RAG

Dense retrieval

Dense retrieval ranks items using learned vector representations.

QuestionEmbed to a vectorNearest-neighbour searchTop passages by meaning
Dense retrieval ranks items using learned vector representations. Values shown in the worked visual are illustrative unless the labels state otherwise.

How it works

An encoder maps queries and documents into a shared space. Semantic neighbors can match even when they share few exact words.

A concrete example

Illustrative: “reset password” retrieves “account credential recovery” at similarity 0.84.

Do not confuse it with Sparse retrieval

dense retrieval uses learned vectors; sparse retrieval relies on term-weighted dimensions.

Study the full lesson