What is retrieval-augmented generation?

Short answer: Retrieval-augmented generation, or RAG, lets a general language model answer from company information without retraining it. That information can be policies, contracts, product documents or past reports. When a question comes in, the system first searches that information for relevant passages. It then gives those passages to the model along with the question. The answer comes from current company material instead of only from what the model learned in training.

Companies use RAG to build internal assistants, customer support answers and knowledge search tools. It lowers the risk of invented answers but does not remove it. It also lets the system show its sources, so users can check them. The system searches the documents each time someone asks, so updating a document changes the answers without retraining the model. Quality depends heavily on the source material. Outdated, duplicated or contradictory documents produce poor answers, however capable the model is.

How it works

The system collects documents from approved sources and splits them into short passages. It stores each passage in a searchable library organized by meaning, so it can find passages that match a question even when the wording differs. When a user asks a question, the system finds the most relevant passages. It only uses passages that this user is allowed to see. It then passes them to the model with an instruction to answer only from them. A good system shows its sources and says when it cannot find an answer. It also records the questions it fails on, so the team can improve the content.

Example

An operations team keeps 600 pages of procedures across shared drives, and new staff ask senior colleagues about 80 questions a week. The company builds a RAG assistant over the 120 procedures that are current and approved, and each answer links to its source. In a test of 100 real past questions, 82 get correct answers with sources, and 12 correctly return "not found". The 6 wrong answers trace back to two procedures that contradict each other, which the team then fixes.

Why it matters

RAG lets a company use AI on its own knowledge without building a custom model. Leaders need to decide which content is trusted enough to include and who keeps it up to date. They also decide which users may see which material, and how to measure answer quality. These choices usually affect the result more than the choice of model.

RAG can still give wrong or incomplete answers, especially when the search misses the right passage or sources disagree. Weak access controls can show confidential documents to the wrong people. Personal data in the documents brings privacy obligations. Answers on legal, financial or safety matters should show their sources, and a person should check them. Test the system on real questions before launch.