Agentic AI · Intermediate level

Intermediate level · Module 8: Retrieval-Augmented Generation for Agents · Lesson 2 of 3

Agentic Retrieval

Learners give the agent retrieval as a tool, let it rewrite queries and search more than once, and stop when evidence is sufficient or the search budget is used.

In this lesson you will

  • Expose retrieval as an agent tool
  • Implement query rewriting and multi-step retrieval with limits

Key concepts

retrieval toolquery rewritingmulti-hop questionsevidence sufficiency checksearch budget

The lesson

In agentic retrieval, the agent decides what to search for: it can rewrite a vague question into precise queries, search several times for different parts of a question, and check whether the evidence is enough before answering.

Limit the number of searches per task and require the agent to state what evidence is still missing. If it cannot find sufficient evidence within the budget, it reports that rather than guessing.

Compare agentic retrieval with a single fixed search on the evaluation set. It often helps on multi-part questions but costs more calls.

Step by step

  1. Wrap the index search as a tool returning passages with IDs.
  2. Allow up to three searches per task with query rewriting.
  3. Add an evidence-sufficiency check before drafting.
  4. Compare with single-search on ten multi-part questions.

Practice activity

Implement and evaluate agentic retrieval for the project.

Expected result: Better answers on multi-part questions within a fixed search budget.

Check your understanding

  1. What does query rewriting do?

    Show answer

    It turns a vague question into precise search queries.

  2. What should the agent do if evidence is insufficient within the budget?

    Show answer

    Report what is missing instead of guessing.

Further learning

Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.