SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2204.06239 · 2022

Can Question Rewriting Help Conversational Question Answering?

arXiv · PDF · Open in the Atlas

Code that ran

5 of 8 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 4 have no contract verdict; 1 failure of our instrument; 3 no recorded run), measured 2026-11-22; 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/2204.06239.json · badge: /api/ran/2204.06239.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
hltchkust/cqr4cqa canonical (classifier label)
classifier basis not recorded on the link
5 ran · 3 no recorded run
FunctionStatusWhere it lives
left_pad Ran
ran on a synthesized input
hltchkust/cqr4cqa/src/data_utils/qr_data_utils.py
code served (permissive licence) · get_code("ac50664dd5bab0c0")
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 2, 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)

# Analyze the function:
# - seqs: iterable of sequences (lists or similar)
# - seq_lens: iterable of sequence lengths (integers)
# - max_len: maximum length (integer)
# - pad_id: padding token id (integer)

# The function iterates over seqs and seq_lens with zip,
# accesses seq_len as an integer for arithmetic,
# accesses seq as something that can be concatenated with a list,
# and uses pad_id in a list multiplication.

# Create small test data
seqs = [
    [10, 20, 30],           # sequence of length 3
    [40, 50],               # sequence of length 2
]

seq_lens = [3, 2]

max_len = 5

pad_id = 0

ARGS = {
    "seqs": seqs,
    "seq_lens": seq_lens,
    "max_len": max_len,
    "pad_id": pad_id,
}
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 2, dtype family int — 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
load_canard_data Ran
ran on a synthesized input
hltchkust/cqr4cqa/src/data_utils/canard.py
code served (permissive licence) · get_code("e196f1aaa53cb372")
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 os
import json
import tempfile
from pathlib import Path

# Create a temporary directory for test data
temp_dir = tempfile.mkdtemp()
data_dir = os.path.join(temp_dir, 'data', 'canard')
output_dir = os.path.join(temp_dir, 'output')
os.makedirs(data_dir, exist_ok=True)
os.makedirs(output_dir, exist_ok=True)

# Create sample data files for train, dev, test splits
sample_data = [
    {
        "History": ["What is Python?", "Tell me more"],
        "Question": "Is it popular?",
        "Rewrite": "Is Python popular?"
    },
    {
        "History": ["What is machine learning?"],
        "Question": "Give examples",
        "Rewrite": "Give examples of machine learning"
    }
]

for split in ['train', 'dev', 'test']:
    file_path = os.path.join(data_dir, f'{split}.json')
    with open(file_path, 'w') as f:
        json.dump(sample_data, f)

# Create a minimal tokenizer stand-in class
class MinimalTokenizer:
    def __init__(self):
        self.eos_token = "</s>"

tokenizer = MinimalTokenizer()

# Define ARGS dictionary with all parameters for load_canard_data
ARGS = {
    'data_dir': data_dir + '/',
    'output_dir': output_dir + '/',
    'tokenizer': tokenizer,
    'overwrite_cache': 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 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_qa_data Ran
ran on a synthesized input
hltchkust/cqr4cqa/src/data_utils/qa_rewrite.py
code served (permissive licence) · get_code("cc50c06c0f919eee")
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 os
import json
import tempfile
from pathlib import Path

# Create a minimal tokenizer stand-in
class MinimalTokenizer:
    def __init__(self):
        self.eos_token = "</s>"

# Create temporary directories for data and output
temp_data_dir = tempfile.mkdtemp()
temp_output_dir = tempfile.mkdtemp()

# Create minimal CoQA-format data files
coqa_train_data = {
    "data": [
        {
            "id": "001",
            "questions": [
                {"turn_id": 1, "input_text": "What is this?"},
                {"turn_id": 2, "input_text": "Tell me more."}
            ],
            "answers": [
                {"input_text": "This is a test."},
                {"input_text": "More information here."}
            ]
        }
    ]
}

coqa_valid_data = {
    "data": [
        {
            "id": "002",
            "questions": [
                {"turn_id": 1, "input_text": "Another question?"}
            ],
            "answers": [
                {"input_text": "Another answer."}
            ]
        }
    ]
}

coqa_test_data = {
    "data": [
        {
            "id": "003",
            "questions": [
                {"turn_id": 1, "input_text": "Test question?"}
            ],
            "answers": [
                {"input_text": "Test answer."}
            ]
        }
    ]
}

# Write CoQA data files
with open(os.path.join(temp_data_dir, 'train_split.json'), 'w') as f:
    json.dump(coqa_train_data, f)

with open(os.path.join(temp_data_dir, 'valid_split.json'), 'w') as f:
    json.dump(coqa_valid_data, f)

with open(os.path.join(temp_data_dir, 'coqa-dev-v1.0.json'), 'w') as f:
    json.dump(coqa_test_data, f)

# Create a minimal tokenizer
tokenizer = MinimalTokenizer()

ARGS = {
    'dataset_name': 'coqa',
    'data_dir': temp_data_dir,
    'output_dir': temp_output_dir,
    'tokenizer': tokenizer,
    'overwrite_cache': False,
    'cache_dir': None
}
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 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
right_pad Ran
ran on a synthesized input
hltchkust/cqr4cqa/src/data_utils/qr_data_utils.py
code served (permissive licence) · get_code("a8222aa29756c742")
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 2, 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

torch.manual_seed(0)

# seqs: list of sequences (lists of integers)
seqs = [
    [1, 2, 3],
    [4, 5]
]

# seq_lens: list of sequence lengths
seq_lens = [3, 2]

# max_len: maximum length to pad to
max_len = 5

# pad_id: padding token id
pad_id = 0

ARGS = {
    "seqs": seqs,
    "seq_lens": seq_lens,
    "max_len": max_len,
    "pad_id": pad_id
}
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 list, ndim 2, dtype family int — 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
trim_batch Ran
ran; our contract draft was wrong, not the code
hltchkust/cqr4cqa/src/data_utils/qr_data_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from Sahandfer/CEM, is pointer only (licence: NONE) · get_code("eeb8dc60c6ef1fa4")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Sahandfer/CEM, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_datasets Not yet run
unverified (harvested, no recorded run)
hltchkust/cqr4cqa/src/data_utils/convqa_data_utils.py
code served (permissive licence) · get_code("c1804882d56dfe15")
How it ran

no invocation recorded.

prepare_validation_features_fast Not yet run
unverified (harvested, no recorded run)
hltchkust/cqr4cqa/src/data_utils/convqa_data_utils.py
code served (permissive licence) · get_code("b3f7ce7c256d3a24")
How it ran

no invocation recorded.

proc_coqa_dataset Not yet run
unverified (harvested, no recorded run)
hltchkust/cqr4cqa/src/data_utils/convqa_data_utils.py
code served (permissive licence) · get_code("55e3d23c649fbcdf")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 1 later) and 7 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
trim_batch 9 other papers
3 dated earlier, 1 the same month, 5 later
2005.01107 (2020-05)
Simplifying Paragraph-level Question Generation via Transformer Language Models
2104.08661 (2021-04)
Explaining Answers with Entailment Trees
2108.02866 (2021-08)
Dual Reader-Parser on Hybrid Textual and Tabular Evidence for Open Domain Question Answering
and 6 more not named here

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

Repositories linked to this paper

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

Abstract

Question rewriting (QR) is a subtask of conversational question answering (CQA) aiming to ease the challenges of understanding dependencies among dialogue history by reformulating questions in a self-contained form. Despite seeming plausible, little evidence is available to justify QR as a mitigation method for CQA. To verify the effectiveness of QR in CQA, we investigate a reinforcement learning approach that integrates QR and CQA tasks and does not require corresponding QR datasets for targeted CQA. We find, however, that the RL method is on par with the end-to-end baseline. We provide an analysis of the failure and describe the difficulty of exploiting QR for CQA.

For agents

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

get_harvested_code_for_paper("2204.06239")
get_code_for_paper("2204.06239")
have("2204.06239")

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

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

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

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

Connect an agent — have() is free.