SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2212.08037 · 2022

Attributed Question Answering: Evaluation and Modeling for Attributed Large Language Models

arXiv · PDF · Open in the Atlas

Code that ran

3 of 3 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; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 0 no recorded run), measured 2026-11-21; 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/2212.08037.json · badge: /api/ran/2212.08037.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
google-research-datasets/attributed-qa canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
FunctionStatusWhere it lives
format_passage_for_ais Ran
ran; our contract draft was wrong, not the code
google-research-datasets/attributed-qa/evaluation.py
code served (permissive licence) · get_code("b31bec242d56bfde")
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 re

PASSAGE_FORMAT = re.compile('« ([^»]*) » « ([^»]*) » (.*)')

def format_passage_for_ais(passage):
    """Produce the AIS template format of a passage.

  Args:
    passage: A passage from the Wikipedia scrape.

  Returns:
    a formatted string, e.g.

      Title: Luke Cage (season 2)
      Section: Release

      The second season of Luke Cage was released on June 22, 2018, on the
      streaming service Netflix worldwide, in Ultra HD 4K and high dynamic
      range.
  """
    ret = []
    m = PASSAGE_FORMAT.match(passage)
    if not m:
        return passage
    title = m.group(1)
    ret.append(f'Title: {title}')
    headings = m.group(2)
    if not headings.startswith(title):
        sections = m.group(2)
        ret.append(f'Section: {sections}')
    elif len(headings) > len(title):
        sections = headings[len(title) + 2:]
        ret.append(f'Section: {sections}')
    ret.append('')
    passage = m.group(3)
    ret.append(passage)
    return '\n'.join(ret)


# Create test passages that match the PASSAGE_FORMAT pattern
# Format: « title » « headings » body_text

test_passage_1 = '« Luke Cage (season 2) » « Luke Cage (season 2) > Release » The second season of Luke Cage was released on June 22, 2018, on the streaming service Netflix worldwide, in Ultra HD 4K and high dynamic range.'

test_passage_2 = '« Breaking Bad » « Season Overview » This is a great show about chemistry and crime.'

test_passage_3 = 'This is not a properly formatted passage and should be returned as-is'

ARGS = {
    'passage': test_passage_1
}
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 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
format_passage_for_autoais Ran
ran; our contract draft was wrong, not the code
google-research-datasets/attributed-qa/evaluation.py
code served (permissive licence) · get_code("5e0a93b8b904b193")
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 re

PASSAGE_FORMAT = re.compile('« ([^»]*) » « ([^»]*) » (.*)')

def format_passage_for_autoais(passage):
    """Produce the NLI format for a passage.

  Args:
    passage: A passage from the Wikipedia scrape.

  Returns:
    a formatted string, e.g.

      Luke Cage (season 2), Release. The second season of Luke Cage was released
      on June 22, 2018, on the streaming service Netflix worldwide, in Ultra HD
      4K and high dynamic range.
  """
    m = PASSAGE_FORMAT.match(passage)
    if not m:
        return passage
    headings = m.group(2)
    passage = m.group(3)
    return f'{headings}. {passage}'


# Test case 1: passage matching the regex pattern
passage_with_format = '« article_id » « Luke Cage (season 2), Release » The second season of Luke Cage was released on June 22, 2018, on the streaming service Netflix worldwide, in Ultra HD 4K and high dynamic range.'

# Test case 2: passage not matching the regex pattern
passage_without_format = 'This is just a plain passage without any special formatting.'

ARGS = {
    'passage': passage_with_format
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 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
read_wikipedia Ran
ran; our contract draft was wrong, not the code
google-research-datasets/attributed-qa/evaluation.py
code served (permissive licence) · get_code("98770e95557bde8e")
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 json
import tempfile
import os

# Create a temporary directory and file for testing
temp_dir = tempfile.mkdtemp()
shard_path = os.path.join(temp_dir, "wikipedia_shard.jsonl")

# Write sample Wikipedia data to the temporary file
sample_data = [
    {"id": "page_001", "contents": "This is the first page about Python."},
    {"id": "page_002", "contents": "This is the second page about machine learning."},
    {"id": "page_003", "contents": "This is the third page about neural networks."},
    {"id": "page_004", "contents": "This is the fourth page about deep learning."},
]

with open(shard_path, 'w') as f:
    for item in sample_data:
        f.write(json.dumps(item) + '\n')

# Define predicted_ids as a set containing some of the page IDs
predicted_ids = {"page_001", "page_003"}

# Construct ARGS dictionary
ARGS = {
    "shard": shard_path,
    "predicted_ids": predicted_ids,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
absl — 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

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 2 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
format_passage_for_autoais 1 other paper
1 later
2309.07852 (2023-09)
ExpertQA: Expert-Curated Questions and Attributed Answers

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-21.

Repositories linked to this paper

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

Abstract

Large language models (LLMs) have shown impressive results while requiring little or no direct supervision. Further, there is mounting evidence that LLMs may have potential in information-seeking scenarios. We believe the ability of an LLM to attribute the text that it generates is likely to be crucial in this setting. We formulate and study Attributed QA as a key first step in the development of attributed LLMs. We propose a reproducible evaluation framework for the task and benchmark a broad set of architectures. We take human annotations as a gold standard and show that a correlated automatic metric is suitable for development. Our experimental work gives concrete answers to two key questions (How to measure attribution?, and How well do current state-of-the-art methods perform on attribution?), and give some hints as to how to address a third (How to build LLMs with attribution?).

For agents

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

get_harvested_code_for_paper("2212.08037")
get_code_for_paper("2212.08037")
have("2212.08037")

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

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

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

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

Connect an agent — have() is free.