Overview
Pinecone is a fully managed vector database designed for high-performance similarity search. It provides ultra-low latency, high availability, and easy scaling without infrastructure management.Setup
Create Pinecone Account
Sign up at Pinecone Console
Create an Index
Create a new index with:
- Index name (e.g.,
flowise-docs) - Dimensions (must match your embedding model, e.g., 1536 for OpenAI)
- Metric (cosine, euclidean, or dotproduct)
Configuration
Required Parameters
Pinecone API key credential
Name of your Pinecone index (must be created beforehand)
Embedding model to convert text to vectors (e.g., OpenAI Embeddings)
Optional Parameters
Documents to upsert into the vector store
Track records to prevent duplication during indexing
Namespace for organizing vectors within an index. Useful for multi-tenancy:
Metadata key for storing the document text content
Filter results by metadata during queries:
Number of most similar results to return
Allow file uploads in chat, automatically scoped to chat session
MMR (Maximal Marginal Relevance)
Search algorithm:
similarity- Standard cosine similaritymmr- Maximize diversity while maintaining relevance
Number of documents to fetch before MMR reranking (only when using MMR)
MMR diversity factor (0 = max diversity, 1 = max relevance)
Usage Examples
Basic Setup
With Namespaces
Metadata Filtering
With MMR for Diversity
With Record Manager
Metadata Filter Syntax
Pinecone supports rich metadata filtering:Best Practices
Index Design
- Create one index per use case
- Use namespaces for multi-tenancy
- Match dimensions to embedding model
- Choose appropriate distance metric
Performance
- Use metadata filtering to reduce search space
- Batch upserts for efficiency
- Monitor query latency
- Use appropriate pod type
Cost Optimization
- Delete old vectors periodically
- Use namespaces instead of multiple indexes
- Right-size your pod type
- Monitor storage usage
Data Management
- Use record manager to avoid duplicates
- Set up backup/export strategy
- Tag vectors with metadata
- Implement soft deletes if needed
Index Configuration Guide
Choosing Dimensions
Dimensions must match your embedding model:| Embedding Model | Dimensions |
|---|---|
| OpenAI text-embedding-ada-002 | 1536 |
| OpenAI text-embedding-3-small | 512 or 1536 |
| OpenAI text-embedding-3-large | 256, 1024, or 3072 |
| Cohere embed-english-v3.0 | 1024 |
| Cohere embed-multilingual-v3.0 | 1024 |
Distance Metrics
- Cosine - Best for most use cases, normalized similarity
- Euclidean - Absolute distance, good for specific domains
- Dot Product - Fast, assumes normalized vectors
Pod Types
- s1 - Storage-optimized (large datasets, lower cost)
- p1 - Performance-optimized (lowest latency)
- p2 - High-performance (very large scale)
Outputs
The Pinecone node provides two outputs:Use as a retriever in chains and agents. Automatically handles similarity search.
Direct vector store access for custom operations like adding/deleting vectors.
Common Issues
Dimension Mismatch
Dimension Mismatch
Error: “Vector dimension does not match index dimension”Solution:
- Ensure embedding model dimensions match index
- Create new index with correct dimensions
- Check embedding configuration
Index Not Found
Index Not Found
Error: “Index ‘name’ not found”Solution:
- Verify index exists in Pinecone console
- Check index name spelling (case-sensitive)
- Ensure index is in ‘Ready’ state
- Wait for index initialization to complete
Namespace Issues
Namespace Issues
Empty results despite having dataSolution:
- Check namespace spelling
- Verify data was inserted into correct namespace
- Try querying without namespace filter
- Use Pinecone console to inspect data
Metadata Filter Not Working
Metadata Filter Not Working
Results ignore metadata filterSolution:
- Ensure metadata was included during upsert
- Check JSON syntax in filter
- Verify metadata key names match
- Test with simpler filter first
Monitoring & Maintenance
In the Pinecone console, monitor:- Vector count - Track total vectors per namespace
- Query latency - p50, p95, p99 percentiles
- Storage usage - Plan capacity
- Request rate - API usage patterns
Scaling Considerations
Pinecone automatically scales, but consider:
- Pod count - Increase for more QPS
- Pod type - Upgrade for better performance
- Replicas - Add for high availability
- Namespaces - Use for logical separation