Building AI

RAG explained without code

Jitendra Bhavsar (JB)
Jitendra Bhavsar (JB)
Updated 4 Nov 20262 min read
A developer working with an AI assistant on company documents

It’s 9:40 pm and you’re planning a long weekend. You ask the HR chatbot how many leaves you have left. “You have 12 leaves remaining,” it says, with total confidence.

Next morning, HR says 4.

The bot wasn’t lying. It answered from last year’s leave policy, the one it happened to find first. That one wrong document is what RAG is really about.

On this page
  1. 1. What is RAG, in plain words?
  2. 2. Why do AI products look things up before they answer?
  3. 3. How can you tell when it looked up the wrong thing?
  4. 4. What should designers and product managers decide about RAG?
  5. 5. Questions about building ai
In short · What is RAG?

RAG (retrieval-augmented generation) means the AI looks things up before it answers. It finds the most relevant passages in your own documents, then writes its answer from them, ideally showing where each fact came from. Think of it as an open-book exam for AI.

What is RAG, in plain words?

It’s how an AI answers from your information instead of from memory. Ask that HR bot about leave, and a RAG system first searches the HR documents, picks the passages that seem to match, and only then writes a reply.

Without that step, the AI answers from whatever it learnt in training, which knows nothing about your company’s leave policy at all.

Why do AI products look things up before they answer?

Because it makes answers current, specific and checkable. It also gives the AI an honest way out: “I couldn’t find that in the policy”, instead of a made-up number.

AspectWithout RAGWith RAG
KnowsOnly what it was trained onYour documents too
Up to dateFrozen at training timeAs current as your files
Shows sourcesNoCan point to the passage
When unsureMay guessCan say nothing was found

How can you tell when it looked up the wrong thing?

Look at what it read, not just what it said. Our 12-leaves bot sounded perfect. The problem was the document behind the answer: last year’s policy sitting right next to this year’s.

The usual giveaways: the source it quotes doesn’t actually say that, the answer mixes two versions, or it’s very sure about something the documents never mention.

What should designers and product managers decide about RAG?

The decisions that matter most aren’t code. Which documents may the bot read, and which never? Does it show its source? What does it say when nothing matches? Who removes last year’s policy?

Get those right and the 12-leaves surprise never happens. If you’d like to build an assistant like this on real documents, see how our studio programme does it. And when you’re ready, read how to test an AI feature before users do.

Questions about building ai

Retrieval-augmented generation. The AI retrieves relevant information first, then generates its answer from it.

More answers on the FAQs page and the fees and scholarships page.

Jitendra Bhavsar (JB)
WRITTEN BY

Jitendra Bhavsar (JB)

Co-faculty, AI build

JB leads technical delivery and AI automation at Qquench and teaches the build side of the programme.

Cohort 1 (Winter 2027) · 18 Jan – 16 Apr 2027 · 12 seats · apply by 11 Jan 2027

Ready to build your first agent? Start free, get ₹2,000.

  1. 01 · TodayCreate your free accountVerified within 1 working hour; ₹2,000 credit added. Want to see the studio first? Book a free Saturday session.
  2. 02 · By 11 JanTake the assessmentAbout 20–25 minutes, then a conversation with Juily or JB.
  3. 03 · 18 Jan 2027Start in the studioTwelve weeks, pods of four, faculty in the room.