Documentation

The playground

The Playground tab of a schema's editor (beside Compatibility and JSON) runs the schema on your real providers without leaving the editor. Choose several providers and models and run once: each gives its own answer, and they are shown together, so you can see whether they agree before you depend on one.

Every run is real. It calls the provider with your key and spends tokens, and it is recorded in the decision log with the source playground, kept as your organization's privacy setting says.

What runs

  • The draft as the form holds it now, unsaved changes included. The form has to be valid, because the schema is sent as it stands. A run of the draft is logged as an Unpublished schema, with no name or version, so it is left out when the statistics are filtered to a schema. Publish it and run the version to log runs under its name.
  • Or any published version. The editor opens on the draft, or on the version it is showing when that is read-only.

Where it runs

Pick an environment you may run decisions in. It supplies the variables the instructions may use ({{env.variables.name}}) and the access check, as in a call from your code. The organization-wide * environment is not offered.

Inputs

There is a control for each input the schema declares, typed as the input is: a switch for yes/no, a number field for a number, a monospace field for JSON, and text otherwise. A required input that is blank, a number that is not one and JSON that does not parse are reported on their input, and nothing is sent. What you typed stays when you switch to another version, for the inputs it still declares.

Providers and models

The list holds every model of every provider you have configured that can run the schema (the same check as the Compatibility tab). The first provider's default model is chosen to begin with.

  • Each provider and model you choose is its own run, sent to that provider only, with no fallback: an answer under a name is always that provider's own.
  • A run goes to six at most at once, since each is a call on your key that may take up to 50 seconds. The list stops offering more when you reach six.
  • A second Run is ignored while one is on its way.

The answers

Under the Run button there is one row for each provider and model: the decision as a badge, and under the name the confidence, the latency and the cost. A line says whether the providers that answered agreed, and on what.

  • A row opens to the probability of each outcome and a link to its row in the decision log. A run with one answer opens it for you.
  • A provider that fails opens by itself with its error and what it tried, and the others keep their answers. A run that had failures says so once, in a single message.
  • Rows settle on their own, so a slow provider does not hold the others back.
  • While the playground tab is open the side panel is wider and stays in view as you scroll the form, so you can edit the instructions and run again with the last answers in sight. Switching tabs keeps what you typed and the answers.

When Run is off

The button says why, in words:

  • the schema, the environments or the providers are still loading, or failed to load (with Try again);
  • the draft or the version does not pass validation;
  • the version could not be read;
  • you have no environment to run in;
  • no provider you have configured can run this schema;
  • nothing is chosen.