Divorce-Bench: AI Safety Benchmark and Evaluation for California Family Law
Problem & Motivation
In California family law, 70% of divorce cases involve at least one self-represented litigant at filing, rising to 80% by judgment. The Judicial Council's self-help site alone draws more than 4 million visitors a year. Those pro per litigants increasingly bring their questions to AI.
Leading general-purpose models tested in 2024 hallucinated on 58% to 88% of verifiable case-law questions. Building a legal-specific tool did not resolve this: a preregistered audit that same year found commercial legal research products hallucinating between 17% and 33% of the time.
More critically, safety requires strict Unauthorized Practice of Law (UPL) guardrails: if a model accurately cites a statute but explicitly directs a user's legal strategy, it acts as an unlicensed attorney, potentially exposing litigants who act on that advice to severe procedural, legal, and personal consequences. Standard legal benchmarks that only check for valid citation accuracy miss this critical boundary violation.
Finally, current legal benchmarks evaluate clean, lawyer-formulated prompts, measuring an artificial upper bound on performance. Evaluating true real-world safety requires testing the operational lower bound: how models handle the noisy, fragmentary, and emotionally charged queries actually submitted by self-represented users.
Divorce-Bench is our AI safety benchmark and evaluation harness built to address all these gaps. It scores factual accuracy and grounding alongside the UPL boundary, and adds a fourth dimension: whether a system routes people toward appropriate human help rather than stopping at a refusal. All four axes are scored against questions written in a pro per litigant's voice.
Related work
- LegalBench (Guha et al., 2023) evaluates legal reasoning across 162 tasks. It measures what a model knows rather than what a retrieval system returns, and does not model refusal.
- LegalBench-RAG (Pipitone and Houir Alami, 2024), the first public benchmark for retrieval in legal RAG, scores retrieval quality on contract-law datasets for attorney-side work. It does not score whether generated text is supported by what was retrieved, and carries no refusal dimension.
- Stanford HAI's audits of commercial legal research tools (Magesh et al., 2025) measure hallucination in shipped products, but are one-time studies of attorney-facing systems rather than reusable benchmarks, and do not address self-represented users or jurisdiction-specific procedure.
- The Stanford Legal Design Lab's quality rubric for justice AI (Hagan, 2024) proposes criteria close to ours, including presentation and informed usage, but is a framework rather than an implementation: no dataset, no harness, no operationalized scoring.
- Lou and Shin (2026) identify the underlying gap. Legal benchmarks grade models on questions lawyers have already refined, while access to justice depends on the unrefined case. Their paper introduces no benchmark of its own and notes that measuring abstention remains future work.
- CitizenQuery (Majithia et al., 2026) evaluates civic queries by pairing factuality with behavioral metrics like abstention and verbosity. However, it measures abstention frequency rather than appropriateness and ignores the line between information and legal advice.
- Scale’s PRBench (2025) is the closest legal counterpart, using 1,100 expert tasks to score accuracy alongside ethics and uncertainty. Derived from real client work, it is attorney-focused: it tests whether a model reasons like a competent lawyer, not whether a public tool avoids improperly acting as one.
The following table summarizes how each approach covers the dimensions that Divorce-Bench scores:
| Benchmark | Domain | Correctness | Grounding | Advice Boundary | Safety Referral |
|---|---|---|---|---|---|
| LegalBench (2023) | Legal reasoning, general | Yes | No | No | No |
| LegalBench-RAG (2024) | Contract law, attorney-side | Retrieval only | Retrieval only | No | No |
| Stanford HAI audits (2025) | Attorney research tools | Yes | Yes | No | No |
| Legal Design Lab rubric (2024) | Justice AI, framework only | Proposed | Proposed | Proposed | Proposed |
| PRBench (2025) | Professional legal reasoning | Yes | No | Partial | No |
| CitizenQuery (2026) | Citizen-government services | Yes | No | Abstention rate only | No |
| Divorce-Bench | CA family law, pro se | Yes | Yes | Yes | Yes |
Data Source & Data Science Approach
Corpus. We built a retrieval corpus from public California legal authority: the California Family Code, California Rules of Court Title 5, Judicial Council FL-series forms, and local family rules from Alameda and Santa Clara counties. California legal sources are deeply nested, Code to Division to Section, so naive fixed-size chunking severs a passage from the authority that gives it weight. We used section-aligned hierarchical chunking that carries a citation, a breadcrumb path, and cross-references on every chunk, which produced roughly 3,071 total chunks. Those passages were embedded with the open-source Qwen3-Embedding-0.6B model and loaded into a pgvector database hosted on AWS RDS.
Gold set. The benchmark is 54 questions written in the voice of a self-represented litigant, synthesized from CJER Family Law Benchguides, the official Judicial Council publications California judges use on the bench. Drafting was LLM-assisted. Our legal expert reviewed the initial 16-record set and spot-checked edge cases in the expanded set, in several cases reversing our judgment about what was safe to answer. 32 questions require some form of refusal and 22 are safe to answer directly. Every record carries a reference answer, a machine-readable specification of safe behavior, and a contamination canary, so that trainers filtering the BIG-bench GUID also exclude our data. Records with legal content additionally name the authorities a correct response must cite, most of them with verbatim supporting spans.
The refusal subset covers four categories we defined with our legal expert:
| Category | Records | Requires Refusal |
|---|---|---|
| Safe to answer directly | 22 | No |
| Direct unauthorized practice of law | 15 | Yes |
| Complex procedure, mandatory referral | 9 | Yes |
| Emotional venting, no legal question | 6 | Yes |
| Outside California jurisdiction | 2 | Yes |
| Total | 54 | 32 |
Reference agent. Because a benchmark needs something to grade, we built our own corrective-RAG agent on LangGraph and graded it in the open. The agent classifies each question into the refusal taxonomy, routes it to a response strategy, retrieves against a county-filtered vector store, generates under category-specific instructions, self-checks that the draft is actually supported by retrieved law, and loops back to retrieval when it is not. A deterministic crisis check overrides the classifier whenever a query contains a first-person danger signal.
Grading is fully separated from the agent. The harness sees only the finished answer, exactly as it would from any third-party vendor.
Evaluation
Our evaluation rubric scores four axes, grouped into two pairs that answer different questions.
- Correctness:
- Accuracy asks whether the response states the law correctly and cites the required authorities, judged against the expert answer key.
- Groundedness asks whether every claim is supported by the passages the system actually retrieved. A response can be legally correct and still fail groundedness if the model pulled the answer from memory instead of from the corpus.
- Behavior:
- Strategic Behavior asks whether the system stayed on the safe side of the information versus advice line.
- User Guidance asks whether it pointed the person somewhere useful instead of leaving them with a flat "I can't help with that." A bare refusal is counted as a failure, not a safe outcome. Our rubric follows the safe-completion approach: reward the most helpful response that stays inside safe bounds, rather than treating a query as simply answerable or refusable. Refusing the strategic question while still volunteering the general law scores higher than refusing outright.
How a verdict is reached
Two deterministic gates run before any model call. One flags a missing not-legal-advice disclaimer. The other fails a response for stating an absolute legal conclusion without a qualifying hedge, encoding our legal expert's rule that there are no absolutes in the law.
Responses clearing the gates go to three LLM judges from three model families, so no system is graded primarily by its own family. Each judge scores each axis 0, 1, or 2 and returns machine-readable failure flags with its reasoning. The panel resolves by majority; a lone dissent is preserved rather than discarded.
The record verdict is weakest-link rather than an average: if any axis falls below threshold, the record is Unsafe. Averaging would allow a well-cited response to mask a behavioral failure.
Reproducibility
Every run emits a manifest pinning the judge model versions, a hash of the judge prompts, and a fingerprint over the gold set contents and versions. A re-judge mode freezes agent answers so that changes to the rubric can be measured against identical data, which turns the harness into an ablation instrument rather than just a scorer.
Statistical methodology
The harness implements the following methods for comparing evaluation runs and checking the benchmark's own reliability:
- Comparing configurations: Runs are paired record-by-record by query ID. Each axis uses both a BCa bootstrap on the mean difference and a two-sided sign-flip permutation test (≤ 20 records: exact enumeration; >20: 100,000 resamples). To minimize false positives, a difference is reported only when both tests agree after Holm step-down correction.
- Judge reliability: Evaluated via ordinal Krippendorff’s alpha and Gwet’s AC2 (to adjust for ratings concentrating on mostly safe responses). Repeat grading measures each judge's score distribution, intra-judge agreement, and score shift rate.
- Power: Pre-calculates the required sample size based on inter-configuration disagreement rates to confirm the gold set's statistical power before testing.
- Retrieval and coverage: Recall@k and nDCG@k are derived automatically by matching retrieved chunk authority and section to gold citations (citation-less records are excluded). A coverage check verifies all gold citations exist in the corpus to avoid treating ingestion gaps as retrieval failures.
- Robustness: Verdict stability is tested by paraphrasing questions and reordering answer sentences. Attribution checkers are validated using positive controls (answers checked against their own ground-truth spans) and negative controls (answers checked against mismatched spans).
Results
Note: Figures below are derived from earlier benchmark iterations (N < 54). Re-running all evaluations against the full 54-record gold set is in progress.
- Routing improved behavioral safety (N = 17): Passes increased from 11/17 to 15/17 after adding a 5-strategy intent router and a hardcoded crisis override. This resolved all prior behavioral failures (e.g. lecturing, answering out of jurisdiction, missing hotline details).
- Majority resolution corrected over-flagging (N = 17, frozen answers): Switching from unanimous to majority judge consensus increased passes from 9/17 to 12/17. Because all 7 lone dissents came from the same judge, this isolated the issue as a judge-side rubric artifact rather than an answer defect.
- External system comparison (N = 34): Our enhanced-retrieval agent passed 29/34, compared to 27/34 for a web-enabled commercial AI (evaluated via frozen chat interface outputs).
- Human rater validation (in progress): Five human raters, two of them legally trained, are blind-scoring each record twice, with the agreement metric fixed before labeling began.
- Limitations: Results are single-run point estimates lacking confidence intervals (to be addressed in the full 54-record evaluation). The commercial benchmark used a lower-tier model. Our legal expert also flagged a structural risk: a public rubric invites gaming. A system can learn to swap "should" for "could" and clear the behavioral axes without becoming safer. The keyword-based deterministic gates are the most exposed to this.
Key Learnings & Impact
- Decoupling correctness from behavior: Accurate statutory citations do not guarantee safe behavior; a model can be legally correct yet unlawfully give advice. Splitting the rubric into Correctness (Accuracy/Groundedness) and Strategic Behavior prevents falsely certifying unsafe responses.
- Masked issues and evaluation limits: Litigants do not know what they do not know, consequently they often misidentify core legal problems (e.g. asking about child support when spousal support is the true issue). While the agent uses neutral prompting to uncover hidden issues, single-turn benchmarking inherently limits evaluating this multi-turn interaction.
- Compiling expert rules to code: Translating qualitative expert guidance (e.g. avoiding "should," defining terms vs. applying facts) required allocating rules between deterministic gates, agent prompts, and judge prompts, revealing clear limits for automated enforcement. Notably, our expert relaxed our rigid "define-versus-apply" rule implementation to permit applying law to user facts, provided it is framed conditionally ("here is the law applied to the facts as you have stated them") rather than as a directive.
- Robust judge consensus: Replacing single-judge vetoes with majority resolution on frozen answers eliminated brittle, single-rater false flags without lowering safety standards.
- Impact and implementation: Divorce-Bench offers a public, reproducible standard for distinguishing legal information from legal advice. It ships as a containerized Python package supporting single-command, modular evaluations which is extensible to other domains beyond California family law where info-versus-advice boundaries carry legal weight.
Acknowledgements
We are especially grateful to the Hon. Lauren Zorfas (Ret.), former Court Commissioner, whose review of our benchmark questions and grading rules shaped this project. The define-versus-apply rule, the no-absolutes rule, and the should-versus-could boundary line of work came out of her sessions with us.
Thanks also to our capstone instructors, Joyce Shen and Korin Reid, for their guidance throughout the semester, and to the UC Berkeley School of Information.
References
- Akyürek, A. F., Gosai, A., Zhang, C. B. C., et al. (2025). PRBench: Large-Scale Expert Rubrics for Evaluating High-Stakes Professional Reasoning. Scale AI. arXiv:2511.11562.
- Dahl, M., Magesh, V., Suzgun, M., & Ho, D. E. (2024). Large Legal Fictions: Profiling Legal Hallucinations in Large Language Models. Journal of Legal Analysis, 16(1). arXiv:2401.01301.
- Guha, N., et al. (2023). LegalBench: A Collaboratively Built Benchmark for Measuring Legal Reasoning in Large Language Models. arXiv:2308.11462.
- Hagan, M. (2024). Measuring What Matters: Developing Human-Centered Legal Q-and-A Quality Standards through Multi-Stakeholder Research. JURIX 2024.
- Hough, B. R. (2010). Self-represented litigants in family law: The response of California's courts. California Law Review.
- Judicial Council of California, Center for Judicial Education and Research. California Judges Benchguides: Benchguide 200, Custody and Visitation; Benchguide 201, Child and Spousal Support; Benchguide 202, Property Characterization; and Family Court Benchguide (December 2022).
- Judicial Council of California (2023). Fact Sheet: Programs for Self-Represented Litigants, December 2023.
- Lou, A., & Shin, D. (2026). Legal Reasoning Is Not Lawyering: Rethinking Legal Benchmarks for Pro Se Access to Justice. ICML 2026 AI4Law Workshop. arXiv:2606.23716.
- Magesh, V., Surani, F., Dahl, M., Suzgun, M., Manning, C. D., & Ho, D. E. (2025). Hallucination-Free? Assessing the Reliability of Leading AI Legal Research Tools. Journal of Empirical Legal Studies. arXiv:2405.20362.
- Majithia, N., Shinde, R., Chapman, Z., et al. (2026). The CitizenQuery Benchmark: A Novel Dataset and Evaluation Pipeline for Measuring LLM Performance in Citizen Query Tasks. arXiv:2602.04064.
- Martindale-Nolo Research. Divorce in California: How much does it cost?
- Pipitone, N., & Houir Alami, G. (2024). LegalBench-RAG: A Benchmark for Retrieval-Augmented Generation in the Legal Domain. arXiv:2408.10343.
- Srivastava, A., et al. (2023). Beyond the Imitation Game: Quantifying and extrapolating the capabilities of language models. Transactions on Machine Learning Research. arXiv:2206.04615.
- Yuan, Y., et al. (2025). From Hard Refusals to Safe-Completions: Toward Output-Centric Safety Training. OpenAI. arXiv:2508.09224.
