mlsanityData to 14 Oct 2026

An LLM Agentic Approach for Legal-Critical Software: A Case Study for Tax Prep Software

arXiv 2509.13471 ↗First posted 16 Sep 2025cs.SE cs.AIcited by 6

On the map: LLM agents and tool use → Software engineering coding agents

Abstract (arXiv)

Large language models (LLMs) show promise for translating natural-language statutes into executable logic, but reliability in legally critical settings remains challenging due to ambiguity and hallucinations. We present an agentic approach for developing legal-critical software, using U.S. federal tax preparation as a case study. The key challenge is test-case generation under the oracle problem, where correct outputs require interpreting law. Building on metamorphic testing, we introduce higher-order metamorphic relations that compare system outputs across structured shifts among similar individuals. Because authoring such relations is tedious and error-prone, we use an LLM-driven, role-based framework to automate test generation and code synthesis. We implement a multi-agent system that translates tax code into executable software and incorporates a metamorphic-testing agent that searches for counterexamples. In experiments, our framework using a smaller model (GPT-4o-mini) achieves a worst-case pass rate of 45%, outperforming frontier models (GPT-4o and Claude 3.5, 9-15%) on complex tax-code tasks. These results support agentic LLM methodologies as a path to robust, trustworthy legal-critical software from natural-language specifications.

Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 15 of its 50 references that are in the map. First posted on arXiv 16 Sep 2025.

Builds on

15 of 50 references.

Closest ancestors · 2

Same direction, newest first

  1. 2024Large Language Model-Based Agents for Software Engineering: A Survey4 Sep
  2. 2024MapCoder: Multi-Agent Code Generation for Competitive Problem Solving18 May

Other references · 13

  1. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
  2. 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,276
  3. 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,442
  4. 2023CodePlan: Repository-level Coding using LLMs and Planningcited by 140
  5. 2023Towards Better Chain-of-Thought Prompting Strategies: A Surveycited by 62
  6. 2023CodeChain: Towards Modular Code Generation Through Chain of Self-revisions with Representative Sub-modulescited by 58
  7. 2024AgentLite: A Lightweight Library for Building and Advancing Task-Oriented LLM Agent Systemcited by 53
  8. 2023Gentopia: A Collaborative Platform for Tool-Augmented LLMscited by 26
  9. 2023METAL: Metamorphic Testing Framework for Analyzing Large-Language Model Qualitiescited by 20
  10. 2022Metamorphic Testing and Debugging of Tax Preparation Softwarecited by 7
  11. 2023On the Potential and Limitations of Few-Shot In-Context Learning to Generate Metamorphic Specifications for Tax Preparation Softwarecited by 3
  12. 2024Software Engineering Methods For AI-Driven Deductive Legal Reasoningcited by 3
1 more
  1. 2025Technical Challenges in Maintaining Tax Prep Software with Large Language Modelscited by 3

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 6.

6 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2023Large Language Models as Tax Attorneys: A Case Study in Legal Capabilities Emergence
  2. 2025Challenges in Testing Large Language Model Based Software: A Faceted Taxonomy
  3. 2026Bidirectional Empowerment of Metamorphic Testing and Large Language Models: A Systematic Survey
  4. 2026SteuerLLM: Local specialized large language model for German tax law analysis
  5. 2026Reasoners or Translators? Contamination-aware Evaluation and Neuro-Symbolic Robustness in Tax Law
  6. 2026Grounding AI Agents in Contracts: An Empirical Evaluation of Spec-Driven Test Generation
  7. 2024The Potential of LLMs in Automating Software Testing: From Generation to Reporting
  8. 2026LogicHunter: Testing LLM Agent Frameworks with an Agentic Oracle