# RAG

> Retrieval-augmented generation (RAG) is a method that lets a generative AI model draw on documents held in a knowledge base and use them to enrich its output.

Original page: https://t10.de/en/glossary/rag
Publisher: total10 GmbH, https://t10.de/en/glossary

A [2020 research paper by Lewis and colleagues](https://arxiv.org/abs/2005.11401) describes RAG. At the time, large language models were limited in how precisely they could retrieve and use knowledge. The authors combined two kinds of memory: a pre-trained model holding what it had learned, and a searchable index of Wikipedia for the model to look things up in.

Germany's Federal Office for Information Security (BSI) describes the method in a [German-language study on generative AI models](https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/KI/Generative_KI-Modelle.pdf?__blob=publicationFile&v=7): a search finds relevant information in a knowledge base and passes it to the model as a prompt, together with the user's input. Generative AI models are frequently given a knowledge base this way to avoid hallucinations and improve output quality. There is a risk, too: attackers can poison a knowledge base with manipulated content, so that certain inputs lead the model to answers they chose in advance.

In e-commerce, we use RAG for AI product copy and SEO content. The copy is built from the shop's real product data, category attributes and supplier specifications, not from generic prompts. A project starts with an audit of the product data. We then build a data model and the RAG knowledge base. The generated copy goes through an editorial workflow with sign-off before it reaches the target system.

## See also

- [Large language model](https://t10.de/en/glossary/large-language-model): A large language model (LLM) is an AI model, trained on large amounts of text, that processes text inputs called prompts and generates text outputs from them.
- [Hallucination](https://t10.de/en/glossary/hallucination): A hallucination is content that an AI model makes up while generating its output and that was part of neither its input nor its training data.
- [SEO](https://t10.de/en/glossary/seo): SEO, or search engine optimisation, is the work of helping search engines understand a site's content and helping people find the site through search and decide whether to visit it.
- [GEO](https://t10.de/en/glossary/geo): GEO, or generative engine optimisation, means making content more likely to appear in the answers given by generative AI search.

## Where the term appears

- [AI product copy and SEO content with RAG](https://t10.de/en/seo)
- [E-commerce for SMEs: shops, content, AI](https://t10.de/en/ecommerce)
- [The self-driving content machine](https://t10.de/en/blog/self-driving-content-machine)

## Sources

1. [Generative KI-Modelle: Chancen und Risiken für Industrie und Behörden, Version 2.0 vom 17.01.2025](https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/KI/Generative_KI-Modelle.pdf?__blob=publicationFile&v=7), Bundesamt für Sicherheit in der Informationstechnik (BSI), accessed 2026-11-07
2. [Lewis et al.: Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks, arXiv:2005.11401v4 (12. April 2021, Erstfassung 22. Mai 2020, NeurIPS 2020)](https://arxiv.org/abs/2005.11401), arXiv (Cornell University), accessed 2026-11-07
