Skip to main content
Back to all essays
AI / ML2 min read

RAG is not a product. It's a subsystem.

Hybrid retrieval, reranking, evaluation, and guardrails. The boring layers that decide whether your 'AI app' survives contact with production.

Build the evidence path. Version the sources; Retrieve candidates; Rerank the evidence; Compose the answer; Evaluate the response; Release + monitor.
Open full-size workflow diagram
Read the workflow steps
  1. Version the sources. Preserve document locations. Track changes and access scope.
  2. Retrieve candidates. Use relevant keyword + vector signals. Respect source access permissions.
  3. Rerank the evidence. Rank relevance to this question. Retain passages and source references.
  4. Compose the answer. Use the selected evidence. Expose missing or conflicting facts.
  5. Evaluate the response. Check groundedness and citations. Inspect relevance and latency.
  6. Release + monitor. Run regressions after source changes. Record failure types and ownership.
  7. Insufficient evidence: clarify or abstain.
  8. Retrieval quality and answer quality are different checks. Measure both.
Cover graphic for RAG is not a product. It's a subsystem., AI / ML

Teams love to ship a demo that "does RAG." Vector database, a few PDFs, a chat box. Applause in the standup. Screenshot in the investor update.

Production is less romantic. Chunking strategies fail on tables and policies. Embeddings drift as documents change. Hallucinations sneak past soft prompts. Latency budgets collapse under real concurrent traffic. Suddenly the demo that answered three questions perfectly cannot survive a Tuesday afternoon.

Contracts, not magic

Treat RAG as a subsystem with contracts: hybrid retrieval (keyword + dense), rerankers that actually improve precision, evaluation harnesses that catch regressions before users do, and hard guardrails that refuse to invent citations.

Without those, you don't have a product. You have a prototype with a marketing site. The gap between "it found something" and "it found the right clause under compliance review" is where most AI budgets quietly evaporate.

MK Labs prototypes those subsystems internally before they ever touch a client environment. That's how we avoid shipping theater.

What we measure

We care about grounded answer rate, citation fidelity, p95 latency, and failure taxonomy, not just "felt helpful in a meeting." If you cannot say how retrieval quality moved week over week, you are flying blind with a very expensive compass.

RAG is infrastructure. Treat it like infrastructure: versioned, tested, owned. The chatbot is the skin. The subsystem is the product.

Putting this into practice?