Get Started
Home
Topics
Search
Library
6 min read · Agents · Evaluation · Added Oct 16 · Paper published Oct 14, 2026

RuleTrek: Benchmarking Agentic Rule Reasoning in Complex Scenarios

Source: research paper via Hugging Face Daily Papers
RuleTrek benchmarks whether agents can apply domain rules when evidence is scattered across workspace files, not spoon-fed as clean sentences. Frontier models hit just 26.97–55.29% end-to-end, and 54.9% of failures are rule-selection errors — discovery, not reasoning, is the real bottleneck.

TL;DR

RuleTrek measures whether LLM agents can find and apply domain rules when evidence is scattered across many files in a workspace, and even top frontier models score only 26.97% to 55.29% end-to-end.

Why It Matters

Suppose you build an agent that answers tax questions. In the real workflow, the agent gets a folder: a taxpayer profile, salary spreadsheets, royalty records, plus a stack of regulatory documents. The agent has to figure out which residency rules apply, which deductions matter, and compute a number. That is harder than any current rule-reasoning benchmark tests.
Most existing benchmarks for rule reasoning, like RuleTaker RuleTaker or RuleArena RuleArena, present a scenario as a few clean factual sentences and ask the model to apply one rule. Separately, workspace agent benchmarks like TheAgentCompany TheAgentCompany test whether agents can retrieve files and run tools, but do not probe domain-rule application. RuleTrek sits in the gap: multi-file scenarios and real rule documents, together.

How It Works

RuleTrek is a benchmark, not a new model. The contribution is the construction pipeline that produces complex yet solvable scenarios, plus a three-way evaluation split.
The pipeline runs in three stages, with an LLM (GPT-6-Astra, per the paper) and human experts in the loop:
1.
Extract a rule graph from a real-world repository (tax code, PostgreSQL docs, D&D 5e SRD, etc.). Nodes are rules; edges capture dependencies like prerequisites, exceptions, overrides, and precedence. Humans verify the graph against the source.
2.
Generate one sub-scenario per rule as realistic artifacts: spreadsheets, logs, config files, forms. Each sub-scenario is designed so solving it requires exactly that rule.
3.
Compose sub-scenarios incrementally along graph edges. This is the subtle part: adding a sub-scenario forces revisions to earlier files so that entities, timestamps, versions, and units stay consistent. After each merge, humans check consistency and solvability before continuing.
The payoff: a final scenario where multiple rules interact and the evidence is distributed, but the ground-truth rule graph is known. Then a question is instantiated and expert-solved for the gold answer.
graph = extract_rule_graph(repo); human_verify(graph) subs = [gen_subscenario(r, graph) for r in graph.nodes] S = subs[0] for s in order_by_dependency(subs[1:], graph): S = llm_compose(S, s, graph) # may rewrite earlier files while not (consistent(S) and solvable(S, graph)): S = llm_revise(S); human_verify(S) Q, A = instantiate_question(S, graph); human_verify(Q, A)
Each instance is then evaluated three ways in an interactive workspace (file access, shell, no network) using the pi CLI pi CLI: Rule Identification Rule Identification gives the agent the raw rule repository and asks which rules and dependencies apply; Rule Deduction Rule Deduction hands over the verified rule graph and asks for the final answer; End-to-End End-to-End Rule Reasoning requires both at once. A separate LLM judge (gpt-5.6-luna) scores answers on fact grounding, rule application, computation, and evidential support.

What They Found

The benchmark has 240 instances across six domains (taxation, PostgreSQL, cybersecurity, software policy, procurement, game rules), with rule graphs averaging ~9 nodes and depth ~2.7. Eleven frontier models were run three times each at temperature 1.
•
Identifying rules is hard. Best average RI is 62.47% (GPT-6.1-Sol); Gemini-2.5-Flash sits at 33.35%.
•
Applying known rules is also hard. Even when the verified rule graph is handed to the agent (RD), the top score is 60.43%. Having the right rules is not enough to integrate scattered evidence correctly.
•
End-to-end is worst, ranging 26.97% to 55.29% across the 11 models.
•
Complexity hurts predictably. Mean E2E across models drops from 76.5 to 23.6 as rule-graph node count grows from ≤3 to ≥14, and from 62.3 to 26.4 as graph depth grows from ≤1 to ≥5.
•
RD beats E2E by 3.79 to 8.15 points across seven compared models, isolating how much pain comes purely from rule identification.
•
Error breakdown on GPT-6.1-Sol failures: rule-selection errors account for 54.9%, more than retrieval, reasoning, or final-synthesis mistakes.
•
Step count is not predictive. Some models take many more steps and score worse; a case study shows one model retrieving a protection rule correctly but failing to update the scenario state after the rule fires, propagating an error over 57 steps.
Judge reliability: human–judge Spearman correlations run 0.822 to 0.857 (human–human is 0.933 to 0.951), and cross-family judges (GLM-5, Gemini-2.5-Pro) correlate 0.903 to 0.934 on submissions.

What’s Useful

•
If you are building a rule-following agent for a regulated domain, RD-style evaluation (give the agent the curated rule set and only measure application) will overstate what you ship. The paper’s RD-vs-E2E gap, plus the 54.9% rule-selection error rate, suggest that rule discovery from source documents is the dominant failure mode worth testing separately. The RuleTrek repo is released, so you can run your own stack against it.
•
When your scenario’s rule graph is deep or wide, expect sharp degradation. Treat the ~9-node, depth-~2.7 average as a modest regime; anything beyond that is where current frontier models fall apart. Worth testing: whether pre-computing and injecting the applicable rule subset at inference time recovers most of the gap your users would hit.
•
The case study where an agent retrieved the right rule but failed to update downstream state is a reminder: for stateful workflows, consider adding an explicit scratchpad or state object that the agent must mutate after each rule application, rather than relying on free-form reasoning to carry state forward. The paper does not test this fix; it is a plausible next experiment.
•
Chain-of-thought length is not a useful knob here. Longer outputs did not correlate with higher E2E scores, so budget tokens on retrieval and verification scaffolding instead.

Caveats

•
RuleTrek is English-only and uses static rule and scenario repositories; the authors flag multilingual and time-evolving rule settings as future work.
•
The construction pipeline itself relies on an LLM (GPT-6-Astra) for extraction, generation, and composition, with human verification as the backstop. Instances that passed verification are trustworthy, but the mix of scenarios reflects what that pipeline tends to produce.
•
The LLM judge agrees with humans less than humans agree with each other (0.82–0.86 vs 0.93–0.95 Spearman), so small score differences between models should not be read as meaningful rankings.
•
Model names in the paper (GPT-6.1-Sol, Grok-4.7, etc.) reflect a late-2026 snapshot; absolute numbers will shift, but the mechanism-level finding (rule identification is the bottleneck, and both RI and RD stay well under human-reasonable thresholds) is the durable claim.
Topics
Agents
Evaluation
Reasoning
Agents
Evaluation
Reasoning
Up next in Agents
Self-Evolving Coding Agents via Harness-Policy Optimization
Interlock: From Local Correctness to Task Completion in Long-Horizon Agents
Don't miss new content
Log in to follow topics and personalize your feed.
Related topics you might like
Agents310 episodes
Reasoning147 episodes
Evaluation209 episodes