Vector Databases
Store embeddings and search for similar content.
Vector databases store content as embeddings and enable similarity search. When an agent searches the knowledge base, the query is converted to an embedding and matched against stored vectors to find relevant content.
How It Works
Chunk
Documents are split into smaller pieces for more precise retrieval.
Embed
Each chunk is converted to a vector embedding and stored in the database.
Search
Queries are embedded and matched against stored vectors to find similar content.
Hybrid Search
Many vector databases support a hybrid search mode that combines vector similarity with a provider-specific keyword or lexical ranking.
Hybrid search works by:
- Finding semantically similar content via vector search
- Finding lexical matches with the database's keyword-search implementation
- Combining lexical and vector signals using the selected database’s scoring or rank-fusion algorithm
Supported Databases
Azure Cosmos DB
MongoDB vCore vector search
Cassandra
Distributed database with vector search
Chroma
Open-source embedding database
ClickHouse
Analytical database with vector search
Couchbase
NoSQL with vector search
LanceDB
Local, serverless, hybrid search
LangChain
Use any LangChain vector store
LightRAG
Graph-based RAG
LlamaIndex
Search existing LlamaIndex indexes
Milvus
Scalable vector database
MongoDB
Atlas vector search
PgVector
PostgreSQL extension, hybrid search
Pinecone
Managed vector database
Qdrant
High-performance vector search
Redis
In-memory with vector search
Valkey
In-memory with vector search
SingleStore
Real-time analytics with vectors
SurrealDB
Multi-model database
Upstash
Serverless vector search
Weaviate
Vector search with modules
Choosing a Database
Local Development
LanceDB or ChromaDB for zero-setup local development
Production
PgVector if you already use PostgreSQL
Managed Service
Pinecone or Weaviate Cloud for vendor-operated infrastructure
Distributed Deployment
Qdrant or Milvus for a separately operated vector service
Async Support
Vector databases with async support let an async application await ingestion and search I/O. Use ainsert and asearch inside an existing event loop.
# Async insert
await knowledge.ainsert(url="https://example.com/docs.pdf")
# Async search
results = await knowledge.asearch(query="How do I configure X?")