Gradient LabSign up free

ML glossary › RAG

What is rag in machine learning?

Retrieval-augmented generation: fetching relevant documents and giving them to the model before it answers.

Where it shows up

Transformers and LLMs

Retrieval-augmented generation

rag first runs a vector search over your documents to find the few passages most relevant to the question.

See rag in motion. The lesson animates it step by step, free.

Open the lesson