Skip to content
Back to the AI glossary

Glossary · AI concepts & terminology

RAG (retrieval-augmented generation)

also: retrieval-augmented generation

In short

An approach in which a language model looks up matching information in your own knowledge source before answering and includes it. Reduces hallucinations and makes AI answers verifiable.

Reference: General AI knowledge

What it means

Retrieval-augmented generation connects a language model to a knowledge source. For a question, the system first retrieves matching passages, usually via embeddings in a vector database, and passes them to the model together with the question. The model phrases its answer on that basis and can name the sources. Lewis and colleagues described the method in 2020. Today it is the usual way to make company knowledge such as manuals, contracts or product data usable without retraining the model.

RAG lowers hallucinations without removing them. If the search finds the wrong passage, the model answers on a wrong basis. If the answer is missing from the documents, it can still invent something. RAG also brings security questions of its own: a document in the knowledge base can contain hidden instructions that the model follows. ISO/IEC 27090:2026 describes this indirect prompt injection in 6.9 and recommends in 5.3 authorising every document retrieval in a RAG system individually.

In practice and in the audit

In a company the biggest danger lies in permissions. A RAG assistant that searches all documents can show an employee salary lists or confidential contracts they were never allowed to open. The search therefore has to respect the access rights of the person asking, for every document individually. ISO/IEC 27001:2022 requires in Annex A 8.3 that access to information is restricted, and that also applies to the route via an assistant. Define which sources may go into the knowledge base, who maintains them and how outdated versions are removed.

For quality you need a small test collection: typical questions with a known correct answer and a known source passage. Use it to measure whether the search finds the right passages and whether the answer matches the source, and repeat the test after every change to documents, splitting or model. ISO/IEC 42001 requires data quality requirements in A.7.4 and verification and validation in A.6.2.4. Both apply to the knowledge base as much as to the model.

References in standards and law

I cite standards by clause number and in my own words, never verbatim. Legal texts link to EUR-Lex.

  • ISO/IEC 27090:2026, 5.3 and 6.9Individual authorisation of every document retrieval and indirect prompt injection.
  • ISO/IEC 27001:2022, Annex A 8.3Restricting access to information.
  • ISO/IEC 42001:2023, A.7.4Data quality requirements.
  • ISO/IEC 42001:2023, A.6.2.4Verification and validation.

Frequently asked questions

Does RAG make a language model’s answers reliable?

Considerably more reliable and checkable, because every answer can refer to passages. Errors remain possible, for example when the search finds the wrong passage or the answer is missing from the documents. So for important answers, check the source given.

Related terms

Further reading in the insights

Matching service

Reviewing RAG applications

I check whether your RAG assistant respects access rights, is protected against hidden instructions in documents and gives traceable answers.

To AI security

Author: Lars Zimmermann

Term and explanation in my own words. Researched to the best of my knowledge and reviewed for accuracy.