Legal Requirements Translation from Law
Not on the map. Why?
Abstract (arXiv)
Software systems must comply with legal regulations, which is a resource-intensive task, particularly for small organizations and startups lacking dedicated legal expertise. Extracting metadata from regulations to elicit legal requirements for software is a critical step to ensure compliance. However, it is a cumbersome task due to the length and complex nature of legal text. Although prior work has pursued automated methods for extracting structural and semantic metadata from legal text, key limitations remain: they do not consider the interplay and interrelationships among attributes associated with these metadata types, and they rely on manual labeling or heuristic-driven machine learning, which does not generalize well to new documents. In this paper, we introduce an approach based on textual entailment and in-context learning for automatically generating a canonical representation of legal text, encodable and executable as Python code. Our representation is instantiated from a manually designed Python class structure that serves as a domain-specific metamodel, capturing both structural and semantic legal metadata and their interrelationships. This design choice reduces the need for large, manually labeled datasets and enhances applicability to unseen legislation. We evaluate our approach on 13 U.S. state data breach notification laws, demonstrating that our generated representations pass approximately 89.4% of test cases and achieve a precision and recall of 82.2 and 88.7, respectively.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 22 of its 42 references that are in the map. First posted on arXiv 3 Jul 2025.
Builds on
22 of 42 references.
References · 22
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,374
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
- 2022Competition-Level Code Generation with AlphaCodecited by 1,462
- 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,392
- 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,135
- 2024A Survey on Large Language Models for Code Generationcited by 658
- 2022PAL: Program-aided Language Modelscited by 652
- 2022Language Models of Code are Few-Shot Commonsense Learnerscited by 160
- 2022Maieutic Prompting: Logically Consistent Reasoning with Recursive Explanationscited by 159
10 more
- 2023Structured Chain-of-Thought Prompting for Code Generationcited by 138
- 2019Large-Scale Multi-Label Text Classification on EU Legislationcited by 104
- 2022Enhancing Self-Consistency and Performance of Pre-Trained Language Models through Natural Language Inferencecited by 40
- 2023Consistency Analysis of ChatGPTcited by 37
- 2023On Context Utilization in Summarization with Large Language Modelscited by 30
- 2022NLP-based Automated Compliance Checking of Data Processing Agreements against GDPRcited by 18
- 2024Logical Consistency of Large Language Models in Fact-checkingcited by 15
- 2023R-U-SURE? Uncertainty-Aware Code Suggestions By Maximizing Utility Across Random User Intentscited by 10
- 2020An Automated Framework for the Extraction of Semantic Legal Metadata from Legal Textscited by 8
- 2024Requirements Satisfiability with In-Context Learningcited by 5
Built on by
Citing papers per year: 2026: 1.
1 paper.