Retrieval-augmented generation (RAG) is a technique in which relevant passages are retrieved from your own documents and given to a language model together with the question. The model answers from that content, so answers stay current and can cite their sources.
Also called: RAG, grounded generation, sovereign RAG
A RAG system has two halves. Ingestion runs ahead of time: documents are split into chunks, each chunk is turned into a vector embedding that captures its meaning, and the chunks are stored in an index along with their source and permissions. Answering runs per question: the question is embedded, the most similar chunks are retrieved, optionally re-ranked, and placed in the model's prompt with an instruction to answer only from them and say where each claim came from.
Pure vector search finds passages that mean the same thing in different words, but it can miss exact terms — a product code, a regulation number, a defined term in a contract. Hybrid search combines semantic similarity with keyword matching for that reason, and a re-ranker then orders the candidates by how well they actually answer the question.
A worked example: a bank's operations team answers hundreds of questions a week about internal procedures — which form a cross-border payment exception needs, who signs off a limit change, what the cut-off times are. The procedures live in Confluence and SharePoint and change monthly. A RAG agent indexes them on a schedule, answers each question from the current version with a citation to the exact page and section, and shows a confidence score. When a procedure is revised, the next indexing run picks it up; no model is retrained. When the sources do not contain an answer, the agent says so instead of guessing.
RAG is not a cure for hallucination on its own. Answers go wrong when chunks cut a table or a clause in half, when retrieval returns an outdated copy of a policy alongside the current one, when a user is shown passages from documents they are not entitled to read, or when the model is allowed to fill gaps from its general knowledge. Good RAG treats these as design decisions: chunking per document type, one authoritative source per topic, permissions enforced at retrieval time, and an instruction — checked by a guardrail — to answer only from what was retrieved.
Citations are what make RAG auditable. If every sentence of an answer can be traced to a passage, a reviewer can verify it in seconds and an auditor can see what the system relied on. Without them, a RAG answer is just a more confident chatbot.
In ATX Agent Hub, chunking, the embedding model and the retriever are configurable per collection; hybrid search and re-ranking are built in; access is controlled per source; and answers carry citations, confidence scores and document lineage down to the source chunk. Documents, embeddings and run history stay in your own tenancy.
Frequently asked questions
What is RAG in simple terms?
RAG means looking up the relevant parts of your own documents first and giving them to the AI model with the question, so the answer is based on your content rather than only on what the model learned in training.
Is RAG better than fine-tuning?
They solve different problems. RAG supplies facts that change and must be cited; fine-tuning changes how a model behaves or writes. For answering from internal documents, RAG is usually the first choice because content can be updated without retraining.
Does RAG stop AI hallucinations?
It reduces them but does not remove them. Answers stay reliable when retrieval finds the right passages, permissions are enforced, the model is told to answer only from the sources, and citations let a reader check every claim.
What is sovereign RAG?
RAG in which the documents, the index, the embeddings and the model calls all stay inside an environment the organisation controls — its own cloud tenancy, data centre or an air-gapped network.
This site needs JavaScript for the full experience. Every page above is reachable without it.