Designing a prompt playground

60 min7 partsCoreFast-moving topicChecked Dec 2026
Start the lessonShort steps, each with something to do
What you'll learn
  • Turn a vague playground prompt into requirements and numbers, and name where it gets hard
  • Store prompts as immutable versions with a label for production, the way git stores code
  • Stream runs over server-sent events, resume a dropped stream, and record every run
  • Fan an eval out under a provider limit, so it pauses and resumes instead of restarting
  • Check access on every object, and merge edits people make at the same time

A prompt playground, the way the design round asks

Design a prompt playground. People write a prompt, run it against models, compare the outputs, save versions, and share prompts with their team. Several people can work on the same prompt at once. Take me from requirements to the parts you'd build, and tell me where it gets hard. We have about 45 minutes.

Anthropic software engineer candidates report a prompt playground as their system design round (2 reports), and another got a prompt-sharing product as a product design round (1 source). The round wants four hard parts worked out:

  1. Long-lived streams that survive a dropped connection.
  2. Versions you can trust, and a production label you can move back.
  3. Evals that run under the provider's limits without slowing anyone down.
  4. Sharing and editing together, without leaking a team's data.

You start with what a playground does and its numbers, then versions and templates, runs and streams, evals, and sharing. Six steps end with a small task in the editor, and the lesson ends on a mock interview: eight questions in the order a 45-minute round runs.

Part 1 of 7about 4 min
What a playground does

A playground is an editor, a runner and a record of every run

The playground round is where the rest of this track comes together: latency, cost, evals and limits.

The outdoor shop's team is the user. They tune the assistant's prompt, try a change on real questions, compare it with what's live, and ship it. Several people work on the same prompt, and the app in production calls whichever version they ship.

Anthropic closed its legacy Workbench on August 17, 2026. It had saved prompts, variables and evals, and the updated one supports none of them. The new playground keeps the draft in your browser and builds the same Messages API request you'll send from your code. OpenAI is deprecating its reusable prompt objects, and its docs now say to treat prompts as application code, reviewed in the same pull requests as the product.

Predict

Both vendors dropped stored prompt versions in 2026. What does that tell you for the design?

Pick an answer above to see the rest

Size it before you draw anything

Assume 20,000 people a day, each running a prompt 40 times. A run takes about 8 seconds: the first token, then a 300-token answer streaming in.

people, runs_each = 20_000, 40
runs_a_day = people * runs_each
average = runs_a_day / 86_400
# the busiest hour runs at 3 times the average
peak = round(average * 3)
# first token, then a 300-token answer streaming
seconds_per_run = 8
print(f"{runs_a_day:,} runs a day: {average:.1f} a second on average, {peak} at the peak")
print(f"{peak * seconds_per_run} streams open at the peak")
print(f"{runs_a_day * 10 / 1e6:.0f} GB of stored runs a day at 10 KB each")
Predict

With runs that last 8 seconds, roughly how many streams are open at once at the peak?

Pick one to see what it prints.
Pick an answer above to see the rest
Part 1 done
Part 2 of 7about 14 min
Versions

Save every version, and never change one

A prompt is a name that changes over time. A version is one exact state of it: the template, the model, the parameters and the version it came from. Once saved, a version never changes, so a run, an eval or a production call can name exactly what it used.

Git works this way. The Pro Git book calls git a content-addressable filesystem: a key-value store where an object's key comes from a hash of its content. Give a version the same kind of id.

store = Versions()
base = "You help customers of an outdoor shop.\n\nQuestion: {{question}}"
first = {"template": base, "model": "claude-sonnet-5-5", "temperature": 0.2}
v1 = store.save(first)
again = store.save(dict(first))
v2 = store.save({**first, "template": base.replace("shop.", "shop. Answer in two sentences.")}, parent=v1)
print(v1 == again, v1 == v2, len(store.store))
Predict

Someone clicks save twice without changing anything, then makes one edit and saves again. How many versions are stored?

Pick one to see what it prints.
Pick an answer above to see the rest

Templates fill variables, and fail when one is missing

A template marks the parts that change, and OpenAI's evals docs used double curly braces for them. A run fills them from a row of values. A missing value should stop the run before it costs anything, not send the model a prompt with a hole in it.

print(render(store.store[v2]["content"]["template"], {"question": "Is the 2-person tent waterproof?"}))
Predict

A test row has no value for two variables, tone and question. How many should the error name?

Pick one to see what it prints.
Pick an answer above to see the rest
Part 2 done
Part 3 of 7about 11 min
Runs and streams

A run streams through a gateway and is recorded as it goes

Runs come from two places: people in the browser, and eval jobs on background workers. Both spend the same provider limits. Every call to the provider leaves through one service, the model gateway, which holds the provider keys.

Predict

Where should the provider limits be applied?

Pick an answer above to see the rest
Predict

The run service records the tokens in the stored run as they stream. Why bother, when the browser shows them anyway?

A dropped connection resumes from its last event id

SSE gives each event an optional id. The WHATWG spec's example shows the point: if the connection dies after the event with id 1, the browser reconnects and sends a Last-Event-ID header with the value 1. The server then sends only what came after.

# (id, text)
events = [(1, "Yes,"), (2, " the"), (3, " tent"), (4, " is"), (5, " waterproof"), (6, ".")]


def resume(events: list, last_event_id: int) -> str:
    """The text a client that reconnects with Last-Event-ID still needs."""
    return "".join(text for i, text in events if i > last_event_id)


# the connection drops after event 3
shown = "".join(text for i, text in events if i <= 3)
print(repr(shown), "+", repr(resume(events, 3)))
Predict

The phone loses signal after event 3. By the time it reconnects with Last-Event-ID 3, the model has finished. Does the server call the model again?

Pick one to see what it prints.
Pick an answer above to see the rest

Side by side shows style, not quality

A comparison runs each variant at the same time on the same inputs, so people see both answers stream in together.

Predict

Two versions answer one question, and version B's answer looks better. What does that show?

Pick an answer above to see the rest
Part 3 done
Part 4 of 7about 9 min
Test sets and evals

An eval turns a comparison into evidence

A test set is a table of variable values, one row per case, with an optional expected answer. An eval runs one or more versions over every row, several samples each, and grades each answer with an exact match, a code check or a model judge, as in the evals lesson.

Predict

Why run each row 3 times per version instead of once?

Pick an answer above to see the rest

Fan out under a share of the limit

An eval is rows times versions times samples, and every one is a model call through the same gateway and the same provider limits as the people running prompts by hand. Here each call is the shop's assistant prompt, which the cost lesson priced at $0.0028 with the prefix cached.

rows, compared, samples = 500, 2, 3
requests = rows * compared * samples
# requests a minute the workspace gives evals
share = 300
print(f"{requests:,} requests: {requests / share:.0f} minutes at {share} a minute, ${requests * 0.0028:.2f} at $0.0028 each")
Predict

The workspace's provider limit is 1,500 requests a minute, and the eval could use all of it. Why cap it at 300?

Pick one to see what it prints.
Pick an answer above to see the rest

Store each result as it finishes, row by row

Workers write each result as it finishes, keyed by eval, row, version and sample. A crash or a run of 429s then pauses the eval instead of restarting it. The order matters too.

Predict

An eval of versions A and B pauses halfway. It ran version by version: all of A first. What can the team compare so far?

Pick an answer above to see the rest
Part 4 done
Part 5 of 7about 9 min
Sharing and editing together

Every prompt lives in a workspace, and each member has a role:

RoleViewRunEditShare
vieweryesyesnono
editoryesyesyesno
owneryesyesyesyes

An owner can also share by link, and the link carries a role of its own. A fork starts another team's own line of versions from one of the shop's.

Predict

Another team forks the shop's prompt, and then the shop edits its own. Does the fork change?

Pick an answer above to see the rest
Predict

The playground checks access when the prompt's page loads. The run endpoint takes a version id and doesn't check. What can a stranger do?

Pick an answer above to see the rest

Editing at the same time

Three ways to handle two people editing one prompt:

  • A lock: one editor at a time. Simple, and everyone else waits.
  • Last writer wins: Figma does this for a property two people change at once, keeping the last value sent to its server.
  • A CRDT, a conflict-free replicated data type: a structure whose copies merge to the same result in any order. Yjs is a CRDT library for exactly this kind of shared editing.
Predict

Two people type into the same sentence of the template at the same moment. With last writer wins on the whole template, what happens?

Predict

At the same moment, one person types into the template and another changes the temperature. Which of the two needs a CRDT?

Pick an answer above to see the rest
Part 5 done
Part 6 of 7about 4 min
The worked example

A worked example: the playground in 45 minutes

The prompt, from candidates' Anthropic rounds: design a prompt playground (2 reports). The practice for this lesson is that round, with follow-ups and a rubric.

1. Clarify, then name the hard parts. Who uses it and how much, which models, what working together means, who can see a prompt, what evals look like, and whether apps in production call these prompts. Then name the four hard parts: long-lived streams, versions you can trust, evals under provider limits, and sharing without leaks.

2. Numbers. 800,000 runs a day, 28 a second at the peak, about 224 streams open at once, 8 GB of runs a day.

3. Data model and API. Workspace, prompt, version, label, run, test set and eval, with versions immutable and named by their content. The calls: save a version, start a run and stream it, cancel a run, move a label, start an eval, share and fork.

Predict

Where should the provider API keys live?

Pick an answer above to see the rest
Part 6 done
Part 7 of 7about 9 min
Follow-ups

Three follow-ups

Three follow-ups come up after this round: shipping a version safely, keeping prompts in git, and keeping customer data out of shares.

Ship a version safely

Move the production label only after an eval on recent real inputs passes. Record the version on every production call, and watch errors and complaints by version for the first hour, so a rollback is one write and the cause is visible.

Predict

The label moved to v14 an hour ago, and complaints are rising. What's the fastest safe fix?

Pick an answer above to see the rest

The round, start to finish

That's every piece the round needs. The mock interview asks eight questions in the order a 45-minute round runs, and the interviewer follows up on each.

In the editor, write topic_at(plan, minute) and start_of(plan, topic). PLAN is the walkthrough as (topic, minutes) blocks in order, so each block starts where the one before it ends.

Check yourself
5 questions
  1. 1.Why give a prompt version an id from a hash of its content and parent?

  2. 2.A browser loses its connection in the middle of a streamed run. What lets it pick up where it left off?

  3. 3.Why does a side-by-side comparison of one sample per version prove little?

  4. 4.The run endpoint takes a version id but checks access only when the page loads. What's the risk?

  5. 5.Two people edit the same sentence of a template at once. Which approach keeps both edits?

Practice

Sources (20)
  1. Release notes · Anthropic, Claude Platform Docs · Jul 17, 2026
    “The legacy Workbench ... in the Claude Console is being sunset with access ending on August 17, 2026.”
  2. Release notes · Anthropic, Claude Platform Docs · Jul 17, 2026
    “Saved prompts, variables, and evals are not supported in the updated Workbench in the Console.”
  3. How do I use the playground? · Anthropic, Claude Help Center · Oct 19, 2026
    “The playground is built directly on the public Messages API, so the request you build in the playground is the same request you will send in your code.”
  4. How do I use the playground? · Anthropic, Claude Help Center · Oct 19, 2026
    “Playground doesn't store your prompts or conversations on Anthropic's servers. Your current draft stays in your browser”
  5. Prompting · OpenAI API docs · Nov 19, 2026
    “OpenAI is deprecating reusable prompt objects in the API.”
  6. Prompting · OpenAI API docs · Nov 19, 2026
    “Treat prompts as application code. Store prompt content in named modules, build dynamic sections with typed function arguments, and review prompt changes in the same pull requests as the product behavior they support.”
  7. Git Internals: Git Objects · Pro Git (git-scm.com) · Nov 19, 2026
    “Git is a content-addressable filesystem. Great. What does that mean? It means that at the core of Git is a simple key-value data store.”
  8. Working with evals · OpenAI API docs · Nov 19, 2026
    “In the test configuration, we will introduce template syntax, represented by the {{ and }} brackets below.”
  9. Streaming Messages · Anthropic, Claude Platform Docs · Nov 19, 2026
    “When creating a Message, you can set stream: true to incrementally stream the response using server-sent events (SSE).”
  10. Streaming Messages · Anthropic, Claude Platform Docs · Nov 19, 2026
    “A series of content blocks, each of which has a content_block_start, any number of content_block_delta events, and a content_block_stop event.”
  11. HTML Standard: Server-sent events · WHATWG · Nov 19, 2026
    “This event stream format's MIME type is text/event-stream.”
  12. HTML Standard: Server-sent events · WHATWG · Nov 19, 2026
    “so that if the connection died between this block and the next, the server would be sent a Last-Event-ID header with the value 1.”
  13. Glossary · Anthropic, Claude Platform Docs · Nov 19, 2026
    “Even with temperature set to 0, the results will not be fully deterministic, and identical inputs might produce different outputs across API calls.”
  14. Advanced usage · OpenAI API docs · Nov 19, 2026
    “Chat Completions are non-deterministic by default (which means model outputs may differ from request to request).”
  15. Working with evals · OpenAI API docs · Nov 19, 2026
    “Evals will become read-only for existing users on October 31, 2026, and the platform is scheduled to shut down on November 30, 2026.”
  16. API1:2023 Broken Object Level Authorization · OWASP API Security Top 10 · Nov 19, 2026
    “Every API endpoint that receives an ID of an object, and performs any action on the object, should implement object-level authorization checks.”
  17. How Figma's multiplayer technology works · Figma Blog · Oct 16, 2019
    “A conflict happens when two clients change the same property on the same object, in which case the document will just end up with the last value that was sent to the server.”
  18. How Figma's multiplayer technology works · Figma Blog · Oct 16, 2019
    “Figma isn't using true CRDTs though. CRDTs are designed for decentralized systems where there is no single central authority to decide what the final state should be.”
  19. Introduction · Yjs docs · Nov 19, 2026
    “Yjs is a high-performance CRDT for building collaborative applications that sync automatically.”
  20. Local-first software: You own your data, in spite of the cloud · Ink & Switch · Apr 1, 2019
    “The only type of change that a CRDT cannot automatically resolve is when multiple users concurrently update the same property of the same object”