711
Dictionary

Retrieval

Selecting the most relevant chunks for a query before generation.

1 min readupdated 2026-07-04

/ quick answer

Retrieval is the R in RAG: given a query, score candidate chunks by similarity (vector, keyword, or hybrid) and return the top-k to inject into the prompt. Selecting the most relevant chunks for a query before generation.

Selecting the most relevant chunks for a query before generation. Retrieval is the R in RAG: given a query, score candidate chunks by similarity (vector, keyword, or hybrid) and return the top-k to inject into the prompt. In practice: Query 'refund policy' returns the 3 highest-similarity chunks from the help-center index.
Definition
Retrieval is the R in RAG: given a query, score candidate chunks by similarity (vector, keyword, or hybrid) and return the top-k to inject into the prompt.
Example
Query 'refund policy' returns the 3 highest-similarity chunks from the help-center index.
Related Workflows
Related Tool Stacks

/ frequently asked

What is Retrieval?

Retrieval is the R in RAG: given a query, score candidate chunks by similarity (vector, keyword, or hybrid) and return the top-k to inject into the prompt.

What is an example of Retrieval?

Query 'refund policy' returns the 3 highest-similarity chunks from the help-center index.

Why does Retrieval matter?

Selecting the most relevant chunks for a query before generation.

What should I learn after Retrieval?

Open the related workflows and prompts further down this page: they show how this idea is applied in a real task, step by step.

/ continue exploring

Related concepts

The vocabulary this page depends on.

  • →Contextual Compression

    Contextual compression is a technique used to reduce the size of the input context for a Large Language Model (LLM) while retaining its most relevant information, typically by summarizing or filtering.

  • →RAG (Retrieval-Augmented Generation)

    Inject external knowledge into an LLM at query time.

  • →Agentic RAG

    RAG where an agent decides what to retrieve, when, and from which source — instead of a single static query.

  • →Embedding

    A numerical vector representation of text, image or audio that captures meaning for similarity search.

all dictionary →

Related workflows

Turn this into a repeatable process.

all workflows →

Related tool stacks

The tools that run it in production.

all tool stacks →

Comparisons & alternatives

Pick between the options.

all comparisons →