Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Principle:Promptfoo Promptfoo Quality Gate Enforcement

From Leeroopedia
Revision as of 17:26, 16 February 2026 by Admin (talk | contribs) (Auto-imported from principles/Promptfoo_Promptfoo_Quality_Gate_Enforcement.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Sources
Domains CI_CD, Quality_Assurance
Last Updated 2026-02-14 08:00 GMT

Overview

A pass/fail gate mechanism that converts evaluation results into CI-interpretable exit codes for automated quality enforcement.

Description

Quality Gate Enforcement translates LLM evaluation results (pass counts, failure counts, error counts) into process exit codes that CI/CD systems use to gate deployments. When any test fails or errors occur, the process exits with code 1, blocking the pipeline.

This is the critical bridge between LLM evaluation outcomes and deployment decisions, ensuring that quality regressions are caught automatically.

Usage

This principle is automatically applied at the end of every `promptfoo eval` CLI execution. It requires no explicit configuration; any test failure triggers a non-zero exit code.

Theoretical Basis

Pseudo-code Logic:

1. After evaluation completes, aggregate metrics:
   successes = sum of passing tests across all prompts
   failures = sum of failing tests across all prompts
   errors = sum of error tests across all prompts
2. If failures > 0 OR errors > 0:
   process.exitCode = 1  (CI gate fails)
3. Else:
   process.exitCode = 0  (CI gate passes)

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment