TECHNOLOGY

Promptfoo thresholds: a weighted passing score can hide a failed assertion

In this article
THE QUICK TAKE

An aggregate threshold is a decision rule; it does not necessarily require every individual assertion to pass.

Decide which requirements are mandatory

A response can be helpful, well formatted and factually wrong. If an evaluation combines those properties into one score, easy successes may offset an essential failure. The assertion documentation distinguishes individual assertions from the test-level decision rule. Write down which properties must hold independently before selecting weights. A weighted average is appropriate only when the intended acceptance policy actually permits the trade-offs that averaging introduces.

Inspect the effect of a test threshold

The documented test-level threshold determines passing from the combined weighted score and can override individual assertion verdicts. Without that threshold, the documented rule requires nonzero-weight assertions to pass. Therefore, adding a seemingly harmless threshold changes more than report presentation. Test an answer that satisfies style checks but violates the essential requirement, and verify that the realized configuration produces the intended failure instead of relying on the visual prominence of a critical assertion.

Keep metric collection separate from gating

The test-case guide describes how assertions attach to cases and defaults. A metric collected for observation need not serve as an acceptance gate. Current assertion documentation distinguishes zero-weight individual assertions from zero-weight assertion sets: excluding a set’s score does not necessarily prevent its children or threshold from failing. Inspect nested rules directly rather than treating every zero weight as a universal switch that disables all decision effects.

Preserve score scales before combining them

Averaging does not automatically convert every metric onto a common bounded scale. Similarity scores, custom numeric outputs and binary checks may have incompatible meanings. The configuration overview provides the surrounding setup. Document any deliberate scale mapping and check the effect of negative or unusually large values. A threshold chosen for one mix of assertions cannot be assumed valid after changing their implementation, scale or relative weight.

Verify a compact acceptance table

Create cases for essential failure, optional failure and complete success, then inspect both child verdicts and the final test status. Keep those fixtures as a review aid when changing policy. The guides to scoring coverage and normalization rules discuss adjacent interpretation problems. Publish the acceptance logic with results so a passing evaluation means the requirements intended by the author, rather than an accidental compensation among unrelated scores.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles