Skip to content
Go back

RAG Is Not Just Chunking → Embedding → Retrieval → Generation

Updated:

Cover



If I had a dollar $ for every time someone explained RAG in exactly four boxes and an arrow between each, I’d have enough to fine-tune a small LLM by now.

Here’s the thing. Those four boxes aren’t wrong. They’re just the skeleton. And a skeleton without organs, blood flow, and a nervous system doesn’t walk anywhere. It just lies there looking like it should work.

So before you nod along to the “it’s simple” version, sit with these for a second:

That’s the difference between a RAG demo that works once and a RAG system that handles real documents correctly.


The real flow (bird’s-eye view)

Think of it as a pipeline where each step checks the work of the last one:

StageWhat’s actually happeningThe question nobody asks
ParsingDocuments → clean structured textDid tables/images survive, or vanish?
ChunkingSplitting text into digestible piecesWhy this size? Why this overlap?
EmbeddingTurning chunks into vectorsDoes this model “get” your domain?
StorageVectors land in a DBPicked for hype, or for your scale/latency needs?
Hybrid SearchKeyword (BM25) + semantic searchAre you only doing vector search and missing exact matches?
Metadata FilteringNarrowing by source/date/deptOr is everything just dumped into one giant pile?
RerankingCross-encoder re-scores top candidatesOr are you trusting raw similarity scores blindly?
Context SelectionPicking the final Top-K chunksToo few = missing info. Too many = confused LLM.
GenerationLLM writes the answerGrounded in your docs, or politely hallucinating?
Answer RelevancyDid it actually answer the questionAnyone checking, or just shipping it?



Every row above has its own failure modes and trade-offs, each of which is worth a post on its own.


Claude Opus 4.7


Why this matters

A “simple” RAG pipeline fails silently. It doesn’t crash. It gives you a confidently wrong answer, citing a chunk that’s 70% irrelevant, built from a table your parser butchered, retrieved because it was vector-similar rather than actually-useful. No one notices until a user does.

Good RAG isn’t about stacking the four boxes. It’s about making each step accountable: parsing for fidelity, chunking for context, retrieval for relevance, generation for grounding.

What’s next

That was a high-level view, intentionally shallow. Next I’ll work through each stage, starting with document parsing, which is where most RAG pipelines actually break.

Stay tuned.


Inspired by my own hurdles.


Share this post on:

Previous Post
An Evening, An agent, and The Ganesh Utsav
Next Post
Wait, how many P's are in "strawperry"?