← ClaudeAtlas

llm-calibration-logprobslisted

Reads a model's own uncertainty off its token log-probabilities — collecting logprobs and aggregating multi-token labels, confidence tiers and margins for triage, calibration assessment with ECE, Brier scores, and reliability diagrams, using confidence downstream without laundering it into evidence, and what to archive for reproducibility. Use when the user asks how confident a classifier was on each item, asks about logprobs, top-k tokens, calibration, ECE, Brier, or reliability diagrams, or wants low-confidence cases routed to human review. This is within-model confidence — agreement across several independent model coders goes to model-council-voting, and codebook and validation design to text-classification.
scdenney/open-science-skills · ★ 57 · AI & Automation · score 74
Install: claude install-skill scdenney/open-science-skills
# Reading a Model's Own Uncertainty from Token Log-Probabilities ## Instructions This skill covers **within-model** confidence: how sure a single model is about each decision it makes, read off the token log-probabilities it emits, and whether that internal confidence is *calibrated* against ground truth. It pairs with the `model-council-voting` skill, which handles the complement — **between-coder** agreement across several independent models. Use both: one model's high self-reported confidence on an item, and three models independently agreeing on that item, are different kinds of evidence, and a careful pipeline reports both. This skill does not cover codebook design or human-validation statistics (κ, F1) — those live in the `text-classification` skill; cross-reference it rather than re-deriving them here. ### 1. What a Token Log-Probability Is, and When to Use It - A generative LLM produces each output token by sampling from a probability distribution over its vocabulary. The **log-probability** (logprob) of the token it actually emitted is `log P(token | context)`; exponentiating gives a probability in `[0, 1]`. A logprob of `0.0` means probability 1.0 (the model treated that token as certain); `-2.30` means probability ≈ 0.10. This is the model's *own* assessment of how likely that token was, conditional on everything before it. - Use logprobs when you need a **per-item, per-decision** confidence signal that is nearly free (it falls out of the same forward pass that