Knowing What the Model Knows

An assistant sounds equally sure when it is right, when it is wrong, and when it answers a question you did not ask. On twelve toy requests, answering everything ships 8 wrong answers. Asking first, then deferring the unsure ones, ships 1.

Pick a policy and watch each request get answered, asked about, or deferred, with the minutes it costs. Then we build, piece by piece, a confidence you can trust and a question worth asking.

You need a little Python and what a probability is. We build the rest from zero.

Session 21 of Georgia Tech CS 8803, LLM seminar. It rests on two papers: Kobalczyk, Astorga, Liu and van der Schaar, Active Task Disambiguation with LLMs (ICLR 2025), and Chuang, Sarma, Gopalan, Boccio, Bolouki, Hu and Zhou, Learning to Route LLMs with Confidence Tokens (ICML 2025). Every idea is re-taught here in our own words and devices.

Answer, ask or defer

Toy requests and toy costs: a question costs the user 1 minute, a deferral 3 minutes of expert time, a wrong answer 20 minutes to find and fix. Thresholds: ask when the expected information gain is at least 0.5 bits; answer when confidence is at least 0.6. Chapter 9 lets you move both.

Chapter 0

Two Ways to Be Confidently Wrong

See why a wrong answer costs most when nothing flags it

A user asks a support assistant: "What is our refund policy for a locked account?" The assistant answers at once: 30 days, and a three-step process. No such policy exists. The answer reads exactly like a right one.

A developer types: "Clean up this script." The assistant fixes the spacing and renames two variables. The developer wanted dead code removed. The model solved a task, but not the one in the developer's head.

These are two different faults. The first is a fault of calibration: the model's stated confidence does not match how often it is right. The second is a fault of ambiguity: the request allows more than one valid answer, and the model picked one without asking. Both end the same way. A wrong output arrives with no warning.

Pay for review or pay for mistakes

10,000 tickets a week; 400 answers are wrong. Set the share of tickets a person reviews, and choose where the flags come from.

0%

Toy numbers: 4% wrong, 3 minutes to review a ticket, 20 minutes to find and fix a wrong answer nobody flagged. The calibrated score here is ideal: it ranks every wrong answer first. Real scores are worse, which is what Chapters 1 to 3 measure.

Work the three corners. With no flags, 400 × 20 = 8,000 minutes, about 133 hours of rework. Flag a random half: review costs 5,000 × 3 = 15,000 minutes, and the 200 wrong answers you missed still cost 4,000. The total is about 317 hours, worse than doing nothing. Flag the 4% a good score ranks lowest: 400 × 3 = 1,200 minutes, or 20 hours.

Failure. The symptom: the team reviews more and more tickets and the mistakes still get through. Measure how many of the flagged tickets were wrong. If that share is near the base rate (4%), the flags are random. Fix: rank by a score whose numbers mean something. That is calibration.

The road

  1. Calibration and ECE: does "80% sure" mean right 80% of the time?
  2. What ECE hides: bins, and the Brier score.
  3. Why models are overconfident: four confidence signals, and temperature.
  4. The ambiguity problem: when more than one answer fits the request.
  5. What makes a question informative: expected information gain.
  6. Active task disambiguation: pick the question from sampled answers.
  7. Confidence tokens: train the model to say how sure it is.
  8. Route or reject: spend the big model only where it helps.
  9. Answer, ask or defer: the two thresholds in the hero.
  10. The field guide: numbers, limits, code and credit.
What do the refund-policy answer and the clean-up-script answer have in common?

Chapter 1

Calibration and the Reliability Diagram

Check whether "80% sure" means right 80% of the time

On a multiple-choice question, the model's output layer gives each option a probability. The model picks the option with the largest one. That largest probability is its stated confidence. Does it mean anything?

A model is calibrated if, among all the answers it gives at 80% confidence, about 80% are right. A weather forecaster is calibrated when it rains on about 70% of the "70% chance of rain" days. You cannot check this on one prediction. You need a batch.

Here is a batch of ten. Sort the answers into confidence ranges, called bins: 0.5 to 0.7, 0.7 to 0.9, and 0.9 to 1.0. In each bin, compute the average stated confidence and the accuracy, the share that were right. Plot accuracy against confidence, one bar per bin. This is a reliability diagram. A calibrated model puts every bar on the diagonal.

Flip answers, read the diagram

Each button is one question with a fixed stated confidence. Pressed means the answer was right. Flip some, or load a preset.

Toy batch of ten. Confidences 0.95, 0.92, 0.88, 0.85, 0.82, 0.78, 0.75, 0.68, 0.60, 0.55. Bars are accuracy; the warm tick is the bin's average confidence.

To sum the gaps into one number, weigh each bin by how many answers it holds. Call a bin m. Call the number of answers in it nm and the total N. Call its accuracy accm and its average confidence confm.

Say it aloud

E-C-E equals the sum over m of n-m over N, times the absolute value of acc-m minus conf-m.

ECE
E-C-E expected calibration error: the average gap between confidence and accuracy, from 0 (calibrated) to 1.
Σm
the sum over m add one term for each bin.
nm
n-m the number of answers in bin m.
N
N the number of answers in the whole batch, here 10.
|accm − confm|
the absolute value of acc-m minus conf-m the gap in bin m: share right minus average confidence, sign dropped.
In plain words

For each bin, take the gap between acc-m and conf-m. Weigh it by the bin's share of answers, n-m over N. Add the weighted gaps.

With numbers

With the toy batch: the bins hold 3, 5 and 2 answers with gaps 0.057, 0.216 and 0.435. ECE = 0.3 × 0.057 + 0.5 × 0.216 + 0.2 × 0.435 = 0.212. The stated confidence is off by about 21 points.

The top bin is the alarm. The two answers given at 92% and 95% are right half the time: gap 0.935 − 0.5 = 0.435. Flip Q1 and Q4 to right and ECE falls to 0.038. The confidences did not change. Only their match with reality did.

Failure. The symptom: a rule like "show the answer if confidence is above 90%" still ships wrong answers. Measure ECE and the top bin's accuracy on a held-out set. Fix: recalibrate or replace the score before you set any threshold. For more on reading these plots, see Plots That Tell the Truth.

In one bin, the average stated confidence is 0.935 and 1 of 2 answers is right. What is that bin's gap, and what does it say?

Chapter 2

What ECE Hides

Change the bins, watch ECE move, and add a score that needs no bins

The three bins in Chapter 1 were a choice. Choose differently and the same ten answers give a different ECE. A published ECE without its binning scheme is half a number.

Re-bin the same answers

The ten answers from Chapter 1, overconfident version. Pick how many bins.

Toy batch. Two bins split at 0.9; three bins at 0.7 and 0.9; five and ten bins are equal widths from 0.5 to 1.0.

Read the two ends. One bin compares the overall average confidence, 0.778, with the overall accuracy, 0.600: ECE 0.178. Inside one wide bin, overconfident and underconfident answers cancel. Ten bins give 0.372, because most bins hold one answer, and one answer is either 0% or 100% right. Few bins hide gaps; many bins add noise.

The Brier score needs no bins. For each answer, call its stated confidence ci and its outcome yi: 1 if right, 0 if wrong.

Say it aloud

B-S equals one over N, times the sum over i of c-i minus y-i, squared.

BS
B-S the Brier score: the mean squared gap between confidence and outcome, 0 is perfect.
1 / N
one over N divide by the number of answers, here 10, to get an average.
Σi
the sum over i add one term for each answer.
ci
c-i the stated confidence of answer i, from 0 to 1.
yi
y-i the outcome of answer i: 1 if right, 0 if wrong.
In plain words

For each answer, subtract y-i from c-i and square the result. Add the squares and divide by N.

With numbers

With the toy batch: Q1 says 0.95 and is wrong, so (0.95 − 0)2 = 0.9025. Q2 says 0.92 and is right, so (0.92 − 1)2 = 0.0064. The ten squares add to 2.954, so BS = 0.295. The well-calibrated version scores 0.135.

Brier mixes two things that ECE keeps apart. A model that is always right but always says 60% pays (0.6 − 1)2 = 0.16 on every answer. Its accuracy is perfect; its honesty is not. That is why the confidence-token paper reports ECE, Brier and a third score side by side.

Failure. The symptom: two methods swap ranks when you change the bin count. Measure ECE at two or three bin counts, plus Brier, on the same split. Fix: report the scheme with every ECE, and use enough answers per bin (dozens, not one).

Why does ECE with a single bin (0.178) come out lower than with three bins (0.212) on the same answers?

Chapter 3

Why Models Are Overconfident

Compare four confidence signals and see what temperature can and cannot fix

A language model learns with cross-entropy loss: on each example, push up the probability of the right next token. Nothing in that loss compares "90% sure" with a record of being right 90% of the time. The confidence-token paper says it plainly: models "can overfit on accuracy rather than calibration, often leading to overconfidence".

The paper tests four common ways to get a confidence number. On Llama3-8B-Instruct answering MMLU, its Table 2 reports these ECE values.

SignalHow it gets a numberECE, MMLU
Verbalizing Yes/No tokenask "are you confident?"; P(Yes) / (P(Yes) + P(No))0.466
Zero-shot logitsthe probability of the answer token0.347
Verbalizing uncertaintyask for a score from 0 to 10.217
Fine-tuned logitsanswer-token probability after task fine-tuning0.081
Self-REF (Chapter 7)a trained confidence token0.040

The cheapest fix after training is temperature scaling (Guo and others, 2017). Call the model's raw score for option k its logit, zk. Divide every logit by one number, the temperature T, before the softmax.

Say it aloud

p-k equals e to the z-k over T, divided by the sum over j of e to the z-j over T.

pk
p-k the probability the model gives option k.
ezk / T
e to the z-k over T option k's logit, divided by the temperature T, made positive by the exponential.
Σj ezj / T
the sum over j the same quantity for every option, added, so the probabilities sum to 1.
In plain words

Divide each logit z-k by T. Take e to that power. Divide by the total over all options. A T above 1 flattens the probabilities; T = 1 changes nothing.

With numbers

With made-up logits 4.0, 1.0 and 0.5: at T = 1, e4 = 54.60 of a total 58.97, so p = 0.926. At T = 2 the logits become 2.0, 0.5 and 0.25, and p = 7.39 / 10.32 = 0.716. The top option is still the same one.

Turn the temperature

The ten answers from Chapter 1, treated as two-option questions. Raise T and watch the confidences slide toward 0.5.

1.00

Toy. For two options, the scaled confidence is 1 / (1 + e−z / T), where z is the log-odds of the original confidence. ECE uses the three bins of Chapter 1, so it jumps when an answer crosses a bin edge.

At T = 4, ECE drops to 0.012. Every answer now sits between 0.51 and 0.68. Yet the most confident answer is still Q1, which is wrong. Temperature moves all confidences together. It cannot pull one wrong answer below the right ones, so any threshold flags the same answers as before.

Failure. The symptom: ECE looks fine after temperature scaling, but routing on the score is no better. Measure the ranking, not only ECE: how many wrong answers sit in the lowest-confidence share. Fix: train a per-answer signal (Chapter 7).

Temperature scaling lowers a model's ECE. Why can it still fail as a signal for routing?

Chapter 4

The Ambiguity Problem

Define when a request allows answers the asker would reject

Imagine a perfectly calibrated model. A user writes: "Combine these two spreadsheets."

One table or two tabs? All rows, or only rows in both files? Match rows by an ID column, or by position? Eight merges fit the words. The user wants one of them.

The Active Task Disambiguation paper splits a request S into two parts. The requirements R are checkable rules every answer must meet. The context C is everything else that shapes which answer the user prefers. Call any candidate answer h. Call the set of answers that meet R H, and the smaller set the user would accept H*.

The paper's definition: S is ambiguous when H is strictly larger than H*. Some answers meet every stated rule and still get rejected.

Say more, shrink H

Eight merges fit "combine these two spreadsheets". The user secretly wants the one marked with a ring. State each requirement and watch H shrink.

Toy example, our own; the paper's running example is a list-search function (its Figure 1).

The paper writes the user's preference over answers as two factors.

Say it aloud

p-star of h given S equals the indicator that h satisfies R, times p-tilde-star of h given R and C.

p*(h | S)
p-star of h given S how much the user wants answer h, given the whole request S.
𝟙{h ⊢ R}
the indicator that h satisfies R 1 if h meets every stated requirement, 0 if not. It is a fact you can check.
p̃*(h | R, C)
p-tilde-star of h given R and C the user's taste among answers that pass: subjective, and different for different users.
In plain words

First check h against R; a failed check gives 0. If h passes, its weight is the user's private taste, p-tilde-star, which depends on the unwritten context C.

With numbers

With the toy merges: a merge that drops a file entirely gets indicator 0, so p-star is 0. The eight valid merges get indicator 1, and the user's taste gives one of them weight 1 and the other seven weight 0.

The user and the model share only the first factor. So the paper asks only requirement questions: each answer adds a checkable rule to R. Two ways to handle ambiguity compete:

  1. Preference optimization (RLHF, DPO; see Session 06): aim the model at the average user. It fails for anyone who is not average.
  2. Iterative elicitation: ask, add the answer to R, shrink H toward H*. This is the paper's choice.
The model's spreadTask not ambiguous (H = H*)Task ambiguous (H ⊃ H*)
Low (sure)healthydangerous: sure of one reading
High (unsure)capability gap: a question will not helpa question helps

Failure. The symptom: users rephrase the same request after each answer. Measure how often the first answer is accepted on underspecified prompts. Fix: detect ambiguity from the spread of valid answers, not from the model's confidence in one.

When is a request S ambiguous in the paper's sense?

Chapter 5

What Makes a Question Informative

Score a question by how evenly its answers split the candidates

You may ask the spreadsheet user one yes-or-no question. "Is it one table?" splits the eight merges four and four. "Is it one table, all rows, by ID?" splits them one and seven. Which is better?

Measure uncertainty with entropy, in bits: with K equally likely candidates it is log2 K. Eight candidates hold 3 bits. The information gain of an answer is the entropy before minus the entropy after. You do not know the answer before you ask, so average over the answers. That average is the expected information gain, or EIG. Learn the basics of entropy in NEU 560 L08.

The paper assumes every candidate in H is equally likely, because the model's own preferences may be biased. Call the number of candidates |H|, a possible answer to question q a, and the number of candidates that give answer a |Ha|.

Say it aloud

E-I-G of q equals log base two of the size of H, minus one over the size of H, times the sum over a of the size of H-a times log base two of the size of H-a.

EIG(q)
E-I-G of q the bits question q removes, on average over its answers.
log2 |H|
log base two of the size of H the entropy before asking: 3 bits for 8 candidates.
1 / |H|
one over the size of H turns group sizes into the chance of each answer.
Σa
the sum over a one term for each possible answer.
|Ha| log2 |Ha|
the size of H-a times log base two of it the group's size times the entropy left if the answer is a.
In plain words

Group the candidates by the answer each would give to q. Each group of size |H-a| leaves log of |H-a| bits, with chance |H-a| over |H|. Subtract that average from the starting log of |H|.

With numbers

With the eight merges: a 4 and 4 split gives 3 − (4 × 2 + 4 × 2) / 8 = 1 bit. A 7 and 1 split gives 3 − (7 × 2.807 + 0) / 8 = 0.544 bits. The even split wins.

Split the candidates

Each card is one merge. Choose a yes-or-no question by the size of its "yes" group, or a question with more answers.

4 of 8

Exact, for eight equally likely candidates. The best question with n answers splits H into n equal groups and gains log2 n bits (the paper's Corollary 1).

More answers gain more: four even answers give 2 bits, eight give 3. But "which of these eight merges do you mean?" makes the user read all eight. The paper argues for questions with few answers and an even split. The utility it maximizes is U(q) = EIG(q) − c(q), where c is the cost of an answer; its experiments set c constant.

Failure. The symptom: the assistant asks question after question and the task barely narrows. Measure the split each question makes on the candidates. Fix: drop questions whose answer is almost always the same.

Sixteen candidates are equally likely. Which yes-or-no question has the largest EIG?

Chapter 6

Active Task Disambiguation

Sample answers first, then pick the question that splits them best

A model cannot list H. It can sample from it. The paper's bet is that LLMs write answers better than they reason about questions, perhaps because the web holds few clarifying questions. So the method "shifts the load from implicit to explicit reasoning about the space of viable solutions." Each round runs six steps:

  1. Sample N candidate answers from the model. The paper uses N = 20 in its guessing game.
  2. Sample M candidate questions, M = 5.
  3. For every pair, get a pseudo-answer: how would answer i reply to question j?
  4. Estimate each question's EIG from its pseudo-answers.
  5. Ask the question with the largest utility U.
  6. Add the user's real answer to the requirements, and repeat.

Step 4 needs no list of H. Call the number of distinct pseudo-answers to one question n, and the number of sampled answers that give pseudo-answer k nk.

Say it aloud

E-I-G-hat of q equals minus the sum over k of n-k over N, times log base two of n-k over N.

EIĜ(q)
E-I-G-hat of q the estimate of question q's information gain, from the samples.
−
minus logs of shares below 1 are negative; the minus makes the result positive.
Σk
the sum over k one term for each of the n distinct pseudo-answers.
nk / N
n-k over N the share of the N sampled answers that give pseudo-answer k.
log2(nk / N)
log base two of n-k over N how surprising pseudo-answer k is, in bits.
In plain words

Count how many sampled answers give each pseudo-answer, n-k. Turn the counts into shares of N. The entropy of those shares is the estimate.

With numbers

With made-up samples: 5 sampled merges, 3 say "one table" and 2 say "separate tabs". EIG-hat = −(0.6 × log2 0.6 + 0.4 × log2 0.4) = 0.971 bits, near the true 1 bit.

The paper's Algorithm 1 divides nk by n, the number of distinct answers. That is a typo: shares must divide by N, the number of samples, or they do not sum to 1.

Sample, score, pick

Sixteen merges; the model prefers "one table" 85% of the time. Sample N answers plainly or as a diverse list, and see which of four questions wins.

8

Toy. True EIG assumes all 16 merges equally likely: 1.000, 0.811, 0.544 and 0.337 bits. Plain sampling draws with repeats from the biased model; the diverse list draws N different merges evenly, as the paper's prompt aims to.

The paper tested this in two settings. In a 10-round animal guessing game, the guessing model had to rank the true animal; 10 is best. In code generation, each question is a test case, answered by running the hidden reference program.

Setting (paper table)BaselineEIG-chosen
20 questions, GPT-3.5, rank after 10 rounds (App. Table 2)implicit 4.9; pick-best-of-5 5.16.2 (4.1 with model log-probs)
HumanEval, GPT-3.5, yes/no tests, after 4 (Table 3)70.8% (from 44.1%)85.6% (from 44.6%)
HumanEval, GPT-4o-mini, same (Table 3)79.6%81.5%
APPS, GPT-4o-mini, input questions, after 4 (Table 4)75.1% (from 34.6%)87.2% (from 35.9%)

Weighting samples by the model's own log-probabilities did worse than treating them as equal (rank 4.1 against 6.2 for GPT-3.5): the model's preferences are biased. A "diverse and representative" instruction raised a diversity score at N = 10 from 0.46 to 0.57 (Table 1). The gap between the baseline and EIG shrinks for stronger models.

Failure. The symptom: the method asks about a detail the user already settled. Measure how many sampled answers break the current requirements. Fix: filter samples against R before scoring; the paper's self-check filter matters more as R grows (its Figure 6).

Twenty sampled solutions give the pseudo-answers "yes" 10 times and "no" 10 times to question A, and "yes" 19 times to question B. Which question does the method ask?

Chapter 7

Confidence Tokens

Teach the model to end each answer with a word that says how sure it is

Chapter 3 showed that the probability a model already gives is a poor confidence. Self-REF (Self-Reflection with Error-based Feedback) trains a better one into the model itself. It adds two new tokens to the vocabulary: <CN>, confident, and <UN>, unconfident. Training learns their embeddings, which start as the average of the existing token embeddings.

Training data comes from the model's own mistakes:

  1. Annotate. Run the base model on every training question. If its answer is right, append <CN>; if wrong, append <UN>.
  2. Balance. Keep only a share α of the <UN> examples, a knob between 0 and 1.
  3. Fine-tune with LoRA adapters of rank 2, 4 or 8, for at most eight epochs.

One rule in step 3 matters most. On a <UN> example, the answer is wrong. Ordinary fine-tuning would raise the probability of that wrong answer. Self-REF masks the gradient on the answer tokens and trains only the <UN> token.

Train with and without the mask

Two training examples: one the base model got wrong (labelled <UN>) and one it got right (labelled <CN>). Press Train and watch what rises.

Toy: each probability is one logit, and each step adds 0.6 × (1 − p) to the logit of every term in the loss. Starting values are made up.

Work the loss on the wrong example. Say the model gives the wrong answer W probability 0.3 and gives <UN> after W probability 0.4. Unmasked, the loss is −ln 0.3 − ln 0.4 = 1.204 + 0.916 = 2.120, and lowering it raises P(W). Masked, the loss is −ln 0.4 = 0.916; only <UN> moves. The paper's ablation (Figure 4) finds masking improves routing for both base models.

At test time, read the two token probabilities after the answer. Call them P(<CN>) and P(<UN>).

Say it aloud

c-M of x and y-hat equals P of C-N, divided by P of U-N plus P of C-N.

cM(x, ŷ)
c-M of x and y-hat the confidence score of model M on question x, given its own answer y-hat, from 0 to 1.
P(<CN>)
P of C-N the probability the model gives the confident token right after its answer.
P(<UN>)
P of U-N the probability it gives the unconfident token at the same position.
In plain words

Take P of C-N and P of U-N at the position after the answer. Ignore every other token. The share that goes to C-N is the score.

With numbers

With made-up numbers: P(<CN>) = 0.62 and P(<UN>) = 0.11, with 0.27 on other tokens. c = 0.62 / 0.73 = 0.849.

The score sees the question and the model's own answer, so it judges that answer, not the query alone. That is the difference from an external router model.

Failure. The symptom: after fine-tuning, the model gets worse at the task itself. Measure task accuracy before and after, on a held-out split. Fix: check that the mask covers the gradients on wrong answers and that α is not starving the <CN> side.

Why does Self-REF mask the gradient on the answer tokens of an example labelled <UN>?

Chapter 8

Route or Reject

Send only the unsure questions to the big model, and find where accuracy catches up

You run a small model you can fine-tune, Llama3-8B-Instruct. You can also call a bigger one, Llama3-70B-Instruct, at a price. Routing sends a question to the big model when the small model's score is below a threshold t. The paper sets t at quantiles of the scores, so the routed share steps through 0%, 5%, 10% and on to 100%.

Route the unsure ones

Twenty questions, sorted by the small model's score. Drag the share to route, and compare a confidence-token order with a random order.

0%

Toy: the small model gets 12 of 20 right, the big one 15 of 20. The solid blue line is the expected accuracy of random routing; the dashed line is one random order.

In the toy, routing the 7 least confident questions (35%) reaches the big model's 75%. Routing 9 to 11 reaches 80%, above either model alone, because the two models make different mistakes. The paper sees the same effect and calls it a form of ensembling.

The paper's minimum routing rate to match the big model alone (Table 2), with Llama3-8B's speed-up at that point (Table 1):

DatasetLlama3-8B routesMistral-7B routesBest baseline, Llama3-8BLatency gain, Llama3-8B
MMLU39%70%90%2.03×
OpenbookQA49%40% (text: 50%)70%1.69×
GSM8K65%75%70%1.33×
MedQA40%70%80%2.00×

The speed-up is per-token latency. On MMLU, all-70B runs at 0.292 s per token; Self-REF on Llama3-8B with 39% routed runs at 0.145, at the same accuracy, 0.739. GSM8K needs the most routing and gives the smallest gain, 1.33×. Weights trained on OpenbookQA still route MMLU, at 70% (Llama3-8B) and 75% (Mistral-7B).

Without a bigger model, the same score drives rejection: abstain when c is below t. The paper tests this on questions where, half the time, the authors remove the right option. Self-REF has the best ROC curve on MMLU and OpenbookQA for both base models (Figure 3), without any training on "none of the above".

Failure. The symptom: routing at 50% costs the big model's price and gives little gain. Measure accuracy against routed share on a held-out set, as in the device, and compare with the random line. Fix: if your curve hugs the random line, the score does not rank errors; retrain it.

On MMLU, Self-REF with Llama3-8B matches Llama3-70B by routing 39% of questions. What does that mean?

Chapter 9

Answer, Ask or Defer

Combine the two signals into one rule and set its two thresholds

Each paper solves one half. Active task disambiguation finds the best question; confidence tokens score an answer. Neither paper combines them. The rule below is this session's synthesis, and it is the rule the hero runs.

Check ambiguity first. A confident answer to the wrong reading looks healthy to the confidence score, so the score cannot catch it. For each request:

  1. Estimate the best question's EIG from sampled answers (Chapter 6).
  2. If EIG is at least tEIG, ask it, and add the reply to the request.
  3. Draft an answer and read its confidence c (Chapter 7).
  4. If c is at least tconf, answer. If not, defer to a bigger model or a person.

Set the two thresholds

Each dot is one request from the hero, placed by its EIG and its confidence. Right of the vertical line, the assistant asks first; an arrow shows the confidence after the reply.

0.50
0.60

Toy requests and costs, as in the hero: ask 1 minute, defer 3, a wrong answer shipped 20. Asking an unambiguous request costs a minute and changes nothing.

Count the hero's default. Confidence only (tEIG above 2 bits): 5 wrong answers × 20 + 3 deferrals × 3 = 109 minutes. Ask, then confidence: 5 questions × 1 + 4 deferrals × 3 + 1 wrong × 20 = 37 minutes. The one left is the Eiffel Tower date, a confident mistake on a clear question. No threshold catches it without deferring good answers too.

Set both thresholds the way the paper sets t: sweep them on held-out traffic and read the cost. A medical assistant raises tconf and lowers tEIG; a brainstorming tool does the reverse. The confidence-token paper makes the same point for rejection.

Failure. The symptom: users complain the assistant asks too much. Measure the share of questions whose reply did not change the answer. Fix: raise tEIG, or improve the samples, since a noisy EIG asks about things that do not matter.

Why does the rule check ambiguity before confidence?

Chapter 10

The Field Guide

Keep the numbers, know the limits, and take the code

Calibration asks whether you can trust a confidence. Disambiguation asks whether the model is solving the right task. The first needs a score trained against correctness; the second needs a question chosen from sampled answers. A deployed assistant needs both, with thresholds set on its own traffic.

Terms and numbers

TermMeaningNumber to remember
ECEweighted gap between confidence and accuracy, per bintoy: 0.212 (3 bins), 0.372 (10 bins)
Brier scoremean squared gap between confidence and outcometoy: 0.295
Temperature Tdivide every logit by one numberlogits 4, 1, 0.5: 0.926 at T = 1, 0.716 at T = 2
AmbiguousH strictly larger than H*8 merges fit; 1 is wanted
EIGexpected bits a question removes4 and 4 split: 1 bit; 7 and 1: 0.544
Active task disambiguationsample answers, score questions by pseudo-answer entropyN = 20, M = 5; HumanEval 70.8% to 85.6%
Confidence scoreP(<CN>) / (P(<UN>) + P(<CN>))ECE 0.040 on MMLU, Llama3-8B
Routing parityleast routed share that matches the big model39% on MMLU; 2.03× faster

Limits the authors state

Inconsistencies inside the papers

Checklist

  1. Measure ECE with its bin scheme, plus Brier, on held-out data.
  2. Check the ranking: what share of wrong answers sits in the lowest-confidence slice?
  3. Do not trust raw logits or verbalized numbers without a check.
  4. Sample diverse answers and filter them against the current requirements.
  5. Ask the question whose pseudo-answers split most evenly, and only above tEIG.
  6. Train confidence tokens with the wrong-answer gradient masked.
  7. Sweep the routing share and compare with the random line before you pick t.
pythonimport math
from collections import Counter

def ece(conf, ok, edges=(0.5, 0.7, 0.9, 1.0)):
    N, e = len(conf), 0.0
    for i, (lo, hi) in enumerate(zip(edges, edges[1:])):
        last = i == len(edges) - 2
        b = [j for j, c in enumerate(conf) if lo <= c < hi or (last and c == hi)]
        if b:
            gap = sum(ok[j] for j in b) / len(b) - sum(conf[j] for j in b) / len(b)
            e += len(b) / N * abs(gap)
    return e

def brier(conf, ok):
    return sum((c - y) ** 2 for c, y in zip(conf, ok)) / len(conf)

def eig_hat(pseudo_answers):                 # one question, one answer per sampled solution
    N = len(pseudo_answers)
    return -sum(n / N * math.log2(n / N) for n in Counter(pseudo_answers).values())

def confidence(p_cn, p_un):                  # Self-REF score
    return p_cn / (p_un + p_cn)

def decide(eig, c, t_eig=0.5, t_conf=0.6):     # this session's synthesis
    if eig >= t_eig: return "ask"
    return "answer" if c >= t_conf else "defer"

conf = [0.95, 0.92, 0.88, 0.85, 0.82, 0.78, 0.75, 0.68, 0.60, 0.55]
ok   = [0, 1, 1, 0, 1, 1, 0, 1, 0, 1]
print(round(ece(conf, ok), 3), round(brier(conf, ok), 3))     # 0.212 0.295
print(round(eig_hat(["one"] * 3 + ["tabs"] * 2), 3))           # 0.971
print(round(confidence(0.62, 0.11), 3))                    # 0.849

Keep going

Credit: Session 21 of Georgia Tech CS 8803, LLM seminar. Papers: Kobalczyk, Astorga, Liu and van der Schaar, Active Task Disambiguation with LLMs (arXiv 2502.04485v1, ICLR 2025); Chuang, Sarma, Gopalan, Boccio, Bolouki, Hu and Zhou, Learning to Route LLMs with Confidence Tokens (arXiv 2410.13284v3, ICML 2025). The toy batches, merges, requests and costs are ours.

The takeaway. A model's confidence is worth exactly as much as its record behind it, so measure it and train it. And before you trust any confidence, make sure the model is answering the question that was meant.

Teach it back: open Present or Teach and explain why temperature scaling cannot fix routing, and why the method samples answers before it picks a question. Then go back to the twelve requests and predict the minutes for each policy before you press it.

CS 8803 LLM Seminar, Session 21: Calibration
Active Task Disambiguation paper · Confidence Tokens paper · Jev · Back to Gleams