Skip to main content

Vector Store Reader

Enhanced semantic search across text and image content in vector stores

What is Vector Store Reader?

The Vector Store Reader is an advanced semantic search node that retrieves relevant content from vector databases using both text and image queries. It supports multiple vector store providers (Postgres, Pinecone, OpenSearch) and offers image search capabilities alongside traditional text-based semantic search.

How to use it?

To effectively retrieve relevant content from your vector store, follow these steps:

  1. Configure Search Type:

    • Text Search: Traditional semantic search using text queries and text embeddings
    • Image Search: Visual similarity search using image queries and image embeddings
  2. Connect Vector Store:

    • Postgres: Connect configured PostgreSQL database with vector extensions
    • Pinecone: Connect Pinecone vector database instance
    • OpenSearch: Connect OpenSearch cluster with vector search capabilities
  3. Set Storage Configuration:

    • For Pinecone/OpenSearch: Specify Index Name (default: "documents")
    • For Postgres: Specify Table Name (default: "embeddings")
    • Ensure names match those used in your Vector Store Writer
  4. Configure Search Parameters:

    • Number of Results: Set how many similar items to retrieve (minimum: 1)
    • Higher numbers provide more comprehensive results but may include less relevant items
  5. Provide Search Input:

    • For Text Search: Connect text input containing your search query
    • For Image Search: Connect image file input for visual similarity search
  6. Connect Embedder:

    • Text Embedder: Required for text search to convert queries to vectors
    • Image Embedder: Required for image search to convert images to vectors
    • Embedder must match the one used when storing content
  7. Process Results:

    • JSON Output: Structured results with metadata, scores, and references
    • Text Output: Concatenated text content from retrieved documents

Example of usage

Objective: Create a hybrid search system that can find relevant content using both text queries and image uploads.

Text Search Setup:

  1. Search Configuration: Select "Text" as Search Type
  2. Vector Store: Connect PostgreSQL with pgvector extension
  3. Query Input: Connect user's text query ("sustainable architecture")
  4. Text Embedder: Use OpenAI embeddings (same as used for storage)
  5. Results: Retrieve top 5 most relevant architectural documents

Image Search Setup:

  1. Search Configuration: Select "Image" as Search Type
  2. Vector Store: Connect same PostgreSQL database
  3. Image Input: Connect uploaded image file (architecture photo)
  4. Image Embedder: Use CLIP or similar vision model for embeddings
  5. Results: Find visually similar architectural images and descriptions

Workflow Benefits:

  • Support multiple search modalities in one system
  • Consistent vector store interface across providers
  • Flexible output formats for different use cases
  • High-quality semantic matching for both text and images

Additional information

Search Type Comparison:

Text Search Features:

  • Natural language query understanding
  • Semantic similarity beyond keyword matching
  • Support for complex, descriptive queries
  • Context-aware content retrieval

Image Search Features:

  • Visual similarity detection
  • Style and composition matching
  • Object and scene recognition

Vector Store Compatibility:

Postgres with pgvector:

  • Open-source vector database extension
  • ACID compliance for data integrity
  • Scalable for medium to large datasets
  • SQL-compatible with existing applications

Performance Optimization:

Best Practices:

  • Use consistent embedder models between writing and reading
  • Optimize number of results based on use case requirements
  • Monitor vector store performance and indexing status

Output Format Selection:

  • Use JSON output for applications requiring metadata and scores
  • Use Text output for simple content display or LLM processing
  • Consider downstream processing requirements when choosing format

Common Use Cases:

  • Document search and knowledge management
  • Visual content discovery and recommendation
  • Content analysis and similarity detection
  • Research and information retrieval systems