RAG is an integration problem, not a prompt problem
When a RAG system disappoints, the cause often lies in engineering rather than prompt wording: how documents were ingested and split, who may see what, or missing measurement. Failures include chunks that split a table or clause, stale indexes, ignored permissions, missing citations and no evaluation to test whether changes help.
When a RAG system disappoints, look beyond the wording of the prompt. The cause is often how documents were ingested, how they were split, who is allowed to see what, or a lack of measurement. In our experience, fixing retrieval and proving it with evaluations usually moves accuracy more than another prompt tweak.
- Chunks that cut a table or a clause in half, so the answer is missing its context
- An index that is stale, or that mixes embedding model versions
- Retrieval that ignores permissions and surfaces a document the user should not see
- No citations, so it is hard to tell a correct answer from a merely confident one
- No evaluation, so every change is a guess
RAG or fine-tuning for enterprise data?
For many enterprise data questions, RAG is a sensible starting point: it ties answers to changing documents, can cite sources and, if designed in, can filter by access rights at retrieval time. Fine-tuning mainly changes how a model behaves. It suits consistent tone or format, and can need a second delivery cycle.
For many enterprise data questions, RAG is a sensible place to start. It keeps answers tied to documents that change, it can cite its sources, and it can apply access control at retrieval time if that is designed in. Fine-tuning mainly changes how a model behaves, is a weak way to keep facts current, and can need a second delivery cycle.
| Need | RAG | Fine-tuning |
|---|---|---|
| Answers reflect documents that change often | Yes: re-index the documents | No: needs retraining |
| Show the sources behind an answer | Yes, if built in: citations come from retrieval | Not reliably: the model has no built-in link to a source |
| Respect who may see which document | Yes, if designed in: filter at retrieval | Hard: training data is not filtered per user |
| Teach a consistent tone or output format | Partly: prompts and examples | Yes: this is what it is good at |
How we build it
We chunk documents with metadata and attach access-control metadata at index time, then retrieve with hybrid search and reranking. Answers show their sources, with a refusal path for out-of-scope questions. Nightly evaluation on a golden question set blocks releases when accuracy or citation rate drops, and retrieval hit rate is measured separately from answer quality.
Ingest and chunk
Chunking and metadata that survive real documents. Chunks below a minimum information density are rejected, and access-control metadata is attached at index time, not only at query time.
Retrieve with hybrid search and reranking
Vector search finds meaning, keyword search finds exact IDs and SKUs, and a reranker orders the candidates. Retrieval hit rate is measured separately from answer quality.
Cite and refuse
The interface shows the source passages next to an answer. Out-of-scope questions go to a refusal path, and when retrieval is weak the system should say it found no definitive source.
Evaluate before every release
A golden question set and a nightly evaluation block a release when accuracy or citation rate falls below the threshold.
Monitor cost, latency and index versions
Monitor p95 latency, cost per query and retrieval hit rate. The embedding model version is tracked in the index manifest, so that vectors from different models are not mixed unnoticed.
What you receive
You receive the ingestion and indexing code with an auditable index manifest, a retrieval service using hybrid search and reranking, a citation interface or API response format for your front end, the evaluation set and scripts ready to run in CI, and a runbook, walkthrough and full source handover.
- The ingestion and indexing code, and an index manifest you can audit
- The retrieval service with hybrid search and reranking
- A citation interface or API response format your front end can render
- The evaluation set and scripts, ready to run in CI
- A runbook and a short walkthrough, with full source handover
Our RAG approach draws on client deployment patterns and on our own product, PlaywithDB.