# RAG (retrieval-augmented generation)

Source: https://www.getvantage.global/glossary/rag

RAG (retrieval-augmented generation) is a technique in which an artificial intelligence (AI) system first retrieves relevant passages from a trusted set of documents and then writes its answer from those passages. RAG grounds answers in a company's own material instead of in whatever a language model happens to remember. A language model on its own answers from what it absorbed in training. That is fine for general knowledge and risky for anything specific to your company. Retrieval-augmented generation (RAG) fixes the order of operations: find the evidence first, then write. The retrieval step searches your documents, usually combining vector search with keyword search and permission filters, and returns the passages most likely to hold the answer. The generation step gives those passages to the model with an instruction to answer only from them and to say where each claim came from. RAG is not a magic shield against wrong answers. If retrieval misses the right page, the model can still write something confident and wrong. So we add checks. The answer must quote the source. Code confirms that the quote actually appears on the cited page. If the evidence is not there, the system says so rather than guessing. Done properly, RAG turns a general model into a specialist on your material without training a model on your data. That last point matters to most of the firms we talk to: the documents stay yours, and nothing is fed into a public model. The visible result is a sourced answer: a reply you can check in seconds.

Our tender agent for a Saudi holding company works this way: its full brief gives a page number and a quote for every item, and code verifies each one.
