What is RAG in AI? Retrieval-augmented generation explained with a bank example

RAG is the technique behind most company chatbots that answer from internal documents. The name comes from a 2020 paper that combined a retriever with a generator (Lewis et al., 2020). The idea is simple; doing it well is engineering.
How RAG works in four steps
- Ingest: split your documents into chunks and index them (embeddings and/or keywords).
- Retrieve: for each question, fetch the most relevant chunks.
- Generate: give the model the question plus those chunks, and ask it to answer only from them.
- Cite: return the answer with links to the sources, or refuse if the sources do not support an answer.
A bank example
A bank’s operations team has hundreds of circulars and process notes. A RAG assistant lets an officer ask “what documents are needed for a joint account with a minor?” and get the answer with the exact circular cited. The officer checks the source before acting. See what else engineers build in AI in banking.
Why it still fails
Language models can still produce fluent but unsupported content, a problem called hallucination (Ji et al., 2023). In RAG it usually comes from bad retrieval (the right passage was not found), bad chunking, or a prompt that does not force refusal.
| Symptom | Usual cause | Fix |
|---|---|---|
| Wrong answer, confident tone | Wrong chunks retrieved | Hybrid search, better chunking, metadata filters |
| Answer without a source | No refusal rule | Require citations, refuse otherwise |
| Good on demo, bad in use | No evaluation set | Build 50–100 real questions with expected answers |
| Slow or costly | Too many chunks | Re-rank, cap context, cache |
How to build one for your portfolio
Take a public set of documents in one sector, build the four steps, write an evaluation set, deploy it and measure accuracy and latency. That is weeks 4–9 of our 12-week roadmap and a core block of the Deployed Engineer Program.
Frequently asked questions
What does RAG stand for in AI?
Retrieval-augmented generation: the model retrieves relevant passages from your documents and generates an answer grounded in them.
Does RAG stop hallucinations?
It reduces them but does not remove them. Citations, refusal rules and an evaluation set are still needed.
Is RAG a good project for freshers?
Yes. A deployed, evaluated RAG assistant on a real sector is one of the strongest first portfolio projects.
Studies cited
- Lewis et al. (2020). Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. NeurIPS 2020 (arXiv). doi:10.48550/arXiv.2005.11401
- Ji et al. (2023). Survey of Hallucination in Natural Language Generation. ACM Computing Surveys. doi:10.1145/3571730




