Verification & Reflection

Confidence Reporting

Surface the agent's uncertainty about its answer alongside the answer itself.

Problem

Large language models produce answers in the same confident tone whether they actually know the answer or are guessing, so downstream code and human readers cannot tell the two cases apart. Users either trust everything (and get burned on the cases the model fabricated) or distrust everything (and lose the value of the cases the model got right). A routing layer that should escalate uncertain cases to human review has no signal to route on, so it either escalates everything or nothing. Self-reports of confidence from the model are themselves miscalibrated, so simply asking the model whether it is sure does not solve the problem on its own.

Solution

Produce a confidence label (high/medium/low or numeric) alongside each answer. Derive from sample variance (self-consistency), evaluator score, retrieval recall, or rubric score. Render in UI; route low-confidence to fallback or human review.

When to use

  • Downstream code or UI needs to distinguish 'I know' from 'I am guessing' on each answer.
  • A confidence signal can be derived from sample variance, evaluator score, or retrieval recall.
  • Low-confidence answers can be routed to fallback or human review usefully.

Open the full interactive page

Diagram, neighbourhood map, code examples, related patterns and full provenance.

Related