Glossary · AI & automation

Retrieval-augmented generation (RAG) meaning

RAG means retrieval-augmented generation: an AI model answers by first fetching relevant passages from your own documents. How it works, and when to use it.

How does RAG work, step by step?

  1. Prepare. Documents such as policies, manuals or a loan file are split into short chunks, and each chunk is stored with a vector embedding that captures its meaning.
  2. Retrieve. When a question comes in, it is converted the same way and the closest chunks are fetched, often combined with plain keyword search.
  3. Augment. Those chunks are placed in the model's prompt with an instruction to answer only from them.
  4. Generate. The model writes the answer and points to the chunks it used.

The method was described in a 2020 research paper and is now the standard way to make a general model useful on a company's own material.

RAG vs fine-tuning: which should you use?

RAGFine-tuning
What changesThe documents the model readsThe model's weights
Updating factsReplace the documentTrain again
CitationsNaturalHard
Best forFacts, policies, case filesStyle, format, narrow skills

For anything where facts change or must be traced, such as a lender's credit policy, RAG is usually the right starting point.

A worked example in lending (illustrative)

A credit analyst asks: "Does this applicant's average bank balance meet our policy for this loan size?" A RAG setup retrieves the relevant clause from the credit policy and the six monthly balance figures from the parsed bank statement. The model answers that the average is below the policy band and quotes both sources. The analyst clicks each citation to check. Figures and policy wording are illustrative. This is the idea behind a loan underwriting assistant that drafts a memo with every line cited to the document it came from, while the credit officer makes the decision.

What are the common mistakes with RAG?

For the limits that should apply in lending, see what AI should never do in a loan file; for where such a system runs, see on-premise vs cloud AI for banks and NBFCs.

Related terms

Read next

Where this shows up in our work. AutoCredit: Statements, GST, bureau and AA into one file; a memo against your policy bands; same-day field verification. Book a 30-minute working session with an engineer.

Questions

What does RAG stand for in AI?

RAG stands for retrieval-augmented generation. The AI retrieves relevant passages from a set of documents first, then generates its answer from those passages, usually with citations back to the source.

Is RAG better than fine-tuning?

For facts that change or need to be traced, such as policies and case files, RAG is usually better because you update documents instead of retraining. Fine-tuning suits teaching a model a style or narrow skill.

Does RAG stop AI hallucinations?

It reduces them by giving the model the right material, but it does not eliminate them. Wrong retrieval or loose instructions can still produce invented answers, so outputs that matter need human review.

Sources

General guidance, current as of the date above. Figures in examples are illustrative. Rules change: confirm with your adviser or the official portal before acting. More terms in the glossary.