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.
A 2020 research paper by Lewis and colleagues describes RAG. At the time, large language models 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. Read in the glossary → 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: a search finds relevant information in a knowledge base and passes it to the model as a prompt Prompt A prompt is the input a user gives a generative AI system, which then responds with an output. Read in the glossary → , together with the user's input. Generative AI models AI Artificial intelligence (AI) covers methods that let a computer perform tasks which would require intelligence if a person did them. Read in the glossary → are frequently given a knowledge base this way to avoid hallucinations 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. Read in the glossary → 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 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. Read in the glossary → 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.
Where the term appears
See also
-
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.
E-commerce
-
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.
E-commerce
-
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.
E-commerce
-
GEO
GEO, or generative engine optimisation, means making content more likely to appear in the answers given by generative AI search.
E-commerce
Sources
-
Generative KI-Modelle: Chancen und Risiken für Industrie und Behörden, Version 2.0 vom 17.01.2025 (opens in a new tab)
Bundesamt für Sicherheit in der Informationstechnik (BSI) accessed