Skip to content
Finic
AI and agents

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 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.

Limits and risks

RAG reduces 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, 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.

← All glossary terms

Ship fraud, bot and KYB checks in minutes.

Start with $5 of free credit, or copy a prompt and let your coding agent set Finic up.

Sign up See pricing