AIEP
GovernanceEmergingUpdated 2026-11

Reversible Auto-Decision

Decide the clear cases automatically, send only the doubtful middle to a person, and make every automatic decision logged, one-call reversible and never repeated after an undo.

Runnable example, tested in CISourceTestsJump to code
$cd examples && pytest governance/test_reversible_auto_decision.py
automationhuman-oversightthresholdsundoaudit

What It Is

An automation policy for model-assisted decisions (merge or keep apart, approve or reject, publish or hold). Scores above an upper threshold and below a lower threshold are decided by the system. Scores in between go to a person. Every automatic decision is written to a ledger with the rule that made it, can be undone with one call, and once undone is never decided automatically again. The name is ours.

The Problem It Solves

Reviewing everything by hand doesn't scale, and the queue grows until nobody reads it. Automating everything is fast until the first wrong decision, and then there is no way to find the others or to take them back. Teams end up choosing between a backlog and a risk. This pattern makes the choice smaller: automate only where the system is clearly sure, and make being wrong cheap.

How It Works

flowchart TD
    I["Case + one or more scores"] --> A{"Undone before?"}
    A -->|"yes"| P["Person"]
    A -->|"no"| D{"Scores disagree?"}
    D -->|"yes"| P
    D -->|"no"| T{"Mean score"}
    T -->|"≥ accept"| Y["Accept, log rule"]
    T -->|"≤ reject"| N["Reject, log rule"]
    T -->|"in between"| P
    Y --> L["Ledger"]
    N --> L
    L -->|"undo(id)"| U["Revert + veto the case"]
  1. Set two thresholds, not one. The gap between them is the review queue. Widen it when you are unsure; narrow it as evidence builds.
  2. Send disagreement to a person. If two independent reads of the same case differ by more than a margin, don't average them. The disagreement is the signal.
  3. Record the rule with every decision. "Accepted: score ≥ accept threshold" lets you later ask which rule is behind most mistakes.
  4. Make undo one call. Reverting must restore the earlier state exactly and be safe to call twice.
  5. Remember the undo. A case that a person reversed is vetoed from automatic decisions. You don't know why they reversed it, so don't repeat it.
  6. Audit by rule. Sample a fixed number of decisions per rule by hand and look at where the errors cluster.

When to Use It

  • Decisions are frequent, mostly clear, and reversible.
  • Wrong decisions are cheaper to undo than to prevent, but you must be able to find them.
  • You can measure the model's scores against hand-checked examples to place the thresholds.

When NOT to Use It

  • The decision can't be reversed: money sent, an email delivered, data deleted without a copy. Use Human-in-the-Loop before the action.
  • Scores aren't calibrated. A model that says 0.95 when it is right 70% of the time makes the thresholds meaningless. Check calibration first.
  • Regulation requires a human decision. Automation, even reversible, may not be permitted.

Trade-offs

  • Undo has a cost. You need to store enough to restore the earlier state, and downstream systems that read the decision in between may need to be told.
  • The queue never reaches zero. The middle band is where the hard cases are, and they stay. Plan reviewer time for it.
  • One kind of error is easier to accept than the other. Pick which way to be wrong (for example, keeping two things apart is cheaper than wrongly joining them) and set the thresholds asymmetrically. See the paper on selective classification below for the underlying idea of abstaining when unsure.

Failure Modes

Thresholds tuned on the same data used to judge them. The decisions look accurate because the thresholds were fitted to them. Check on a Frozen Evaluation Set.

A ledger entry for a decision that never happened. The decision is recorded, then applying it fails. Now undo would reverse something that was never done. Apply first, record only on success.

Undo that doesn't undo. The revert restores the row but not the things derived from it (counts, caches, links). Test undo end to end.

Veto set grows forever. If every undone case is blocked for good, the automation slowly stops working. Review the vetoed list periodically, and expire entries only on purpose.

Averaging hides disagreement. Two reads at 0.99 and 0.60 average to a confident-looking 0.80. Compare them before you combine them.

Implementation Example

A decider with two thresholds, a disagreement check, a ledger and an undo that blocks re-decision. The tests cover the middle band, disagreeing reads, rule recording, double undo, and a failed apply that leaves nothing in the ledger.

cd examples && pytest governance/test_reversible_auto_decision.py
"""Reversible Auto-Decision.
 
Decide the clear cases automatically and send only the doubtful middle to a
person. Every automatic decision is written to a ledger with the rule that made
it, can be undone in one call, and once undone is never decided automatically
again. Two reads of the same case that disagree go to a person.
"""
 
from __future__ import annotations
 
from collections.abc import Callable
from dataclasses import dataclass, field
from itertools import count
 
 
@dataclass
class Decision:
    id: int
    case: str
    outcome: str  # "accept" | "reject"
    rule: str
    score: float
    undone: bool = False
 
 
@dataclass
class Outcome:
    action: str  # "accept" | "reject" | "review"
    reason: str
    decision: Decision | None = None
 
 
@dataclass
class AutoDecider:
    accept_at: float = 0.9
    reject_at: float = 0.1
    max_disagreement: float = 0.2
    apply: Callable[[str, str], None] = lambda case, outcome: None
    revert: Callable[[str, str], None] = lambda case, outcome: None
    ledger: dict[int, Decision] = field(default_factory=dict)
    vetoed: set[str] = field(default_factory=set)
    _ids: count = field(default_factory=lambda: count(1))
 
    def decide(self, case: str, scores: list[float]) -> Outcome:
        """`scores` is one or more independent reads of the same case (probability it is a match)."""
        if not scores:
            return Outcome("review", "no scores to decide on")
        if case in self.vetoed:
            return Outcome("review", "a person undid an automatic decision on this case")
        if max(scores) - min(scores) > self.max_disagreement:
            return Outcome("review", "the reads disagree with each other")
        score = sum(scores) / len(scores)
        if score >= self.accept_at:
            return self._record(case, "accept", "score >= accept_at", score)
        if score <= self.reject_at:
            return self._record(case, "reject", "score <= reject_at", score)
        return Outcome("review", "score is between the thresholds")
 
    def _record(self, case: str, outcome: str, rule: str, score: float) -> Outcome:
        # Apply first: if it fails, nothing is recorded, so the ledger never holds
        # a decision that didn't happen (and undo never reverts one).
        self.apply(case, outcome)
        d = Decision(next(self._ids), case, outcome, rule, score)
        self.ledger[d.id] = d
        return Outcome(outcome, rule, d)
 
    def undo(self, decision_id: int) -> None:
        d = self.ledger[decision_id]
        if d.undone:
            return
        self.revert(d.case, d.outcome)
        d.undone = True
        self.vetoed.add(d.case)  # the reason a person undid it is unknown, so do not repeat it

Tool Landscape

ToolNotes
Review queues (Label Studio, Argilla, in-house admin pages)Where the middle band goes
Audit tables / event sourcingNatural place for the ledger and the undo
Calibration tools (scikit-learn CalibratedClassifierCV, reliability diagrams)Check that scores mean what the thresholds assume

Further Reading

Spotted something wrong or have a production story? Edit this page on GitHub.