A generator is the response-producing component of a retrieval-augmented generation (RAG) system. It receives the user’s query and information retrieved from a knowledge source, then uses that context to produce a fluent, relevant response grounded in the supplied information. section 3.2 section 3.2.2
In a typical RAG flow:
- A retriever searches a knowledge base for information relevant to the query. section 3.2.3
- The generator receives the original query and retrieved context, then produces a response that incorporates that context. section 3.2.3
Answering a warranty question
For a question about the Emerald Glow Lamp’s warranty, the generator uses retrieved terms—such as the two-year coverage period and exclusions—to compose a specific answer. The response is grounded in those terms rather than relying only on general model knowledge. section 3.2.4
Figure 3.2 The RAG system architecture: retrievers, knowledge source, and generator
See how the generator fits alongside the retriever and knowledge source in a RAG architecture. section 3.2











