Agentic RAG: Chunking
by krishna
Classic RAG retrieves once and hopes for the best. Agentic RAG lets the model plan, choose tools, check its own evidence, and try again. This post walks through why that matters and how to design it for production.
The problem: one-shot retrieval breaks on real questions
A standard RAG pipeline embeds the question, pulls the top-k chunks, and generates an answer. That works for simple lookups. It fails when the question is messy or the answer lives in more than one place.
- Multi-hop questions. Which contracts renewed after the pricing change, and what changed? needs several retrievals, each depending on the last.
- Ambiguous or underspecified queries. A single embedding of a vague question retrieves vague context.
- Mixed sources. The answer may sit in a vector store, a SQL table, and a live API. Top-k over one index cannot reach all three.
- No self-check. If retrieval returns weak or irrelevant chunks, the model still answers, confidently and wrongly.
Core idea: treat retrieval as a decision loop rather than a pipeline step. The system plans, retrieves, grades what it found, and either answers or tries again.
System design: the pipeline, step by step

The first two stages are the same as classic RAG and run offline. The rest is where the agent lives.
01. Chunking: Split documents into small, searchable pieces before indexing. Respect headings and tables, and add overlap so ideas are not cut in half.
Long document --> Split with overlap --> Small chunks
02. Embedding & Indexing: Turn each chunk into a vector and store it with metadata (source, date, ACL). Also keep a keyword index so exact terms like IDs and error codes still match.
Chunks --> Embedding model --> Vector + keyword index
03. Query Planning: The agent reads the question and decides what to do: answer directly, rewrite it, break it into sub-questions, or pick a source.
User question --> Planner / router --> Sub-queries
04. Tool-Based Retrieval: Each sub-query goes to the best tool: hybrid vector search, a SQL query, a web or internal API. Merge results, then rerank to keep the best few.
Vector search, SQL, APIs --> Rerank
05. Grade & Reflect: The agent judges whether the evidence is relevant and sufficient. If not, it rewrites the query or switches tools and loops, within a step budget.
Evidence --> Enough --> No: rewrite and retry
06. Grounded Generation: Write the answer only from the retrieved evidence, with citations. If the evidence is thin, say so instead of guessing.
Top evidence –> LLM –> Cited answer
Classic RAG vs. Agentic RAG
| Dimension | Classic RAG | Agentic RAG |
|---|---|---|
| Retrieval | Single pass, top-k | Iterative, planned, multi-tool |
| Query handling | Embedded as written | Rewritten, decomposed, routed |
| Quality control | None | Evidence grading and retry |
| Latency and cost | Low, predictable | Higher, variable (cap it) |
| Best for | FAQs, simple lookup | Research, analytics, multi-source questions |
Key takeaways
- Retrieval is a decision, not a step. Let the model plan and choose sources instead of always searching the same index.
- Grade before you generate. A relevance check on retrieved evidence is the cheapest way to cut hallucinations.
- Foundations still decide quality. Good chunking, hybrid search, and reranking matter more than any agent loop on top of them.
- Autonomy needs guardrails. Budgets, permissions, and tracing keep latency, cost, and risk under control.
- Use it where it pays off. Start with classic RAG, and add the agent loop for questions that need multiple hops or sources.
Next in the series: Chunking and Embedding Models
Classic RAG retrieves once and hopes for the best. Agentic RAG lets the model plan, choose tools, check its own evidence, and try again. This post walks through why that matters and how to design it for production. The problem: one-shot retrieval breaks on real questions A standard RAG pipeline embeds the question, pulls the…
Recent Comments
Archives
- December 2026
- November 2026
- October 2026
- September 2026
- August 2026
- June 2026
- May 2026
- April 2026
- February 2026
- January 2026
- November 2025
- October 2025
- September 2025
- August 2025
- July 2025
- June 2025
- May 2025
- April 2025
- March 2025
- November 2024
- October 2024
- September 2024
- August 2024
- July 2024
- June 2024
- May 2024
- April 2024
- March 2024
- February 2024
- January 2024
- December 2023
- November 2023
- February 2018
- February 2012
- January 2012
- December 2011
- October 2011
- August 2011
- July 2011
- May 2011
- January 2011
- November 2010
- October 2010
- September 2010
- July 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- August 2008
- July 2008
- June 2008
- December 2007
- April 2007
- January 2007
Categories
- Access Denied
- Agentic Design Patterns
- AgenticAI
- AIEngineering
- Artificial Intelligence
- AWS
- Azure
- Certification
- CKA
- CKAD
- Code
- Curious Shorts
- Data Science
- DevOps or DevSecOps
- DS-ML-AI
- Errors
- GCP
- GenAI
- GitHub Actions
- Hackathon-Workshops
- Hint
- illegalArgument
- Java
- Jenkins
- KCNA
- Machine Learning
- MCP
- MLOps
- Pattern
- Pipeline
- Product
- TOGAF
- Uncategorized
- Workshops