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.
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.
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
LiteLLM's Rough 2026: 3 CISA KEV Flaws, a 9.9 CVE, and a Poisoned PyPI Release
Your AI gateway holds every provider key you own. In 2026 LiteLLM shipped 17 security advisories, three of them exploited in the wild. Here is what to patch and how to fence it in.
Meta and Sierra's Personal Agent Protocol, Explained
It is OAuth for letting your AI agent act on your behalf with a business, not another MCP, and it is nowhere near ready to build on.
Mistral Large 4 'Le Chonk': Self-Host or Use the API?
A 1T-parameter MoE model with open weights coming doesn't make self-hosting the right call for most teams.
You might have missed
Evergreen posts worth revisiting.