Johns Hopkins' DAR Framework Lets AI Look up Laws to Beat Legal Reasoning
DAR gives LLMs on-demand access to legal statutes as tools, pushing state-of-the-art on rule-based reasoning — but only for the strongest models
Takeaways
- DAR is a new agentic framework that gives LLMs on-demand tool access to legal statutes, rather than stuffing full rulebooks into the context window. [Paper]
- Evaluated on DeonticBench, a 6,232-task benchmark spanning U.S. tax law, airline policies, housing law, and immigration appeals. [DeonticBench]
- Two agentic harnesses tested: Terminus-2 (iterative retrieval loop) and Terminus-Kira (adds a verification agent for additional lookups).
- Strong frontier models (GPT, Claude Sonnet, Kimi-K2) gain meaningfully on hard tasks; weaker models often degrade in accuracy while consuming far more tokens.
- Best hard-subset performance on SARA Numeric reaches only 44.4% even for top models, showing deontic reasoning remains largely unsolved.
- No public code or model checkpoint released; DeonticBench Prolog reference programs are the primary available artifact.
Legal and policy reasoning is one of the hardest tasks you can hand an LLM. Not because the language is dense, but because the rules are long, cross-referenced, and change meaning depending on which clause you read first. A new paper from Johns Hopkins University and Télécom Paris tackles this head-on with DAR: Deontic Reasoning with Agentic Harnesses, introducing an agentic framework that lets models look up statutes on demand rather than trying to hold an entire legal code in their context window.
Why Legal Reasoning Breaks LLMs
Deontic reasoning is the formal term for applying explicit rules and obligations to specific facts to reach a conclusion. Think: computing a taxpayer's exact liability under the U.S. tax code, or determining whether an immigration appeal should succeed under USCIS administrative guidelines. It is not fuzzy or probabilistic. There is a correct answer derivable from the rules, and the model either gets it or it doesn't.
A key technical challenge for LLM-based deontic reasoning is that the relevant ruleset can be long and cross-referenced, so models may still fail to locate the rules needed for a particular reasoning step. Stuffing an entire statute into a context window is one approach, but it creates a needle-in-a-haystack problem: the model must still identify which specific sub-clause governs the current step of its reasoning, and frontier models routinely miss these lookups even when the text is right in front of them.
Across frontier LLMs and coding models, best hard-subset performance reaches only 44.4% on SARA Numeric and 46.6 macro-F1 on Housing , numbers that make clear this is not a solved problem, even for the most capable models available today.
The Benchmark: DeonticBench
DAR is evaluated on DeonticBench, a multi-domain benchmark purpose-built for rule-based reasoning. DeonticBench covers four real-world rule domains: U.S. federal taxes (SARA), airline baggage policies, U.S. state housing law, and U.S. immigration administration (USCIS-AAO). All tasks follow a unified input-output format, but the domains vary in answer type and reasoning demands, including numeric computation, logical entailment, and multi-factor legal decision-making.
The SARA component is particularly well-established. SARA contains a set of 9 sections taken from U.S. federal tax law statutes, pruned and simplified, plus hand-crafted cases that test the understanding of those sections. Each case comes either with an entailment prompt , a statement about the statutes and the case that may be true or false , or a question asking how much tax one of the case's protagonists owes. The USCIS-AAO component is newly constructed for DeonticBench, adding real immigration appeal decisions to the mix.

The DAR Framework: Statutes as Tools
The core idea behind DAR is deceptively simple: instead of giving the model the full statute upfront, give it tools to retrieve the relevant sections when it needs them. This turns a passive reading task into an active lookup loop, where the model decides what to fetch at each reasoning step.
The paper tests two agentic harnesses built on top of this idea:
- Terminus-2: A structured agentic loop where the model can call statute-retrieval tools iteratively, fetching only the sections relevant to its current reasoning step before producing a final answer.
- Terminus-Kira: A more powerful variant that adds a dedicated verification pass, where a second agent reviews the reasoning chain and can trigger additional lookups if it detects gaps or inconsistencies.
Both harnesses are contrasted against a Direct Solving baseline, where the model receives the full statute text in context and must answer in one pass , the standard approach used in most prior work.

What the Numbers Actually Show
DAR is evaluated on hard subsets of DeonticBench, where the relevant ruleset can be long and cross-referenced, and models may still fail to locate the rules needed for a particular reasoning step. The results are genuinely mixed, and that nuance is the most important finding.
On the positive side, agentic harnesses consistently push the frontier for strong models. On SARA Numeric, the hardest quantitative task, top-tier models like GPT and Claude Sonnet show meaningful accuracy gains under Terminus-Kira compared to direct solving. The USIS-AAO immigration task, which requires navigating multi-factor legal decisions, also sees improvements for capable models.
But the story flips for weaker models. Agentic harnesses can push the frontier on deontic reasoning tasks, but improvements are not uniform: weaker models often degrade on numerical tasks while consuming far more tokens. This is a critical practical warning: wrapping a mid-tier model in an agentic loop does not make it better at legal reasoning. It makes it slower, more expensive, and potentially less accurate, because the model may retrieve irrelevant sections, get confused by the multi-turn structure, or fail to integrate retrieved information correctly.

The Real Insight: Model Capability is the Bottleneck
The deeper finding here is about the interaction between model strength and agentic scaffolding. Agentic harnesses are not a free lunch. They shift the cognitive demand from passive reading to active retrieval and integration , a harder task that requires the model to maintain a coherent reasoning state across multiple tool calls. Only models that are already strong enough to do multi-step reasoning reliably can benefit from this additional structure.
This has direct implications for how you should think about building legal AI systems:
- If you are using a frontier model (GPT-4-class, Claude Sonnet, Kimi-K2), agentic statute retrieval is worth exploring , it can meaningfully improve accuracy on hard rule-following tasks.
- If you are using a smaller or weaker model to save on cost, adding an agentic harness may hurt more than it helps, and will definitely increase your token bill.
- The numerical sub-tasks (computing exact tax liability) are the hardest to improve with agentic methods, suggesting that arithmetic chaining over retrieved rules remains an open problem.
The benchmark domains covered by DeonticBench , tax law, airline policies, housing law, immigration appeals , map directly onto real enterprise use cases. Statutory reasoning considers a set of contingent rules contained within documents provided to a model in-context at inference time, in addition to basic arithmetic principles , which makes it fundamentally different from math benchmarks where the rules are fixed and universal. Every new statute, policy update, or regulatory change creates a new reasoning challenge that cannot be baked into model weights.
What's Available
The paper does not release a standalone code repository or model checkpoint alongside the preprint. The DeonticBench dataset itself, which DAR is evaluated on, includes reference Prolog programs for all instances and is the primary artifact available to the research community. The DAR harness implementations are described in sufficient detail to reproduce, but no plug-and-play toolkit is released at this stage.
For teams building on top of this work, the most actionable takeaway is architectural: treat legal statutes as a retrieval corpus with structured tool access, not as a monolithic context dump. The gains are real for capable models, and the failure modes for weaker models are well-documented enough to inform deployment decisions before you commit to a production system.