How agents search knowledge bases to find relevant information.
When an agent needs information, it searches for relevant chunks rather than loading everything into the prompt. This keeps responses focused and efficient.
Finds content by meaning, not exact words. When you ask “How do I reset my password?”, it finds documents about “changing credentials” even if those exact words don’t appear.
Traditional RAG always searches with the exact user query and injects results into the prompt.Agentic RAG lets the agent decide when to search, reformulate queries, and run follow-up searches if needed.
Traditional RAG
Agentic RAG
# Always searches, always injects resultsresults = knowledge.search(user_query)context = "\n\n".join([d.content for d in results])response = llm.generate(user_query + "\n" + context)
from agno.agent import Agent# Agent decides when to searchagent = Agent( knowledge=knowledge, search_knowledge=True, # Agent calls search_knowledge_base tool when needed)agent.print_response("What's our return policy?")
With Agentic RAG, the agent can:
Skip searching when it already knows the answer
Reformulate queries for better results
Run multiple searches to gather complete information
Test with real queries to validate search quality:
test_queries = [ "What's our vacation policy?", "How do I submit expenses?", "Remote work guidelines",]for query in test_queries: results = knowledge.search(query) print(f"{query} -> {results[0].content[:100]}..." if results else "No results")