Expand description
Data-driven Truth Gate threshold.
The hook can record every engine probability as a prediction trace (HIKMAH_HOOK_RECORD);
a person or CI later records whether that completion claim was false (hikmah outcome --observed true means it was a false completion). MemoryStore::gate_threshold pairs
the two and picks the threshold t (the engine blocks when p >= t) with the highest recall
of false completions whose empirical false-block rate (blocked true completions / all true
completions) stays within a budget. Ties in recall go to the higher threshold. Only observed
probabilities are candidates, because the rates change only there.
This covers the engine path alone. The deterministic rules still block on their own, so the gate’s overall false-block rate can be higher by the rules’ own false blocks.
Structs§
- Gate
Threshold Report - Threshold
Point - The engine-path rates at one threshold.
Functions§
- choose_
threshold - Highest-recall threshold among the observed probabilities whose false-block rate is at most
max_false_block; ties in recall go to fewer false blocks, then to the higher threshold. A threshold that catches no false completion only adds false blocks (turning the engine off does better), so it never qualifies.Nonewhen none qualifies. - rates_
at - Rates at threshold
tfor(p, was_false_completion)points. - wilson_
interval - Wilson score interval for
ksuccesses inntrials at normal quantilez.