Skip to main content
This example demonstrates how to use ChromaDB with hybrid search, which combines dense vector similarity search (semantic) with full-text search (keyword/lexical) using RRF fusion. Hybrid search is useful when you want to:
  • Combine semantic understanding with exact keyword matching
  • Improve retrieval accuracy for queries with specific terms
  • Handle both conceptual and lexical search needs
The RRF algorithm fuses rankings from both search methods using:

Code

cookbook/08_knowledge/vector_db/chroma_db/chroma_db_hybrid_search.py

Usage

1

Set up your virtual environment

2

Install dependencies

3

Run Agent