PGPradhumn Gupta

Playground

Play with the ideas

The concepts behind production RAG, made interactive. Drag, tune, and guess — it's the fastest way to build intuition.

Retrieval Run

The whole pipeline as a game: drive the query, grab the relevant chunks, dodge the hallucinations, and reach the answer before the latency budget runs out.

Level 1Context 0/0Score 0

Retrieval Run

Drive the Query. Grab the relevant chunks, dodge the hallucinations, grab power-ups, and reach ANSWER before latency runs out. Bosses every 5 levels.

Move · Arrow keys / WASD · or drag on touch

Chunking, live

Watch a document re-split as you change size and strategy. See the full write-up.

Strategy
chunks 6avg size 82mid-sentence cuts 0
chunk 1 · 112 chars

Retrieval-augmented generation grounds a language model in your own data. First you split documents into chunks.

chunk 2 · 40 chars

Then you embed each chunk into a vector.

chunk 3 · 101 chars

At query time you embed the question, find the nearest chunks, and pass them to the model as context.

chunk 4 · 105 chars

The quality of that context decides the quality of the answer. Chunking is the step most teams get wrong.

chunk 5 · 79 chars

Split too small and you lose meaning; split too large and retrieval gets fuzzy.

chunk 6 · 52 chars

The goal is chunks that each hold one coherent idea.

Edit the source text

Notice: fixed chunking slices at a character count — watch the mid-sentence cuts climb as size shrinks. Recursive respects sentence boundaries, so ideas stay intact. That difference is most of why recursive out-retrieves fixed in practice.

Embedding space

Retrieval is just nearest-neighbor search in vector space. Orbit the space, click a word to make it the query, and watch what gets retrieved.

Orbit to look around · drag a word to move it and watch the distances change · tap a word to make it the query (rust). Retrieval just returns the query's nearest neighbors.

Nearest to “puppy

  • dog84%
  • kitten83%
  • wolf80%
  • apple45%
  • banana43%
  • bike32%
  • car30%
  • truck23%

Grounded or hallucinated?

Six answers, each with its retrieved context. Can you spot which ones the model made up?

Round 1 / 6Score 0

Question

What is our refund window?

Retrieved context

Customers may request a full refund within 30 days of purchase.

Model answer

You can get a full refund within 30 days of purchase.