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"
}| Field | Type | Description |
|---|---|---|
suiteId | number | The suite whose results are checked |
enabled | boolean | Whether the gate is active |
minPassRate | 0-100 | Minimum pass percentage to allow deploy |
triggerType | deploy | schedule | manual | When 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
- Configure a gate with your desired pass rate (e.g., 90%)
- Link it to your regression suite
- Before deploying, run the suite against the new version
- Check the gate -- if it passes, deploy with confidence
- If it fails, review the failing tests, fix the prompt, and re-run