Skip to main 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

1

Chunk

Documents are split into smaller pieces for more precise retrieval.
2

Embed

Each chunk is converted to a vector embedding and stored in the database.
3

Search

Queries are embedded and matched against stored vectors to find similar content.
Many vector databases support hybrid search, combining vector similarity with keyword matching. This improves results for queries that benefit from both semantic understanding and exact term matching. Hybrid search works by:
  1. Finding semantically similar content via vector search
  2. Finding keyword matches via full-text search
  3. Combining results using ranked fusion

Supported Databases

Choosing a Database

Async Support

Vector databases with async support enable non-blocking operations for better performance in production. Use ainsert and asearch methods when building async agents.
# Async insert
await knowledge.ainsert(url="https://example.com/docs.pdf")

# Async search
results = await knowledge.asearch(query="How do I configure X?")