Unit 06.03: Confirming before anything irreversible
Confirmation belongs on the path the effect must pass through, not in the prompt.
Sort by effect; gate the irreversible ones
Five actions with their effects and whether they need confirmation.
The code sorts them.
ACTIONS = [
("read an account", "read", False),
("draft a reply", "none", False),
("add an internal note", "write, reversible", False),
("issue a refund", "moves money", True),
("email the customer", "irreversible", True),
]
print(f"{'action':26} {'effect':20} confirm first?")
for action, effect, confirm in ACTIONS:
print(f"{action:26} {effect:20} {'YES' if confirm else 'no'}")
gated = [a for a, _, c in ACTIONS if c]
print(f"\n{len(gated)} need confirmation: {gated}")
print("the confirmation belongs in the UI, on the path the effect must pass")
# A confirmation implemented as a prompt instruction is a request. Implemented
# as a required `confirmed_by` parameter on the function, it cannot be skipped
# by any path that reaches the function.
Two of five need confirmation, and both are irreversible. The other three can be handed over freely, which keeps the number of confirmations low enough that each one carries weight.
Implemented as a required confirmed_by parameter, the confirmation cannot be skipped by any path that reaches the function - including one added later by someone who has not read this.
The mistake this prevents
The mistake is implementing confirmation as an instruction telling the model to ask first. The model asks most of the time, which is a control you cannot state a guarantee for and cannot show an auditor.
Takeaway
Gate on irreversibility, and make the confirmation a required parameter of the function. An instruction to ask first is a probability.
