Raise a review threshold from 0.40 to 0.85 and it sounds more cautious. In this fixture, extra reviews fall from two to one. Missed problems rise from one to four.

The image shows a browser presentation of our actual local Python output. All 12 scores and labels were constructed for teaching. We called no model and measured no product's accuracy.

First, which way does the score point?

Here, a score signals that an item needs review. At or above the threshold, we review it; below the threshold, we pass it. It is not a score for “safe to publish.”

Reverse that meaning and the intuition that a higher threshold is safer becomes misleading. A higher threshold flags fewer items. When a missed problem is expensive, that can be the less cautious choice.

Jina Yoon's new PostHog article describes using decision models ahead of more expensive model calls, with different thresholds for different tasks. Our smaller experiment starts before model selection: count the mistakes that a gate permits.

Twelve cases make the tradeoff visible

Each pair below is (score, true_label). A label of 1 means review is needed; 0 means it is not. There are six of each. One score is exactly 0.40 so we exercise the boundary too.

Save this as threshold_demo.py and run python3 threshold_demo.py with Python 3.10 or later. We ran it with Python 3.12.13. It uses only the standard library, with no network or API key.

"""Synthetic teaching fixture. No real model calls or quality estimate."""
import json

samples = [
    (0.96, 1), (0.88, 1), (0.84, 1), (0.61, 1), (0.40, 1), (0.12, 1),
    (0.91, 0), (0.72, 0), (0.39, 0), (0.24, 0), (0.15, 0), (0.04, 0),
]

def route(score, threshold):
    if score is None:
        return "review"
    if not 0 <= score <= 1:
        raise ValueError("score must be between 0 and 1")
    return "review" if score >= threshold else "pass"

results = []
for threshold in (0.40, 0.85):
    tp = fn = fp = tn = 0
    for score, label in samples:
        review = route(score, threshold) == "review"
        tp += int(review and label == 1)
        fn += int(not review and label == 1)
        fp += int(review and label == 0)
        tn += int(not review and label == 0)
    results.append(dict(threshold=threshold, tp=tp, fn=fn, fp=fp, tn=tn,
                        assumed_cost=10 * fn + fp))

assert [(r["tp"], r["fn"], r["fp"], r["tn"], r["assumed_cost"])
        for r in results] == [(5, 1, 2, 4, 12), (2, 4, 1, 5, 41)]
assert route(None, 0.85) == "review"
assert route(0.40, 0.40) == "review"
print(json.dumps({"fixture": "12 synthetic cases; no model calls",
                  "false_negative_cost": 10, "false_positive_cost": 1,
                  "results": results, "missing_score": route(None, 0.85)}, indent=2))

Read tp as correctly flagged problems, fn as problems passed through, fp as unnecessary reviews, and tn as correctly passed normal items.

  • At 0.40: tp=5, fn=1, fp=2, tn=4.
  • At 0.85: tp=2, fn=4, fp=1, tn=5.

The higher bar really does reduce interruptions. It also lets more problems through. Both belong in the result.

Fewer calls are only half the bill

Suppose a missed problem costs 10 units and an unnecessary review costs 1. These are teaching assumptions, not measured business losses.

At 0.40, that is 1×10 + 2×1 = 12. At 0.85, it is 4×10 + 1×1 = 41. Counting only reviews would favor the more expensive choice under these assumptions.

Your task may price the two errors differently. Write down both losses, then replay thresholds. Do not use these twelve cases to select a “best production threshold.” They illustrate arithmetic, represent no real traffic distribution, and establish no model calibration.

A score of 0.85 is not an 85% safety guarantee

Treating a score as a probability requires calibration evidence. Asking a language model to append its own confidence number does not supply that evidence. Even a model calibrated on a validation set needs checks when its inputs, version or task change.

Sometimes the change is larger than a threshold. PostHog's implementation PR changes the model and checking approach together and says its offline labels came from LLMs. Its before-and-after numbers cannot be attributed entirely to one threshold or treated as human ground truth. Reading the implementation establishes a boundary that a performance summary can miss.

The easily forgotten branch: unknown

The script routes None to review, rather than converting it to zero. That is an explicit rule for this example, not a universal business policy.

Timeouts, invalid responses and permission errors need their own states in a real integration. Decide whether those states wait, request human review or block. A missing score is not evidence that the model found nothing wrong. Define equality too: this example uses >=, so exactly 0.40 is flagged.

What to keep before deployment

Record the task, score direction, label provenance, sample coverage, exact model version and threshold. Count false positives separately from false negatives. Compare with a simple baseline; observe decisions without affecting real outcomes before letting a gate control release.

For a decision fully specified by deterministic rules, implement and test those rules first. For a fuzzy semantic decision, test what a suitable model adds. Our view is that automation must account for the mistakes it introduces as well as the work it removes.

If you are changing models, use the model-upgrade regression guide to freeze inputs, versions and failure conditions. What we reproduced here is a model-free threshold exercise. Real accuracy, cost and production behavior still need your own evidence.