Back to Agno

Building Blocks

cookbook/07_knowledge/02_building_blocks/README.md

2.6.41.2 KB
Original Source

Building Blocks

Core components you can configure to customize knowledge behavior.

Prerequisites

  1. Run Qdrant: ./cookbook/scripts/run_qdrant.sh
  2. Set OPENAI_API_KEY environment variable
  3. For reranking: set COHERE_API_KEY environment variable

Examples

FileWhat It Shows
01_chunking_strategies.pyAll chunking strategies compared on the same document
02_hybrid_search.pyVector, keyword, and hybrid search side by side
03_reranking.pyTwo-stage retrieval with Cohere reranking
04_filtering.pyDict filters, FilterExpr, and metadata tagging
05_agentic_filtering.pyAgent-driven dynamic filter selection
06_embedders.pyComparing OpenAI and Ollama embedders

Running

bash
.venvs/demo/bin/python cookbook/07_knowledge/02_building_blocks/01_chunking_strategies.py

Further Reading