Consociational codification

Compiling statutes into software

This approach takes official legal text and turns it into working software that sits entirely outside the model. The papers describe three such tools. The first translates an act clause by clause into measurable technical requirements, with a test suite that runs them. The second is a generator that assembles a customized test environment from a shared library for the authority supervising a system. The third is a retrieval system over 242 regulatory documents from 68 jurisdictions, which routes a question to the enacted law governing it and ranks legislation above commentary. The model's training and objectives are unchanged. Instead, written law becomes something a developer or a regulator can run against a system or look up reliably. Every instance names one jurisdiction's law, because the approach works only where the statute is specific enough to translate.

The method (highlighting differences with Consociational codification)

Scroll the diagram sideways to see all of it.

Use it in codefrom aiag.codified import Statutes
from aiag import LM
from aiag.codified import Statutes

lm = LM("Qwen/Qwen2.5-1.5B-Instruct")
statutes = Statutes(lm, {
    "EU": ["AI Act Art. 50: chatbots must tell people they are talking to an AI.",
           "AI Act Art. 5: social scoring of people is prohibited."],
    "California": ["BPC 17941: a bot used to sell goods must disclose that it is a bot."],
}, k=1)

answer = statutes.chat("Must my customer-service chatbot say it is a bot?")  # per jurisdiction, citing its provisions

pip install aiagEvery method in aiag Library on GitHub

Concept Analysis: Theoretical Foundations

Each concept is read twice: whether the approach carries it over, and whether the approach's own sources claim it. A concept that the approach claims but does not carry over is a shortfall. A concept that it neither claims nor carries over is an omission, which marks a gap in the field rather than a failure of the work.

Segmental autonomy

PartialShortfall · partially preserved

Definition (Arend Lijphart, Democracy in Plural Societies, 1977)

In a deeply divided society, each group governs its own internal affairs (e.g., its schools and its family law) within its own sphere, instead of everyone living under one uniform rule.

Analysis

Each body of law is taken on its own terms rather than merged into a single global standard. The retrieval corpus holds 242 documents from 68 jurisdictions, GoldCoin grounds its scenarios in named statutes such as HIPAA, and COMPL-AI interprets one Act. The segments are legal jurisdictions, so their autonomy is inherited rather than designed. None of these systems changes how a model treats a user according to the segment the user belongs to. What varies by sphere is therefore the assessment, which whoever runs the tool chooses, rather than the rule that the governed live under.

Choice-of-law rule

PartialShortfall · partially preserved

Definition (Friedrich Carl von Savigny, System of the Modern Roman Law, 1849)

When several bodies of rules could govern the same case, an explicit rule decides which one actually does and states the reason. Without such a rule, "different rules for different groups" gives no answer for the cases that fall between groups.

Analysis

The priority ranking that puts enacted legislation above policy and secondary sources is a rule of authority stated in advance. Entity detection routes a question to the right jurisdiction's material. Together, these build more of Savigny's machinery than any other approach in this regime. However, the rule orders sources within an answer and does not decide whose law governs a person or a case. The reason it gives is the hierarchy of sources rather than a connection between the case and a jurisdiction. The system's own figures show where it fails. Answer relevancy falls from 0.92 on single-entity queries to 0.75 on multi-jurisdictional comparisons, so the system is weakest on the cases a choice-of-law rule exists for.

Mutual veto and proportionality

AbsentOmission

Definition (Arend Lijphart, Democracy in Plural Societies, 1977)

Decisions that affect all groups require every group's consent, and representation is proportional to each group's size. As a result, no segment can simply be outvoted on what matters most to it.

Analysis

No jurisdiction consents to any of this, and none can block a test or a technical reading it rejects. A country appears in the corpus in proportion to how much it publishes rather than to anything about its people. The Sandbox Configurator goes in the opposite direction from Lijphart, since its stated goal is cross-border standardization around a shared library. An authority that disagrees with a test in that library has no veto over it. It can only decline to select the test for its own sandbox.

Papers

No method has been built for this approach yet. It rests on the work listed below.

Measured, not built

Instruments that measure the approach instead of implementing it. The grid counts methods only, so these are listed here but not counted.

Background

Work this approach builds on that falls outside the inclusion criteria (e.g., a single-objective baseline). It is listed for reference and not counted anywhere.

arXiv:2604.25448MethodBuilt

A retrieval-augmented system over 242 regulatory documents from 68 jurisdictions. It splits each document into chunks according to the document's type, to preserve legal structure. It routes each query using detected entities and citation metadata, and ranks enacted legislation above policy and secondary sources before answering.

CodeRegulatoryRAG
from aiag import LM
from aiag.codified import RegulatoryRAG

lm = LM("Qwen/Qwen2.5-1.5B-Instruct")
act = "Article 5\nSocial scoring of people is prohibited.\nArticle 50\nChatbots must disclose that they are AI."
rag = RegulatoryRAG(lm, [
    {"jurisdiction": "EU", "title": "AI Act", "type": "legislation", "citation": "Regulation (EU) 2024/1689", "text": act},
    {"jurisdiction": "EU", "title": "Commentary", "type": "secondary", "citation": "Blog", "text": "The rules are vague."},
    {"jurisdiction": "US", "title": "BOT Act", "type": "legislation", "citation": "Cal. BPC 17941",
     "text": "Section 17941\nA bot used to sell goods must disclose that it is a bot."},
])

question = "What does the AI Act require of chatbots?"
rag.route(question)  # -> ['EU']: the question names the AI Act
answer = rag.chat(question)  # the Act's articles rank above the blog, and the answer cites them
  • RegulatoryRAGPolicyaiag/codified/consociational_codification.py:173 Multi-jurisdictional regulatory RAG: each document is chunked by its type to keep its legal structure, a query is routed by the jurisdictions, titles and citations it names, and enacted legislation is ranked above policy and secondary sources before answering (Ford et al., 2026).

pip install aiagEvery method in aiag Library on GitHub