HeadlinesBriefing favicon HeadlinesBriefing.com

Agentic RAG: Let the Agent Search

Towards Data Science •
×

Agentic RAG is a minimal OpenAI Agents SDK implementation where retrieval becomes a search‑read‑decide loop. The recipe is simple: chunk, embed, retrieve, then answer. It looks clean on paper, but in real cases similarity search can amasically surface similar wording but not useful chunks, and evidence may rank too low or be split across chunk boundaries. By making retrieval iterative—allowing the model to search, read, decide if it has enough evidence, and search again when needed—we can often eliminate the need for vector embeddings altogether.

For a case study, we built a policy RAG agent over a collection of six synthetic markdown policy documents covering common corporate areas. Using the OpenAI Agents SDK, the agent was configured with three tools: list_docs, search_docs, and read_doc, all controlled by an instruction that emphasizes grounding answers in the policy documents. The agent runs on gpt-5.4 and follows a clear search behavior to find enough relevant evidence before answering.

When asked, “Can I book the timely official conference hotel above the cap in Berlin, and what approval is needed?” the agent correctly answered “yes, with a practical business reason,” citing conference_guidelines.md, travel_policy.md, approval_matrix.md, and policy_updates_2026.md. The trace shows the agent first calling search_docs, then list_docs, then read_doc before producing the final answer. Building a practical agentic RAG solution requires careful tool curation, deciding on raw‑text versus a derived knowledge layer, and balancing freedom with auditability.