CodeQuest101AI Agents & Tool CallingChapter Studio
AI Agents & Tool Calling

7 chapters

Advanced RAG

Chapter 06 / 07

Search when the task needs evidence.

Make retrieval a tool choice, inspect actual returned passages, and keep unsupported claims out of the answer.

A policy search is another observation

An order lookup can tell us when an item arrived. It cannot establish a policy that was never returned. An agent can request a policy search when the task needs knowledge from documents, then continue using the retrieved evidence.

Here, search_policies uses the existing offline RAG experiment's supported examples and real retrieval calculations. Agent choices and answer explanations remain authored simulations. A returned passage can support a citation; the search request or a high ranking alone cannot prove the answer.