Claude Sonnet 5 RAG Chatbot Test: 40,000 Documents, Real Data
A developer moved Claude Sonnet 5 into a live 40,000-document support RAG four days after launch — real eval data on what improved, what didn't.
According to a dev.to write-up from a founder-led software studio, Claude Sonnet 5 became the default free and Pro model on July 1 — and the team had it running inside a client's retrieval pipeline four days later. Not a benchmark run, not a toy demo — a production RAG chatbot for a small-business client with about 40,000 support documents and a strict “don’t make things up” requirement.
That timeline matters because it turns a marketing announcement into a natural experiment. The team says it tests new model releases against real client pipelines “because that’s the only way to know if they matter.” The central question for anyone running a similar stack: does upgrading the generation model actually reduce hallucinations in a live RAG system, or does it just move the same failure modes around?
For developers running a similar retrieval-augmented generation pipeline, the case study is useful precisely because it isn't a vendor benchmark. For a small-business owner evaluating whether to build (or rebuild) a RAG chatbot at all, it's a rare look at what a “boring” architecture buys you when a new model ships: the option to test it against real support tickets within days, rather than waiting on a re-platforming project.
The Stack Was Built to Make This Boring
The team describes its architecture in blunt terms: pgvector for retrieval, a thin re-ranking step, and “whatever LLM sits at the end answering with citations.” The generation model is treated as a swappable dependency, not a load-bearing wall.
That design choice is what made a same-week swap possible. Here is the actual diff the team shared, presented as an illustration of their config-driven setup rather than a template to copy verbatim:
const generationModel = {
provider: 'anthropic',
model: 'claude-sonnet-5', // was claude-sonnet-4-6
maxTokens: 1024,
temperature: 0.1,
};As the author puts it, swapping providers or model versions should be a one-line change — and if it isn't, the architecture is the problem, not the model. That framing is worth sitting with before reading the results below: the eval numbers that follow only mean something because the rest of the pipeline stayed untouched.
That pattern is worth generalizing, carefully. Decoupling the generation call from prompt construction, citation formatting, and output parsing is what turns a model release into an afternoon's testing rather than a rewrite. Pipelines that hardcode prompt phrasing to one model's quirks, or parse its output with regex tuned to that model's formatting habits, don't get this option — the swap breaks something else first.
What Changed in the First 48 Hours
The team ran Sonnet 5 against its existing eval set — about 120 real support questions with known-good answers — for 48 hours before any other changes went in. Two results stood out, by the team's own account. The numbers below come from that internal eval, not an independent or third-party benchmark, so treat them as one team's self-reported before/after rather than a verified industry result.
| Signal (team's internal eval) | Claude Sonnet 4.6 | Claude Sonnet 5 |
|---|---|---|
| Confident wrong answers | Blended unrelated policy sections into a plausible-sounding answer | More willing to say “the documents don’t cover this” |
| Handling 8-10 retrieved chunks (vague queries) | Tended to pick the first chunk and ignore the rest | Answer quality held up better |
| Latency | Baseline | Roughly flat |
| Cost per query | Baseline | Flat |
The team is explicit that latency and cost were not why they kept the new model — the reduction in confident wrong answers was. As they put it, the failure mode that actually costs small businesses money isn't an unhelpful chatbot; it's a chatbot that's wrong with a straight face. For a support bot answering from 40,000 documents, a wrong answer delivered confidently is worse than no answer at all.
Read the numbers with the right caveats attached. A 120-question eval set and a 48-hour testing window are enough to catch an obvious regression, not enough to certify a hallucination rate. Nothing here is an independently verified benchmark — it's one team's internal comparison, on one document set, for one use case. Treat it as a signal worth re-testing against your own eval set, not a number to quote to a client.
What the Swap Didn't Fix
The team is equally direct about what the new model didn't solve. By their account, the model swap did not fix bad chunking, and it did not fix a retrieval step that was already returning the wrong documents. Most of the week, they say, went into “the boring stuff”: chunk size, metadata filters, and re-ranking thresholds — the same tuning work any RAG pipeline needs regardless of which model sits at the end.
The team also frames this against a wider debate. They cite a widely referenced 153-million-line analysis reporting duplication up roughly 4x and rising churn on codebases where teams lean on AI agents without review — and argue the same pattern shows up in RAG systems: teams swap in a shinier model expecting it to paper over a retrieval layer nobody actually designed. In their words, the model is maybe 20% of why a RAG chatbot hallucinates; the other 80% is what you feed it. That's the team's framing and estimate, not an independently measured figure, but it lines up with what the 48-hour eval actually showed: the chunking and retrieval problems were still there after the swap.
The practical takeaway isn't to distrust model upgrades — it's to sequence them correctly. Fix chunk boundaries and re-ranking thresholds first, because those are the same regardless of which model answers the query. Only after retrieval is returning the right documents does a model swap tell you anything meaningful about hallucination rates.
The Verdict: Config Value or Migration Project?
The team's own conclusion doubles as a diagnostic for readers deciding whether to make the same move: if your RAG pipeline is architected so the generation model is a config value, model releases are good news you can act on in days — not a migration project.
That's the test worth running before touching any config file. If your generation call already sits behind one function, with prompt construction, citation formatting, and output parsing decoupled from any single model's quirks, a swap to Sonnet 5 is a same-week eval, same as this one. If your prompts are tuned to one model's formatting habits, or your retrieval layer hasn't been touched since launch, the model swap is the least important thing to fix first — the chunking, metadata filters, and re-ranking thresholds are.
More from DangMua