← All insights
Engineering

Building RAG that actually works in production

Retrieval-augmented generation is easy to demo and hard to ship. Here's what separates a convincing prototype from a system you can put in front of customers.

A demo answers your five favourite questions. A product answers the thousand you didn't think of — including the ones with no good answer. The gap between the two is mostly engineering discipline, not model choice.

Start with retrieval quality. Most 'the LLM is hallucinating' problems are really 'the retriever returned the wrong chunks' problems. Invest in chunking, metadata and reranking before you touch the prompt.

Then build an evaluation set. Collect real questions, write reference answers, and score every change against them. Without this you're tuning blind, and every 'improvement' is a guess.

Add guardrails and citations. Ground every answer in retrieved sources, show the citations, and design a graceful 'I don't know' path. Users forgive a system that admits uncertainty; they don't forgive confident nonsense.

Finally, monitor in production. Log queries, retrieved context and feedback, and review failures weekly. RAG is not a project you finish — it's a system you operate.

Want a second opinion on your AI plan?

We'll give you an honest, no-obligation read.