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
| Term | What It Means |
|---|---|
| Index | Your searchable database (like a folder for related content) |
| Namespace | A way to organize content within an index (like subfolders) |
| Vector | The numerical representation of your text |
| Metadata | Additional info attached to each record (category, date, source) |
| Embedding | The process of converting text to vectors |
Setup Guide
Step 1: Create a Pinecone Account
- Go to pinecone.io and sign up
- Create a new project
- Choose your plan (free tier available)
- Get your API key from the dashboard
Step 2: Create an Index
- In Pinecone dashboard, click "Create Index"
- Name your index (e.g., "knowledge-base")
- Choose dimensions (must match your embedding model - typically 1536 for OpenAI)
- Select your cloud region
- Click Create
Step 3: Configure the Block
Connection Settings:
-
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
-
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
-
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
-
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
-
Number of Documents: Set how many results to return
- Default: 2
- Minimum: 1
- Returns the top K most similar documents
-
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:
-
Query Input: You provide a natural language search query
- Example: "What is our vacation policy?"
- Can include workflow variables:
{{user_question}}
-
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
-
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
-
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)
-
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].textto variabletop_answer - Map field
matches[0].scoreto variableconfidence_score
- Map field
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
- Start with clear queries - Use specific, well-formed questions for better results
- Adjust document count - Increase "Number of Documents" for broader results, decrease for precision
- Use namespaces wisely - Organize content by category, tenant, or topic in different namespaces
- Map useful fields - Use "Save answer" to extract scores, metadata, and content for your workflow
- Test query variations - Try different phrasings of questions to see what works best
- Check relevance scores - Scores close to 1.0 indicate high confidence matches
- Leverage metadata - Store source, date, category info to filter and organize results
- Execute and test - Use the execution result preview to verify your queries return expected data
Troubleshooting
| Problem | Likely Cause | Solution |
|---|---|---|
| No indexes shown | Wrong API key or no indexes created | Verify API key and create index in Pinecone dashboard |
| No results | Empty index or query mismatch | Verify content is indexed, try broader queries |
| Low relevance scores | Query doesn't match indexed content | Rephrase query or check if content covers the topic |
| Credentials error | Invalid or expired API key | Update credentials with valid Pinecone API key |
| Slow responses | Large index or high query volume | Check 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