Quality Gates

Automated pass/fail thresholds for deploys

What Are Quality Gates?

A quality gate is an automated pass/fail check that runs before a prompt is deployed. You set a minimum pass-rate threshold and link it to a test suite. If the most recent run for that suite falls below the threshold, the gate blocks the deploy.

Configuring a Gate

Each prompt can have one quality gate. Configure it via the Evals tab or the API:

http
PUT /api/prompts/{promptId}/eval/gate

{
  "suiteId": 1,
  "enabled": true,
  "minPassRate": 90,
  "triggerType": "deploy"
}
FieldTypeDescription
suiteIdnumberThe suite whose results are checked
enabledbooleanWhether the gate is active
minPassRate0-100Minimum pass percentage to allow deploy
triggerTypedeploy | schedule | manualWhen the gate runs

Checking the Gate

Call the gate check endpoint to get the current status:

http
POST /api/prompts/{promptId}/eval/gate/check

// Response:
{
  "gateEnabled": true,
  "passed": true,
  "score": 95,
  "threshold": 90,
  "latestRunId": 42,
  "message": "Quality gate passed"
}

The gate compares the most recent completed deploy-triggered run's score against the configured threshold. If no deploy run exists, the gate reports “not passing”.

Typical Gate Workflow

  1. Configure a gate with your desired pass rate (e.g., 90%)
  2. Link it to your regression suite
  3. Before deploying, run the suite against the new version
  4. Check the gate -- if it passes, deploy with confidence
  5. If it fails, review the failing tests, fix the prompt, and re-run