Chat Flow
Flow Builder
Blocks
Database
Pinecone

Pinecone Block

What it does: Connect to Pinecone's managed vector database for enterprise-grade semantic search and AI knowledge retrieval.

🌲

In simple terms: Pinecone is like a super-powered search engine for your data that understands meaning. When your document collection grows large, Pinecone handles the heavy lifting - managing millions of records while keeping searches lightning fast.

When to Use This

Use Pinecone when you need:

  • ✅ Production-ready vector search at scale
  • ✅ Handle millions of documents efficiently
  • ✅ Enterprise reliability and uptime
  • ✅ Managed infrastructure (no servers to maintain)
  • ✅ Fast, consistent search performance

Example: Power an AI assistant that searches through your company's entire documentation library to answer employee questions instantly.

Key Features

  • Managed Service: No infrastructure to maintain
  • Massive Scale: Handle millions to billions of vectors
  • Fast Queries: Sub-second search responses
  • High Availability: Built-in redundancy and uptime
  • Metadata Filtering: Combine semantic search with traditional filters

Pinecone Concepts Explained

TermWhat It Means
IndexYour searchable database (like a folder for related content)
NamespaceA way to organize content within an index (like subfolders)
VectorThe numerical representation of your text
MetadataAdditional info attached to each record (category, date, source)
EmbeddingThe process of converting text to vectors

Setup Guide

Step 1: Create a Pinecone Account

  1. Go to pinecone.io and sign up
  2. Create a new project
  3. Choose your plan (free tier available)
  4. Get your API key from the dashboard

Step 2: Create an Index

  1. In Pinecone dashboard, click "Create Index"
  2. Name your index (e.g., "knowledge-base")
  3. Choose dimensions (must match your embedding model - typically 1536 for OpenAI)
  4. Select your cloud region
  5. Click Create

Step 3: Configure the Block

Connection Settings:

  1. Credentials: Select your Pinecone credentials from the dropdown or create new ones

    • API Key: Your Pinecone API key
    • The system will automatically fetch your available indexes
  2. Index: Select the index you want to query from the dropdown

    • Shows all indexes available in your Pinecone account
    • Automatically loads when credentials are selected
  3. Store Name: Select the namespace to search within

    • Namespaces help organize content within an index
    • Shows all available namespaces for the selected index
    • Optional: can search across all namespaces if not specified
  4. Query: Enter the search query

    • Natural language text to search for
    • Can use workflow variables (e.g., {{user_question}})
    • Will be converted to embeddings automatically
  5. Number of Documents: Set how many results to return

    • Default: 2
    • Minimum: 1
    • Returns the top K most similar documents
  6. Save answer: Map response fields to workflow variables

    • Add entries to store specific fields from results
    • Access matched documents and metadata in your workflow

Common Use Cases

Enterprise Knowledge Base

Store your company's documentation, policies, and procedures. Let employees search naturally - "What's our vacation policy?" - and get relevant results instantly.

Customer Support AI

Index all your help articles, FAQs, and product documentation. Your AI assistant can find the perfect answer for any customer question.

Document Similarity

Find related documents, contracts, or content. Upload a document and find others with similar topics or themes.

Product Search

Create semantic product search that understands what customers mean, not just what they type. "Comfortable shoes for walking" finds the right products.

Research and Discovery

Index research papers, reports, or articles. Discover related work based on concepts, not just keywords.

How It Works

The Pinecone block performs semantic search to find relevant content:

  1. Query Input: You provide a natural language search query

    • Example: "What is our vacation policy?"
    • Can include workflow variables: {{user_question}}
  2. Embedding Generation: Your query is automatically converted to a vector (embedding)

    • The system uses the same embedding model as your indexed content
    • Captures the semantic meaning of your query
  3. Similarity Search: Pinecone finds the most similar vectors in your index

    • Compares your query vector against all indexed content
    • Uses advanced algorithms for fast, accurate matching
  4. Results Return: Get the top matching documents with relevance scores

    • Number of results based on your "Number of Documents" setting
    • Each result includes the matched content and metadata
    • Scores indicate how closely each result matches your query (0 to 1)
  5. Variable Mapping: Store results in workflow variables

    • Use response mapping to extract specific fields
    • Access matched content in subsequent workflow steps

Example Configuration

Searching Company Knowledge Base:

  • Credentials: Corporate Pinecone Account
  • Index: company-knowledge-base
  • Store Name: hr-policies
  • Query: {{employee_question}}
  • Number of Documents: 3
  • Save answer:
    • Map field matches[0].text to variable top_answer
    • Map field matches[0].score to variable confidence_score

What You Get Back

After querying Pinecone, you receive:

  • Matches: Array of relevant content found
  • Scores: Relevance score for each match (0 to 1, higher is better)
  • Metadata: Any additional info stored with each vector (source, category, date, etc.)
  • IDs: Unique identifiers for each result
  • Text/Content: The actual content of matched documents

Example Response Structure:

{
  "matches": [
    {
      "id": "doc-123",
      "score": 0.92,
      "metadata": {
        "source": "employee-handbook.pdf",
        "category": "HR",
        "page": 15
      },
      "text": "Employees receive 15 days of vacation..."
    },
    {
      "id": "doc-456",
      "score": 0.87,
      "metadata": {
        "source": "benefits-guide.pdf",
        "category": "HR",
        "page": 8
      },
      "text": "Vacation days can be used..."
    }
  ]
}

Practical Examples

Example 1: Customer Support AI

Configuration:

  • Credentials: Support Team Pinecone
  • Index: help-articles
  • Store Name: product-faqs
  • Query: {{customer_message}}
  • Number of Documents: 5

Use Case: When a customer asks a question, search your help articles and return the 5 most relevant answers.

Example 2: Document Similarity

Configuration:

  • Credentials: Document Analysis
  • Index: contracts-database
  • Store Name: legal-contracts
  • Query: {{contract_summary}}
  • Number of Documents: 10

Use Case: Find contracts similar to a given contract summary, returning top 10 matches.

Example 3: Semantic Product Search

Configuration:

  • Credentials: E-commerce Store
  • Index: product-catalog
  • Store Name: footwear
  • Query: comfortable walking shoes for long distances
  • Number of Documents: 20

Use Case: Search products by natural language description, not just keywords.

Example 4: Research Paper Discovery

Configuration:

  • Credentials: Research Team
  • Index: academic-papers
  • Store Name: machine-learning
  • Query: transformer architecture improvements
  • Number of Documents: 15

Use Case: Find relevant research papers based on topic descriptions.

Tips for Success

  1. Start with clear queries - Use specific, well-formed questions for better results
  2. Adjust document count - Increase "Number of Documents" for broader results, decrease for precision
  3. Use namespaces wisely - Organize content by category, tenant, or topic in different namespaces
  4. Map useful fields - Use "Save answer" to extract scores, metadata, and content for your workflow
  5. Test query variations - Try different phrasings of questions to see what works best
  6. Check relevance scores - Scores close to 1.0 indicate high confidence matches
  7. Leverage metadata - Store source, date, category info to filter and organize results
  8. Execute and test - Use the execution result preview to verify your queries return expected data

Troubleshooting

ProblemLikely CauseSolution
No indexes shownWrong API key or no indexes createdVerify API key and create index in Pinecone dashboard
No resultsEmpty index or query mismatchVerify content is indexed, try broader queries
Low relevance scoresQuery doesn't match indexed contentRephrase query or check if content covers the topic
Credentials errorInvalid or expired API keyUpdate credentials with valid Pinecone API key
Slow responsesLarge index or high query volumeCheck Pinecone dashboard for performance metrics

Best Practices

  • Write clear queries - Natural language questions work best (e.g., "How do I reset my password?")
  • Use appropriate document counts - 3-5 for focused answers, 10-20 for comprehensive searches
  • Organize with namespaces - Separate different content types or customers for better isolation
  • Test with execution - Run single block execution to preview results before deploying
  • Map response fields - Extract specific data points (text, scores, metadata) to workflow variables
  • Monitor performance - Check Pinecone dashboard for query latency and success rates
Indite Documentation v1.4.0
PrivacyTermsSupport