Retrieval Augmented Generation (RAG) allows an LLM to answer questions based on your own private data (PDFs, Notes, Emails).
How it Works
- Ingestion: Your text documents are chopped into small chunks.
- Embedding: Each chunk is converted into a vector (a list of numbers) representing its meaning.
- Retrieval: When you ask a question, the system finds the most similar chunks.
- Generation: The chunks are sent to the LLM along with your question.
Why use RAG?
- Accuracy: Reduces hallucinations by grounding the AI in facts.
- Privacy: Your data stays local.
- Context: The AI knows things it wasn't trained on (e.g., your specific project details).
Where to go next
This page explains what RAG is. To use it on your own files: the recipe Chat with your PDFs privately sets it up with an app, no code; the Complete Local RAG Pipeline builds the same thing yourself in Python.