I keep seeing teams blame the model when the real failure is retrieval.
More specifically: chunking.
It’s one of the least glamorous parts of an AI stack, which is probably why it gets ignored until it starts burning money and wrecking trust. But if you’re building RAG in an enterprise setting, chunking is not a detail. It’s the foundation.
A simple example says it all.
A fintech chatbot was asked about an indemnification clause in an NDA. The contract language was split across chunks mid-sentence. One chunk said Party A indemnifies Party B. The qualifier lived in the next chunk. Retrieval only pulled the first piece, and the system answered confidently with the wrong interpretation.
That wasn’t a model intelligence problem. It was a context engineering problem.
And this is the part I wish more teams understood: upgrading to a bigger model does not fix bad retrieval. GPT-5 won’t magically reconstruct context that your pipeline threw away.
Bad chunking poisons everything downstream — RAG quality, hallucination rates, prompt performance, latency, and cost.
What I’ve found in practice is that good chunking usually comes down to five principles:
1. Preserve context coherence
Don’t split meaning across boundaries if you can avoid it. Contracts want sections and subsections. Code wants functions, classes, and dependency-aware grouping. Conversations want speaker turns or time windows.
2. Tune boundaries, size, and overlap together
Most teams only think about chunk size. That’s not enough.
Where you split matters.
How large the chunk is matters.
And overlap matters more than people think.
3. Let the data type drive the strategy
Legal text, spreadsheets, source code, support tickets, and financial reports should not be chunked the same way. If you use one generic token splitter across all of them, you’re basically choosing failure in advance.
4. Aim for Goldilocks-sized chunks
Too small and you lose context. Too big and you flood the model with irrelevant tokens. The right answer is rarely an arbitrary fixed number. It’s whatever preserves a complete semantic unit without dragging in junk.
5. Use overlap as insurance
A little purposeful overlap prevents meaning from breaking at the edges. In legal, finance, and code, that’s not optional. It’s a safety feature.
There’s also a cost angle that doesn’t get enough airtime.
When chunking is sloppy, retrieval pulls more chunks than necessary. More chunks means more tokens in context, higher latency, more cost, and often worse answers because the model is swimming through noise.
I’ve seen teams cut meaningful token spend just by fixing chunk strategy. No model switch. No fancy orchestration layer. Just better retrieval inputs.
And yes, this ties directly into the RAG vs. agentic search conversation.
My view is pretty simple:
Good RAG with good chunking wins when you need fast, predictable, cheap answers at scale.
Agentic search absolutely has a place, especially when the task is messy and multi-step — scattered documents, linked references, calculations across systems, ugly codebases. But it’s slower and more expensive, often by an order of magnitude. And even then, it still benefits from well-structured chunks.
So if the plan is “we’ll skip retrieval discipline and let agents figure it out,” that’s usually just an expensive way to avoid cleaning up your data.
That’s really the uncomfortable truth underneath all of this: chunking problems are often data architecture problems in disguise.
Messy spreadsheets. Tightly coupled code. Contracts with awkward structure. Missing metadata. Broken hierarchies.
AI doesn’t create those problems. It just makes them impossible to ignore.
That’s why I’m increasingly skeptical of generic enterprise AI advice that jumps straight to model selection or agent frameworks without getting specific about the data layer. If your chunks are bad, the rest of the stack is just compensating for a bad foundation.
So when I look at an enterprise AI project that isn’t working, one of my first questions is no longer “which model are you using?”
It’s:
How are you chunking the data?
What are the semantic boundaries?
What overlap are you using?
What metadata survives retrieval?
Did you evaluate chunking by data type, or did you just set a token count and hope?
That’s where the real work is.
And honestly, that’s where a lot of the real advantage is too. Not in another AI strategy deck. Not in swapping one frontier model for another. In doing the unsexy retrieval work well enough that the model actually gets the right context in the first place.
Chunking is one of the first lines of defense against hallucination.
If I were auditing an enterprise RAG system today, I’d start there.