Free concept playground · no account

Prompt Lab

See the exact prompt the model actually receives, every time.

Prompt Lab

AvailableFree

Type a message and watch the literal payload the model receives assemble around it — the hidden system preamble, retrieved context, and few-shot examples, concatenated and token-counted. You typed one line; the model reads the whole stack.

~7you typed
~100model receives
93%hidden from you
Your tokens
System preamble~49 tok
You are Acme's support assistant. Answer only from the provided context. If the answer is not in the context, say you don't know — never invent policy. Cite the source line. Be concise and polite.
Retrieved context~19 tok
Refunds are processed within 5 business days to the original payment method.
Retrieved context~12 tok
Orders over 2000 rupees ship free within India.
Retrieved context~13 tok
Support hours are 9am to 6pm IST, Monday to Friday.
Your message~7 tok
When will I get my refund?
The payload autopsythe literal string sent to the model

You typed ~7 tokens, but the model actually receives ~10093% of the prompt is scaffolding you never see. Here is the assembled request, character for character, in true send order.

[SYSTEM]
You are Acme's support assistant. Answer only from the provided context. If the answer is not in the context, say you don't know — never invent policy. Cite the source line. Be concise and polite.

[CONTEXT]
Refunds are processed within 5 business days to the original payment method.

[CONTEXT]
Orders over 2000 rupees ship free within India.

[CONTEXT]
Support hours are 9am to 6pm IST, Monday to Friday.

[USER]
When will I get my refund?
Share on WhatsApp
Was this playground useful?

Prompt Lab

Type a message the way you would to any chatbot — then watch the literal payload the model actually receives assemble around it. Before a real call would ever fire, Prompt Lab expands the payload autopsy: the hidden system preamble, the retrieved context chunks, and the few-shot examples, all concatenated with your own text and token-counted, in the exact order they go on the wire — system → context → example → user. The moat is that it shows the string character for character, so you can see that you typed one line but the model reads the whole stack. Most tools hide this; prompt engineering stops being folklore the moment you can see it. Runs entirely in your browser (0 uploads, works offline).

How to use it

  1. Load a preset — Bare prompt, RAG assistant, or Few-shot classifier — or type your own into Your message.
  2. Fill the hidden fields — System preamble, Retrieved context (one chunk per line), and Few-shot examples (a blank line between each) — to model how a platform wraps your text.
  3. Read the summary: you typed vs model receives, and the percentage hidden from you — plus the split bar showing your tokens against the scaffolding.
  4. Open the payload autopsy X-ray to read the assembled request in full, character for character, then Copy or Download it.

What this clears up (the fundamentals)

  • The model never sees just what you typed — a system preamble, retrieved context, and few-shot examples are prepended every turn. Your visible tokens are often the smallest part of the prompt.
  • Order is fixed and it matters — sections go system → context → example → user. The user turn lands last, after everything the platform decided the model should read first.
  • Tokens are roughly characters ÷ 4 — a fast mental model for why a "short" question can still cost a lot: the hidden scaffolding dominates the bill. Real tokenizers differ, but the intuition holds.
  • Few-shot vs instruction prompting are visible choices — an instruction lives in the system section; examples become their own example sections. Seeing them separated is how you learn which lever you're actually pulling.

Where it's used

A top-of-funnel AI-engineering check — the fastest way to feel why "the model ignored my instruction" is usually a scaffolding problem, not a model problem. It's a miatz build-lab concept playable for the AI Engineering track (AIE-101): play the payload autopsy here, then learn to build the prompt assembler, the token estimator, and the regression harness yourself.

FAQ

What is the "payload autopsy"?

The assembled request the platform actually sends: your message plus the hidden system preamble, retrieved context, and few-shot examples, concatenated in send order and shown literally — the string the API receives, not a summary of it.

How are the token counts calculated?

Each section is estimated at Math.ceil(length / 4) — a rough ~4-characters-per-token rule. It is deterministic and on-device: no model call, no network, no real BPE tokenizer. It teaches the shape of a token bill, not an exact invoice.

Why is so much of my prompt "hidden"?

Because platforms wrap your text in scaffolding on every turn — instructions, safety notes, retrieved documents, examples. The hidden ratio is hidden tokens ÷ total tokens; a long system prompt around a short question can push it above 90%.

Does this call a model or send my keys anywhere?

No. Prompt Lab only assembles and counts the prompt — it never calls a model and never touches an API key. Everything runs in your browser.

Is anything uploaded?

No. Your text is assembled and counted entirely in your browser — nothing is transmitted, stored, or logged. Turn off your Wi-Fi and it still works.

Limits

This is a teaching widget built on precomputed, illustrative rules, not a live model. Token counts use a fixed ~4-chars-per-token estimate, so they will differ from a real tokenizer (BPE splits punctuation, whitespace, and rare words differently), and it does not run inference, add a provider's own safety layers, or price a real bill. What it teaches — that the model reads far more than you type, in a fixed order — is exactly the real practice.

Related

Part of the Demystify Playgrounds. Explore the rest from the Playgrounds home.

Bookmark this page (Ctrl+D, or ⌘D on Mac) — it works offline the next time you need it.

Ninety playgrounds. Zero setup.

Every concept here is playable free, no account — and inside the program you learn to rebuild the machinery yourself.