A joint venture of Intervuwalla and Tech-Bharat: Intervuwalla × Tech-BharatWhatsApp +91 98100 00622info@intervuwalla.com
  1. Home
  2. Blog
  3. What is RAG in AI? Retrieval-augmented generation explained with a bank example

Deployed engineering

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

Deployed Engineer Lab editorial team, with Anil Gupta · · Last updated · 8 min read

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

  1. Ingest: split your documents into chunks and index them (embeddings and/or keywords).
  2. Retrieve: for each question, fetch the most relevant chunks.
  3. Generate: give the model the question plus those chunks, and ask it to answer only from them.
  4. 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.

SymptomUsual causeFix
Wrong answer, confident toneWrong chunks retrievedHybrid search, better chunking, metadata filters
Answer without a sourceNo refusal ruleRequire citations, refuse otherwise
Good on demo, bad in useNo evaluation setBuild 50–100 real questions with expected answers
Slow or costlyToo many chunksRe-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

  1. Lewis et al. (2020). Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. NeurIPS 2020 (arXiv). doi:10.48550/arXiv.2005.11401
  2. Ji et al. (2023). Survey of Hallucination in Natural Language Generation. ACM Computing Surveys. doi:10.1145/3571730

About the authors

Written by the Deployed Engineer Lab editorial team, with the experience of Anil Gupta and Clément Lacaille.

Talk to a counsellor

Start today.

Tell us who you are. A counsellor calls you back with the right program, fees and batch dates.