Skip to main content
Hybrid search in ChromaDB 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

chroma_db_hybrid_search.py

Usage

1

Set up your virtual environment

2

Install dependencies

3

Set environment variables

4

Run Agent