SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2401.05190 · 2024

DCR: Divide-and-Conquer Reasoning for Multi-choice Question Answering with LLMs

arXiv · PDF · Open in the Atlas

Code that ran

8 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; 2 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 5 failures of our instrument; 0 no recorded run), 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/2401.05190.json · badge: /api/ran/2401.05190.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
aimijie/divide-and-conquer canonical (classifier label)
classifier basis: census
6 ran · 0 no recorded run
aimijie/dcr canonical (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
FunctionStatusWhere it lives
createInput Ran
ran; our contract draft was wrong, not the code
aimijie/divide-and-conquer/utils.py
code served (permissive licence) · get_code("372e469b050ee739")
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 temporary directories for input and output
input_dir = tempfile.mkdtemp()
output_dir = tempfile.mkdtemp()

# Create a sample input JSON file
sample_data = {
    "key1": "value1",
    "key2": [1, 2, 3],
    "key3": {"nested": "data"}
}

input_filename = "data.json"
input_file_path = os.path.join(input_dir, input_filename)
with open(input_file_path, 'w', encoding='utf-8') as f:
    json.dump(sample_data, f)

# Create args object with required attributes
class Args:
    def __init__(self, method, input_file, experiment_id):
        self.method = method
        self.input_file = input_file

# Test with method='divide'
args_divide = Args(method='divide', input_file=input_filename, experiment_id='exp_001')

ARGS = {
    'input_path': input_dir,
    'output_path': output_dir,
    'experiment_id': 'exp_001',
    'args': args_divide
}
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
getPath Ran
ran on a synthesized input
aimijie/divide-and-conquer/utils.py
code served (permissive licence) · get_code("8f022f97a0945aeb")
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 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 os
from types import SimpleNamespace

# Create a simple args object with the required attributes
args = SimpleNamespace(
    dataset='mnist',
    method='cnn',
    write_path='v1',
    experiment_num=2
)

ARGS = {
    'args': args
}
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 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: none by the harness; any seed is in the setup block
get_ans_sc Ran
ran; our contract draft was wrong, not the code
aimijie/divide-and-conquer/compute_all_acc.py
code served (permissive licence) · get_code("ed2a1cf1e9a15cb6")
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.

from collections import Counter

def get_ans_sc(ansList):
    most_frequent_item, _ = Counter(ansList).most_common(1)[0]
    return most_frequent_item

# The function takes a list and finds the most common element
# ansList should be a list with multiple elements where one appears most frequently
ARGS = {
    "ansList": [1, 2, 2, 3, 2, 4, 1, 5]
}
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 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
get_len_and_acc_conquered Ran
ran, honoured the contract we drafted
aimijie/divide-and-conquer/compute_all_acc.py
code served (permissive licence) · get_code("abdc8ec1bd2a34c1")
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 json
import tempfile
import os

# Create a temporary directory for test data
temp_dir = tempfile.mkdtemp()

# Create input.json with test data
input_data = [
    {'answer': 'correct'},
    {'answer': 'also correct'},
    {'answer': 'wrong answer'}
]
with open(f'{temp_dir}/input.json', 'w') as f:
    json.dump(input_data, f)

# Create answer0.json with test answers
ans_data = ['correct', 'also correct', 'different']
with open(f'{temp_dir}/answer0.json', 'w') as f:
    json.dump(ans_data, f)

ARGS = {
    'path': temp_dir
}
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
get_len_and_acc_fixed Ran
ran, honoured the contract we drafted
aimijie/divide-and-conquer/compute_all_acc.py
code served (permissive licence) · get_code("ee7b33e026bff293")
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 json
import tempfile
import os

# Create a temporary JSON file with test data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.json')
test_data = [
    {
        'pred_ans': 'yes\tyes\tno\tyes',
        'answer': 'yes'
    },
    {
        'pred_ans': 'no\tno\tno',
        'answer': 'no'
    },
    {
        'pred_ans': 'maybe\tmaybe\tyes',
        'answer': 'maybe'
    },
    {
        'pred_ans': 'correct\tincorrect',
        'answer': 'wrong'
    }
]
json.dump(test_data, temp_file)
temp_file.close()

ARGS = {
    'file': temp_file.name
}
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
get_sim_an Ran
ran; our contract draft was wrong, not the code
aimijie/dcr/split_data.py
code served (permissive licence) · get_code("89312e410ccb2f33")
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 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

torch.manual_seed(0)

# The function get_sim_an takes an 'answer' parameter which should be an iterable
# It counts occurrences of items and returns the most frequent item and its frequency
# The function works with any hashable items

# Create a simple list of answers (could be strings, numbers, etc.)
answer = [1, 2, 1, 3, 1, 2, 4, 1]

ARGS = {
    "answer": answer
}
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 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: none by the harness; any seed is in the setup block
judge_confidence Ran
ran; our contract draft was wrong, not the code
aimijie/dcr/split_data.py
code served (permissive licence) · get_code("2b3be75199e4658e")
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 numpy as np

torch.manual_seed(0)

# Analyze the function:
# - sim_an: accessed with index [1], so it's a sequence-like object (list, tuple, or tensor)
# - sim_an[1] is compared with args.threshold_mu, so it should be numeric
# - args: an object with attribute 'threshold_mu' that is numeric

# Build sim_an as a simple list or tuple with at least 2 elements
sim_an = [0.5, 0.3, 0.7]  # sim_an[1] = 0.3

# Build args as a simple class with threshold_mu attribute
class Args:
    def __init__(self, threshold_mu):
        self.threshold_mu = threshold_mu

args = Args(threshold_mu=0.5)

ARGS = {
    'sim_an': sim_an,
    'args': args
}
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 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
setPrompt Ran
ran; our contract draft was wrong, not the code
aimijie/divide-and-conquer/utils.py
code served (permissive licence) · get_code("42008063fbb6e058")
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 re

# Create sample data
data = [
    {
        'question': 'What is the capital of France?',
        'choices': ['Paris', 'London', 'Berlin'],
        'rationale': {
            'reason1': 'France is a country\nin Europe',
            'reason2': 'Paris is the\nlargest city'
        }
    },
    {
        'question': 'What is 2+2?',
        'choices': ['3', '4', '5'],
        'rationale': {
            'reason1': 'Basic\narithmetic',
            'reason2': 'Simple\nmath\noperation'
        }
    }
]

# Create args object with method attribute
class Args:
    def __init__(self, method):
        self.method = method

args_divide = Args('divide')
args_zeroShotCoT = Args('zeroShotCoT')
args_FCR = Args('FCR')
args_other = Args('other')

ARGS = {
    'data': data,
    'args': args_other
}
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

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, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 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.

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

Large language models (LLMs) have shown impressive performance in reasoning benchmarks with the emergence of Chain-of-Thought (CoT), particularly in multi-choice question (MCQ). However, current works equally resolve questions regardless of the problem-solving difficulty, leading to an excessive focus on simple items while insufficient attention on intricate ones. To address this challenge, we propose a simple yet effective strategy, Divide and Conquer Reasoning (DCR), to enhance the reasoning capability of LLMs for MCQs, as inspired by human beings using heuristics to first categorize tasks and then handle them separately. In particular, we first categorize questions into two subsets based on confidence score ($\mathcal{CS}$), which is estimated by statistical frequency of generated answers. Subsequently, we propose Filter Choices based Reasoning (FCR) to improve model performance on MCQs with low ($\mathcal{CS}$). Our experiments demonstrate that the proposed strategy only costs 85% of SOTA, while still achieves average accuracy improvement of 1.56% across nine datasets including arithmetic, commonsense, and logic reasoning tasks. The code is at \url{https://github.com/AiMijie/Divide-and-Conquer}

For agents

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

get_harvested_code_for_paper("2401.05190")
get_code_for_paper("2401.05190")
have("2401.05190")

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

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

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

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

Connect an agent — have() is free.