---
title: "What is retrieval-augmented generation (RAG)? Definition and examples"
description: "Retrieval-augmented generation (RAG) is a method where an AI system first finds relevant documents or records, then gives them to a language model to use…"
canonical: "https://finic.ai/glossary/retrieval-augmented-generation"
last-updated: "2026-12-03"
---

# What is retrieval-augmented generation (RAG)?

Retrieval-augmented generation (RAG) is a method where an AI system first finds relevant documents or records, then gives them to a language model to use when it writes its answer.

Also called: RAG, Grounded generation

## How it works

A RAG system has two parts. The retrieval step searches a store of documents, often with embeddings that match by meaning, and picks the passages most relevant to the question. The generation step passes those passages to a [large language model](https://finic.ai/glossary/large-language-model) with an instruction to answer from them.

This lets the model use information it was never trained on, such as internal policies, recent cases or a customer's own records, without retraining the model.

## Uses in fraud and compliance

RAG is useful where answers must come from a specific, changing body of material.

- Answering analyst questions from internal fraud playbooks and policies.
- Finding similar past cases when a new alert arrives.
- Summarizing a customer's history from records, notes and documents.
- Checking a business against the documents it submitted during [KYB](https://finic.ai/glossary/kyb).

## Limits and risks

RAG reduces [AI hallucination](https://finic.ai/glossary/ai-hallucination) but does not remove it. If retrieval returns the wrong passages, the answer will be wrong too. The model can also mix retrieved facts with its own guesses.

Retrieved text is also an attack surface. A document planted in the store can carry [prompt injection](https://finic.ai/glossary/prompt-injection), and retrieval can expose data to users who should not see it unless access rules are applied at search time.

## Good practice

Ask the model to cite the passages it used, apply the same access rules to retrieval as to the source data, and test the system with questions whose answers you know.

## Related terms

- [Large language model (LLM)](https://finic.ai/glossary/large-language-model.md): A large language model (LLM) is a neural network trained on large amounts of text to predict and generate language. It powers chat assistants, AI agents and many text tools.
- [AI hallucination](https://finic.ai/glossary/ai-hallucination.md): An AI hallucination is output from an AI model that sounds plausible but is false or not supported by its inputs, such as an invented fact, source or figure.
- [Prompt injection](https://finic.ai/glossary/prompt-injection.md): Prompt injection is an attack in which text given to an AI model contains instructions that override what its developer or user intended, so the model leaks data or takes unwanted actions.
- [Model Context Protocol (MCP)](https://finic.ai/glossary/model-context-protocol.md): The Model Context Protocol (MCP) is an open standard that lets AI applications connect to outside tools and data through MCP servers, using one common interface.
