Chat Flow
Flow Builder
Blocks
Database
Vector Store

Vector Store Integration Block

The Vector Store block enables powerful semantic search and retrieval from vector databases, optimized for seamless integration with Pinecone. It empowers your workflows with AI-driven similarity searches using vector embeddings, ideal for applications like content discovery and recommendations.

Note: Ensure you have a Pinecone account, API key, and configured index ready before setting up the block for efficient data access.

Features

  • Semantic Search: Perform similarity searches using vector embeddings for precise content matching.
  • Pinecone Integration: Leverage native support for Pinecone’s vector database.
  • Namespace Support: Organize vectors into logical namespaces for structured data management.
  • Configurable Results: Customize the number of documents returned in search results.
  • Response Mapping: Map search results to workflow variables for dynamic processing.
  • Real-time Queries: Execute fast, real-time similarity searches.

Configuration

Pinecone Setup

  1. Create Pinecone Account:

  2. Create Index:

    • Set up a vector index in Pinecone with dimensions matching your embedding model.
    • Select an appropriate similarity metric (e.g., cosine, Euclidean, dot product).
  3. Obtain API Credentials:

    • Navigate to API Keys in the Pinecone console.
    • Copy your API key and note your environment (e.g., us-east-1).

Authentication

Configure the following Pinecone credentials in the block:

  • API Key: Your Pinecone API key for authentication.
  • Environment: The Pinecone region hosting your index (e.g., us-east-1).
  • Index Name: The name of the target vector index.

Warning: Verify that your API key has access to the specified index and environment to avoid authentication errors.

Basic Configuration

Index Selection

Select from available Pinecone indexes in your account:

  • Index: Choose the vector index for queries.
  • Namespace: Specify a namespace within the index for organized data access.
  • Query: Enter the text query for similarity searches.
  • Number of Documents: Set the number of results to return (default: 2).

Query Configuration

Query Text: Input the search query to identify similar vectors.

Find documents about machine learning algorithms

Number of Documents:

  • Minimum: 1 document.
  • Default: 2 documents.
  • Maximum: Configurable based on index settings.

Note: Adjust the number of documents to balance result comprehensiveness with query performance.

Use Cases

Document Retrieval

Query: "artificial intelligence applications in healthcare"
Number of Documents: 5
Purpose: Retrieve relevant research papers or articles for analysis

FAQ Search

Query: "how to reset password"
Number of Documents: 3
Purpose: Identify the most relevant FAQ entries for user support

Product Recommendations

Query: "wireless bluetooth headphones"
Number of Documents: 10
Purpose: Discover similar products based on descriptions

Content Discovery

Query: "sustainable energy solutions"
Number of Documents: 7
Purpose: Find related articles or resources for content exploration

Advanced Features

Namespace Organization

Organize vectors into logical namespaces for efficient data management.

// E-commerce namespace structure
Namespaces:
- "products" - Product descriptions and specifications
- "reviews" - Customer reviews and feedback
- "support" - FAQ and support documentation
 
// Content management namespace structure
Namespaces:
- "articles" - Blog posts and articles
- "documentation" - Technical documentation
- "marketing" - Marketing materials

Query Optimization

Best Practices for Queries:

  • Craft descriptive, specific queries to improve result relevance.
  • Include key terms that reflect user intent.
  • Test variations to refine search accuracy.
  • Consider context to enhance query precision.

Example Query Variations:

Generic: "machine learning"
Specific: "supervised machine learning classification algorithms"
Contextual: "machine learning for image recognition in medical diagnosis"

Response Processing

Vector store responses include structured data for flexible processing.

// Example response structure from a Pinecone query
{
  "matches": [
    {
      "id": "doc_001",
      "score": 0.92,
      "metadata": {
        "title": "Introduction to Neural Networks",
        "category": "AI/ML",
        "author": "Dr. Smith",
        "created_date": "2025-01-15"
      },
      "values": [0.1, 0.2, 0.3, ...] // Vector embeddings
    },
    {
      "id": "doc_002", 
      "score": 0.87,
      "metadata": {
        "title": "Deep Learning Fundamentals",
        "category": "AI/ML",
        "author": "Prof. Johnson",
        "created_date": "2025-01-10"
      },
      "values": [0.4, 0.5, 0.6, ...] // Vector embeddings
    }
  ],
  "namespace": "research_papers"
}

Response Mapping

Transform search results into workflow variables for seamless integration.

Basic Mapping

// Map the top result's metadata to variables
matches[0].metadata.title β†’ {{topResultTitle}}
matches[0].score β†’ {{topResultScore}}
matches[0].id β†’ {{topResultId}}
 
// Map multiple results to arrays
matches[*].metadata.title β†’ {{allTitles}}
matches[*].score β†’ {{allScores}}

Advanced Mapping

// Filter results by similarity score threshold
matches[score > 0.8].metadata.title β†’ {{highConfidenceResults}}
 
// Extract specific metadata fields
matches[*].metadata.category β†’ {{resultCategories}}
matches[*].metadata.author β†’ {{resultAuthors}}
 
// Create a summary object
{
  "total_results": matches.length,
  "best_match": matches[0].metadata.title,
  "confidence": matches[0].score,
  "categories": unique(matches[*].metadata.category)
} β†’ {{searchSummary}}

Integration Patterns

Retrieval-Augmented Generation (RAG)

1. Vector Store Query β†’ Retrieve relevant documents
2. Content Extraction β†’ Extract document text
3. AI Model β†’ Generate response using retrieved context
4. Response Delivery β†’ Deliver augmented answer

Semantic Search Pipeline

1. User Query β†’ Capture search input
2. Vector Store β†’ Identify similar content
3. Ranking/Filtering β†’ Apply additional filters
4. Result Formatting β†’ Prepare results for display
5. User Interface β†’ Present results to users

Content Recommendation

1. User Profile β†’ Analyze user preferences
2. Vector Store β†’ Find similar content
3. Personalization β†’ Apply user-specific filters
4. Recommendation Engine β†’ Rank and select items
5. Delivery β†’ Present personalized suggestions

Performance Optimization

Query Optimization

  • Specific Queries: Use detailed queries to enhance relevance.
  • Keyword Selection: Include contextually relevant keywords.
  • Query Length: Balance brevity with descriptive detail.

Result Management

  • Result Limits: Set reasonable document counts for optimal speed.
  • Score Thresholds: Filter results by minimum similarity scores.
  • Metadata Filtering: Use namespaces and metadata for targeted searches.

Index Management

  • Namespace Strategy: Organize data into meaningful namespaces.
  • Regular Updates: Keep vector embeddings current with source data.
  • Monitoring: Track query performance and result accuracy.

Error Handling

Common issues and their resolutions:

Connection Errors

"Unable to connect to Pinecone"

  • Verify the API key is valid and active.
  • Confirm the environment/region matches your index.
  • Check network connectivity to Pinecone’s servers.

Index Errors

"Index not found"

  • Ensure the index name is correct in the configuration.
  • Verify the index exists in the Pinecone console.
  • Confirm the API key has access to the index.

Query Errors

"No results found"

  • Try broader or alternative query terms.
  • Ensure the namespace contains relevant vectors.
  • Verify compatibility with the embedding model.

Performance Issues

"Slow query response"

  • Reduce the number of requested documents.
  • Check Pinecone’s service status for outages.
  • Optimize query specificity and complexity.

Best Practices

Query Design

  • Clear Intent: Craft queries that explicitly convey search goals.
  • Context Inclusion: Incorporate relevant context for better matches.
  • Iterative Refinement: Test and adjust queries based on result quality.

Data Organization

  • Namespace Strategy: Use descriptive namespace names for clarity.
  • Metadata Quality: Include rich metadata to enhance searchability.
  • Regular Maintenance: Update vector data to reflect current content.

Performance

  • Caching: Cache frequent queries to improve response times.
  • Batch Processing: Group queries for efficient execution.
  • Monitoring: Analyze query patterns to optimize performance.

Security

  • API Key Management: Securely store and rotate API keys.
  • Access Control: Restrict access to authorized users and roles.
  • Data Privacy: Handle sensitive data according to compliance requirements.

Node Display

The Vector Store node provides visual feedback:

  • Configuration Status: Displays "Configure Vector Store..." if not set up.
  • Index Name: Shows the active Pinecone index (blue tag).
  • Namespace: Indicates the selected namespace (green tag).
  • Query: Displays the search query text (orange tag).
  • Document Count: Shows the number of documents to retrieve (purple tag).

Troubleshooting

Setup Issues

"No indexes available"

  • Create an index in the Pinecone console.
  • Verify API credentials and environment settings.
  • Ensure your account has an active subscription.

"Authentication failed"

  • Check the API key format and validity.
  • Confirm the environment matches your index region.
  • Verify subscription status in Pinecone.

Query Issues

"Empty results"

  • Confirm the namespace contains relevant data.
  • Experiment with simpler or broader queries.
  • Check embedding model compatibility.

"Low similarity scores"

  • Refine query specificity and keyword selection.
  • Verify data quality in the vector index.
  • Test alternative query formulations.

Performance Issues

"Timeout errors"

  • Reduce the number of requested documents.
  • Monitor Pinecone’s service status for issues.
  • Simplify query structure for faster execution.

"Rate limiting"

  • Implement retry logic for rate-limited requests.
  • Review your Pinecone plan’s request limits.
  • Batch requests to optimize API usage.

Warning: Test the Vector Store block in the Indite editor’s preview mode to validate connectivity and query results before deployment.

Example Workflows

Knowledge Base Search

1. User Question β†’ Capture user query
2. Vector Store β†’ Search knowledge base
3. Result Processing β†’ Extract relevant articles
4. Response Generation β†’ Create tailored answer
5. User Response β†’ Deliver information

Document Classification

1. Document Input β†’ Receive new document
2. Vector Store β†’ Find similar documents
3. Category Analysis β†’ Determine document type
4. Classification β†’ Assign appropriate category
5. Storage β†’ Save with classification

Recommendation System

1. User Behavior β†’ Track user interactions
2. Profile Building β†’ Create user preference profile
3. Vector Store β†’ Find similar content
4. Ranking β†’ Score and rank recommendations
5. Delivery β†’ Present personalized suggestions
Indite Documentation v1.4.0
PrivacyTermsSupport