SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2201.11903 · NeurIPS · 2022

Chain-of-Thought Prompting Elicits Reasoning in Large Language Models

Dale Schuurmans, Denny Zhou, Xuezhi Wang, V Le, Jason Wei, Brian Ichter, Maarten Bosma, Fei Xia, Ed Chi Quoc

arXiv · PDF · Open in the Atlas

Code that ran

5 of 7 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; 2 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/2201.11903.json · badge: /api/ran/2201.11903.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
TianduoWang/MsAT community (classifier label)
classifier basis not recorded on the link
4 ran · 2 no recorded run
nicolay-r/thor-ecac community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
ChainOfThoughtCause Ran
ran on a synthesized input
nicolay-r/thor-ecac/src/cot_cause.py
code served (permissive licence) · get_code("da9673a8a47a19c8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned tuple, 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

# ChainOfThoughtCause has no __init__ method (uses default), so it takes no initialization arguments
INIT_ARGS = {}

# The class only has static methods, so we need to pick one to test
# Let's test prompt_for_span_inferring as the primary method
METHOD = 'prompt_for_span_inferring'

# Arguments for prompt_for_span_inferring(context, source)
ARGS = {
    'context': 'Person A: I had a great day today. Person B: That sounds wonderful!',
    'source': 'Person A'
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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, ndim 1, dtype family float — a tuple 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
calculate_acc Ran
ran on a synthesized input
TianduoWang/MsAT/core/utils.py
code served (permissive licence) · get_code("ed156b3a46d11ab3")
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, ndim 1, 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 re

# Analyze the function to understand what it needs:
# - gold_eqns: list of equations (each equation is a list of strings that get joined)
# - pred_eqns: list of equations (each equation is a list of strings that get joined)
# - nums: list of lists of numbers (nums[i] is a list of numbers for equation i)

# The function:
# 1. Joins each equation from a list of strings
# 2. Creates a mapping from 'number0', 'number1', etc. to float values
# 3. Substitutes these placeholders in the equations
# 4. Evaluates both gold and pred equations
# 5. Compares results within 0.0001 tolerance

# Build valid test data
gold_eqns = [
    ['number0', '+', 'number1'],  # 5 + 3
    ['number0', '*', 'number1'],  # 10 * 2
]

pred_eqns = [
    ['number0', '+', 'number1'],  # 5 + 3 (correct)
    ['number0', '*', 'number1'],  # 10 * 2 (correct)
]

nums = [
    [5, 3],      # for first equation
    [10, 2],     # for second equation
]

ARGS = {
    'gold_eqns': gold_eqns,
    'pred_eqns': pred_eqns,
    'nums': nums,
}
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 tuple, ndim 1, dtype family int — a tuple 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
calculate_acc_code Ran
ran on a synthesized input
TianduoWang/MsAT/core/utils.py
code served (permissive licence) · get_code("2643a333e4f14f19")
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, ndim 1, 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 re

# Create valid arguments for calculate_acc_code
# The function expects two lists of equations (as sequences of characters/strings)
# Each equation is joined into a string, with <SEP> replaced by newlines
# The code is then exec'd and should set a variable RES_ with the result

gold_eqns = [
    ['R', 'E', 'S', '_', ' ', '=', ' ', '5', '.', '0'],
    ['R', 'E', 'S', '_', ' ', '=', ' ', '1', '0', '.', '5'],
]

pred_eqns = [
    ['R', 'E', 'S', '_', ' ', '=', ' ', '5', '.', '0'],
    ['R', 'E', 'S', '_', ' ', '=', ' ', '1', '0', '.', '5'],
]

ARGS = {
    'gold_eqns': gold_eqns,
    'pred_eqns': pred_eqns,
}
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 tuple, ndim 1, dtype family int — a tuple 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
count_parameters Ran
ran on a synthesized input
TianduoWang/MsAT/core/utils.py
code served (permissive licence) · get_code("cbf3e12d7057a165")
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
import math

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

model = SimpleModel()

ARGS = {
    'model': model
}
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
get_combination_mask Ran
ran; our contract draft was wrong, not the code
TianduoWang/MsAT/deductreasoner/model.py
pointer only (licence: MIT); the stored copy get_code serves, from allanj/deductive-mwp, is pointer only (licence: NONE) · get_code("57cd245fea675806")
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 allanj/deductive-mwp, 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.

get_batched_prediction_consider_multiple_m0 Not yet run
unverified (harvested, no recorded run)
TianduoWang/MsAT/deductreasoner/trainer.py
code served (permissive licence) · get_code("5961e81f95a87056")
How it ran

no invocation recorded.

get_train_dataloader Not yet run
unverified (harvested, no recorded run)
TianduoWang/MsAT/deductreasoner/prepare_dataset.py
code served (permissive licence) · get_code("10a9e1bd9dab41c9")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 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 6 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
get_combination_mask 2 other papers
2 later
2203.10316 (2022-03)
Learning to Reason Deductively: Math Word Problem Solving as Complex Relation Extraction
2210.11694 (2022-10)
Multi-View Reasoning: Consistent Contrastive Learning for Math Word Problem

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

We explore how generating a chain of thought-a series of intermediate reasoning steps-significantly improves the ability of large language models to perform complex reasoning. In particular, we show how such reasoning abilities emerge naturally in sufficiently large language models via a simple method called chain-ofthought prompting, where a few chain of thought demonstrations are provided as exemplars in prompting. Experiments on three large language models show that chain-of-thought prompting improves performance on a range of arithmetic, commonsense, and symbolic reasoning tasks. The empirical gains can be striking. For instance, prompting a PaLM 540B with just eight chain-of-thought exemplars achieves state-of-the-art accuracy on the GSM8K benchmark of math word problems, surpassing even finetuned GPT-3 with a verifier. A: The cafeteria had 23 apples originally. They used 20 to make lunch. So they had 23 -20 = 3. They bought 6 more apples, so they have 3 + 6 = 9. The answer is 9. Q: Roger has 5 tennis balls. He buys 2 more cans of tennis balls. Each can has 3 tennis balls. How many tennis balls does he have now? A: The answer is 11. Q: The cafeteria had 23 apples. If they used 20 to make lunch and bought 6 more, how many apples do they have? A: The answer is 27. Q: Roger has 5 tennis balls. He buys 2 more cans of tennis balls. Each can has 3 tennis balls. How many tennis balls does he have now? A: Roger started with 5 balls. 2 cans of 3 tennis balls each is 6 tennis balls. 5 + 6 = 11. The answer is 11. Q: The cafeteria had 23 apples. If they used 20 to make lunch and bought 6 more, how many apples do they have? Model Input Model Output Model Output Model Input Figure 1: Chain-of-thought prompting enables large language models to tackle complex arithmetic, commonsense, and symbolic reasoning tasks. Chain-of-thought reasoning processes are highlighted. 36th Conference on Neural Information Processing Systems (NeurIPS 2022).

For agents

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

get_harvested_code_for_paper("2201.11903")
get_code_for_paper("2201.11903")
have("2201.11903")

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

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

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

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

Connect an agent — have() is free.