SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.13213 · 2024

Probabilities of Chat LLMs Are Miscalibrated but Still Predict Correctness on Multiple-Choice Q&A

arXiv · PDF · Open in the Atlas

Code that ran

10 of 14 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 9 failures of our instrument; 4 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2402.13213.json · badge: /api/ran/2402.13213.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
bplaut/softmax-probs-predict-llm-correctness canonical (classifier label)
classifier basis: census
9 ran · 3 no recorded run
bplaut/llm-calibration-and-correctness-prediction canonical (classifier label)
classifier basis: classifier_2025
1 ran · 1 no recorded run
FunctionStatusWhere it lives
compute_statistics Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
bplaut/softmax-probs-predict-llm-correctness/show_msp_distributions.py
code served (permissive licence) · get_code("74f56cba2c962f66")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# The function compute_statistics takes a list of values and computes
# distribution statistics. It uses:
# - values: must be a list or iterable that can be converted to np.array
# - It checks if values is empty with "if not values"
# - It computes various numpy operations on the array

# Create a simple list of numeric values
values = [1.5, 2.3, 3.7, 4.2, 5.1, 6.8, 7.4, 8.9, 9.2, 10.5]

ARGS = {
    'values': values
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_data Ran
ran; our contract draft was wrong, not the code
bplaut/softmax-probs-predict-llm-correctness/utils.py
code served (permissive licence) · get_code("ed723c89b7e88189")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tempfile
import os

# Create a temporary file with test data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write("Correct 0.9,0.8,0.7\n")
temp_file.write("Wrong 0.4,0.5,0.3\n")
temp_file.write("Correct 0.95,0.92,0.88\n")
temp_file.close()

file_path = temp_file.name

ARGS = {
    'file_path': file_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_file_name Ran
ran; our contract draft was wrong, not the code
bplaut/softmax-probs-predict-llm-correctness/utils.py
code served (permissive licence) · get_code("54531f830631efef")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import sys
import re

def parse_file_name(file_name, collapse_prompts=False):
    if 'few_shot' in file_name:
        few_shot_idx = file_name.find('_few_shot')
        file_name = file_name[:few_shot_idx] + '.txt'
    match = re.match('d=(.+?)_m=(.+?)_q=(\\d+)-(\\d+)_c=(.+?)_p=(.+?).txt', file_name)
    if not match:
        print(f'Error: Invalid file name format: {file_name}')
        sys.exit(1)
    dataset, model, start_q, end_q, conf_type, prompt_phrasing = match.groups()
    group = f'{conf_type},{prompt_phrasing}' if not collapse_prompts else f'{conf_type}'
    return (dataset, model, group)


ARGS = {
    'file_name': 'd=cifar10_m=bert_q=1-5_c=entropy_p=natural.txt',
    'collapse_prompts': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_filename Ran
ran; our contract draft was wrong, not the code
bplaut/softmax-probs-predict-llm-correctness/show_msp_distributions.py
code served (permissive licence) · get_code("ddaa2dc3f0678532")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import re

def parse_filename(filename):
    """Extract model and conf_type from filename."""
    basename = os.path.basename(filename)
    model_match = re.search('m=([^_]+)', basename)
    model = model_match.group(1) if model_match else None
    conf_type_match = re.search('c=([^_]+)', basename)
    conf_type = conf_type_match.group(1) if conf_type_match else None
    return (model, conf_type)

ARGS = {
    'filename': '/path/to/checkpoint_m=resnet50_c=standard_epoch=10.pt'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_group_name Ran
ran; our contract draft was wrong, not the code
bplaut/softmax-probs-predict-llm-correctness/utils.py
code served (permissive licence) · get_code("0881fdbaf4528342")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function parse_group_name takes a single parameter 'group' which is a string
# It splits the string by commas and extracts up to 4 parts
# We need to construct a valid group string with comma-separated values

ARGS = {
    "group": "conf_type_value,prompt_type_value,confidence_measure_value,renorm_status_value"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
plot_style_for_group Ran
ran; our contract draft was wrong, not the code
bplaut/softmax-probs-predict-llm-correctness/plotting_functions.py
code served (permissive licence) · get_code("44d2ee7d0ca61946")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

# Test cases for plot_style_for_group function
# The function takes a group parameter and returns style info based on string matching

ARGS = {
    'group': 'first_prompt'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
process_file Ran
ran, honoured the contract we drafted
bplaut/softmax-probs-predict-llm-correctness/show_msp_distributions.py
code served (permissive licence) · get_code("0c29fde88ebbe1cd")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tempfile
import os

# Create a temporary file with valid content for the function to process
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_filepath = temp_file.name

# Write test data to the file
temp_file.write("grade confidence\n")
temp_file.write("A 0.95, 0.87, 0.92\n")
temp_file.write("B 0.78, 0.81, 0.75\n")
temp_file.write("C 0.65, 0.72, 0.68\n")
temp_file.write("\n")
temp_file.write("D 0.55, 0.60\n")
temp_file.close()

ARGS = {
    'filepath': temp_filepath
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
t_to_str Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
bplaut/llm-calibration-and-correctness-prediction/generate_text.py
code served (permissive licence) · get_code("68f6a3ddce1f5422")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function t_to_str takes a tensor T and a precision parameter
# It converts the tensor to a string representation and formats it

# Create a small tensor to pass as T
T = torch.tensor([[1.23456, 2.34567], [3.45678, 4.56789]])

# precision parameter is an integer controlling formatting
precision = 3

ARGS = {
    'T': T,
    'precision': precision
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
test_large_sample Ran
ran; our contract draft was wrong, not the code
bplaut/softmax-probs-predict-llm-correctness/statistical_tests.py
code served (permissive licence) · get_code("3b63c9c481b3cc15")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function uses len(data) and compares it to threshold
# data is expected to be a sequence with a length
# We'll create a simple list as data

data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 
        21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35]

ARGS = {
    'data': data,
    'threshold': 30
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family int — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
test_normality Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
bplaut/softmax-probs-predict-llm-correctness/statistical_tests.py
code served (permissive licence) · get_code("95b959aa05271726")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import scipy.stats as stats
import numpy as np

torch_imported = False
try:
    import torch
    torch_imported = True
except ImportError:
    pass

# Generate sample data for normality testing
# Using a small dataset with roughly normal distribution
np.random.seed(0)
data = np.random.normal(loc=0, scale=1, size=20)

ARGS = {
    'data': data,
    'mode': 'ks',
    'threshold': 0.05
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
acc_scatter_plots Not yet run
unverified (harvested, no recorded run)
bplaut/softmax-probs-predict-llm-correctness/plotting_functions.py
code served (permissive licence) · get_code("4d4f6a798379d5f5")
How it ran

no invocation recorded.

compute_auroc Not yet run
unverified (harvested, no recorded run)
bplaut/softmax-probs-predict-llm-correctness/plotting_functions.py
code served (permissive licence) · get_code("4e2deaf4a017eea3")
How it ran

no invocation recorded.

plots_for_group Not yet run
unverified (harvested, no recorded run)
bplaut/llm-calibration-and-correctness-prediction/analysis_main.py
code served (permissive licence) · get_code("8d80acdead51a530")
How it ran

no invocation recorded.

test_equal_variance Not yet run
unverified (harvested, no recorded run)
bplaut/softmax-probs-predict-llm-correctness/statistical_tests.py
code served (permissive licence) · get_code("85a8cea633d8182d")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 14 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

We study 15 large language models (LLMs) fine-tuned for chat and find that their maximum softmax probabilities (MSPs) are consistently miscalibrated on multiple-choice Q&A. However, those MSPs might still encode useful uncertainty information. Specifically, we hypothesized that wrong answers would be associated with smaller MSPs compared to correct answers. Via rigorous statistical testing, we show that this hypothesis holds for models which perform well on the underlying Q&A task. We also find a strong direction correlation between Q&A accuracy and MSP correctness prediction, while finding no correlation between Q&A accuracy and calibration error. This suggests that within the current fine-tuning paradigm, we can expect correctness prediction but not calibration to improve as LLM capabilities progress. To demonstrate the utility of correctness prediction, we show that when models have the option to abstain, performance can be improved by selectively abstaining based on the MSP of the initial model response, using only a small amount of labeled data to choose the MSP threshold.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2402.13213")
get_code_for_paper("2402.13213")
have("2402.13213")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2402.13213.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2402.13213.svg)](https://syntology.ai/paper/2402.13213)

Connect an agent — have() is free.