Browse Foundations

What Is RAG? How AI Tools Answer Questions About Your Data

Retrieval-augmented generation is how an AI assistant can accurately answer questions about a document you just uploaded, without retraining the underlying model.

The core idea

RAG (retrieval-augmented generation) retrieves relevant passages from a knowledge base — your documents, a database, the web — using embeddings and a vector database, then hands those passages to the model alongside your question. The model answers from that retrieved material instead of relying only on what it learned during training.

Why it matters

It lets an AI product answer accurately about content the underlying model was never trained on — internal company docs, this morning's news, a PDF uploaded five seconds ago — without the cost and delay of retraining or fine-tuning the model itself.

The weak link

A RAG system is only as good as its retrieval step. If the search fetches the wrong passages, the model will still answer fluently and confidently — just from the wrong material. Most of the engineering effort in a good RAG system goes into tuning that retrieval step, not the generation step.

Frequently Asked Questions

What does RAG stand for?

Retrieval-augmented generation — retrieving relevant passages from a knowledge base before answering, rather than relying only on what the model learned during training.

How is RAG different from fine-tuning?

RAG adds external, up-to-date information at answer time without touching the model itself. Fine-tuning actually retrains the model's weights, which is slower and more expensive to update.

Keep Exploring