Back to Home
Retrieval-Augmented Generation (RAG)

Retrieval

Retrieval means selecting the most useful document chunks and sending them to the AI model.

This is a simplified educational demo. Real retrieval systems use more advanced ranking and filtering.

Interactive Playground

Knowledge Base

3
Live Visualization
📄 Question ready — click Retrieve 0 / 8 compared
Question
🔍
Vector
Search
🏆
Rank
Results
🎯
Select
Top K
📬
Send to
LLM

All Chunks

Context Given to AI

Statistics

8
Total Chunks
8
Chunks Compared
3
Retrieved Chunks
3
Top K
0 words
Context Size

How It Works

Question
🔍
Vector
Search
🏆
Rank
Results
🎯
Retrieve Top
Chunks
📬
Send Context
to LLM
Vector Search vs. Retrieval

This distinction is the main goal of this lesson.

8
Search Results

Vector Search finds similar chunks — it scores every chunk in the knowledge base.

3
Retrieved

Retrieval chooses which of those chunks are actually sent to the AI.

Search happens on every chunk, but retrieval only keeps the top few. The rest never reach the AI.
Try raising or lowering Top K — a bigger K sends more context, but also more noise.
The Context Given to AI box is exactly what the language model sees, nothing more.
💡
Key Takeaway

Vector Search finds relevant information. Retrieval decides which information the AI actually receives.