Manuscript Offprint

arXiv:2610.19698

RuleTrek: Benchmarking Agentic Rule Reasoning in Complex Scenarios

Chenhao Yuan, Bohan Yu, Yinhao Xu, Chao Yin, Chenxi Zhou, Zhaoxuan Wang, Shuwen Xu, Shaoping Huang, Haolin Ren, Jiaxiang Liu, Yao Xu, Jun Zhao, Kang Liu

Abstract

Large language models (LLMs) increasingly tackle complex real-world tasks in specialized domains. However, identifying and correctly applying domain-specific rules remains challenging when scenario information is distributed across multiple files. Existing rule-reasoning benchmarks typically represent scenarios using only a few factual statements, simplifying the identification and application of relevant rules. To address this gap, this paper introduces RuleTrek, a multi-domain benchmark for agentic rule reasoning in complex scenarios. Its rule-grounded construction pipeline extracts structured rule graphs, generates and incrementally composes rule-specific sub-scenarios while ensuring consistency and solvability. To systematically evaluate agentic rule reasoning in complex scenarios, RuleTrek assesses three capabilities in interactive workspaces: Rule Identification (RI), Rule Deduction (RD), and End-to-End Rule Reasoning (E2E). Experiments on 11 frontier LLMs show that the highest RI and RD scores are only 62.47% and 60.43%, respectively, while E2E scores range from 26.97% to 55.29%. These results demonstrate that current LLM agents face substantial challenges in rule reasoning over complex scenarios. We make our code and dataset publicly available at RuleTrek.

1 Introduction

Recent advances in large language models (LLMs) have enhanced agents' capabilities in reasoning, information retrieval, and tool use (OpenAI, 2026a; Anthropic, 2026; Google DeepMind, 2026; GLM-5 Team, 2026). These advances have enabled agents to tackle increasingly complex tasks in specialized domains, where solutions often depend on domain-specific rules, such as tax residency rules for tax assessment. As scenarios grow more com-

Figure

Figure 1: Comparison of rule reasoning in prior work and complex real-world scenarios. Prior work typically presents scenarios using a few factual statements, whereas RuleTrek requires agents to integrate complex scenario information distributed across heterogeneous files, identify applicable rules from complex rule documents, and apply them to derive correct decisions.

plex, agents face increasing challenges in identifying applicable rules from relevant documents and correctly applying them to solve problems using distributed scenario information. For example, tax assessment requires agents to identify and apply rules from regulatory documents. As illustrated in Figure 1(b), this becomes challenging when complex scenario information such as taxpayer profiles, salary records and royalty income is distributed across multiple files. Agents must integrate this information to identify applicable rules concerning residency requirements, tax rates, and deductions, and correctly apply them to calculate tax liability.

However, existing benchmarks (Clark et al., 2020; Sun et al., 2024; Zhu et al., 2025; Zhou et al., 2025; Yu et al., 2026a; Tang et al., 2026; Liang et al., 2026) provide limited evaluation of agents' ability to identify and apply rules to solve problems in complex and multi-file scenarios. As illustrated in Figure 1(a), rule-reasoning benchmarks (Clark et al., 2020; Tafjord et al., 2021; Zhou et al.,

∗^{*}Equal contribution.

†^{\dagger}Corresponding author.

2025; Yu et al., 2026b) typically represent scenarios using only a few factual statements, simplifying the identification and application of relevant rules. Agent benchmarks in realistic workspaces (Xu et al., 2025; Malay et al., 2026; Guo et al., 2026; Tang et al., 2026) evaluate agents' abilities to retrieve distributed information, use tools, and complete multi-step tasks, but rarely evaluate their ability to identify and apply domain-specific rules to solve problems in complex scenarios.

To address this gap, we introduce RuleTrek, a multi-domain benchmark for evaluating agents' ability to reason with rules in complex scenarios. In RuleTrek, agents operate in interactive workspaces, where they must iteratively explore rule documents and scenario files, retrieve relevant information, and use tools as needed to solve problems. RuleTrek covers six domains: taxation, PostgreSQL, cybersecurity, software policy, procurement, and game rules. To construct complex scenarios that can be solved using rules from a given rule repository, we develop a rule-grounded scenario construction pipeline consisting of three stages: (1) extracting structured rule graphs from real-world rule repositories to capture domain-specific rules and their dependencies; (2) generating a sub-scenario for each rule in the graph, with each sub-scenario requiring the application of its corresponding rule; and (3) incrementally composing these sub-scenarios according to rule dependencies, while verifying consistency and solvability at each composition step.

To systematically evaluate agentic rule reasoning in complex scenarios, RuleTrek assesses three capabilities: (1) Rule Identification (RI) evaluates agents' ability to identify suitable rules and their dependencies from original rule documents; (2) Rule Deduction (RD) evaluates agents' ability to integrate distributed scenario information and correctly apply the provided necessary rules to reason over complex scenarios; and (3) End-to-End Rule Reasoning (E2E) jointly evaluates rule identification and rule deduction, requiring agents to integrate distributed information across complex scenarios to identify and apply applicable rules from original rule documents to solve complex tasks. Experiments on 11 frontier LLMs show that the highest RI and RD scores reach only 62.47% and 60.43%, respectively, while E2E scores range from 26.97% to 55.29%. These results highlight the substantial challenges of both identifying applicable rules and correctly applying them to complex scenarios with distributed information.

The main contributions of this paper are summarized as follows:

• To systematically evaluate agents’ capabilities in rule identification, rule deduction, and end-to-end rule reasoning in complex scenarios, this paper introduces RuleTrek, a multi-domain benchmark featuring complex, multi-file scenarios that require agents to integrate distributed information and correctly identify and apply domain-specific rules.

• To construct complex scenarios that can be solved using rules from given rule documents, this paper proposes a rule-grounded scenario construction pipeline. The pipeline extracts rule graphs, generates rule-specific sub-scenarios, and incrementally composes them while ensuring scenario consistency and rule-based solvability.

• This paper evaluates 11 frontier LLMs on RuleTrek across three evaluation settings. The results reveal substantial challenges in identifying applicable rules and correctly applying them to complex scenarios with distributed information.

References (33)