TL;DR
Translating the EU AI Act into concrete software requirements is usually a manual, headache-inducing task that demands both legal and engineering expertise. This paper evaluates TERE4AI, an open-source tool that reads a project's documentation, figures out its risk level, and automatically generates system-specific requirements—each traced back to the exact legal wording and ethical principles. Five AI ethics experts rated a sample of these generated requirements and found nearly all of them to be accurate, complete, clear, and tailored to the system.
What Problem Does This Paper Address?
Regulations like the EU AI Act are written for lawyers, not software engineers. Yet developers—especially those at small and medium-sized enterprises without in-house legal teams—are responsible for making sure their AI systems comply.
Existing automated tools typically fall into two camps: they either extract generic legal obligations from the text, or they grade a system's documentation against a static checklist. What's missing is a bridge between the law and a specific system's intended purpose. Under the EU AI Act, compliance depends heavily on what a system actually does and what its documentation says. TERE4AI aims to fill this gap by tailoring requirements directly to a system from its own documentation while keeping every requirement traceable to the originating law.
Methods
TERE4AI is an open-source Model Context Protocol (MCP) server (also accessible via a web client, TERE4AI-web) built around a knowledge graph of the EU AI Act. It works in two stages:
- Build Time (Once): A script parses the EU AI Act into legal units (Articles, paragraphs, points, etc.). A generator LLM (
gpt-6-astra) extracts atomic "norms" (obligations, prohibitions, permissions) from 30 core Articles and Annexes, and aligns each norm with up to three of the seven non-binding ethical requirements from the High-Level Expert Group on AI (HLEG)—such as human oversight, transparency, and fairness. To avoid self-bias, a separate judge LLM from a different model family (claude-opus-5-5) reviews and filters these norms and alignments. - Use Time (Per System): Given a public repository,
TERE4AI-webreads only its documentation (READMEs, model cards, dataset cards, etc.—never the code). An LLM proposes values for 44 factual questions (e.g., domain, autonomy), backing each with an exact file-and-line quote. A human can review or edit these facts before a deterministic script calculates the system's risk level. For each applicable Article, the generator LLM writes tailored requirements citing specific norms, the judge LLM acts as a quality gate, and each requirement automatically inherits the HLEG ethical principles linked to its cited norms.
Datasets
Because commercial high-risk AI systems are rarely open source, the authors searched GitHub for public repositories that included full documentation alongside their code. From an initial pool of 128 repositories, 10 passed their selection criteria, and two were chosen for the final evaluation:
- A resume-ranking hiring tool, classified by TERE4AI as high-risk under employment (Annex III, point 4).
- A medical image segmentation tool that also predicts body statistics from scans, classified as high-risk under biometric categorisation (Annex III, point 1)—chosen specifically because its classification is contestable.
The tool generated 126 tailored requirements for the hiring tool and 124 for the segmentation tool (250 total across 24 Articles). Because that was too many for humans to grade, the authors drew a stratified random sample of 37 tailored requirements from Articles 9–15 (the core rules for high-risk systems).
Key Insights and Ideas
- Tailoring works, except on conditional rules: Experts praised requirements that referenced specific system components (like monitoring diagnostics). Negative feedback was rare and mostly happened when the tool generated requirements from norms that only apply conditionally (e.g., optional real-world testing), which made the output feel generic.
- Bundling norms hurts clarity: The only two requirements that fell below the clarity threshold were the longest ones in the sample (297 and 353 words), where multiple norms were packed into a single requirement.
- The "always say yes" trap for LLM judges: While the judge LLM agreed with the experts' majority on correctness and completeness 100% of the time, it didn't actually outperform a naive baseline that simply rates everything "high"—because the experts themselves rated almost everything 4 or 5 out of 5.
- Low inter-rater reliability doesn't always mean disagreement: Krippendorff's alpha among the five experts was near zero (or slightly negative). Because nearly every score was a 4 or 5, the metric couldn't distinguish between items, even though pairs of experts were on the same side of the threshold 90%+ of the time.
Key Results
- Facts & Risk Levels: The experts' majority agreed with all 15 facts the tool proposed from the documentation. All five experts agreed the hiring tool was high-risk; for the medical segmentation tool, three agreed it was high-risk, one thought it was prohibited, and one could not tell.
- Requirement Quality (RQ1): Out of the 37 sampled requirements, the experts' majority rated 37/37 high (4 or 5) on correctness and completeness, 35/37 on clarity, and 36/37 as specific to the system.
- Ethical Alignment (RQ2): The majority agreed that 36/37 requirements supported all of the HLEG ethical principles they inherited.
- Judge vs. Experts (RQ3): The judge model matched the experts' majority on 37/37 for correctness and completeness, 31/37 for clarity, and 30/36 for specificity.
Limitations and Future Work
The authors are upfront about several caveats:
- Not legal advice: The five raters were AI ethics experts, not lawyers. High correctness scores mean the requirements match the cited wording of the Act, not that the system is legally compliant.
- Scope and baselines: The study only tested two open-source systems, focused on Articles 9–15, used commercial LLMs without repeated runs for nondeterminism, and did not compare TERE4AI against a baseline.
- Code traceability: While requirements traced back to the law, tracing them forward to the actual code (e.g.,
.pyfiles mentioned in the requirements) was left untested.
Next, the authors plan to run broader studies with open-weight models, proper baselines, and multiprofessional focus groups (combining lawyers, ethicists, and developers), as well as test how coding agents use TERE4AI to link requirements directly to code.
Summary updated