Supported Providers
OpenAI
text-embedding-3-small, text-embedding-3-large
Azure OpenAI
OpenAI embeddings on Azure infrastructure
Google Gemini
text-embedding-004 and models-embedding-001
Voyage AI
voyage-3, voyage-3-lite for domain-specific embeddings
Default Provider (OpenAI)
By default, Graphiti uses OpenAI’stext-embedding-3-small:
OpenAI Embeddings
Basic Configuration
Configuration Options
Available Models
- text-embedding-3-small
- text-embedding-3-large
- text-embedding-ada-002
- Dimensions: 1536 (default) or lower
- Best for: General use, cost-effective
- Price: $0.02 per 1M tokens
Custom Dimensions
Reduce dimensions for lower storage costs:Azure OpenAI Embeddings
Use OpenAI embeddings deployed on Azure:Environment Variables
Google Gemini Embeddings
Use Google’s embedding models:Environment Variables
Available Models
text-embedding-004- Latest model, 768 dimensionsmodels/embedding-001- Earlier model, 768 dimensions
Voyage AI Embeddings
Use Voyage AI for specialized domain embeddings:Installation
Configuration
Environment Variables
Available Models
- voyage-3
- voyage-3-lite
- voyage-code-3
- voyage-finance-2
- voyage-law-2
- Dimensions: 1024
- Best for: General-purpose, state-of-the-art quality
- Context: 32K tokens
Custom Embedding Clients
Implement a custom embedder by extendingEmbedderClient:
Embedding Usage
Embeddings are generated automatically for:- Entity Names - For entity similarity search
- Relationship Facts - For semantic fact retrieval
- Community Summaries - For cluster-based search
- Episode Content - For source document search
Batch Embedding Generation
Graphiti batches embedding requests for efficiency:Choosing an Embedding Model
Quality vs Cost
Balance search quality with API costs. Start with
text-embedding-3-small.Dimension Size
Higher dimensions = better quality but more storage. 512-1024 works for most cases.
Domain Specificity
Use domain-specific models (Voyage) for specialized content.
Consistency
Don’t change embedding models after deployment - requires full re-embedding.
Cost Optimization
1
Choose efficient models
Use
text-embedding-3-small or voyage-3-lite for cost savings2
Reduce dimensions
Lower
embedding_dim to reduce storage and API costs3
Batch operations
Use
add_episode_bulk() to generate embeddings in larger batches4
Cache strategy
Consider caching embeddings for frequently used content
Performance Tips
Changing Embedding Models
If you need to switch models:- Export your graph structure and content
- Create a new database
- Configure the new embedding model
- Re-ingest all episodes with the new embedder
Next Steps
Searching
Use embeddings for semantic search
LLM Providers
Configure your LLM provider
Graph Drivers
Choose your graph database