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: Evaluator

Answer with an AI evaluator; escalate uncertain queries to a person.

Parameters:
aiEvaluator

The automatic evaluator (must report feedback.uncertainty; if it does not, 1 - confidence or 0 is used).

humanEvaluator

The person (a GUI front end, ConsoleEvaluator, a HumanProxy that raises NeedsHuman, or a simulated user standing in for one in experiments).

policy{“threshold”, “rate”, “risk”}
thresholdfloat

Initial (or fixed) \(\tau\).

target_ratefloat

Desired share of human answers (rate policy).

etafloat

Step size of the rate policy.

epsilon, deltafloat

Tolerated disagreement and confidence level (risk policy).

auditfloat

Probability of auditing a confident query (risk policy).

min_labelsint

Human answers needed before the risk policy moves \(\tau\).

max_humanint, optional

Hard budget of escalations.

calibrationiterable, optional

Labels from an earlier calibration session or study: tuples (uncertainty, disagreement) or the labels attribute of another escalation evaluator. The risk policy 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.

Examples using easyiec.evaluators.EscalationEvaluator#

Hybrid evaluation: the AI answers, people decide the hard cases

Hybrid evaluation: the AI answers, people decide the hard cases

You and Claude together in a notebook gallery

You and Claude together in a notebook gallery