Gradient

Courses

∇\nabla∇The maths behind AI0/72
π\piπMaths0/84
⋆\star⋆AI for everyone0/10
Γ\GammaΓGame theory0/49
py\texttt{py}pyPython for AI0/15
y^\hat{y}y^​Build your own AI0/15
All courses

Tuition

My tuitionOlympiad trackCompetitions

Practice

ProjectsAsk a questionTrain on a GPUExplorationsMaths StoriesUnsolved problemsPlaygroundScience labsMock testsOlympiad

Reference

GlossaryBlogDiscoveries
Glossary › Retrieval

What is retrieval?

Finding passages relevant to a question by comparing embedding vectors, and adding them to the context so that the model can read the answer instead of recalling it. Also called RAG.

Where it is taught

Retrieval. A model's knowledge is frozen on the day its training ends. Retrieval fetches relevant text at the moment you ask and places it in the context, like an open-book exam.

What the lesson leaves you with

  • Retrieval finds relevant passages by comparing embedding vectors, then adds them to the context.
  • The model's weights do not change. Only what it can see changes.
  • An answer is only as good as the passages that were found.
Open the lesson

Questions

What is retrieval?
Finding passages relevant to a question by comparing embedding vectors, and adding them to the context so that the model can read the answer instead of recalling it. Also called RAG.
Where is retrieval used in AI?
A model's knowledge is frozen on the day its training ends. Retrieval fetches relevant text at the moment you ask and places it in the context, like an open-book exam.
What is the key idea to remember about retrieval?
Retrieval finds relevant passages by comparing embedding vectors, then adds them to the context.
Where can I learn retrieval step by step?
In the lesson “Retrieval” in Gradient’s course on the maths behind AI, with interactive diagrams and questions.

Related terms

  • Context window
  • Fine-tuning
  • Hallucination
  • Pre-training
  • Prompt