Skip to main content

title: “ChromaDB with Hybrid Search using Reciprocal Rank Fusion (RRF)” description: “This example demonstrates how to use ChromaDB with hybrid search,.” ---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.
""" )

Create an agent with the hybrid search knowledge base

agent = Agent( name=“Agno Knowledge Agent”, model=OpenAIChat(id=“gpt-5.2”), knowledge=knowledge, instructions=instructions, description=description, )

---------------------------------------------------------------------------

Run Agent

---------------------------------------------------------------------------

if name == “main”:

Load Agno documentation into the knowledge base

asyncio.run( knowledge.ainsert( name=“Agno Documentation”, url=“https://docs.agno.com/llms-full.txt”, ) )

Hybrid search will:

1. Find semantically similar documents (via dense embeddings)

2. Find documents containing query keywords (via FTS)

3. Fuse results using RRF for optimal ranking

agent.print_response(“How do I create an agent with tools?”, markdown=True)