Software Engineeringunpacked

LLM confidence calibration: scores you can route on, sampling that catches errors, sources you can check

A confidence score from an LLM is only useful once you've checked it: calibrate it against a labeled set, so that '0.9' really means right about 90% of the time, then route the low scores to people. Measure accuracy per document type and per field, not only overall, and keep a stratified random sample of the confident outputs under review. Finally, keep every claim tied to its source, so a reviewer can check it in seconds.

Video · LLM Confidence Scores You Can Trust: Calibration and Human Review Routing (CCAR-F) · 4:14

Video · Stratified Sampling for AI Extraction: Human Review That Scales (CCAR-F) · 3:53

Video · Provenance in Multi-Agent AI: Map Every Claim to Its Source, Claude Citations (CCAR-F) · 4:31

Why the overall accuracy number misleads

An extraction pipeline that is "97% accurate overall" can still fail one kind of input badly. The exam guide warns that aggregate metrics "may mask poor performance on specific document types or fields". Take a bike-rental shop extracting damage reports from emails, return forms and chat transcripts: emails dominate the volume, so a weak spot on chats or on one field, such as dates, hardly moves the average.

Three practices fix this, in order: calibrated confidence, review by segment, and traceable sources.

1. Calibrate the confidence score

Claude has no built-in confidence score for extractions: you ask for one as a field in your schema, per field. On its own, that number is a guess; the exam guide calls self-reported confidence an unreliable proxy. It becomes useful once calibrated: among outputs scored about 0.8, about 80% should be correct.

  1. Build a labeled set that mirrors real traffic, edge cases included. Anthropic's eval guide uses the same principle: design evals that "mirror your real-world task distribution".
  2. Compare scores with truth, field by field. Group outputs by score (0.9–1.0, 0.8–0.9…) and measure how often each group is right.
  3. Set thresholds from the data. If dates scored above 0.9 are right 99% of the time, auto-accept them; route lower scores to people. Thresholds can differ per field.

Grade the labeled set with code where you can (exact match on IDs and dates is fast and reliable) and save human grading for what code can't judge.

2. Review by segment, and keep sampling

Before you reduce human review, check accuracy per document type and per field. Then keep a stratified random sample of the confident outputs under review:

Plain random sample Stratified sample
Mostly emails, because emails are most of the volume A fixed share from each type: emails, forms, chats
A rare type can fail for weeks unnoticed Every segment keeps a measured error rate
Finds known errors Also catches new error patterns as inputs change

Give small segments a larger share, so their error rate is measured as precisely as the big ones. This is how human in the loop review scales: people look at the low-confidence cases and a well-chosen sample, not at everything.

3. Keep every claim tied to its source

Review is only fast when a reviewer can see where each value came from. The exam guide's term is a claim-source mapping: each finding carries its source, a relevant excerpt and a date, and every later step keeps it.

The Claude API can do part of this natively. With citations enabled on the documents you send, each claim in the response comes with citations that point into those documents (the cited text, and a location such as a page range for PDFs). The docs note that citations "are guaranteed to contain valid pointers to the provided documents", which makes them more dependable than asking for sources in the prompt. See also LLM hallucination.

Calibration and review on the Claude Certified Architect exam

Domain 5 of the CCAR-F exam covers this in task 5.5 (field-level confidence calibrated on labeled sets, accuracy by document type and field, stratified sampling of high-confidence outputs) and task 5.6 (claim-source mappings, annotated conflicts, dates on every claim). Typical wrong answers: trusting the overall accuracy, trusting raw self-reported confidence, and letting a summary drop the sources. For the validation layer before review, see LLM output validation.

More in all articles.

Sources: Develop tests; Citations; Probability calibration (scikit-learn); Stratified sampling (Wikipedia); Claude Certified Architect Foundations exam guide v1.0, task statements 5.2, 5.5 and 5.6.

FAQ

What does calibration mean for an LLM confidence score?

A score is calibrated when it matches reality: among outputs scored about 0.8, about 80% are correct. You check it by comparing the model's scores with a labeled validation set, field by field, and you set review thresholds from that data, not from the raw number.

Can I trust a model's self-reported confidence?

Not on its own. The exam guide calls self-reported confidence an unreliable proxy for case complexity. It becomes useful for routing only after you calibrate it against labeled examples.

Why use stratified sampling for human review?

A random sample is dominated by the most common document type, so rare types barely get checked. Sampling within each type and field keeps measuring every segment's error rate and catches new error patterns.

How do I keep track of where an AI's claims come from?

Keep a structured claim-source mapping (source, excerpt, date) through every step, including summaries. With the Claude API, the citations feature returns, for each claim, pointers into the documents you provided.