Knowledge Maxxing
← Back to topic library
AI MaxxingIntermediate90 sec

Retrieval-augmented generation

Retrieval-augmented generation retrieves relevant documents at request time and includes them in a model's prompt, so its answer is grounded in that supplied content.

Prerequisite: Information retrieval

What matters

This lets a model answer accurately about information outside its training data or too recent to have been learned, by supplying the needed facts directly in context instead.

Example

A support chatbot using retrieval-augmented generation looks up the current version of a policy document before answering, rather than relying on what it memorized during training.

Common misconception

Retrieval-augmented generation does not eliminate hallucination entirely; the model can still misread or ignore the retrieved context when generating its answer.

Recall question

What problem does supplying retrieved documents in the prompt help solve?

Keywords and related concepts

RAGretrieval-augmented generationgroundingvector database

Related topics

Vector database
AI MaxxingIntermediate
Reranking
AI MaxxingIntermediate
Hallucination
AI MaxxingBeginner