AI dictionary · LLMs and GenAI

What is RAG?RAG kya hai?

Also called: Retrieval augmented generation

RAG: Letting an LLM answer from your documents: search for relevant passages first, then generate an answer from them with citations.LLM ko aapke documents se jawaab dene dena: pehle relevant hisse dhoondho, phir unhi se citations ke saath jawaab banao.

🧸 Think of it likeAise samjho

Like an open book exam: first find the right pages in the book, then write the answer from them and mention the page.Open book exam jaisa: pehle kitaab mein sahi pages dhoondho, phir unse jawaab likho aur page number batao.

📘 ExplainedVistaar se

RAG has two phases. Indexing: split documents into chunks, create embeddings and store them in a vector database with metadata and permissions. Answering: embed the question, retrieve the best chunks (often hybrid search plus reranking), put them in the prompt with instructions to answer only from them and cite sources, then generate. RAG keeps answers current and grounded without retraining. Most failures are retrieval failures, so measure retrieval and answer quality separately.RAG ke do phases hain. Indexing: documents ko chunks mein todo, embeddings banao aur metadata aur permissions ke saath vector database mein rakho. Answering: sawaal ka embedding banao, best chunks nikaalo (aksar hybrid search plus reranking), unhe prompt mein daalo is instruction ke saath ki sirf unhi se jawaab de aur sources cite kare, phir generate karo. RAG bina retrain jawaab current aur grounded rakhta hai. Zyaadatar failures retrieval ke hote hain, isliye retrieval aur jawaab ki quality alag naapo.

💡 Real exampleAsli example

An HR bot that answers 'how many casual leaves do I get?' from the latest policy PDF, with the page reference.HR bot jo 'mujhe kitni casual leaves milti hain?' ka jawaab latest policy PDF se, page reference ke saath deta hai.

📖 Learn it step by stepStep by step seekho

🔗 Related termsJude hue shabd

Questions people ask

What is RAG?

Letting an LLM answer from your documents: search for relevant passages first, then generate an answer from them with citations. RAG has two phases. Indexing: split documents into chunks, create embeddings and store them in a vector database with metadata and permissions. Answering: embed the question, retrieve the best chunks (often hybrid search plus reranking), put them in the prompt with instructions to answer only from them and cite sources, then generate. RAG keeps answers current and grounded without retraining. Most failures are retrieval failures, so measure retrieval and answer quality separately.

How can I understand RAG in simple words?

Like an open book exam: first find the right pages in the book, then write the answer from them and mention the page.

What is an example of RAG?

An HR bot that answers 'how many casual leaves do I get?' from the latest policy PDF, with the page reference.

RAG ka matlab kya hai?

LLM ko aapke documents se jawaab dene dena: pehle relevant hisse dhoondho, phir unhi se citations ke saath jawaab banao. Open book exam jaisa: pehle kitaab mein sahi pages dhoondho, phir unse jawaab likho aur page number batao.

See RAG in the full A to Z dictionary · Start a free AI course