Prompts

Version your prompts, see what changed between versions, and choose which one production calls get.

In the console sidebar (it appears once the feature applies to your account): Prompts Open it ↗

Steps

  1. Open Prompts and select New prompt. The id is what your code sends as prompt_id: lowercase letters, digits, dots, dashes and underscores.
  2. The editor opens. Write the system prompt and the messages, put {{name}} where a value changes from call to call, pick the model and the parameters, give a variable a default if callers may leave it out, and select Save version. Later, Edit on a version starts the next one from it. Test in Playground runs a version against models side by side before you ship it.
  3. Back on Prompts, select a version to see what changed against the one before it, the variables it needs, and the code that calls it.
  4. To ship a version, select Move production to vN. The dialog checks what changes for today’s callers. A new variable without a default would fail their calls, so it asks for a default and saves it as the next version.
  5. To roll back, move production to the earlier version. Your code changes nothing and nothing redeploys.

Limits and gotchas

  • Any member can create prompts and save versions. Moving or removing a label and deleting a prompt need an admin or the owner, and each one is recorded in the workspace audit log.
  • A saved version never changes. An edit always becomes the next version, so the version a label pointed to yesterday is still there to move back to.
  • Label moves and deletes reach calls within about 10 seconds.
  • Prompts are stored encrypted. Deleting a prompt deletes its versions and labels; calls with its id get a 404 from then on, and the calls already made stay in your logs.
  • In the editor, Show the request renders the draft with the values you type and shows what a call would send on each endpoint. Nothing is saved, and no model is called.

API reference for the same thing: Prompt Library