A comprehensive legal cartography project mapping the EU AI Act's complete logical structure with an intelligent evaluation engine.
Map legislation as deterministic + probabilistic requirement trees, then build software that can evaluate whether a real-world case satisfies legal requirements by:
- Deterministic nodes: Rule-based evaluation (HIGH confidence elements)
- Interpretative nodes: LLM-assisted evaluation (LOW/MEDIUM confidence elements)
- Full traceability: Every determination explained with confidence scores
- Human oversight: Lawyers can review and override any LLM determination
carthography/
โโโ cartography-framework/ # Methodology documentation
โ โโโ legal-cartography-v0.1.md
โ
โโโ eu-ai-act-cartography/ # Complete EU AI Act mapping
โ โโโ definitions/ # Article 3 definitions + scope
โ โ โโโ scope-applicability.json
โ โ โโโ scope-exclusions.json
โ โ โโโ ai-system-definition.json
โ โ โโโ core-actor-definitions.json
โ โ โโโ temporal-operational-concepts.json
โ โ โโโ technical-data-definitions.json
โ โ โโโ biometric-definitions.json
โ โ โโโ high-risk-classification.json
โ โ โโโ remaining-definitions-batch-1.json
โ โ
โ โโโ consequences/ # Mapped obligations (Wirknormen)
โ โ โโโ article-5-prohibited-practices.json
โ โ โโโ article-9-risk-management-COMPLETE.json
โ โ
โ โโโ annexes/ # All annexes
โ โ โโโ annex-iii-high-risk-use-cases.json
โ โ
โ โโโ working-notes/ # Session notes and analysis
โ โโโ PROGRESS.md # Detailed progress tracker
โ
โโโ evaluation-engine/ # Evaluation software
โ โโโ engine.py # Core evaluation logic
โ โโโ visualizer.py # HTML/ASCII visualization
โ โโโ interactive_cli.py # Interactive CLI interface
โ โโโ requirements.txt
โ โโโ README.md
โ
โโโ ai-act-source/ # Source materials
โโโ EU_AI_Act.md
-
Layered Threshold Architecture
Layer 0: Scope of Application (Art 1-2) โ Layer 1: Material Scope - AI System Definition โ Layer 2: Territorial/Personal Scope โ Layer 3: Exclusions โ Layer 4: Actor Classification (provider, deployer, etc.) โ Layer 5: System Classification (high-risk, prohibited, etc.) โ Layer 6: Specific Provision Applicability โ Substantive Obligation -
Deterministic vs. Probabilistic
- Deterministic: Clear rule-based requirements (e.g., "system is placed on market")
- Probabilistic: Interpretative concepts requiring judgment (e.g., "significant risk", "reasonably foreseeable")
-
Confidence Tracking
- Every node has explicit confidence rating (HIGH/MEDIUM/LOW)
- LOW confidence nodes flagged for LLM evaluation
- Interpretative challenges documented
-
Shared Nodes
- Reusable components (scope, definitions, classifications)
- Referenced across multiple provisions
- Single source of truth
Example structure for a legal requirement:
{
"provision": "Article 9",
"title": "Risk management system",
"wirknorm": {
"legal_consequence": "Obligation to establish risk management system",
"confidence": "HIGH"
},
"threshold_requirements": {
"operator": "AND",
"layers": [
{"requirement": "Scope applies", "reference": "scope.json"},
{"requirement": "System is high-risk", "reference": "high-risk.json"},
{"requirement": "Actor is provider", "confidence": "HIGH"}
]
},
"substantive_obligations": {
"requirements": [
{
"text": "Identify reasonably foreseeable risks",
"confidence": "MEDIUM",
"flag": "LOW_CONFIDENCE: 'reasonably foreseeable' requires interpretation",
"llm_evaluation_needed": true
}
]
}
}cd evaluation-engine
python interactive_cli.py- Interactive Case Creation: Describe your AI system
- High-Risk Classification: Automatic evaluation against Article 6 + Annex III
- Compliance Assessment: Check specific requirements (e.g., Article 9)
- LLM Integration: Interpretative elements evaluated by LLM with reasoning
- Visual Results: HTML decision trees + confidence scores
- Human Review: Override any LLM determination
from engine import EvaluationEngine
engine = EvaluationEngine()
case = {
"system_description": "AI-powered CV screening for hiring",
"provider_info": {"name": "TechCorp", "location": "Germany"},
"deployment_context": {"sector": "employment"}
}
result = engine.evaluate("high-risk-classification", case)
# Result:
# {
# "result": True, # IS high-risk
# "confidence": 0.95,
# "decision_tree": {...},
# "llm_evaluations": [
# {
# "description": "Assess if system materially influences hiring decisions",
# "result": True,
# "confidence": 0.85,
# "reasoning": "System filters 80% of candidates automatically..."
# }
# ]
# }- Article 1-2: Complete scope architecture (7 pathways, 12 exclusions)
- Article 3: All 68 definitions with interdependencies
- Article 5: All 8 prohibited practices (despite source text issues)
- Article 6-7: Complete high-risk classification logic
- Annex III: All 25 high-risk use cases across 8 areas
- Article 9: Risk management requirements with full threshold chain
- Evaluation Engine: Core logic, visualization, CLI interface
- Article 8, 10-15: High-risk requirements (partial mapping)
- Article 16-29: Provider/deployer obligations
- Article 50-52: Transparency obligations
- Chapter V: General-purpose AI provisions
- Chapters VI-VIII: Governance and enforcement
- Annexes I, II, IV-XII: Various technical annexes
- LLM Integration: Placeholder (needs API integration)
- Web Interface: Pending
-
Threshold Chains Are Deep: Article 9 obligation requires passing through 5+ layers before even reaching substantive requirements
-
Interpretative Density: ~40% of key concepts require contextual LLM evaluation:
- "Significant risk"
- "Materially influencing"
- "Reasonably foreseeable misuse"
- "Acceptable residual risk"
-
Profiling Exception: If system profiles โ always high-risk, no opt-out (Art 6(3) second subparagraph)
-
Provider Defines Purpose: "Intended purpose" is provider-defined (Art 3(12)), cascades through entire Act
-
Dynamic Annexes: Annex III can be amended by Commission (Art 7) - not static list
-
Real-time Biometric = Most Restricted: Article 5(1)(h) has most complex procedural safeguards
- Scope/Definitions: Generally HIGH confidence (90%+)
- Classification Boundaries: MEDIUM confidence (60-80%)
- Risk Thresholds: LOW confidence (40-60%) - require case-by-case evaluation
- Interpretative Concepts: LOW confidence - LLM essential
- Complete mapping of remaining provisions
- Integrate actual LLM API (Anthropic Claude, OpenAI)
- Build web interface with interactive visualizations
- Add export to PDF legal reports
- Multi-provision compliance checking
- Gap analysis (what's missing for compliance)
- Recommendation engine (suggested actions)
- Comparative analysis across jurisdictions
- Real-time regulatory updates
- Case law integration
- Regulatory sandboxing simulation
- Automated documentation generation
- Wirknorm: Legal consequence with real-world effect
- Rechtskernsatz: Deterministic core set of requirements
- Threshold chain: Cumulative prerequisites for obligation
- Operator types: AND (cumulative), OR (alternative), AND_NOT (exclusions)
- Tatbestand: Operative facts triggering legal consequence
- Rechtsfolge: Legal effect/consequence
- Auslegung: Interpretation of ambiguous terms
- Subsumtion: Application of law to facts
This is currently a solo research project demonstrating the legal cartography concept. Future collaboration welcome.
[To be determined]
[Your contact information]
Status: Active development Version: 0.1.0 (Proof of Concept) Last Updated: 2025-10-08