Four checks before you build a RAG pipeline
1 min read
Updated
- RAG
- LLM architecture
- Evaluation
Retrieval-augmented generation solves a narrow problem. Run these four checks before spending weeks on embeddings, chunking and vector databases.
Retrieval-augmented generation pays off when answers must stay grounded in changing prose documents. It quietly breaks when source docs are stale, access rules are muddy, or nobody measures whether search pulls the right passages. Check four things before building one.
1. Does the answer live in prose or in a database?
A customer asking where their package is does not need vector search over help-center articles. They need a deterministic query against your order database.
In the support agent I built, customer facts come strictly from structured commerce records matched through an ordered identifier ladder. Retrieval handles policy guidance alone: per-brand knowledge articles stored as immutable versions so every drafted reply traces back to the exact policy text it read. Facts come from typed queries; policy comes from documents.
2. Are the underlying documents worth retrieving?
Outdated wiki pages, contradicting policies and unowned docs ruin retrieval long before embedding choice matters. Clean up ownership first: who maintains each document, which revision is live, and which users are permitted to see it. Pick models and vector indexes after the source library is trustworthy.
3. Can you grade retrieval on its own?
When search fetches the wrong paragraphs, a stronger generator just makes hallucinations read more smoothly. Assemble a small set of real user questions paired with the exact passages that should answer them, and track retrieval hit rate independently before touching prompts or upgrading models downstream.
4. What happens when the evidence is missing?
Missing records, stale documents and out-of-scope questions all require explicit product behavior: decline cleanly, answer with a caveat, ask for a missing identifier, or escalate to a human.
In our support system, auditing thousands of unmatched tickets showed roughly one in five described a real purchase while omitting an order number or purchase email. No search algorithm could retrieve data that was never provided, so the right response was asking for that one missing detail. Leaving the fallback unplanned guarantees confident improvisation.