Skip to main content

Gate and Approvals

Check a version before a label moves, and ask a second person to approve the move.

Two checks can stand before a label moves. The gate reads the stored comparison of the version. The approval asks a second person to agree. The rule of the label turns each on or off — see Label rules. By default, production is gated. The rule of a label can also ask for approval.

The gate

The gate compares the version with a baseline: the version the label holds now, or the version that production holds, as the rule says. It reads a comparison that already exists. It does not run a new one. The promote dialog shows the result:

  • The gate passes, with the verdict and the baseline.
  • The gate blocks, with the reason.
  • First promotion: the label held no version, so there is nothing to compare.
  • This label is not gated.

A comparison comes from a run that your code starts with the prompt (evals.run(..., prompt=prompt), which sends the hash of the version), or from Compare on a dataset on the compare page. See Evaluations.

Why the gate blocksWhat to do
No comparison of the version with the baseline has run.Run one.
The version is Regressed against the baseline.Fix the version, or ask an owner or admin to override.
The comparison gives no verdict, for example with fewer than 20 cases.Run a larger comparison.
The newest verdict is against an older baseline.Compare the version with the version that the label holds now.
The runs that name the version carry no hash.Pass the prompt to the run, so the run sends the hash.
The prompt has no gate settings.An owner or admin saves them.
A comparison made since the baseline reached the label is Regressed.A newer passing comparison does not clear it. An owner or admin can override.
The rule asks for Improved, and the version is not.Improve the version, or change the rule.
The dataset changed after the comparison ran.Run the comparison again.

Gate settings

The Gate settings tab holds the defaults of each comparison of the prompt. The gate counts only a comparison that matches them.

FieldMeaning
DatasetThe dataset to compare on. The gate reads its newest version.
SplitDev, cases you can tune on, or Holdout.
Trials per case1 to 10. A note shows below 3.
ChecksMatches the expected output, Contains the expected output, Output matches the schema, Calls the expected tool, Judge with a rubric (it needs a Rubric name).
CasesAll cases, or a sample of 1 to 2,000. A verdict needs at least 20 cases.

Click Save the gate settings. Only an owner or an admin can save them. Other roles read them. Until someone saves them, "the gate has no evidence to read, and a move to production that needs evidence is blocked". An archived prompt must be restored first.

Override

An owner or an admin can move a label past a block. In the promote dialog, tick Promote without a passing verdict, write a Reason (required, at least 20 characters) and click Promote with override. The label history records the kind Promotion with override, the reason and your name. A member reads "Your role cannot override the gate. Run the comparison, or ask an owner or admin."

Approval

Turn approval on in the rule of a label: A second person approves each move. Then choose Who approves: A member or an admin, or An admin. Approval needs another person who can approve. In a team of one, the box stays off and says what to do. Only an owner can turn approval off. If the last other approver leaves, the label stays blocked until an owner turns the rule off.

With approval on, the Promote button reads Request promotion, and the dialog asks for the promotion and does not move the label. If the rule turns approval on while the dialog is open, the dialog says: "This label needs approval now. Close this dialog and ask for the promotion."

Ask

A member or higher clicks Request promotion. The dialog is titled "Request promotion of support v5 to production". Write the Note for the approver (required), 1 to 500 characters, and click Request promotion. The label does not change. You can ask when the gate blocks: the request keeps the gate result of that time.

Wait

A card on the prompt page shows "v5 waits for approval on production since the time · requested by the person · gate: passes". The gate word is passes, blocks with the reason, first promotion or not gated. A label has one open request at a time. A request ends after 7 days with no decision.

Decide

A person who can approve clicks Approve or Reject. Compare opens the diff.

Approve opens "Approve support v5 for production". It reads the gate again. Click Approve and move the label. If the gate blocks, an owner or an admin can tick Approve without a passing verdict, write a reason of at least 20 characters and click Approve with override. A member reads "The gate blocks this version. Your role cannot override the gate. Reject the request, or ask an owner or admin."

Reject needs a Reason (required, at least 20 characters). The label does not change. The request ends, and the table Promotion requests shows Rejected by your name.

The person who asked can click Withdraw. That person cannot approve: the card reads "Another person must approve this request." A person who cannot decide sees the card without Approve, Reject and Withdraw.

When the label moves, the label history shows both names: the person who asked and the person who approved. If the label moves before a decision, the request ends as Superseded.

Requests that wait for you

  • A number shows on Prompts in the side navigation. It counts the open requests that you can approve. Nothing shows for zero. A "?" shows when the count could not be read.
  • On the Prompts list, a row shows Waits for your approval. The Show menu has Waits for my approval.
  • The Label history tab has a table Promotion requests with the columns Requested, By, Move, Outcome and Note. An outcome is Waiting for approval, Approved by, Rejected by, Withdrawn by, Expired after 7 days with no decision or Superseded.

A request sends the event prompt.promotion_requested, and a move sends prompt.label_moved. See Webhooks.

Who may do what

ActionWho
Ask for a promotionMember and above
Approve or rejectA person other than the requester. The rule sets the role: member, admin or owner for A member or an admin; admin or owner for An admin.
WithdrawThe person who asked
Override a block, save gate settingsAdmin and owner
Change a label ruleAdmin and owner
Turn off approvalOwner

Next Steps