SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2309.06275 · 2023

Re-Reading Improves Reasoning in Large Language Models

arXiv · PDF · Open in the Atlas

Code that ran

9 of 11 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; 3 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 5 failures of our instrument; 2 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, 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/2309.06275.json · badge: /api/ran/2309.06275.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
tebmer/rereading-llm-reasoning canonical (classifier label)
classifier basis: census
9 ran · 2 no recorded run
FunctionStatusWhere it lives
is_number Ran
ran, violated the contract we drafted
tebmer/rereading-llm-reasoning/utils/answer_parser.py
code served (permissive licence) · get_code("0fe9cf6c00ef56ea")
How it ran

Ran in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-04T22:34:05Z). 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.

# Setup code for is_number function

ARGS = {
    "s": "3.14"
}
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 bool, 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
chat_api Ran
ran; our contract draft was wrong, not the code
tebmer/rereading-llm-reasoning/pal/core/backend.py
code served (permissive licence) · get_code("6f07d6fdc179cc59")
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 openai

# Mock the openai.ChatCompletion.create to avoid actual API calls
class MockChoice:
    def __init__(self, content):
        self.message = {'content': content}

class MockResponse(dict):
    def __init__(self, choices):
        self['choices'] = [{'message': {'content': choice}} for choice in choices]

def mock_chat_completion_create(**kwargs):
    return MockResponse(['This is a mock response.', 'This is another mock response.'])

openai.ChatCompletion.create = mock_chat_completion_create

ARGS = {
    'model': 'gpt-3.5-turbo',
    'max_tokens': 100,
    'stop': None,
    'temperature': 0.7,
    'top_p': 0.9,
    'n': 2,
    'best_of': 1,
    'messages': None,
    'prompt': 'What is the capital of France?',
    'system_message': 'You are a helpful assistant.',
    'api_source': 'openai'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai — 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
extract_the_fist_number Ran
ran; our contract draft was wrong, not the code
tebmer/rereading-llm-reasoning/utils/answer_parser.py
code served (permissive licence) · get_code("7343bffcd73070da")
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

def extract_the_fist_number(input_str, example=None):
    """ Extract the first number in the input string. """
    pattern = '[\\-+]?\\d*[\\.,/]?\\d+'
    matches = re.findall(pattern, input_str)
    if matches:
        return matches[0]
    return None


ARGS = {
    'input_str': 'The price is 42.99 dollars',
    'example': 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 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
extract_the_last_number Ran
ran; our contract draft was wrong, not the code
tebmer/rereading-llm-reasoning/utils/answer_parser.py
code served (permissive licence) · get_code("774cb6f79e4ecf3b")
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

def extract_the_last_number(input_str, example=None):
    """ Extract the last number in the input string. """
    pattern = '[\\-+]?\\d*[\\.,/]?\\d+'
    matches = re.findall(pattern, input_str)
    if matches:
        return matches[-1]
    return None

ARGS = {
    'input_str': 'The price is 42.5 and the quantity is 100',
    'example': 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 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
last_boxed_only_string Ran
ran; our contract draft was wrong, not the code
tebmer/rereading-llm-reasoning/utils/util.py
code served (permissive licence) · get_code("0b14c648516c38a7")
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.

# Analyzing the function: last_boxed_only_string
# The function takes a single parameter 'string' which is a string
# It searches for '\boxed' or '\fbox' in the string and extracts the boxed content
# The function uses string methods: rfind, len, indexing

ARGS = {
    "string": r"Some text before \boxed{answer here} and some text after"
}
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
remove_boxed Ran
ran; our contract draft was wrong, not the code
tebmer/rereading-llm-reasoning/utils/util.py
code served (permissive licence) · get_code("f3bbe264b05aadd3")
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.

# Analyze the function
# remove_boxed(s) takes a string parameter 's'
# It checks if the string starts with '\boxed{' and ends with '}'
# If so, it returns the content between them
# Otherwise it returns None

# Create test cases for the ARGS dict
ARGS = {
    "s": "\\boxed{answer}"
}
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
scoere_date_understanding Ran
ran, honoured the contract we drafted
tebmer/rereading-llm-reasoning/utils/scorer.py
code served (permissive licence) · get_code("75bdd5a77703b527")
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 numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - pred: should be a value that can be checked against keys in target_scores dict
# - example: should be a dict with 'target_scores' key containing a dict
#   where pred can be a key with an associated score value

# Create a valid example dict
example = {
    'target_scores': {
        'date_2023': 0.95,
        'date_2024': 0.87,
        'date_2022': 0.72,
        None: 0.0
    }
}

# Create a valid pred that exists in target_scores
pred = 'date_2023'

ARGS = {
    'pred': pred,
    'example': example
}
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 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
scorer_number Ran
ran, honoured the contract we drafted
tebmer/rereading-llm-reasoning/utils/scorer.py
code served (permissive licence) · get_code("24602cacdb6ebdb7")
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 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 torch

torch.manual_seed(0)

# The function scorer_number takes:
# 1. pred: a value that can be converted to float (or None)
# 2. example: a dict with a 'target' key containing a value convertible to float

pred = "3.14"  # A string that converts to float
example = {'target': "3.1405"}  # Dict with 'target' key, value convertible to float

ARGS = {
    'pred': pred,
    'example': 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 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
scorer_string Ran
ran, honoured the contract we drafted
tebmer/rereading-llm-reasoning/utils/scorer.py
code served (permissive licence) · get_code("6e9e8fba2a2d400d")
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 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 torch
import torch.nn as nn

torch.manual_seed(0)

# Construct arguments for scorer_string(pred, example)
pred = "Hello World"

example = {
    'target': 'hello world'
}

ARGS = {
    'pred': pred,
    'example': 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 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
call_gpt Not yet run
unverified (harvested, no recorded run)
tebmer/rereading-llm-reasoning/pal/core/backend.py
code served (permissive licence) · get_code("d2417be2799a98fe")
How it ran

no invocation recorded.

completions_api Not yet run
unverified (harvested, no recorded run)
tebmer/rereading-llm-reasoning/pal/core/backend.py
code served (permissive licence) · get_code("9605ca38ee5df19e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 3 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 2 the same month, 3 later) and 8 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
remove_boxed 20 other papers
1 dated earlier, 1 the same month, 18 later · 1 only as an assembly brick
2103.03874 (2021-03)
Measuring Mathematical Problem Solving With the MATH Dataset
2309.12284 (2023-09)
MetaMath: Bootstrap Your Own Mathematical Questions for Large Language Models
2310.05914 (2023-10)
NEFTune: Noisy Embeddings Improve Instruction Finetuning
and 17 more not named here
is_number 18 other papers
4 dated earlier, 3 the same month, 11 later
1807.06756 (2018-07)
SySeVR: A Framework for Using Deep Learning to Detect Software Vulnerabilities
1906.02425 (2019-06)
Uncertainty-guided Continual Learning with Bayesian Neural Networks
2005.00558 (2020-05)
POINTER: Constrained Progressive Text Generation via Insertion-based Generative Pre-training
and 15 more not named here
last_boxed_only_string 17 other papers
17 later
2310.05914 (2023-10)
NEFTune: Noisy Embeddings Improve Instruction Finetuning
2024.findings-emnlp.407 (2024 (year only))
MultiAgent Collaboration Attack: Investigating Adversarial Attacks in Large Language Model Collaborations via Debate
2404.02078 (2024-04)
Advancing LLM Reasoning Generalists with Preference Trees
and 14 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-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

To enhance the reasoning capabilities of off-the-shelf Large Language Models (LLMs), we introduce a simple, yet general and effective prompting method, Re2, i.e., \textbf{Re}-\textbf{Re}ading the question as input. Unlike most thought-eliciting prompting methods, such as Chain-of-Thought (CoT), which aim to elicit the reasoning process in the output, Re2 shifts the focus to the input by processing questions twice, thereby enhancing the understanding process. Consequently, Re2 demonstrates strong generality and compatibility with most thought-eliciting prompting methods, including CoT. Crucially, Re2 facilitates a "bidirectional" encoding in unidirectional decoder-only LLMs because the first pass could provide global information for the second pass. We begin with a preliminary empirical study as the foundation of Re2, illustrating its potential to enable "bidirectional" attention mechanisms. We then evaluate Re2 on extensive reasoning benchmarks across 14 datasets, spanning 112 experiments, to validate its effectiveness and generality. Our findings indicate that, with the exception of a few scenarios on vanilla ChatGPT, Re2 consistently enhances the reasoning performance of LLMs through a simple re-reading strategy. Further analyses reveal Re2's adaptability, showing how it can be effectively integrated with different LLMs, thought-eliciting prompting, and ensemble strategies. Our code is available at \url{https://github.com/Tebmer/Rereading-LLM-Reasoning/}

For agents

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

get_harvested_code_for_paper("2309.06275")
get_code_for_paper("2309.06275")
have("2309.06275")

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

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

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

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

Connect an agent — have() is free.