---
term: "Retrieval-augmented generation"
category: "Agents and autonomy"
url: https://agenticopenfinance.com/glossary/retrieval-augmented-generation
source: AgenticOpenFinance glossary
---

# Retrieval-augmented generation

> Retrieving relevant documents or records first and giving them to the model, so its answer rests on current material.

Retrieval-augmented generation is a design in which an application first retrieves relevant documents or records, such as a product's terms or a customer's recent transactions, and passes them to the model together with the question. The answer can then rest on current, citable material rather than only on what the model learned in training. Retrieved content is also a path for indirect prompt injection, so it should be handled as data, never as instructions.

Related terms: [Large language model](https://agenticopenfinance.com/glossary/large-language-model.md), [Indirect prompt injection](https://agenticopenfinance.com/glossary/indirect-prompt-injection.md), [Confabulation](https://agenticopenfinance.com/glossary/confabulation.md), [System prompt](https://agenticopenfinance.com/glossary/system-prompt.md)
