Skip to content
Urnish Tech logo
Back to blog
AIGenAIRAGLLM

AI series · Part 2: Retrieval (RAG)

RAG Explained: Give Your LLM an Open-Book Exam

Urnish Tech·Oct 12, 2026· 3 min read

Retrieval-Augmented Generation searches your own documents first, then has the LLM answer from what it found, with a citation. Here's how the pipeline works.

RAG (Retrieval-Augmented Generation) means: before answering, search your own documents, then hand the best pieces to the LLM so it answers from real data. It turns a closed-book exam into an open-book exam.

The pipeline

text
Prepare once:    documents → chunks → embeddings → vector DB
Every question:  question → find best chunks → LLM (chunks + question) → answer with source

Where you've seen it

  • Bank and telecom support bots that answer from their own help-centre articles.
  • Perplexity, which searches the web first and then answers with sources.

RAG in our HR assistant

Question: "Can an intern take maternity leave?" The retriever finds this chunk from the intern policy:

Interns are not entitled to company maternity leave… up to 4 weeks unpaid leave.

- Acme Intern Policy

The LLM answers from that chunk and cites it, instead of guessing from general knowledge.

RAG grounds the LLM in our own documents, so answers are accurate, up to date and cite their source, which reduces hallucination.

- The short version

Next in the GenAI series: Chunking Strategies: How to Cut Documents Without Losing Meaning

Start from the top: GenAI Quick Answers and Series Guide

We deploy these patterns across production engagements in fintech, healthcare, and eCommerce. Talk to a senior engineer about how they apply to your platform.

Let's talk

Have a product idea or a system to scale?

Tell us what you're building. You'll hear back within one business day - from a senior engineer, not a sales rep.

  • Reply within 24h
  • Senior engineers only
  • Fixed-scope or T&M
  • NDA on request
or emailadmin@urnishtech.com