easyiec.evaluators.EscalationEvaluator#
- class easyiec.evaluators.EscalationEvaluator(ai, human, *, policy='threshold', threshold=0.3, target_rate=0.2, eta=0.1, epsilon=0.25, delta=0.1, audit=0.1, min_labels=8, max_human=None, seed=None, name='escalation', calibration=None, granularity='query')[source]#
Bases:
EvaluatorAnswer with an AI evaluator; escalate uncertain queries to a person.
- Parameters:
- ai
Evaluator The automatic evaluator (must report
feedback.uncertainty; if it does not,1 - confidenceor 0 is used).- human
Evaluator The person (a GUI front end,
ConsoleEvaluator, aHumanProxythat raisesNeedsHuman, or a simulated user standing in for one in experiments).- policy{“threshold”, “rate”, “risk”}
- threshold
float Initial (or fixed) \(\tau\).
- target_rate
float Desired share of human answers (
ratepolicy).- eta
float Step size of the
ratepolicy.- epsilon, delta
float Tolerated disagreement and confidence level (
riskpolicy).- audit
float Probability of auditing a confident query (
riskpolicy).- min_labels
int Human answers needed before the
riskpolicy moves \(\tau\).- max_human
int,optional Hard budget of escalations.
- calibrationiterable,
optional Labels from an earlier calibration session or study: tuples
(uncertainty, disagreement)or thelabelsattribute of another escalation evaluator. Theriskpolicy starts from them, as split conformal methods start from a calibration set (Angelopoulos et al., 2024), instead of escalating everything until enough audits arrive.- granularity{“query”, “decision”}
Sample size used in the risk bound: one per query (conservative) or one per elementary decision (e.g. the eight duels of a pairwise query), which is appropriate when the decisions within a query are close to independent.
- ai
Examples using easyiec.evaluators.EscalationEvaluator#
Hybrid evaluation: the AI answers, people decide the hard cases