Visualizers

Learn by moving things

Interactive explainers for the ideas behind retrieval, embeddings, and agents. A formula tells you what is true; dragging a vector shows you why. Each one also appears inside the article it belongs to, and runs entirely in your browser, so drag, poke, and break it.

Portrait of Sachin Gupta rendered in binary

HyDE: search from a made-up answer

From: A Field Guide to RAG →

A question sits far from the passages that answer it on the embedding map. HyDE drafts a rough made-up answer, which lands beside the real answer passages because it is shaped like one, and searches from there. The guess is discarded; the real passages it found are read.

HyDE: search from a made-up answer, not the questioninteractive
the map (embedding space)real answer passagesquestionfar: weak match

The question is worded nothing like the passages that answer it, so it sits far away on the map and pulls back weak matches.

Contextual compression

From: A Field Guide to RAG →

A retrieved chunk is on-topic but mostly padding for any one question. Contextual compression keeps only the sentences that actually answer it and drops the rest, so the prompt fills with signal instead of filler.

Contextual compression: keep the signal, drop the fillerinteractive
question:What is the laptop return window?
The company issues each employee a laptop on their first day.
Laptops must be returned when you leave the company.
Defective laptops may be returned within 30 days for a replacement.
The IT desk handles all equipment requests.
Personal software should not be installed on company machines.
to the prompt:~61 tokens(the whole chunk, mostly filler)

The retrieved chunk is on-topic but mostly padding for this exact question. Sending all of it wastes prompt budget.

Keeping the catalog in step with the shelf

From: RAGOps: RAG Is a Distributed System, Not a Demo →

A source page is edited. Instead of rebuilding the whole index, a file watcher fires and only that one page is re-chunked and re-embedded (8 chunks, not 50,000), so the index catches up to the corpus one document at a time.

Keeping the catalog in step with the shelfinteractive
source pagepolicyv1chunk + embedthis page's chunks in the indexv1v1v1v1v1v1v1v18 chunks re-embedded this update49,999 other documents untouchedfresh

The index is built once. The policy page and its 8 chunks in the index agree: both v1, fresh.

Visualizers — Sachin Gupta