Skip to content
dgem has moved to github.com/GoogleCloudPlatform/dgem. Docs are moving to googlecloudplatform.github.io/dgem; this site stays up during the move.

Confidence and Calibration

For teams who need to know when a dgem decision can be trusted, and how we check that. Every claim below links to a measurement with its sample size; simulated or illustrative numbers are labelled as such. For the full picture of why dgem decisions can be trusted, start with Confidence beyond Shannon: hesitation-gated decisions.

DiffusionGemma fills in all answer slots of a policy at once and returns, for each question, a probability for every allowed answer (not just a label). From those probabilities dgem derives:

SignalWhat it isWhere you see it
ConfidenceProbability of the chosen answerCLI table, JSON confidence
HesitationEntropy of the answer distribution scaled to 0–100% by the number of options (0% = certain, 100% = coin toss)Decision Studio answer cards; --stats
Standard error, agreementSpread across samples (with samples: 4)CLI table, JSON

Hesitation bands used in the Studio: below 16% clear, 16–50% somewhat unsure, above 50% very unsure. Why a model can read its own confidence in one pass, in plain language: The journey to decision models and the glossary.

  1. Measure calibration on labelled data. Confidence should match accuracy. Public suites: 231-item JevBench and a 50-item calibration suite across 11 datasets (benchmarks); your own data: Calibrate your policy.
  2. Gate on hesitation. Answers above a hesitation threshold go to a person or a larger model. Hesitation alone detects most errors (AUROC ≈ 0.85 on JevBench, EXP-17).
  3. Escalate only what needs it. A Stage 2 cascade to Gemini on answers above 16% hesitation reached 221/231 on JevBench while escalating 39% (Gemini on everything: 225/231), and 48/50 on the calibration suite at 34% escalated (EXP-14).
  4. Monitor known biases. The model has a measurable preference for the first option when unsure; it is measured on every release rather than corrected, because the corrections we tested did not help reliably (Confidence beyond Shannon).
  5. Re-validate on every serving change. A new serving image is compared with production in the regression matrix, judged against the run-to-run agreement measured in the same session, before it takes traffic.
TechniqueStatusEvidence
Hesitation gate (~16%)RecommendedCatches most errors at low cost (EXP-14, EXP-17)
Stage 2 cascade to Gemini on hesitant answersRecommended where a larger model is acceptableEXP-05, EXP-14
samples: 4 for an error barUse where agreement mattersAdds ~35–40 ms
Temperature scalingRecommended per policy, fit on held-out dataBest temperature ranges from 1.2 to 3.6 by domain (v0.2.0 reference)
document_first prompt layoutDefault from serving v0.2.0Gains of 3–12 points on multi-question and wide-option sets (prompt layout)
Null-prior de-biasingResearch: helps one suite, hurts anotherEXP-13, EXP-14
Reversed-order (“mirror”) checkResearch: little gain over hesitation for double the costEXP-15–EXP-17
  • Small suites are noisy. 50 and 231 items give coarse calibration estimates; two identical runs agree on 94–99% of answers depending on the suite (regression matrix).
  • Individual answers depend on the serving image. Accuracy was unchanged across the last runtime upgrade, but about 5% of items changed answer; don’t compare per-item results across images.
  • Calibration is policy- and data-specific. Numbers on public suites don’t transfer automatically; check your own (how).