Upstash Vector Store

Node Details

  • Name: Upstash_VectorStores
  • Type: Upstash
  • Version: 2.0
  • Category: Vector Stores

Base Classes

  • Upstash
  • VectorStoreRetriever
  • BaseRetriever

Credentials

  • Type: upstashVectorApi
  • Required Fields:
    • UPSTASH_VECTOR_REST_URL
    • UPSTASH_VECTOR_REST_TOKEN

Input Parameters

  1. Document (optional, list)
    • Type: Document
    • Description: List of documents to be processed
  2. Embeddings (required)
    • Type: Embeddings
    • Description: Embedding model to use
  3. Record Manager (optional)
    • Type: RecordManager
    • Description: Keeps track of records to prevent duplication
  4. File Upload (optional)
    • Type: boolean
    • Description: Allows file upload on the chat
  5. Upstash Metadata Filter (optional)
    • Type: string
    • Description: Filter for Upstash metadata
  6. Top K (optional)
    • Type: number
    • Description: Number of top results to fetch (default: 4)

Outputs

  1. Upstash Retriever
    • Type: retriever
    • Base Classes: [Upstash, VectorStoreRetriever, BaseRetriever]
  2. Upstash Vector Store
    • Type: vectorStore
    • Base Classes: [Upstash, UpstashVectorStore base classes]

Functionality

The node provides two main functionalities:
  1. Upsert:
    • Processes input documents
    • Creates or updates embeddings in the Upstash vector store
    • Handles file uploads and chat IDs if enabled
    • Uses RecordManager for deduplication if provided
  2. Delete:
    • Removes specified documents from the vector store
    • Supports deletion using RecordManager or direct ID-based deletion
  3. Initialization:
    • Sets up the Upstash vector store with provided credentials
    • Applies metadata filters and chat ID filters if specified
    • Creates a retriever or vector store based on the configuration

Use Cases

  • Storing and retrieving document embeddings for similarity search
  • Managing document collections with metadata filtering
  • Integrating file upload capabilities in chat applications
  • Implementing efficient document retrieval systems

Notes

  • The node supports both standalone usage and integration with a RecordManager for more advanced document tracking.
  • File upload feature can be enabled to associate documents with specific chat sessions.
  • The node uses the UpstashVectorStore from the LangChain library for vector operations.