Agentic RAG: When Retrieval Needs to Think Before It Answers

· Source: LLM on Medium · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Software Development & Engineering · Depth: Advanced, quick

Summary

Agentic RAG addresses the limitations of standard, single-shot Retrieval Augmented Generation (RAG) pipelines that struggle with complex questions requiring multiple facts not found in a single document. It enables a Large Language Model (LLM) to "think" and perform iterative retrieval. Two primary patterns are ReAct, which interleaves reasoning (Thought), action (retrieval with new queries), and observation, and Plan-and-Execute, which pre-defines a sequence of retrieval steps. While effective for intricate queries, each additional reasoning iteration in agentic RAG adds latency, typically 300 to 1,500 milliseconds, and a few cents per LLM call (e.g., GPT-4o pricing). Therefore, agentic RAG should be a deliberate choice for specific question types, not a default, especially when basic RAG with good chunking and hybrid search already achieves a faithfulness score above 0.85.

Key takeaway

For AI Engineers designing advanced RAG systems, prioritize maximizing basic retrieval quality through better chunking and hybrid search before considering agentic patterns. Implement agentic RAG, such as ReAct for open-ended questions or Plan-and-Execute for structured tasks, only for complex queries where single-shot retrieval demonstrably fails. Be mindful that each agentic iteration adds significant latency (300-1,500ms) and cost, making it a specialized solution rather than a universal default for systems with strict latency budgets or high baseline performance.

Key insights

Agentic RAG enables LLMs to reason and retrieve iteratively, addressing complex queries single-shot RAG cannot.

Principles

Method

ReAct involves alternating Thought, Action (retrieval with a new query), and Observation steps, where each observation informs the next thought. Plan-and-Execute defines a full sequence of retrieval steps upfront.

In practice

Topics

Best for: Machine Learning Engineer, AI Engineer, AI Architect

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by LLM on Medium.