Real-World RAG Incidents: Lessons from a Production Rollout
A field report from rolling out retrieval-augmented generation in production, including cache bugs, bad embeddings, and how we fixed them.
Key takeaways
A field report from rolling out retrieval-augmented generation in production, including cache bugs, bad embeddings, and how we fixed them.
Real-World RAG Incidents: Lessons from a Production Rollout#
When we first rolled out a RAG-based assistant for our internal SRE team, nothing in the vendor docs really prepared us for the messy parts.
Incident: Cached Wrong Answers#
The first painful incident happened on a Monday morning. A runbook query returned an outdated PostgreSQL failover procedure because:
- We cached answers aggressively to save tokens.
- The underlying runbook in Git had been updated over the weekend.
- Our invalidation logic only watched the vector store, not the source repo.
How We Fixed It#
- We changed our cache key to include the document commit hash.
- We added a background job that compares Git commits against stored vectors.
- We updated the runbook template to show the last updated date in the answer.
Incident: Embeddings Going Silent#
Two weeks later, we saw a spike in “no relevant context found” errors during incident calls. The vector DB was healthy; the problem turned out to be:
- A new data source with HTML-heavy content.
- We were chunking purely by character count.
- The relevant text was split across three different chunks.
Changes We Made#
- Switched to semantic + heading based chunking with overlap.
- Added a metric for “chunks per query” and “distance of top-1 match”.
- Logged a sample of low-quality retrievals for manual review.
Checklist for RAG in Production#
- Track cache hit rate, LLM error rate, and no-context rate.
- Store the retrieved chunk IDs alongside each answer.
- Regularly sample answers and review them with the owning team.
The marketing pages sold RAG as magic. In reality it behaves more like a database: if you don’t design for drift, invalidation, and observability, it will betray you at the worst moment.
Get the DevOps Troubleshooting Cheat Sheet
Subscribe and get our free one-page reference for the errors that eat an afternoon — CrashLoopBackOff, OOMKilled, Terraform state locks, and more — plus new guides as we publish them.
AI Agents in DevOps: From Copilots to Autonomous Automation in 2025
Copilots suggest, agents act. Here's the spectrum between them, where each earns its keep in DevOps, and how to add autonomy without lighting your infra on fire.
What We Learned Running Weekly Game Days on Our CI/CD Pipeline
Practical game day scenarios for CI/CD: broken rollbacks, permission issues, and slow feedback loops—and how we fixed them.
More from AI
Explore more articles in this category
Claude Code Mods: Programmable, Unsandboxed, and Your Problem in CI
Mods make Claude Code a real runtime you can program. They also run with your full native permissions, no sandbox, so a bad one is a bad CI step.
Gemini 4 Argon: A Frontier Model You Mostly Can't Use Yet
Google shipped a 1M-token output ceiling and strong cyber-defense benchmarks, then handed the keys to almost nobody. Here is what that gating pattern tells you.
GPT-6.1 Sol's 80% Price Cut Rewrites Agentic Coding Math
OpenAI priced GPT-6.1 Sol at a fifth of GPT-6 Astra and called it nearly as good at agentic coding. That claim is now a routing decision, not a headline.
You might have missed
Evergreen posts worth revisiting.