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

The sender retries until it gets an acknowledgment, so a message is never lost. But if the acknowledgment itself is lost, it resends and the receiver gets a duplicate: a card charged twice. Never lost, sometimes doubled.

Keep trying until you hear backinteractive
senderretriescharge 100receivercharged 1x

The sender sends the message and waits for an acknowledgment.

Each request carries a unique idempotency key. The first delivery charges the card and records the key; a retry with the same key is recognized and skipped. Delivered twice, charged once: exactly-once in practice, the Stripe pattern.

A key so a repeat changes nothinginteractive
senderkey a1b2charge · a1b2receiverprocessed keys:(empty)cardcharged 0x

The sender attaches a unique idempotency key, a1b2, to the charge.

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.

Visualizers — Sachin Gupta