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

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.

Graph vs flat retrieval

From: Beyond the Vector

Some questions cannot be answered by one passage. Toggle between vector retrieval (returns the closest chunk and stops) and graph retrieval (follows the connections to a multi-hop answer).

Q: “Who leads the team that owns the project using the Vector DB?”
leadsmemberownsusesmust complyBinaSearch teamAdaRankBotVector DBGDPR
Vector search matches “Vector DB” and returns that passage. It has the closest chunk, but not the answer, because the answer is three hops away.

Step through the lifecycle every MCP connection runs: negotiate capabilities, discover the tools, call one, read the result. The sameness is why one client can talk to any server.

0 / 7
Client → Server
Server → Client
Client → Server
Client → Server
Server → Client
Client → Server
Server → Client
Every MCP server speaks this same lifecycle: negotiate capabilities, discover what is available, then call it. That sameness is why one client can talk to any server.
Visualizers — Sachin Gupta