Learn AI /Search, Embeddings and RAG /Retrieval
Retrieval
- Starter
- Search, Embeddings and RAG
- Programme & data teams
Also called: document retrieval.
Back to the milestone you came from
In five seconds
What it is
Retrieval returns passages that a search method ranks as relevant, so a person or later model step can use source material.
In plain words
Retrieval is the part of a system that fetches bits of text judged most relevant to a question so the next step has material to examine.
An everyday example
A traveller in Santiago asks a transport desk, “What is the fastest way to get from the museum district to the university area after 6 pm?” The desk worker does not read every leaflet in the office. Instead, they pull a few route sheets and service notices that seem closest in meaning, even if one says “campus quarter” rather than “university area”. The traveller reads those pages first and then decides which route to take. The key step is not giving the final advice from memory, but finding the most relevant pages quickly.
A human desk worker may use broad world knowledge, ask follow-up questions and judge reliability in ways a retrieval system does not. Real retrieval usually compares numerical representations and returns ranked text chunks, not whole leaflets chosen by common sense alone. Also, retrieval does not itself decide the best route or write the final reply; it only selects candidate source material.
Remember thisRetrieval does not write the answer; it returns candidate source passages that a later step may use.
Understand it
Understand it
Why it matters
For non-specialists, retrieval matters because it affects whether a system starts from the right evidence. If retrieval is weak, a later summary or AI answer may miss key facts, quote the wrong source or sound confident while relying on poor context. If retrieval is strong, people can check the source material, compare passages and make better decisions about whether to trust the output. In practice, this affects time, quality and accountability: Can you find the relevant paragraph quickly? Can you trace where a claim came from? Can you spot when the system found something only loosely related?
How retrieval pulls source passages for a question
After viewing this, a reader should be able to say that retrieval takes a query, searches stored text for relevant passages, ranks them and returns evidence for later use.
01
1. Question enters
A user asks a question or gives a topic to search for.
Draw a rounded box on the left labelled 'Query' with example text beneath: 'What support is available for small farmers after flooding?'.
02
2. Documents are prepared
The document collection has usually already been split into smaller chunks and indexed so search can be fast.
Draw a middle-left box labelled 'Document store' containing 4 to 6 stacked page icons. Add small sublabels 'chunks' and 'index'.
03
3. Search compares relevance
The system compares the query with stored chunks using keywords, meaning, or both, then scores likely matches.
Draw a centre box labelled 'Retrieval' with a magnifying-glass icon and short tags: 'match words', 'match meaning', 'score'.
04
4. Best passages come out
The system returns a ranked list of the most relevant passages, ready for a person or model to read.
Draw a right-side box labelled 'Top passages' with three snippet cards numbered 1, 2 and 3, each showing a short highlighted line of text.
05
5. Answering happens later
A later step may use those passages to draft or check an answer, but that later step is not retrieval itself.
Draw a dashed arrow from 'Top passages' to a final optional box labelled 'Answering step', visually separated to show it is outside retrieval.
A left-to-right flow diagram with four boxes and arrows. Read from the user question on the left, through stored documents and search, to ranked passages on the right. Small labels show that documents may be split into chunks and indexed before search, and that the retrieved passages can then be handed to a person or model.
Hovering or tapping each box reveals a one-sentence note: input, preparation, matching, ranking, and later use.
Describe this without the diagram
The diagram explains retrieval as a five-part flow. First, a user question enters the system. Second, documents have already been prepared as smaller chunks and indexed. Third, a retrieval step compares the question with those stored chunks using keyword matching, meaning-based matching, or both, and gives them relevance scores. Fourth, the system returns the highest-ranked passages rather than a finished answer. Fifth, those passages may then be used in a separate answering step. The main idea is that retrieval finds evidence; it does not itself generate the final response.
With reduced motion: Show the same five boxes in a static left-to-right row with arrows and all labels visible at once. The optional answering step remains separated with a dashed arrow to show it is outside retrieval.
Retrieval is the step where a system searches stored documents and returns passages its search method judges relevant to a question. The input is usually a user query, such as a question or topic. The output is usually a short list of passages, snippets or document sections.
In many modern systems, search does not rely only on exact word matching. It can also compare meaning. To do that, the query and documents may be turned into numerical representations called embeddings. Similar meanings may be represented by nearby vectors, which can help the system find passages even when they use different words.
What comes back is not the final answer or proof that the material is correct. It is candidate evidence that may help a person, search tool or language model produce a response. Retrieval selects material; a citation separately points from a claim to its supporting passage or document.
Retrieval is often confused with retrieval-augmented generation, or RAG. They are related but not the same. Retrieval only finds relevant material. RAG is the larger workflow that retrieves material and then asks a generative model to draft an answer using those sources.
Good retrieval depends on how documents were prepared and stored. Long documents may be split into chunks and indexed in a searchable structure before retrieval. Retrieval then searches that structure and ranks likely matches.
How “Finding the right bus advice for a cross-city trip” maps onto the real thing
| In the story | In the AI system |
|---|---|
| The traveller's question about the trip | The user query |
| Route sheets and service notices in the office | The stored document collection or knowledge base |
| Pulling the pages that match the meaning of the question | Retrieving relevant passages by semantic or keyword matching |
| The traveller reading those pages before choosing | A person or model using retrieved evidence before producing an answer |
A worked example
Ahead of informals, a desk officer in Bonn must prepare talking points by close of business on references to human oversight in previously adopted texts and cleared statements.
Starting from: Query: "previous language on people retaining oversight of automated decisions"
- The approved search tool compares the query with indexed chunks from adopted texts and cleared statements.
- Semantic matching retrieves passages using related wording, such as "meaningful human control" or "human review", while keyword matching also gives weight to exact terms.
- The passages are scored and ranked. An optional reranking step moves the passages that best match the full question nearer the top.
- The tool returns the leading passages with their document titles and locations so the desk officer can open and verify each source.
Result: The desk officer receives a short list of candidate passages rather than a drafted position. After checking context and clearance status, the officer can use the relevant source language in the talking points.
In a United Nations workplace
At close of business, a human resources officer supporting a procurement unit receives an implementing partner's progress report and must check its account of vacant project posts and recruitment delays. The officer uses an approved internal search tool to retrieve relevant passages from the report, the agreed workplan and earlier progress reports.
Retrieval can find related passages even when one document says "unfilled positions" and another says "recruitment pending". It ranks those passages as candidate evidence, but the officer still checks the source, reporting period and context before using them on the file.
Before you try thisThe report may contain personal data or procurement-sensitive information. It must not be uploaded to or searched through a tool that is not approved for that material. Any authorised retrieval system must preserve access controls, and retrieved passages must be verified before informing a personnel or procurement action.
Where you may hear it
- At a vendor demo for an ICT governance board
- In a procurement meeting reviewing an internal search tool
- While an information management officer tests a knowledge assistant
- During first reading of a concept note for a document question-answering pilot
Avoid confusion
Avoid confusion
Often confused with
Retrieval-augmented generation
A method that first finds relevant source passages and then asks a language model to answer using that material.
Indexing
Indexing organises documents or document chunks into a searchable structure so a system can quickly find the most relevant passages for a query.
Citation (in AI answers)
A citation in an AI answer points you to a source passage or document intended to support a specific claim.
Common misconceptions
Common misconception: Retrieval and RAG are the same thing.
Correction: Retrieval is only the finding step. RAG is a larger pipeline that usually includes retrieval plus a generative model that drafts an answer from the retrieved material. Keeping the terms separate helps people evaluate which part is working and which part is failing.
Common misconception: If a passage was retrieved, it must be correct.
Correction: Retrieved means 'judged relevant by the search method', not 'verified true'. A system can retrieve outdated, low-quality or only partly related text. People still need to check the source, date, context and fit for the question.
Common misconception: Meaning-based retrieval replaces keyword search completely.
Correction: Not always. Exact words still matter for names, codes, legal phrases, dates and technical terms. Many practical systems combine keyword and meaning-based methods because each catches things the other can miss.
Quick check
Which statement best describes retrieval in an AI-assisted question-answering system?
Retrieval is the search-and-selection step. It returns relevant passages from stored material. Writing the final answer, verifying truth and chunking documents are separate tasks, though they may appear in the same overall system.
Go deeper
Go deeper
The simple version
Retrieval is the part of a system that fetches bits of text judged most relevant to a question so the next step has material to examine.
The technical version
Retrieval takes a query and searches an indexed collection for relevant documents or chunks. In modern semantic retrieval, the query and stored text are often represented as embeddings, which are numerical vectors designed so semantically similar items are near each other. The system then performs nearest-neighbour search or a hybrid search that mixes embedding similarity with keyword signals. Results are scored, ranked and returned as candidate evidence. Optional reranking may refine the order. Retrieval is therefore a search-and-selection stage, not the generation stage; in a RAG pipeline, its output becomes context for a language model.
Reviewed external resources
EncyclopaediaInformation retrieval (opens in a new tab)Wikipedia
This link gives a broad overview of information retrieval concepts and history, which suits readers who want general background before AI-specific details.
Intermediatelink checked 2026-07-31
CourseEmbeddings (opens in a new tab)Google
This course material explains embeddings, which suits readers who want to understand how meaning-based retrieval can compare text beyond exact words.
Intermediatelink checked 2026-07-31
InteractiveEmbedding Projector (opens in a new tab)TensorFlow
This interactive tool lets readers explore how similar items can appear close together in embedding space, which suits visual learners experimenting with meaning-based search ideas.
Starterlink checked 2026-07-31
VideoVideo explanations: Retrieval (opens in a new tab)YouTube search
This is a YouTube search results page for retrieval explanations, which suits readers who prefer to compare several video styles rather than rely on one source.
search results, not one pagelink checked 2026-07-31
DiscussionCommunity discussion: Retrieval (opens in a new tab)Reddit search
This is a Reddit search results page for retrieval discussions, which suits readers who want informal questions, examples and practitioner conversations with caution about reliability.
search results, not one pagelink checked 2026-07-31
Where this came from
Drafted with a language model through an offline pipeline, checked against this site's schema, and every external link above fetched to see whether it answers. Treat it as a starting point and check anything that matters against the primary sources. How this site is built and what that means.
The one thing to remember
Retrieval does not write the answer; it returns candidate source passages that a later step may use.