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.
On this page
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
AI Pair Programming: Tips to Get Better Code
Practical habits that turn AI coding assistants from a slot machine into a reliable pair, from context and prompts to verification.
Best AI Coding Assistants in 2026 — Compared by Use Case
Every AI coding tool demos beautifully. The real differences show up in your editor, your codebase, and your bill. This is the map to what each is best at.
Spec-Driven Development for AI Coding (2026)
Spec-driven development gives AI coding assistants an unambiguous target, so the output is reviewable, maintainable, and scales past throwaway scripts.
You might have missed
Evergreen posts worth revisiting.