SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2304.13007 · EMNLP · 2023

Answering Questions by Meta-Reasoning over Multiple Chains of Thought

Jonathan Berant, Ori Yoran, Ben Bogin, Uri Katz, Tomer Wolfson, Daniel Deutch

arXiv · PDF · Open in the Atlas

Code that ran

9 of 10 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; 2 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 1 failure of our instrument; 1 no recorded run), measured 2026-11-22; 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/2304.13007.json · badge: /api/ran/2304.13007.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
oriyor/reasoning-on-cots canonical (classifier label)
classifier basis: census
9 ran · 1 no recorded run
FunctionStatusWhere it lives
chunk_list_to_sublists Ran
ran on a synthesized input
oriyor/reasoning-on-cots/src/common/dataset_utils.py
code served (permissive licence) · get_code("df23eac515d0b974")
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. 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

# The function chunks a list into sublists of a given size
# It takes two parameters: original_list (a list) and chunk_size (an integer)

# Create a simple list to chunk
original_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

# Define chunk_size
chunk_size = 3

ARGS = {
    "original_list": original_list,
    "chunk_size": chunk_size
}
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 — a list 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
compute_exact_match Ran
ran, honoured the contract we drafted
oriyor/reasoning-on-cots/src/pred_evaluators/evaluation.py
code served (permissive licence) · get_code("86dcd04f5c5623f3")
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 int, ndim 0, dtype family int, 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 string
import re

def normalize_text(s):
    """Removing articles and punctuation, and standardizing whitespace are all typical text processing steps."""
    def remove_articles(text):
        regex = re.compile('\\b(a|an|the)\\b', re.UNICODE)
        return re.sub(regex, ' ', text)

    def white_space_fix(text):
        return ' '.join(text.split())

    def remove_punc(text):
        exclude = set(string.punctuation)
        return ''.join((ch for ch in text if ch not in exclude))

    def lower(text):
        return text.lower()
    return white_space_fix(remove_articles(remove_punc(lower(s))))

def compute_exact_match(prediction, truth):
    return int(normalize_text(prediction) == normalize_text(truth))

ARGS = {
    "prediction": "The quick brown fox jumps over the lazy dog.",
    "truth": "the quick brown fox jumps over lazy dog"
}
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 int, ndim 0, dtype family int, 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
compute_f1 Ran
ran, honoured the contract we drafted
oriyor/reasoning-on-cots/src/pred_evaluators/evaluation.py
code served (permissive licence) · get_code("9118271336e0821a")
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 torch
import string
import re

# The function compute_f1 takes two parameters: prediction and truth
# Both are strings that get normalized and compared for F1 score

ARGS = {
    "prediction": "The quick brown fox jumps over the lazy dog.",
    "truth": "The quick brown fox jumps over a lazy dog"
}
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 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
file_as_string Ran
ran on a synthesized input
oriyor/reasoning-on-cots/src/common/dataset_utils.py
code served (permissive licence) · get_code("558f49bd6261449f")
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 tempfile
import os

# Create a temporary file with some content
temp_dir = tempfile.mkdtemp()
temp_file_path = os.path.join(temp_dir, "test_file.txt")

# Write some test content to the file
with open(temp_file_path, 'w') as f:
    f.write("  Hello, World!  \n  This is a test file.  \n")

ARGS = {
    "file_path": temp_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 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_decompsition_break Ran
ran on a synthesized input
oriyor/reasoning-on-cots/src/dataclasses.py
code served (permissive licence) · get_code("787934785bc5bf80")
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.

from typing import List, Dict
from dataclasses import dataclass

@dataclass
class BreakDecomposition:
    decomposition: str
    intermediate_questions: List[str]
    intermediate_answers: List[str]
    final_answer: str
    intermediate_contexts: List[str]

@dataclass
class EntailmentResult:
    entailment: float
    neutral: float
    contradiction: float

@dataclass
class EntailmentResultWithInput:
    premise: str
    hypothesis: str
    entailment_result: EntailmentResult

@dataclass
class DecompositionStepV1:
    question: str
    answer: str
    google_answer: str
    google_answer_long: Dict
    entailment_result_with_input: EntailmentResultWithInput
    gpt_3_ans: str

def format_decompsition_break(decomposition: BreakDecomposition) -> List[DecompositionStepV1]:
    decomposition_steps = []
    for i in range(len(decomposition.intermediate_questions)):
        decomposition_steps.append(DecompositionStepV1(question=decomposition.intermediate_questions[i], answer=decomposition.intermediate_answers[i + 1], google_answer=None, google_answer_long=None, entailment_result_with_input=None, gpt_3_ans=None))
    decomposition_steps.append(DecompositionStepV1(question=None, answer=None, google_answer=None, google_answer_long=None, entailment_result_with_input=None, gpt_3_ans=decomposition.final_answer))
    return decomposition_steps

# Construct a valid BreakDecomposition instance
break_decomp = BreakDecomposition(
    decomposition="What is the capital of France and its population?",
    intermediate_questions=["What is the capital of France?", "What is the population of Paris?"],
    intermediate_answers=["Paris", "Paris", "2.2 million"],
    final_answer="The capital of France is Paris with a population of 2.2 million.",
    intermediate_contexts=["France geography", "Paris demographics"]
)

ARGS = {
    "decomposition": break_decomp
}
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
greenify Ran
ran on a synthesized input
oriyor/reasoning-on-cots/src/opeanai/utils.py
code served (permissive licence) · get_code("3b07f989f0ffe622")
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

def greenify(input):
    return '\x1b[102m' + input + '\x1b[0m'

ARGS = {
    'input': 'Hello World'
}
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
normalize_text Ran
ran; our contract draft was wrong, not the code
oriyor/reasoning-on-cots/src/pred_evaluators/evaluation.py
code served (permissive licence) · get_code("c30d6b506e3a5d6e")
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 string
import re

# The function normalize_text takes a single parameter 's' which should be a string
# Based on the function body, it performs text normalization operations:
# - Converts to lowercase
# - Removes punctuation
# - Removes articles (a, an, the)
# - Fixes whitespace

# Create a test string with articles, punctuation, and irregular whitespace
test_string = "The quick brown fox, jumps over the lazy dog! A cat and an elephant."

ARGS = {
    "s": test_string
}
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_csv_to_dict Ran
ran on a synthesized input
oriyor/reasoning-on-cots/src/common/dataset_utils.py
code served (permissive licence) · get_code("10ff4bd5646b3677")
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 pandas as pd
import io

# Create a small CSV in memory
csv_content = """name,age,city
Alice,30,NYC
Bob,25,LA
Charlie,35,"""

csv_file = io.StringIO(csv_content)

ARGS = {
    'csv_file': csv_file,
    'encoding': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — 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
yellowfy Ran
ran on a synthesized input
oriyor/reasoning-on-cots/src/opeanai/utils.py
code served (permissive licence) · get_code("5cd3899a28826ba7")
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

def yellowfy(input):
    return '\x1b[106m' + input + '\x1b[0m'

ARGS = {
    'input': 'Hello World'
}
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
call_gpt Not yet run
unverified (harvested, no recorded run)
oriyor/reasoning-on-cots/src/opeanai/utils.py
code served (permissive licence) · get_code("63cfc8eb0c95d0dc")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 3 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 3 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
compute_exact_match 3 other papers
1 dated earlier, 2 later
2110.07803 (2021-10)
Attacking Open-domain Question Answering by Injecting Misinformation
2305.12295 (2023-05)
Logic-LM: Empowering Large Language Models with Symbolic Solvers for Faithful Logical Reasoning
2310.15047 (2023-10)
Implicit meta-learning may lead language models to trust more reliable sources
normalize_text 3 other papers
1 dated earlier, 2 later
2110.07803 (2021-10)
Attacking Open-domain Question Answering by Injecting Misinformation
2305.12295 (2023-05)
Logic-LM: Empowering Large Language Models with Symbolic Solvers for Faithful Logical Reasoning
2405.18357 (2024-05)
Faithful Logical Reasoning via Symbolic Chain-of-Thought
compute_f1 2 other papers
2 later
2305.12295 (2023-05)
Logic-LM: Empowering Large Language Models with Symbolic Solvers for Faithful Logical Reasoning
2310.15047 (2023-10)
Implicit meta-learning may lead language models to trust more reliable sources

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

Modern systems for multi-hop question answering (QA) typically break questions into a sequence of reasoning steps, termed chain-ofthought (CoT), before arriving at a final answer. Often, multiple chains are sampled and aggregated through a voting mechanism over the final answers, but the intermediate steps themselves are discarded. While such approaches improve performance, they do not consider the relations between intermediate steps across chains and do not provide a unified explanation for the predicted answer. We introduce Multi-Chain Reasoning (MCR), an approach which prompts large language models to meta-reason over multiple chains of thought, rather than aggregate their answers. MCR examines different reasoning chains, mixes information between them and selects the most relevant facts in generating an explanation and predicting the answer. MCR outperforms strong baselines on 7 multi-hop QA datasets. Moreover, our analysis reveals that MCR explanations exhibit high quality, enabling humans to verify its answers.

For agents

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

get_harvested_code_for_paper("2304.13007")
get_code_for_paper("2304.13007")
have("2304.13007")

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

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

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

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

Connect an agent — have() is free.