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

Adaptive RAG: retrieve only when it helps

From: RAG That Thinks →

A router in front of retrieval decides whether a query even needs external knowledge. Simple questions go straight to the model; questions about private or fresh data get retrieved. It sizes the effort to the question.

Adaptive: a router decides whether to retrieveinteractive
queryrouterskip: answer directlyretrieve, then answer
What is 2 + 2?

Skip retrieval. the model already knows this; retrieval would only add noise and latency.

FLARE: retrieve mid-generation

From: RAG That Thinks →

Forward-looking active retrieval woven into generation. As the model writes, confident words stream straight out, but whenever it is about to say something it is unsure of, it pauses, retrieves on that span, and continues.

FLARE: retrieve only for the words it is unsure ofinteractive
The Eiffel Tower was completed in

Confident words are written straight out; retrieval only fires on the shaky ones.

Self-RAG: grade yourself as you write

From: RAG That Thinks →

The model emits special reflection tokens that gate its own flow: whether to retrieve, whether a passage is relevant, and whether the answer is actually supported. A 'not supported' verdict sends it back to revise, in-band, before anything is shown.

Self-RAG: the model grades itself as it writesinteractive
[ Retrieve? ]yesthe question needs external facts, so pull passages
[ Relevant? ]yesthe retrieved passage is on-topic, keep it
[ Supported? ]nothe draft claims a number the passage never states, so do not trust it
reviseredorewrite the answer using only what the passage actually supports
[ Supported? ]yesnow every claim traces to the passage, so emit the answer

Special reflection tokens decide whether to retrieve, whether a passage is relevant, and whether the answer is actually supported. A “no” on the last one sends it back to revise, in-band, before anything is shown.

Visualizers — Sachin Gupta