RAG (Retrieval-Augmented Generation)

RAG is a technique where an LLM answers questions using your private documents—PDFs, emails, databases—instead of relying only on its training data. It retrieves relevant snippets and generates answers based on them.


In one sentence

RAG lets an AI answer questions about your own documents, not just what it learned from the internet.


What it's for

Customer support bots that read your company’s knowledge base. Legal assistants that search case files. Medical tools that reference patient records. Anywhere the answer lives in your data, not the public web.


How to think about it

Imagine a librarian who reads your question, runs to the stacks, pulls the 3 most relevant books, and writes an answer using only those pages. That’s RAG. The AI never memorized your documents; it looks them up on demand.


Common misunderstandings

RAG is not a database. It does not guarantee accuracy—if your documents are wrong, the answer will be wrong. It also struggles with questions that require synthesizing information across many scattered pages.


If you want to try it

Use NotebookLM (free). Upload a PDF—your resume, a report, a contract. Ask specific questions about it. Notice how the answers cite page numbers or quotes.


Sources

  • Google NotebookLM documentation
  • LangChain RAG tutorials