RAG_LAB

Retrieval-Augmented Generation (RAG) answers questions by first retrieving relevant text from a document collection, then handing that text to a language model to generate a grounded answer. This page walks through the four stages that make retrieval possible — click any step below to interact with it directly and watch the concept work in real time, with a toy (not real) implementation small enough to see all the way through.

01

Chunking

Split raw text into smaller pieces before anything is embedded.

02

Embedding

Turn a piece of text into a vector — a list of numbers a computer can compare.

03

Vector DB

Store many embedded chunks so the closest ones can be found later.

04

Querying

Embed a question and rank stored chunks by similarity — this is retrieval.

all four stages run entirely in your browser — no server, no real model, no data leaves this page