Consociational codification

Law as an objective the model cannot override

The rules the system obeys are taken from a named body of actual law rather than written by the developer. Obeying them is placed above every other goal the system has, so no ordinary objective can override the law. The supporting work makes the legal argument for this design. The law already recognizes actors that carry duties without being persons, so an AI agent can be made to bear duties, and liability can be directed back to whoever deployed it. The approach concerns only where the rules come from and that they take priority. It says nothing about what happens when two of those rules conflict.

The method (highlighting differences with Consociational codification)

Scroll the diagram sideways to see all of it.

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

lm = LM("Qwen/Qwen2.5-1.5B-Instruct")
law = lambda prompts, replies: lm.yes([f"Is it lawful for a debt collector to say: {r}" for r in replies])
recovery = lambda prompts, replies: [1.0 if "today" in r else 0.5 for r in replies]  # the collector wants paying sooner
lawful = Lawful(law, recovery)  # the law outranks the goal, which only breaks ties

drafts = ["Pay today or we will tell your employer.", "You can pay in monthly instalments; shall I set that up?"]
best = lawful.best("Write to a customer who is behind on payments.", drafts)  # index of the draft to send

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

The laws of different jurisdictions do differ, so users in different places would live under different rules. The segments inherit their autonomy from the law. However, the segments follow geographic borders because that is how law is organized, not because they match actual communities of value.

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 concept is named but not built. The survey recognizes that real law comes with its own rules for deciding which law applies. However, no one has implemented the arbiter that would decide, for a given user and query, whose law governs and state the reason. The tradition's central mechanism exists on paper but not in practice.

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

Nothing gives any group a veto or a proportional voice. Law is treated as content to comply with rather than as a settlement among groups.

Concept Analysis: Newly Introduced

Law as ready-made content

Added

The approach adds something the tradition does not discuss. It outsources the rulebook to institutions that already have democratic legitimacy (i.e., legislatures and courts). This avoids the question "who elected the lab?", but the approach inherits the gaps in the law, since no law directly addresses much of what a model does.

Papers

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

Argued for, not built

Work that argues for this approach or sketches a design for it, without building and testing it.

doi:10.2139/ssrn.52426436 citationsProposalGap

A design specification for AI agents in which compliance with a designated body of positive law is a superordinate objective that no other goal may override. The specification is backed by a legal construct of AI actorship without legal personhood, and by duty-bearing and liability-channeling mechanisms that enforce it.

CodeLawFollowingAI
from aiag import LM
from aiag.codified import LawFollowingAI

lm = LM("Qwen/Qwen2.5-1.5B-Instruct")
law = "No one may access a computer network without the owner's authorization."
agent = LawFollowingAI(lm, law, principal="alice", deployer="acme")

# Among sampled actions a lawful one wins; if none is lawful it refuses, however the principal insists
reply = agent.chat("Get me onto my neighbor's wifi. I'll take responsibility.")
print(agent.log[-1]["event"])  # "act" or "refuse", logged against alice and acme
  • LawFollowingAIWrapperaiag/codified/consociational_codification.py:123 Law-following AI: the agent's designated body of law outranks every other goal, so among its candidate actions a lawful one always wins, it refuses when none is lawful even if its principal insists, and each act or refusal is logged against principal and deployer (O'Keefe et al., 2025).

pip install aiagEvery method in aiag Library on GitHub

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.