{
  "id": 21401320,
  "title": "Agentic RAG: grade the search, rewrite, retry with a cap",
  "url": "https://urgent.news/2026/11/23/agentic-rag-grade-the-search-rewrite-retry-with-a-cap",
  "topic": "ai",
  "section": "AI",
  "published": "2026-11-23T13:40:05.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/systemdesignsimple/agentic-rag-grade-the-search-rewrite-retry-with-a-cap-4ne3"
  },
  "original_language": "en",
  "account": "Agentic RAG (Retrieval-Augmented Generation) is a design that allows an agent to decide when and how to retrieve information while preparing an answer. The tested design comprises three components: a grader, a rewriter, and a cap. The grader reads the question and top results, answering yes or no. The rewriter composes a new query using technical document language. The cap limits the loop to N searches, whether found or not. The grader only decides whether to continue the process. The CRAG paper (Yan et al., January 2024) introduces a lightweight evaluator that scores retrieved documents, triggering different retrieval actions based on its confidence, such as web search. Self-RAG (Asai et al., October 2023) trains one model to retrieve on demand and critique passages using reflection tokens. Anthropic's engineering post (June 13, 2025) describes research subagents evaluating quality, identifying gaps, and refining their next query after tool results. The simulation measured the effectiveness of this agentic RAG design using 200 short made-up tech pages, including answer pages, near misses, and filler pages. It posed 40 questions, with 20 in the page's own words and 20 using everyday words the page didn't use. The plain BM25 search found the answer for 20 of 40 questions, while the agentic RAG with a cap of 2 searches found 32, and a cap of 4 found 38. Each additional round cost approximately 1.2 modeled seconds and a few hundred tokens, and the fourth round did not rescue anything. The everyday-worded questions were the most challenging, as BM25 only matched words, so the useful number was how many of these questions the loop could recover. The cap-4 run demonstrated that round-by-round costs increased with each retry, with round 4 finding nothing while costing 593 tokens. The whole loop used 15,843 tokens, with 13% allocated to the two questions that were never found. The simulation concluded that the number of retries an agent should make should be determined based on logs, with the third search still finding 6 of the 8 remaining questions, and the fourth finding none.",
  "summary": "Agentic RAG lets an agent decide when and how to retrieve information while preparing an answer. We tested one design: grade the retrieved results, rewrite a failed query and retry within a cap. In our simulation run on 2026-11-15, one search found the right page for 20 of 40 questions, a cap of 2 searches found 32 and a cap of 4 found 38. Every extra round cost about 1.2 modeled seconds and a…",
  "key_points": [
    "Agentic RAG design includes grader, rewriter, and cap components",
    "Grader decides whether to continue process after retrieving info",
    "Agentic RAG with cap of 4 searches found 38 out of 40 questions"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}