Skip to main content
Back to the glossary

RAG

Retrieval-Augmented Generation

In one sentence

Retrieval-augmented generation answers a question by first retrieving passages from a document set and then asking a language model to write the answer from those passages.

Two stages. Retrieval selects the fragments of a corpus that are relevant to the question, usually by combining vector similarity with keyword search and metadata filters. Generation passes those fragments to the model together with the question and an instruction to answer from them.

What it buys

The answer is grounded in a corpus you control, so it can carry a citation back to the source document and page. Updating what the system knows means updating documents, not retraining weights, which is the difference between an afternoon and a project. And access control stays where it belongs: if the retrieval layer filters by permission, a user cannot be answered from a document they are not allowed to read.

Where it breaks

If retrieval misses the right passage, the model answers from its own parameters and the wrong answer reads exactly as confident as a right one. That makes retrieval quality, chunking and metadata more decisive than the choice of model, and it is why retrieval has to be evaluated on its own, with its own recall metric, before anyone measures the quality of the final text.

Where BeAI uses it

AI Portal builds a separate knowledge base per project. BidEval runs a chat over the tender documents it has just parsed. MyAISquads retrieves from ticket history and internal documentation before proposing a resolution.

Where we use it

Related terms

Ready to Transform Your Operations with AI?

Join leading companies that trust BeAI Energy for their AI solutions