Grounding an agent in your own data

The model is the easy part. The knowledge base is the work.

The short answer

Retrieval-augmented generation grounds an AI agent in your own documents: the question is used to fetch relevant passages, and the model answers only from those. Quality depends far more on how the content is prepared and chunked than on which model is used.

Key takeaways

  • Most RAG quality problems are content problems, not model problems.
  • Chunk by meaning, not by character count.
  • Show sources so answers can be verified.
  • Build an evaluation set before launch, not after the first complaint.

Retrieval-augmented generation is a straightforward idea: instead of hoping the model knows about your business, fetch the relevant part of your own content and have it answer from that.

The pipeline

  1. 01Ingest your documents — policies, prices, product data, FAQs, past support conversations.
  2. 02Chunk them into passages that each make sense on their own.
  3. 03Embed each chunk and store it in a vector index.
  4. 04Retrieve the most relevant chunks for the user's question at query time.
  5. 05Generate the answer from those chunks only, with instructions to refuse when they do not contain it.
  6. 06Cite the source, so a person can check.

Where it actually goes wrong

  • Chunking by character count, so a price table is split down the middle and neither half means anything.
  • Stale content, so the agent quotes last year's fees with complete confidence.
  • Contradictions across documents, with no rule about which one wins.
  • No refusal instruction, so the model fills the gap when retrieval returns nothing useful.
  • No evaluation, so nobody knows whether last week's prompt change made it better or worse.

Evaluation

Build a set of a hundred or so real questions with correct answers, and run it against every prompt, model or content change. Without it you are making changes on the basis of the last conversation somebody happened to notice — and, in practice, alternating between two versions forever.

Cost

Knowledge base preparation is usually the largest line in an agent project, not the engineering — which surprises people. Model usage is a separate per-conversation cost that is generally modest but worth monitoring, because a badly designed retrieval step can multiply it several times over without improving a single answer.

Questions people also ask

Almost never. Retrieval handles knowledge, and prompting handles tone. Fine-tuning is for specialised behaviour that prompting genuinely cannot produce, and it is expensive to maintain as models change.

Related

What this connects to

Rather have this answered about your own account?

Send us what you have. We will look at it properly and write back with what we would change, in the same plain terms as the page you just read.