Grading Executable Legal Rules Against Independent Records: Transitional Provisions and Korean SME Status

Jinhyung BaearXiv 2026 · arXiv

Evaluating "Rules as Code"—the process of turning legal text into executable programs—is notoriously difficult. Usually, researchers grade their code against their own interpretation of the law. But what if the researcher is wrong? This paper introduces LexTemporis, a framework that grades legal programs against independent, real-world records to reveal how well these systems actually handle the complexities of time and delegation in law.

TL;DR

LexTemporis moves beyond "grading against the author's homework" by evaluating LLM-generated legal rules against 10,901 real-world records of Korean SME status. It demonstrates that traditional evaluation methods overstate model performance and that "transitional provisions"—rules about how laws change over time—are often more important than the core statutory text.

What Problem Does This Paper Address?

As we move toward "Rules as Code" (RaC), Large Language Models (LLMs) are increasingly used to translate statutes into executable Python or Prolog. However, current benchmarks suffer from a circularity problem: a model is typically graded against a "gold standard" written by the same person who provided the law to the model. If the human grader misreads a subtle provision, the model is rewarded for making the same mistake.

Furthermore, most legal AI research treats law as a static "point-in-time" problem. In reality, law is intertemporal. When a law changes, "transitional provisions" (often buried in addenda) determine whether an old rule still applies to a specific firm on a specific date. This paper tackles the challenge of evaluating how well LLMs handle these "layers" of law—statutes, decrees, annexes, and addenda—across many years of real-world outcomes.

The LexTemporis test bed workflow, showing how legal layers are processed through retrieval and synthesis to be executed against real-world keys.

Methods

The author developed a pipeline to test four LLMs (Gemini 3.8 Flash, Claude Opus 5.5, Claude Haiku 5.5, and GPT-OSS 120B) on their ability to write a judge(facts) function that determines a firm's status.

Key methodological innovations include:

  • Two-Reference Grading: Every model output is graded twice—once against a "Reference Rule" (the author's manual interpretation) and once against an "Answer Key" (independent real-world records).
  • Delegation-Aware Retrieval: A custom retriever that doesn't just look at the main statute but "walks" through citations to find subordinate decrees, industry-specific annexes, and transitional addenda.
  • Verify-and-Repair Loop: A system that checks the generated code against logical properties derived from the law (e.g., "a firm far below the revenue ceiling must be an SME") and asks the LLM to fix violations.

Datasets

The paper introduces a massive, newly curated test bed:

  • Korean SME Status: 10,901 firm-years (2015–2023) of Small and Medium Enterprise (SME) status disclosed by listed companies in South Korea. This is paired with a "Version Store" containing 39 versions of the Act and 45 versions of the Decree.
  • US Income Tax: 2,000 synthetic returns (2013–2022) graded against the NBER TAXSIM35 calculator to test yearly changes in tax parameters.
  • German Hospital Volumes: 7,845 decisions regarding hospital entitlements, where thresholds are often hidden in transitional clauses.
The complex layers of the Korean SME rule, illustrating how different instruments decide various aspects of the status.

Key Insights and Ideas

  • The "Addenda" Gap: In the Korean case, the date of a decision matters more because of transitional provisions (addenda) than because of the actual numbers (ceilings) in the law. Ignoring these addenda leads to significant errors.
  • Performance "Shrinkage": This is the paper's most critical finding. A model's apparent "lead" in performance often shrinks when measured against real records compared to the author's reading. For three models, the advantage of providing the "right" provisions was 28–60% smaller against real records.
  • The Grader's Bias: Grading against your own reading can overstate a model's utility. If a model reproduces a human's incorrect reading of a contested provision, it looks "perfect" in a standard benchmark but fails in the real world.
  • Reporting Inertia: Real-world data revealed that firms often repeat their previous year's status word-for-word, even when the law suggests they should have transitioned. This "inertia" is a property of practice that a pure legal reading cannot predict.

Key Results

  • Accuracy Boost: Modelling just one transitional provision raised the agreement between the executable rule and real-world disclosures from 83–86% to 89–90%.
  • Testing Interpretations: The real-world disclosures were used to "vote" on a contested legal reading. In 130 out of 189 firm-years where two legal readings diverged, the disclosures favored the author's specific interpretation.
  • Retrieval Sensitivity: Providing the exact required provisions (an "oracle" bundle) resulted in 98.9% agreement with the author's reading but only 89% agreement with real-world records, highlighting the "ceiling" created by real-world noise and missing facts.
A comparison of different temporal structures across the three case studies and what happens when an encoding fails to track them.

Limitations and Future Work

  • Ground Truth vs. Practice: The "Answer Key" (company disclosures) is not a legal "ground truth"—firms can and do make mistakes in their own filings.
  • Omitted Complexity: The current reference rules omit some highly complex ownership-based independence tests, which accounted for about 32% of the remaining disagreements with the data.
  • Future Directions: The author suggests that future retrieval systems should include "dated official interpretations" from government agencies as an additional layer to help models resolve open legal questions.

Summary updated

Abstract

Laws are increasingly turned into programs that decide cases, such as whether a firm was a small or medium enterprise (SME) on a given date, and large language models (LLMs) now write them. The programs are usually graded against answers written by someone who read the same law, so a program can score well by sharing the grader's reading rather than by getting the law right. LexTemporis grades them instead against records of what actually happened: 10,901 firm-years of SME status disclosed by Korean listed companies, with every version of the governing rules. An appendix adds comparison cases from US income tax and German hospital minimum volumes. The date changes outcomes mainly through provisions outside the main statutory text: one transitional provision raises agreement with the disclosures from 83-86% to 89-90%. The disclosures also test the author's reading of a contested provision, favouring it in 130 of 189 firm-years where readings diverge. Four LLMs wrote the rules, given different selections of the law. A pre-registered comparison finds no condition better across all four models. In exploratory analyses, supplying the right provisions looks better graded against the author's reading than against the records: the advantage shrinks for three models (for one, to between a quarter and three-fifths of its size), and per firm-year it is several times larger where the author's reading is wrong, partly by construction, since there reproducing that reading more faithfully must lose. Grading legal programs against the grader's own reading can overstate how well they work.
BibTeX
@misc{bae2026grading,
  author = {Jinhyung Bae},
  title = {{Grading Executable Legal Rules Against Independent Records: Transitional Provisions and Korean SME Status}},
  year = {2026},
  eprint = {2611.24055},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.24055},
}
Figure