Overview
Chroma is an open-source embedding database designed for AI applications. Perfect for local development with easy deployment to cloud or self-hosted environments.Setup
- Local (In-Memory)
- Local (Persistent)
- Cloud (Chroma Cloud)
No setup required! Chroma runs in-memory by default.
Configuration
Required Parameters
Name of the collection to store/retrieve embeddings
Embedding model to use (e.g., OpenAI Embeddings)
Optional Parameters
Documents to upsert into the collection
URL of Chroma server. Leave empty for in-memory mode:
- Empty = In-memory
http://localhost:8000= Local serverhttps://api.trychroma.com= Chroma Cloud
Chroma API credential (only needed for cloud-hosted instances)
Track indexed documents to prevent duplication
Filter search results by metadata:
Number of results to return
Usage Examples
In-Memory (Development)
Local Persistent
Chroma Cloud
With Metadata Filtering
With Record Manager
Metadata Filter Syntax
Chroma supports WHERE clause filtering:Best Practices
Development
- Use in-memory for quick testing
- Use local server for development
- Small datasets work great in-memory
- Easy to reset and iterate
Production
- Use Chroma Cloud or self-hosted server
- Enable authentication
- Set up backups
- Monitor collection sizes
Performance
- Create indexes on frequently queried metadata
- Use appropriate collection sizes
- Consider sharding for very large datasets
- Batch upserts when possible
Data Management
- Use descriptive collection names
- Tag documents with metadata
- Use record manager to avoid duplicates
- Implement collection lifecycle management
Collection Management
Creating Collections
Collections are created automatically when you first upsert documents.Deleting Collections
Listing Collections
Deployment Options
Docker Compose
Kubernetes
Common Issues
Connection Refused
Connection Refused
Can’t connect to Chroma serverSolution:
- Verify Chroma server is running
- Check URL format:
http://localhost:8000 - Ensure port 8000 is not blocked
- For Docker: Check container is running
Collection Not Found
Collection Not Found
Error accessing collectionSolution:
- Collections are auto-created on first upsert
- Check collection name spelling
- Ensure documents were successfully indexed
- Verify you’re connecting to correct server
In-Memory Data Lost
In-Memory Data Lost
Data disappears after restartSolution:
- In-memory mode doesn’t persist
- Use Chroma server for persistence
- Configure persistent volume
- Consider Chroma Cloud for managed hosting
Authentication Failed
Authentication Failed
Chroma Cloud connection issuesSolution:
- Verify API key is correct
- Check tenant and database names
- Ensure credential is properly configured
- Test with Chroma Cloud console
Chroma vs Other Vector DBs
| Feature | Chroma | Pinecone | Qdrant |
|---|---|---|---|
| Open Source | Yes | No | Yes |
| In-Memory | Yes | No | Yes |
| Managed Cloud | Yes | Yes | Yes |
| Self-Hosted | Yes | No | Yes |
| Best For | Development | Production | Production |
| Ease of Use | Excellent | Very Good | Good |
Outputs
Retriever interface for use in chains and agents
Direct vector store access for custom operations