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

Ordering: same messages, wrong order, wrong answer

From: Delivery Guarantees: At-Least-Once, Exactly-Once, and Idempotency →

Deposit 100 then withdraw 50 on an account that cannot go negative ends at 50. Reorder the two and the withdrawal is rejected against a zero balance, ending at 100: the same messages, a different answer. Keeping them in order prevents it.

Same messages, wrong order, wrong answerinteractive
in order0+100 deposit= 100-50 withdraw= 50reordered0-50 withdrawrejected+100 deposit= 100

Two events for one account that starts at 0 and may not go negative: deposit 100, then withdraw 50.

A messy, context-dependent question ('and how much does it cost?') is unsearchable on its own. Query rewriting resolves the context and produces a clear, standalone query the index can match.

Query rewriting: clean the messy questioninteractive
metformin?
and how much does it cost?
sent to search:and how much does it cost?
"it" = ? unsearchable

On its own the follow-up is unsearchable: the index has no idea what “it” refers to.

Query expansion / multi-query

From: A Field Guide to RAG →

One wording can miss documents that use different words. Multi-query fans the question into several phrasings, searches all of them in parallel, and pools the results, catching passages a single phrasing would have missed.

Multi-query: ask it several ways, pool the resultsinteractive
question:car insurance claim
originalcar insurance claim
rephraseauto policy claim
rephrasevehicle accident reimbursement
pooled results

You start with a single wording, which may not match documents that use different words.

Visualizers — Sachin Gupta