Skip to main content

Prompt Lab

The Prompt Lab (/prompt-lab, in the top bar) is where every prompt the assistant uses can be read, edited, versioned and tried against a real claim, with a trace of what the assistant did.

What it shows​

The left column lists every prompt in the catalogue, grouped: the System prompts, then each capability group's playbooks. A badge shows the active version (v3) or an unsaved edit.

Selecting a prompt opens its editor, with its id and whether it is on a saved version or the code default.

ControlEffect
Save as new versionCreates version n + 1 and makes it active. The chat uses it from the next turn.
Load default into editorPuts the code default in the editor without saving.
Use code defaultDeactivates every saved version. History is kept.
n versionsThe history, with Use this version to roll back and a button to load any version into the editor.

Try It​

The Try It panel runs a prompt without saving anything:

  1. Pick a loaded claim.
  2. Type a question, or leave it empty to send the selected capability's quick-action message.
  3. Run. Unsaved edits to any prompt apply to this run only, on top of the saved active versions.

The Output panel streams the answer. The Trace panel lists every activity, tool result and screen action, and the token usage and model for the run.

Try It sends claimId rather than the claim itself, so it runs against the stored copy of the claim.

Where versions are kept​

In this browser's localStorage, under claimpilot-prompt-versions (frontend/src/promptlab/promptStore.ts). There are no logins, so a server-side save would be everyone's.

The active version of each prompt travels with every request:

  • as promptOverrides on each POST /api/chat,
  • as the first frame of every voice session, { "clientConfig": { "promptOverrides": … } }.

So text and voice always use the same prompts. The server only ever holds the code defaults. It drops unknown ids and values over 20,000 characters (sanitiseOverrides), and an override that is blank falls back to the default.

Clearing site data resets everything to the code defaults.

Fingerprints​

Each answer's done event carries prompts.fingerprint: default, or a short hash of the overrides that applied, plus their ids. The same versions in any browser give the same hash. Answer feedback records it, so the effect of a prompt edit shows up as its own row in the feedback report. See Answer feedback.

Answer feedback panel​

The bottom of the Prompt Lab is the Answer feedback report: the helpful rate by capability and by prompt set, and the recent votes with their reasons, notes, questions and answers. Replay in Try It loads a rated question, its claim and its capability into the runner, so a bad answer becomes a prompt edit tested on the case that exposed it.

What it does not do​

  • It has no scored evaluation. Try It runs a prompt; it does not grade it. See Known limits.
  • An embedded host has no Prompt Lab. Its prompts are whatever the deployment ships.
  • Editing prompt text here does not change the code. To make a version the default for everyone, copy it into api/src/prompts/catalogue.ts and ship it. See Write prompts.