SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2412.08972 · 2024

RuleArena: A Benchmark for Rule-Guided Reasoning with LLMs in Real-World Scenarios

arXiv · PDF · Open in the Atlas

Code that ran

7 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; 1 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 5 failures 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/2412.08972.json · badge: /api/ran/2412.08972.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
skyriver-2000/rulearena canonical (classifier label)
classifier basis: census
7 ran · 3 no recorded run
FunctionStatusWhere it lives
build_query_prompt Ran
ran; our contract draft was wrong, not the code
skyriver-2000/rulearena/nba/micro_evaluation.py
code served (permissive licence) · get_code("33729edf0f537f04")
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

torch.manual_seed(0)

# Construct query_dict with required keys: 'team_situations', 'player_situations', 'operations'
# Each value should be a list of strings that will be joined together

query_dict = {
    'team_situations': [
        'Team A is leading by 5 points',
        'Team B has 3 players on the bench',
        'Both teams are in playoff contention'
    ],
    'player_situations': [
        'Player 1 has 25 points so far',
        'Player 2 is dealing with an injury',
        'Player 3 is in foul trouble with 4 fouls'
    ],
    'operations': [
        'Check if team can substitute players',
        'Verify if player is eligible to play',
        'Calculate remaining game time'
    ]
}

ARGS = {
    'query_dict': query_dict
}
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
generate_sche_1 Ran
ran; our contract draft was wrong, not the code
skyriver-2000/rulearena/tax/gen_payer.py
code served (permissive licence) · get_code("27015c02d456d414")
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 numpy as np

# Construct valid arguments for generate_sche_1
status_dict_employed = {
    'self_employed': False
}

status_dict_self_employed = {
    'self_employed': True
}

# Test with self_employed = False
ARGS = {
    'status_dict': status_dict_employed
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
generate_sche_3 Ran
ran; our contract draft was wrong, not the code
skyriver-2000/rulearena/tax/gen_payer.py
code served (permissive licence) · get_code("9ddfec7ba3d407f2")
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 numpy as np

# Construct a valid status_dict argument
status_dict = {
    'has_student_loans_or_education_expenses': True
}

# Define ARGS mapping all parameters to values
ARGS = {
    'status_dict': status_dict
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
generate_sche_c Ran
ran; our contract draft was wrong, not the code
skyriver-2000/rulearena/tax/gen_payer.py
code served (permissive licence) · get_code("34570a699cf7b596")
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 numpy as np

# The function takes a status_dict parameter
# Looking at the function body, it doesn't actually USE the status_dict parameter
# It only generates random integers and returns a dictionary
# So we need to pass a dict (can be empty or have any content)

status_dict = {
    'status': 'active',
    'filing_year': 2023
}

ARGS = {
    'status_dict': status_dict
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
invert_order Ran
ran, violated the contract we drafted
skyriver-2000/rulearena/airline/compute_answer.py
code served (permissive licence) · get_code("1dada379afb0981c")
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 numpy as np

# The function invert_order takes:
# 1. a: a list/sequence that can be indexed
# 2. order: an array-like that can be passed to np.argsort()

# Build a simple list for 'a'
a = ['apple', 'banana', 'cherry', 'date', 'elderberry']

# Build an order array - this will be sorted to determine indices
order = np.array([3, 1, 4, 0, 2])

ARGS = {
    'a': a,
    'order': order
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
load_problems Ran
ran; our contract draft was wrong, not the code
skyriver-2000/rulearena/airline/micro_evaluation.py
code served (permissive licence) · get_code("18fc43eb30bd48af")
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 json
import tempfile
import os

# Create a temporary directory and a sample JSONL file
temp_dir = tempfile.mkdtemp()
os.makedirs(f'{temp_dir}/synthesized_problems', exist_ok=True)

# Create sample problem data
bag_num = 1
complexity = 2
problems_data = [
    {"id": 0, "problem": "test problem 1"},
    {"id": 1, "problem": "test problem 2"},
]

# Write to a JSONL file
file_path = f'{temp_dir}/synthesized_problems/bag_num_{bag_num}_complexity_{complexity}.jsonl'
with open(file_path, 'w') as f:
    for problem in problems_data:
        f.write(json.dumps(problem) + '\n')

# Change working directory to temp directory so relative path works
original_dir = os.getcwd()
os.chdir(temp_dir)

ARGS = {
    'bag_num': 1,
    'complexity': 2,
}
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
standard_deduction Ran
ran, honoured the contract we drafted
skyriver-2000/rulearena/tax/micro_evaluation.py
code served (permissive licence) · get_code("0001e5e0d6c0e6b5")
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 numpy as np

# Construct valid arguments for standard_deduction function
ARGS = {
    'filing_status': 'married filing jointly',
    'age': 68,
    'spouse_age': 70,
    'blind': True,
    'spouse_blind': False
}
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 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
gen_question Not yet run
unverified (harvested, no recorded run)
skyriver-2000/rulearena/airline/gen_questions.py
code served (permissive licence) · get_code("6672f83bb9ba6c7b")
How it ran

no invocation recorded.

gpt Not yet run
unverified (harvested, no recorded run)
skyriver-2000/rulearena/nba/micro_evaluation.py
code served (permissive licence) · get_code("dde255079fb4a398")
How it ran

no invocation recorded.

parse_rule_application Not yet run
unverified (harvested, no recorded run)
skyriver-2000/rulearena/nba/micro_evaluation.py
code served (permissive licence) · get_code("b77c07cf7776a152")
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, 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 10 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-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

This paper introduces RuleArena, a novel and challenging benchmark designed to evaluate the ability of large language models (LLMs) to follow complex, real-world rules in reasoning. Covering three practical domains -- airline baggage fees, NBA transactions, and tax regulations -- RuleArena assesses LLMs' proficiency in handling intricate natural language instructions that demand long-context understanding, logical reasoning, and accurate mathematical computation. Two key attributes distinguish RuleArena from traditional rule-based reasoning benchmarks: (1) it extends beyond standard first-order logic representations, and (2) it is grounded in authentic, practical scenarios, providing insights into the suitability and reliability of LLMs for real-world applications. Our findings reveal several notable limitations in LLMs: (1) they struggle to identify and apply the appropriate rules, frequently becoming confused by similar but distinct regulations, (2) they cannot consistently perform accurate mathematical computations, even when they correctly identify the relevant rules, and (3) in general, they perform poorly in the benchmark. We also observe a significant performance boost when LLMs are provided with external tools for oracle math and logic operations. These results highlight significant challenges and promising research directions in advancing LLMs' rule-guided reasoning capabilities in real-life applications. Our codes and data are publicly available on https://github.com/skyriver-2000/RuleArena.

For agents

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

get_harvested_code_for_paper("2412.08972")
get_code_for_paper("2412.08972")
have("2412.08972")

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

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

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

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

Connect an agent — have() is free.