arXiv:2610.19999cs.CLOct 2026

Manuscript Offprint

arXiv:2610.19999

A Strong Harness Narrows the Model Gap: A Comparative Evaluation for Legislative Document-to-XML Conversion

Palvika Bansal, Rittika Jindal, Ruichong Wang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Legal-content reproduction requires matching the source exactly in section hierarchy, verbatim text, citations, and amendment spans; a dropped citation or mislabeled amendment carries into the products lawyers rely on. We report an industrial pipeline converting U.S. state legislation into strict, schema-constrained XML, and hypothesize that its accuracy comes from harness engineering, the deterministic tooling built around a model, more than the model itself. Our controlled ablation crosses three harnesses (zero-shot, a single tool-using agent, and a decomposed multi-agent pipeline) with three Claude models on 153 gold bills from two jurisdictions. The harness narrows the model gap: the weakest model in the full pipeline beats the strongest model alone (0.948 versus 0.806, paired bootstrap p less than 0.001). Because the two agentic harnesses share identical tools, their gap comes from orchestration: decomposition plus the persisted state and per-agent context it brings. Across four scored dimensions, the model spread at zero-shot (0.68 to 0.81) narrows to 0.95 at the full pipeline; the residual sits almost entirely in citation normalization, where the canonical identifier is retrieved from an external authority rather than generated from the weights, so a deterministic lookup tool supplies the exactness that a larger model does not.

1 Introduction

Most legal-NLP benchmarks reward understanding. Classification, retrieval, judgment prediction, and summarization all ask whether a system recovers the meaning or the right label, and a paraphrase that keeps the substance usually counts as correct. Reproduction is a different problem. Once a bill becomes a product that lawyers rely on, the output has to match the source down to the surface: sections and subsections in the right order, the bill text verbatim, citations in canonical form, the struck and inserted spans of an amendment placed where they belong, and the metadata that indexes it downstream. A dropped citation or a mislabeled amendment is an error that travels into the products lawyers put in front of clients, wherever in the document it happens to sit. What we are after is exact reproduction, not a high average.

A large enough model might be expected to clear this bar on its own. It does not. In the zero-shot condition (T1), even the strongest model we tested falls short: Opus reaches only 0.806 overall and barely resolves jurisdiction-specific citations (normalization 0.232). The shortfall is not obviously something a larger model fixes. A model has no way to know a jurisdiction’s normalized statutory identifiers from pre-training, since that mapping lives in an external authority rather than in the weights, and making the model larger does little to close the gap.

Our working hypothesis is that exactness here owes more to harness engineering, the orchestration, tools, and deterministic constraints assembled around the model, than to the model itself. To test it we cross three harnesses with three models ( §4§4): T1 runs the model zero-shot with no harness, T2 hands a single agent the full tool set and asks it to self-sequence the conversion, and T3 is the decomposed harness modeled on the production system, splitting that same tool set across specialized agents. Because T2 and T3 share tools exactly, whatever separates them should reflect orchestration—decomposition together with the persisted state and per-agent context it brings—not a wider action space.

We make four contributions. (1) A deployed harness: a playbook-driven, multi-agent pipeline that converts U.S. state legislation into schema-constrained publication XML and runs in production at a legal-content publisher ( §4§4). (2) A controlled model×harness ablation that holds tool

∗^{*} Equal contribution.

access constant between the single-agent (T2) and decomposed (T3) harnesses, which lets us attribute the gain to orchestration—decomposition, the persisted state it introduces, and per-agent context isolation—rather than to a larger action space (§6). (3) A dimension-resolved error analysis showing the residual error is not spread evenly but settles in the legally load-bearing dimensions, citations and amendments, and on the harder jurisdiction (§6). Handing the citation-lookup tool to a single agent at T2 does not appear to be enough on its own: only the stronger models invoke it well (normalization 0.88 and 0.59 for Sonnet and Opus against Haiku's 0.10), and the weakest recovers only once T3 gives it a dedicated citation agent (0.80, §6.3). (4) An evaluation built for legal-document transformation: we decompose correctness into four dimensions, pairing standard document measures (character-level normalized edit distance (NED) and tree-edit similarity) with two domain measures, exact amendment-span matching and a citation score split into localization and normalization. That split is what localizes the residual to citation normalization, which no model in our study resolves unaided (§5).

References (19)