Topic hub
Build a Knowledge Agent With Retrieval-Augmented Generation
What This Collection Covers
Retrieval-augmented generation is the practice of answering from your own documents rather than from what a model absorbed during training. It is the most common way to make an agent useful about a specific business, and the most common way to make one confidently wrong.
This collection covers the decisions that determine which of those two outcomes you get: how documents are split, how search is done, who is allowed to retrieve what, how answers are cited, how the index stays current, and what happens when nothing relevant exists.
The Guides
Chunk sizes for knowledge articles covers how splitting a document determines what can be retrieved, and why chunk size is a content decision before it is a technical one.
Keyword, vector and hybrid search compares the three retrieval methods and when the combination is worth the complexity.
Filter by user access covers permission aware retrieval, the control that prevents an agent from summarising a document the reader was never allowed to see.
Add citations describes citations that a reader can check, and the difference between a citation and a decoration.
Keep the index in sync deals with staleness: what happens when a document changes and the index does not.
Handle questions with no source covers the abstention behaviour that separates a trustworthy agent from a plausible one.
Reranking explains the second pass that fixes ordering, and when it is worth the latency.
Graph RAG or vector retrieval compares structured relationship retrieval with similarity search.
SQL and document search in one answer covers the architecture where a question needs both a record and a document.
Evaluate retrieval separately splits evaluation into two measurements so a failure points at the right component.
Multilingual knowledge agents covers the case where documents and questions are in different languages.
How to Read It
If you are building from scratch, read chunking, hybrid search and no answer strategy in that order. Those three decide most of the quality.
If an agent is already live and answers are occasionally wrong, start with retrieval evaluation, then permissions. Those two turn an intermittent complaint into a number.
What a Working System Looks Like
Four signs that a retrieval system is doing its job, in order of how easy they are to check.
A question phrased in the customer's words returns the right document in the top five. That is chunking and search method working together.
An answer cites a source the reader can open, and the sentence matches the passage. That is generation and citation working together.
A question the corpus does not cover produces a clear statement of that, with a route. That is the abstention path working.
A document edited this morning is reflected in an answer this afternoon. That is the sync pipeline working.
Most systems get two of the four right, and the two they miss predict the complaints they receive.
Where Teams Get Stuck
Three places, and each has a recognisable signature.
They tune the prompt when retrieval is failing. The answer is vague or wrong, and no amount of instruction fixes it because the right passage was never in the context. The retrieval evaluation guide exists to make this visible before the prompt is rewritten for the third time.
They skip permissions until an audit. Permission aware retrieval is cheap to add at index time and expensive to retrofit, because the metadata has to be backfilled for every document.
They treat the index as static. A one time ingestion is a snapshot, and a snapshot is wrong within a week. Sync is not an optimisation; it is the difference between a knowledge agent and an archive.
What This Collection Is Not
It is not a guide to a particular vector database, embedding model or framework. Those change faster than the decisions do, and the decisions are what determine quality.
It is also not an argument for building retrieval yourself. Managed retrieval services are often the right choice, and the same questions apply to them: what are the chunks, what is filtered, how does the index stay current, and what happens when nothing matches.
Where a guide names a mechanism, such as reciprocal rank fusion or a rerank threshold, it is because the mechanism is the decision, not because the implementation matters.
The Three Questions to Ask First
Before choosing anything, answer these.
What is the smallest unit of meaning a reader would want quoted? That sets the chunk.
Who is not allowed to see part of this corpus? That sets the permission model.
What should the system do when it does not know? That sets the abstention behaviour.
Most retrieval projects that disappoint answer those three late, after the infrastructure is built, and then discover that the answers require re-indexing everything.
Next step
Start with chunk sizes, or contact us to review a retrieval design.
FAQ
Question: Is retrieval still necessary with long context windows?
Yes. A window holds what you put in it, and retrieval decides what that is. A large window without retrieval is a large window full of the wrong documents.
Question: What is the most common cause of a bad RAG answer?
Retrieval returning nothing relevant, and the model answering anyway. The no answer guide exists because that failure looks like a model problem and is almost always a retrieval or instruction problem.
Question: Do these guides apply to internal tools as well as customer support?
Yes, and permissions matter more there, because internal documents have sharper access boundaries than public ones.