MAC: Multi-Agent Constitution Learning
Organizations: Mohamed bin Zayed University of Artificial Intelligence (MBZUAI) · Indraprastha Institute of Information Technology Delhi (IIIT Delhi) · Google DeepMind
Abstract
Constitutional AI is a method to oversee and control LLMs based on a set of rules written in natural language. These rules are typically written by human experts, but could in principle be learned automatically given sufficient training data for the desired behavior. Existing LLM-based prompt optimizers attempt this but are ineffective at learning constitutions since (i) they require many labeled examples and (ii) lack structure in the optimized prompts, leading to diminishing improvements as prompt size grows. To address these limitations, we propose Multi-Agent Constitutional Learning (MAC), which optimizes over structured prompts represented as sets of rules using a network of agents with specialized tasks to accept, edit, or reject rule updates. We also present MAC+, which improves performance by training agents on successful trajectories to reinforce updates leading to higher reward. We evaluate MAC on tagging Personally Identifiable Information (PII), a classification task with limited labels where interpretability is critical, and demonstrate that it generalizes to other agentic tasks such as tool calling. MAC outperforms recent prompt optimization methods by over 50%, produces human-readable and auditable rule sets, and achieves performance comparable to supervised fine-tuning and GRPO without requiring parameter updates.
Figures & tables
| Domain | Example Constitutional Rules |
|---|---|
| Legal | Mark as private specific dates when they appear in the context of personal events or actions, such as births, deaths, or significant life events. Do not mark general references or narrative text containing similar time periods. Examples: mark “1975”, “22 August 2003”; do not mark “on a day in June”. |
| Healthcare | Mark terms such as heart failure subtypes (e.g., diastolic heart failure, systolic heart failure) when explicitly mentioned in a patient’s medical history as private. Do not mark generic medical conditions without an explicit subtype or detailed description. |
| Finance | Mark as private any phrase indicating a specific financial timeframe (e.g., FY2022, YTD FY2021) when it appears in direct association with identifiable information. Do not mark generic narrative context or standalone labels without specific identifiers. Examples: mark “FY2022 balance sheet”, “Q4 2021 sales report” (if associated with identifiable information); do not mark “next year”, “past fiscal year” without identifiers. |
| Method | Legal | Finance | Healthcare |
|---|---|---|---|
| MAC (14B) | 67.3 | 45.5 | 26.7 |
| Microsoft Presidio (SpaCy) | 57.3 | 32.8 | 12.0 |
| Microsoft Presidio (BERT) | 10.4 | 5.2 | 2.7 |
| Microsoft Presidio (Stanza) | 54.0 | 44.7 | 9.1 |
| Nvidia GLiNER | 57.1 | 35.9 | 5.3 |
| Dataset | Optimizer | 3B | 7B | 14B |
|---|---|---|---|---|
| Legal | GEPA | 12.70 | 52.05 | 50.09 |
| MIPRO | 13.15 | 38.61 | 44.31 | |
| MAC | 36.00 | 55.10 | 67.30 | |
| Finance | GEPA | 11.89 | 22.51 | 28.75 |
| MIPRO | 9.81 | 22.34 | 26.80 | |
| MAC | 30.10 | 37.50 | 45.50 |
| Dataset | Model | 0-Shot | 1-shot | 3-shot | 5-shot |
|---|---|---|---|---|---|
| Random Retrieval: | |||||
| Legal | 3B | 38.79 | 40.94 | 45.64 | 33.17 |
| 7B | 54.85 | 64.93 | 62.29 | 60.56 | |
| 14B | 73.41 | 77.35 | 77.74 | 76.29 | |
| Finance | 3B | 17.42 | 21.82 | 25.18 | 25.06 |
| 7B | 38.79 | 32.32 | 35.88 | 46.73 | |
| Method | Precision | Recall | F1 |
|---|---|---|---|
| Training Baselines: | |||
| GRPO | 64.61 | 28.63 | 39.68 |
| SFT | 78.72 | 44.17 | 56.59 |
| MAC Variants: | |||
| MAC | 64.32 | 24.95 | 35.96 |
| MAC+ | 75.93 | 48.27 | 59.02 |
| Agent | Base Model | MAC+ |
|---|---|---|
| Classification (F1 score) | ||
| Annotator Agent | 32.9 | 59.02 |
| LLM-as-a-Judge (Win rate) | ||
| Decision Agent | 9.0% | 86.0% |
| Rule Editor Agent | 25.0% | 74.0% |
| Rule Proposer Agent | 3.0% | 97.0% |
| Method | Final Accuracy | Improvement |
|---|---|---|
| MAC | 87.5% | +5.5% |
| GEPA | 86.0% | +4.0% |
| MIPRO | 84.5% | +2.5% |
| Metric | MAC | GEPA | MIPRO |
|---|---|---|---|
| Average Characters | 3,679.2 | 5,264.7 | 1,425.8 |
| Statistic | MACCROBAT (Healthcare) | PUPA (Finance) | ECHR (Legal) |
|---|---|---|---|
| Total characters | 542,124 | 400,041 | 1,547,159 |
| Total private characters | 297,616 | 53,701 | 158,007 |
| Private characters (%) | 54.9 | 13.42 | 10.21 |
| Public characters | 244,508 | 346,340 | 1,389,152 |
| Public characters (%) | 45.1 | 86.58 | 89.79 |
| Total private entities | 24,155 | 4,564 | 11,156 |
| Model | Legal | Healthcare | Finance |
|---|---|---|---|
| 3B | # Rules: 3 | # Rules: 7 | # Rules: 13 |
| Rules | 1. Mark names, dates, OTPs, IDs, phone numbers; exclude non-private terms (e.g., “applicant”, months); mark names only when supporting a specific private item/ID; exclude non-identifiers (e.g., “in”, “and”, “on”). 2. Mark numeric dates; do not mark surrounding words. Example: 1982, 15 December 2004. 3. Mark dates (YYYY, MM/DD/YYYY); exclude common non-private terms (e.g., “the applicant”, “court”); do not mark ordinal suffixes (“st”, “nd”, “rd”, “th”). | 1. Mark personal identifiers (names, dates, SSNs, phone numbers, emails, etc.); do not mark common words/placeholders (e.g., “IV”, “hands”, “died”). 2. Mark full names, dates, SSNs, phone numbers, emails, medical IDs (ICD/MRN), lab test IDs (PT#, CBC#), and identifiers in context (e.g., “ID:”, “DOB:”); do not mark clinical descriptors unless part of the identifier. 3. Mark full names, DOBs, SSNs, phone numbers, emails, medical/lab IDs and labeled identifiers; do not mark generic clinical terms (e.g., “progression”, “recovery”) unless tied to specific identifiers. | 1. Mark tokens that uniquely identify individuals (e.g., names, emails, phone numbers, SSNs, addresses, dates); avoid generic context or logs unless they explicitly identify a person; exclude non-identifying descriptors and industry terms. Example: John Doe ¡[email protected]¿ 1952-06-24 95 AVA BLANCET FRAUZ. 2. Mark explicit identifiers and labeled fields (e.g., Name, Email, Address, Date) when they contain identifying information; exclude generic narrative text and industry-specific terminology without identifiers. Example: John Doe ¡[email protected]¿ 1952-06-24 95 AVA BLANCET FRAUZ. 3. Mark identifiers appearing in structured or semi-structured contexts (e.g., IDs, contact fields, combined identifiers); do not mark log-only or industry terms unless they directly reference an identifiable entity. |
| 7B | # Rules: 4 | # Rules: 12 | # Rules: 16 |
| Rules | 1. Mark dates, times, and durations that specifically reference case numbers or dates of legal events; do not mark general temporal references or unrelated numbers. 2. Mark personal names; do not mark titles/roles unless they precede the name. 3. Mark nationality, titles following names, and specific government officials; do not mark generic titles or roles. | 1. Mark phrases indicating medical conditions or treatments (drug names, disease names, procedures), but not surrounding text unless it directly identifies a person. 2. Mark phrases indicating medical conditions/treatments and clinical descriptors (e.g., “best-corrected visual acuity”); do not mark surrounding text unless directly identifying. 3. Mark age/gender/introduction phrases in records (e.g., “62-year-old”, “female”, “presented to…”); do not mark surrounding text unless directly identifying. | 1. Mark dates, times, monetary values, and names as private; do not mark surrounding text unless it directly identifies a person. 2. Mark names as private; do not mark surrounding text unless it directly identifies a person. 3. Mark names, email addresses, and phone numbers as private; do not mark surrounding text unless it directly identifies a person. |
| 14B | # Rules: 15 | # Rules: 4 | # Rules: 7 |
| Rules | 1. Mark as private specific dates and location names within legal/case documents; do not mark generic descriptors or full sentences containing such terms. 2. Mark official titles when they refer to individuals, specific dates, and specific location names; do not mark generic titles or broad locations. 3. Mark specific numbers in case details (e.g., witnesses, event dates) but not general narrative numbers. | 1. Mark medical procedures, diagnoses, and medical equipment in clinical contexts as private; do not mark general terms outside medical narratives; split adjacent phrases when needed. 2. Mark conditions, treatments, procedures, and anatomical features in medical contexts; do not mark general terms outside medical narratives; split adjacent phrases when needed. 3. Mark age, gender, and personal titles when appearing in referral/record introductions (e.g., “A 68-year-old man…”). | 1. Context-triggered: mark dates/times/names/contact details when preceded by labels (e.g., “Date:”, “Name:”); do not mark the labels. 2. Mark any phrase that can uniquely identify an individual/organization (names, dates, contact details, identifiers); do not mark generic roles/broad locations/placeholders without identifiers. 3. Function-based: mark phrases containing multiple identifying elements in a single statement; avoid marking generic text unless it includes specific identifiers. |
| Agent Role | Rollouts | Total Input | Total Output | Avg. Input | Avg. Output |
|---|---|---|---|---|---|
| Annotator Agent | 1,000 | 1,466,839 | 378,013 | 1,466.8 | 378.0 |
| Decision Agent | 697 | 1,402,748 | 64,257 | 2,012.6 | 92.2 |
| Rule Editor Agent | 132 | 366,927 | 11,327 | 2,779.8 | 85.8 |
| Rule Proposer Agent | 1,000 | 3,178,303 | 74,905 | 3,178.3 | 74.9 |
| Total | 2,829 | 6,414,817 | 528,502 | 2,267.5 | 186.8 |
Prompt Optimization
Prompt optimization automates the revision or selection of instructions and other prompt components to improve model behavior for specific tasks.
See all 140 papers