SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.05213 · 2024

On Subjective Uncertainty Quantification and Calibration in Natural Language Generation

arXiv · PDF · Open in the Atlas

Code that ran

12 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; 11 failures of our instrument; 2 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/2406.05213.json · badge: /api/ran/2406.05213.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
meta-inf/suq-nlg canonical (classifier label)
classifier basis: census
12 ran · 2 no recorded run
FunctionStatusWhere it lives
add_completion_task Ran
ran; our contract draft was wrong, not the code
meta-inf/suq-nlg/qa/eval_dump.py
code served (permissive licence) · get_code("915a9c0698bb76bc")
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 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
import torch.nn as nn

torch.manual_seed(0)

# Analyze the function:
# - req_body: a dict that gets merged with {'model': eval_model, 'n': 5}
# - eval_model: a string (used as the 'model' value in the merged dict)

# The function uses:
# - req_body as a dict (dict merge operation)
# - eval_model as a value to be assigned to 'model' key
# - len(all_requests) to generate a custom_id
# - appends to all_requests list

req_body_example = {
    'messages': [{'role': 'user', 'content': 'Hello'}],
    'temperature': 0.7,
    'max_tokens': 100
}

eval_model_example = 'gpt-4'

ARGS = {
    'req_body': req_body_example,
    'eval_model': eval_model_example
}
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 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
align_arrays Ran
ran; our contract draft was wrong, not the code
meta-inf/suq-nlg/qa/plot-all.py
code served (permissive licence) · get_code("b7c3d1da7e3610ab")
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 numpy as np
from typing import Tuple

# Create mandatory arrays - all must have same length
mandatory_array_1 = np.array([1.0, 2.0, 3.0, 4.0, 5.0])
mandatory_array_2 = np.array([10.0, 20.0, 30.0, 40.0, 50.0])
mandatory = (mandatory_array_1, mandatory_array_2)

# Create optional arrays - can have different lengths or be empty
optional_array_1 = np.array([100.0, 200.0, 300.0, 400.0, 500.0])
optional_array_2 = np.array([])  # empty array
optional_array_3 = np.array([1.1, 2.2, 3.3])  # shorter than mandatory
optional = (optional_array_1, optional_array_2, optional_array_3)

ARGS = {
    "mandatory": mandatory,
    "optional": optional,
}
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 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
clean_text Ran
ran; our contract draft was wrong, not the code
meta-inf/suq-nlg/qa/vu.py
code served (permissive licence) · get_code("2745a7b067527cea")
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 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

ARGS = {
    'old_text': 'This is some text\nQ: What is this?\nMore text'
}
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 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
download_batch_outputs Ran
ran; our contract draft was wrong, not the code
meta-inf/suq-nlg/qa/eval_parse.py
code served (permissive licence) · get_code("989948dc5ec7e193")
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 json
import os
from unittest.mock import Mock, MagicMock

# Create a temporary directory for the test
temp_dir = tempfile.mkdtemp()

# Create a mock submission record file with batch IDs
submission_rec_file = os.path.join(temp_dir, "submission_records.jsonl")
with open(submission_rec_file, 'w') as f:
    f.write(json.dumps({"id": "batch_001"}) + "\n")
    f.write(json.dumps({"id": "batch_002"}) + "\n")

# Create a mock OpenAI client
mock_client = Mock()

# Create mock batch objects
mock_batch_1 = Mock()
mock_batch_1.status = "completed"
mock_batch_1.output_file_id = "file_001"

mock_batch_2 = Mock()
mock_batch_2.status = "completed"
mock_batch_2.output_file_id = "file_002"

# Setup batches.retrieve to return the appropriate batch
def retrieve_batch(batch_id):
    if batch_id == "batch_001":
        return mock_batch_1
    elif batch_id == "batch_002":
        return mock_batch_2

mock_client.batches.retrieve = retrieve_batch

# Create mock file content objects
mock_file_content_1 = Mock()
mock_file_content_1.write_to_file = Mock()

mock_file_content_2 = Mock()
mock_file_content_2.write_to_file = Mock()

# Setup files.content to return the appropriate file content
def get_file_content(file_id):
    if file_id == "file_001":
        return mock_file_content_1
    elif file_id == "file_002":
        return mock_file_content_2

mock_client.files.content = get_file_content

ARGS = {
    "submission_rec_file": submission_rec_file,
    "openai_client": mock_client,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai, tqdm — 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
enque_sim_score_tasks Ran
ran; our contract draft was wrong, not the code
meta-inf/suq-nlg/qa/eval_dump.py
code served (permissive licence) · get_code("8b2a6e8218aec661")
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 torch
import numpy as np
from unittest.mock import MagicMock

torch.manual_seed(0)

# Define the sample_ans parameter
sample_ans = "This is a sample answer"

# Define the ref_ans_candidates parameter
ref_ans_candidates = [
    "This is a reference answer 1",
    "This is a reference answer 2",
    "This is a reference answer 3"
]

# Define the rec_i parameter (row dict)
rec_i = {
    'question': 'What is the capital of France?',
    'dataset': 'trivia'
}

# Define the dataset parameter
dataset = 'trivia'

# Define the eval_cache parameter (a dict for caching)
eval_cache = {}

# Define the eval_model parameter
eval_model = 'gpt-4'

ARGS = {
    'sample_ans': sample_ans,
    'ref_ans_candidates': ref_ans_candidates,
    'rec_i': rec_i,
    'dataset': dataset,
    'eval_cache': eval_cache,
    'eval_model': eval_model
}
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 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
flatten_dict Ran
ran; our contract draft was wrong, not the code
meta-inf/suq-nlg/generation/utils.py
code served (permissive licence) · get_code("6afd679238dc532d")
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 torch
import numpy as np

torch.manual_seed(0)

# Construct a nested dictionary with various data types
test_dict = {
    'model': {
        'layers': {
            'layer1': 'conv',
            'layer2': 'relu'
        },
        'params': {
            'learning_rate': 0.001,
            'batch_size': 32
        }
    },
    'data': {
        'train': [1, 2, 3],
        'test': [4, 5, 6]
    },
    'metrics': {
        'accuracy': 0.95,
        'loss': 0.05
    },
    'simple_value': 42
}

# Define ARGS mapping all parameters
ARGS = {
    'd': test_dict,
    'parent_key': '',
    'sep': '_'
}
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 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
generate_gpt_eval_request Ran
ran; our contract draft was wrong, not the code
meta-inf/suq-nlg/qa/eval_dump.py
code served (permissive licence) · get_code("91089e2a35a95037")
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 torch

# Construct minimal valid arguments for generate_gpt_eval_request
row = {
    'dataset': 'trivia',
    'question': 'What is the capital of France?'
}

ref_answer = 'Paris'

answer = 'Paris'

dataset = 'trivia'

few_shots = None

ARGS = {
    'row': row,
    'ref_answer': ref_answer,
    'answer': answer,
    'dataset': dataset,
    'few_shots': few_shots
}
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 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
load_data Ran
ran; our contract draft was wrong, not the code
meta-inf/suq-nlg/mt/utils.py
code served (permissive licence) · get_code("c6f4b10896e5af07")
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 os
import tempfile
import shutil

# Create a temporary directory structure for testing
temp_base = tempfile.mkdtemp()
split_dir = os.path.join(temp_base, "train")
os.makedirs(split_dir, exist_ok=True)

# Create a sample data file
lang = "en"
split = "train"
filepath = os.path.join(split_dir, f"{split}.{lang}")
with open(filepath, 'w') as f:
    f.write("hello world\n")
    f.write("this is a test\n")
    f.write("sample data line\n")

ARGS = {
    "base_path": temp_base,
    "split": split,
    "lang": lang
}
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
mask_arrays Ran
ran; our contract draft was wrong, not the code
meta-inf/suq-nlg/qa/plot-all.py
code served (permissive licence) · get_code("05b8a50b7eee68cf")
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 torch
import numpy as np

torch.manual_seed(0)

# Create test arrays - a tuple of arrays with different sizes
arr1 = torch.randn(5, 4)  # 5 elements, 4 features
arr2 = torch.randn(5, 3)  # 5 elements, 3 features
arr3 = np.array([])       # empty array to test the len(a) > 0 condition

arrs = (arr1, arr2, arr3)

# Create a boolean mask with 5 elements (matching the length of arr1 and arr2)
mask = torch.tensor([True, False, True, False, True])

ARGS = {
    "arrs": arrs,
    "mask": mask
}
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 — 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
online_outfile_path Ran
ran; our contract draft was wrong, not the code
meta-inf/suq-nlg/qa/eval_submit.py
code served (permissive licence) · get_code("64c5dbf616aea642")
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 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

ARGS = {
    'inp_path': 'data.jsonl'
}
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 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
parse_float_between_0_and_1 Ran
ran, honoured the contract we drafted
meta-inf/suq-nlg/generation/utils.py
code served (permissive licence) · get_code("6600bbf7a743f950")
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 float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 re

def parse_float_between_0_and_1(s):
    pattern = '[+-]?\\d*\\.?\\d+'
    matches = re.finditer(pattern, s)
    for match in matches:
        num_str = match.group()
        try:
            num = float(num_str)
            if 0 <= num <= 1:
                return num
        except ValueError:
            continue
    return None

ARGS = {
    's': '0.5'
}
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 float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
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
parser Ran
ran; our contract draft was wrong, not the code
meta-inf/suq-nlg/exputils.py
code served (permissive licence) · get_code("71234fd59ed06c65")
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 ArgumentParser. 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 argparse

def _get_timestr():
    import datetime
    dt = datetime.datetime.now()
    return '{}-{}-{}-{}'.format(dt.month, dt.day, dt.hour, dt.minute)

def _with_default_args(parser, file_name):
    default_path = '/tmp/{}/last_{}'.format(file_name, _get_timestr())
    parser.add_argument('-dir', default=default_path, type=str)
    parser.add_argument('-resume', dest='resume', action='store_true')
    parser.set_defaults(resume=False)
    parser.add_argument('-production', dest='production', action='store_true')
    parser.set_defaults(production=False)
    return parser

def parser(file_name) -> argparse.ArgumentParser:
    """
    Add arguments needed by the framework
    """
    return _with_default_args(argparse.ArgumentParser(), file_name)

# Setup code
ARGS = {
    'file_name': 'test_model'
}
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 ArgumentParser — a ArgumentParser output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ArgumentParser 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
load Not yet run
unverified (harvested, no recorded run)
meta-inf/suq-nlg/qa/plot-all.py
code served (permissive licence) · get_code("0d8b779c92feda0d")
How it ran

no invocation recorded.

preflight Not yet run
unverified (harvested, no recorded run)
meta-inf/suq-nlg/exputils.py
code served (permissive licence) · get_code("c6f235974b03ba76")
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, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 0 later) and 12 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.

FunctionAlso present inEarliest-datedOthers named
parser 2 other papers
2 dated earlier
2205.10772 (2022-05)
Fast Instrument Learning with Faster Rates
2403.19381 (2024-03)
On Uncertainty Quantification for Near-Bayes Optimal Algorithms
preflight 2 other papers
2 dated earlier
2205.10772 (2022-05)
Fast Instrument Learning with Faster Rates
2403.19381 (2024-03)
On Uncertainty Quantification for Near-Bayes Optimal Algorithms

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

Applications of large language models often involve the generation of free-form responses, in which case uncertainty quantification becomes challenging. This is due to the need to identify task-specific uncertainties (e.g., about the semantics) which appears difficult to define in general cases. This work addresses these challenges from a perspective of Bayesian decision theory, starting from the assumption that our utility is characterized by a similarity measure that compares a generated response with a hypothetical true response. We discuss how this assumption enables principled quantification of the model's subjective uncertainty and its calibration. We further derive a measure for epistemic uncertainty, based on a missing data perspective and its characterization as an excess risk. The proposed methods can be applied to black-box language models. We illustrate the methods on question answering and machine translation tasks. Our experiments provide a principled evaluation of task-specific calibration, and demonstrate that epistemic uncertainty offers a promising deferral strategy for efficient data acquisition in in-context learning.

For agents

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

get_harvested_code_for_paper("2406.05213")
get_code_for_paper("2406.05213")
have("2406.05213")

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

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

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

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

Connect an agent — have() is free.