Home · Glossary · What is retrieval-augmented generation (RAG)?
Glossary

What is retrieval-augmented generation (RAG)?

A language model on its own only knows what it learned in training. RAG gives it a way to look things up in your documents before it answers.

Definition: Retrieval-augmented generation (RAG) is a technique where an AI system first searches a collection of documents for relevant passages, then gives those passages to a language model so it can write an answer based on them. It lets a model answer questions about your own data and cite its sources.

How RAG works

A RAG system has two halves: a search engine and a writer.

  1. Prepare: documents are split into short chunks, and each chunk is turned into an embedding and stored.
  2. Retrieve: when you ask a question, it is embedded too, and the closest chunks are fetched, often combined with keyword matching and a reranker.
  3. Generate: the question and the retrieved chunks go to a language model with instructions to answer only from them.
  4. Cite: a good system shows which chunks the answer used, so you can check.

An example

You have a year of recorded team meetings and ask, “What did we decide about the launch date?” The retriever finds the three passages where the launch date came up. The model reads them and answers: the team pushed the launch to allow a final QA pass. Under the answer are links to the two recordings and the timestamps where it was said. Without retrieval, the model would have nothing to go on and might invent an answer.

RAG has become the standard way to build assistants over private data because it keeps the model and the knowledge separate. You can add, change or delete documents at any time and the next answer reflects it, with no retraining. It also means the quality of the answers depends heavily on the quality of the search underneath.

Checking a cited answer takes seconds when the citation points to an exact passage or timestamp, which is why citations are the feature to look for first in any RAG tool.

Where RAG goes wrong

Most RAG failures are retrieval failures, not writing failures:

  • Wrong passages retrieved. If search misses the relevant chunk, the model can't use it, however good it is.
  • Answering beyond the evidence. A model may fill gaps with plausible guesses. Instructions to say “I don't know” help but aren't perfect.
  • Chunking problems. A key sentence split across two chunks can lose its meaning.
  • Stale index. New files that haven't been indexed can't be retrieved.
  • No citations. Without sources, you can't tell a grounded answer from a confident guess.

In MediaFind

MediaFind's Ask feature works this way, entirely on your computer. It searches your library, passes the relevant passages to a language model running locally, and answers with citations that link to the exact file and timestamp. In Memory, an answer lists the messages it read, or says your conversations don't cover the question rather than guessing. No prompt or transcript is sent to a server. For the design details, read how Ask does local RAG.

Frequently asked questions

Is RAG the same as fine-tuning?

No. Fine-tuning changes a model's weights by training it on new data. RAG leaves the model alone and gives it relevant documents at question time, which is easier to update and makes sources visible.

Can RAG run without the cloud?

Yes. Both the search step and the language model can run on a laptop, so documents and questions never leave the machine.

Does RAG stop AI from making things up?

It reduces it but doesn't eliminate it. Citations let you check each answer against the source.

Search your whole library on your own computer.

Free for up to 10 files, with a 7-day Pro trial. No account, nothing uploaded.

Download for macOS View pricing