Skip to main content
This example passes url= to insert_many() and ainsert_many(). Agno v2.7.2 reads the urls argument, so these calls insert no documents. The code fence remains source-exact. Apply the replacement below before running.
distributed_rag_with_reranking.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export your API keys

4

Fix the batch insert arguments

Replace all six url="https://agno-public.s3.amazonaws.com/recipes/ThaiRecipes.pdf" arguments in the saved file with urls=["https://agno-public.s3.amazonaws.com/recipes/ThaiRecipes.pdf"].
5

Run the example

Save the code above as distributed_rag_with_reranking.py, then run:
Full source: cookbook/03_teams/15_distributed_rag/03_distributed_rag_with_reranking.py