Extracting party information from legal contracts

Any legal AI application involving contracts must identify the parties across a matter’s documents without confusing them with advisers, signatories acting for someone else, or companies merely mentioned. We tested how much accuracy different extraction methods could deliver, and at what cost.

The experiments led from finding names, through checking and merging them, to choosing a model and refining its instructions. We compared three complete implementations on 30 prepared matters, then ran a local decision model on the same benchmark.

Haiku for all three tasks produced the highest overall F1, 94.4%, at an estimated $0.065 per matter. Mammoth with Haiku scored 91.0% at $0.031 per matter. Local GLiDE-9B with Haiku scored 90.5%, with higher F1 on Normal matters and lower F1 on Hard matters.1

1. One completed run per implementation. Cost estimates cover checking, listing and merging at the experiment’s saved API rates. The GLiDE-9B row shows recorded API charges. Blue marks the best scores and the lowest API-rate estimate. These are observed results, not a guarantee of the same ranking on new matters. F1 is the harmonic mean of precision and recall. It summarizes both in one score and falls when either is low.

ConfigurationPrecisionRecallF1Cost / matterDuplicates
Mammoth + Haiku91.0%91.0%91.0%$0.0311
Luna + Terra94.0%91.0%92.5%$0.2241
Haiku for all three tasks97.3%91.7%94.4%$0.0652
Local GLiDE-9B + Haiku92.6%88.5%90.5%$0 in API charges0

Precision measures how many returned entries are correct; recall measures how many reference parties were found. Duplicate entries count against precision. The benchmark has 23 routine “Normal” matters and seven “Hard” matters with unusual or complex structures, including five synthetic matters.

The system has three jobs beyond finding candidate names

Pattern rules locate candidate names in document text. A checker rejects names that are not parties, a listing model finds additional parties in selected passages, and a merger combines entries that refer to the same party.2

2. These roles describe the complete implementations summarized above. The component experiments below ask separate questions, holding the other stages fixed where stated. Their scores are not a single cumulative ranking.

ImplementationCheckingListingMerging
Mammoth + HaikuMammoth-1Haiku 5.5Mammoth-1
Luna + TerraGPT-6 LunaGPT-6.1 TerraGPT-6 Luna
Haiku for all three tasksHaiku 5.5Haiku 5.5Haiku 5.5
Local GLiDE-9B + HaikuGLiDE-9BHaiku 5.5GLiDE-9B

Finding names alone produced too much cleanup work

The local name-tagging models found many reference parties, but returned far more names that were not parties. Pattern rules were more selective, yet missed over a third of the parties in Hard matters. Neither approach was sufficient on its own.3

3. One output per method on 30 matters. Contractner uses threshold 0.8. Trimming DeBERTa’s names was developed after examining its errors, not validated on unseen matters. All methods here ran locally with $0 in model API charges; laptop computation is not priced.

ConfigurationNormal F1Hard precisionHard recallHard F1
Pattern rules66.1%71.4%63.8%67.4%
Contractner33.6%7.5%97.9%13.9%
DeBERTa23.2%5.6%84.0%10.6%
DeBERTa, trimmed names34.5%14.3%77.7%24.2%

Contractner returned 1,500 entries, of which 1,194 were unmatched names and 159 were duplicates. This made the next question practical. Could small decision models filter candidate names and combine aliases before a larger model did the harder reading?

Decision models differ in how they filter and merge names

GLiDE-9B scored 69.2% Normal F1 and 71.9% Hard F1. Mammoth-1 scored 70.5% and 74.7%, respectively.4

4. Two checker runs per model on the same 30 original matters. Each run judged 173 rule-generated candidates with check.v1 and a 0.5 cutoff. The checker scores cover the rules and filter. Historical costs are API-rate estimates per matter. GLiDE-9B ran locally, with $0 in per-call API charges.

CheckerNormal F1Hard precisionHard recallHard F1Cost / matter
Jev70.5%90.3%59.6%71.8%$0.00012
Mammoth-170.5%92.2%62.8%74.7%$0.00019
Elephant-169.2%81.7%61.7%70.3%$0.00007
GLiDE-9B69.2%82.2%63.8%71.9%$0 in API charges

Fixed-list merge test

Each merger started with the same two saved Haiku 5.5 result sets. Each set covered 30 matters and contained 12 duplicate entries.5

5. Each model merged each saved result set once with same.v1 at a 0.8 cutoff. For F1, the range spans the two result sets. Counts separated by a slash give the first and second sets. A harmful merge joins distinct reference parties. GLiDE-9B completed 1,795 local pair decisions across the two scored runs and recorded $0 in API charges.

MergerDuplicates leftHarmful mergesNormal F1Hard F1
Jev3093.7%91.8% (90.6%–93.0%)
Mammoth-11094.4% (94.4%–94.5%)92.3% (91.1%–93.5%)
Elephant-15093.0% (92.9%–93.0%)91.8% (90.6%–93.0%)
GLiDE-9B2094.4% (94.4%–94.5%)92.3% (91.1%–93.5%)

The complete GLiDE-9B run also used Haiku for listing. Its checks, merge pairs and final party lists reflect that full pipeline.

Haiku offered a lower-cost alternative to Opus for finding additional parties

The broad model comparison kept Jev’s saved checking results, Mammoth merging and the original listing instructions fixed. Seven listing models scored similarly on Normal matters; their results diverged more on Hard matters.6

6. Two runs per model, each covering 23 Normal and seven Hard matters. Large figures are means; small figures are run ranges, not confidence intervals. Cost covers listing only, excluding checks and merging. Claude and GPT models used subscription tools or Gateway adapters, so access methods also differed. Subscription usage is priced as estimated API use.

Normal F1Normal F185%90%95%100%Opus 5.594.9%Haiku 5.594.4%Sonnet 5.595.2%GPT-5.6 Terra93.2%particle-193.7%GPT-5.6 Luna94.1%GPT-6 Luna93.3%
F1 scale runs from 85% to 100%. Dots show two-run means and lines show the run ranges across 23 Normal matters.
Hard F1Hard F185%90%95%100%Opus 5.594.4%Haiku 5.592.3%Sonnet 5.589.1%GPT-5.6 Terra87.9%particle-188.3%GPT-5.6 Luna85.9%GPT-6 Luna86.4%
F1 scale runs from 85% to 100%. Dots show two-run means and lines show the run ranges across seven Hard matters.

Normal matters

ConfigurationPrecisionRecallF1Cost / matterDuplicates
Opus 5.593.0%92.3–93.896.8%94.9%94.5–95.2$0.741$0.140–$1.3430
Haiku 5.593.0%92.3–93.796.0%95.2–96.894.4%94.4–94.5$0.021$0.006–$0.0351
Sonnet 5.595.2%95.2%95.2%$0.350$0.052–$0.6480
GPT-5.6 Terra92.2%90.8–93.594.4%93.5–95.293.2%92.9–93.5$0.083$0.083–$0.08410–2
particle-192.2%95.2%93.7%$0.0410
GPT-5.6 Luna92.2%92.2–92.396.0%95.2–96.894.1%93.7–94.5$0.0101
GPT-6 Luna90.8%90.8–90.996.0%95.2–96.893.3%92.9–93.7$0.008$0.003–$0.0132

Hard matters

ConfigurationPrecisionRecallF1Cost / matterDuplicates
Opus 5.594.7%93.6–95.794.1%93.6–94.794.4%93.6–95.2$2.636$0.529–$4.7420
Haiku 5.595.5%95.3–95.689.4%87.2–91.592.3%91.1–93.5$0.077$0.025–$0.1280
Sonnet 5.594.1%94.0–94.284.6%83.0–86.289.1%88.1–90.0$1.339$0.296–$2.3810
GPT-5.6 Terra85.2%82.7–87.691.0%90.4–91.587.9%86.9–89.0$0.381$0.329–$0.4330
particle-184.9%82.9–86.992.0%91.5–92.688.3%87.4–89.1$0.162$0.162–$0.1630
GPT-5.6 Luna82.8%82.4–83.289.4%85.9%85.7–86.2$0.047$0.040–$0.0540
GPT-6 Luna86.6%86.3–87.086.2%85.1–87.286.4%86.0–86.8$0.028$0.010–$0.0470

Opus led Hard F1 in this comparison. A narrower Haiku–Opus comparison using Mammoth for both checking and merging confirmed the tradeoff. Opus improved Hard F1 from 94.0% to 96.2%, recovering an average 3.5 additional parties across all seven Hard matters per run.7

7. Two runs per model with the original instructions and Mammoth checking and merging. Cost covers listing only. Opus’s roughly 34× cost reflects these runs and their cache effects, not a universal price ratio.

ConfigurationNormal F1Hard precisionHard recallHard F1Hard cost / matter
Haiku 5.594.4%96.6%91.5%94.0%$0.081$0.040–$0.121
Opus 5.594.1%93.7–94.597.3%96.7–97.895.2%94.7–95.796.2%95.7–96.8$2.773$2.435–$3.110

Haiku offered an accuracy–cost compromise. The later GLiDE-9B run kept Haiku for listing and used the Claude subscription. The next experiment asked whether clearer instructions could improve its treatment of difficult party relationships.8

8. A separate particle-1 test read every document in full. It reduced Normal and Hard F1 and increased cost compared with selected passages. Because it also changed the candidate pathway, it is not included in the model ranking.

Stricter instructions improved precision by giving up recall

With Haiku listing and Mammoth checking and merging fixed, we revised the listing instructions. Broader guidance separated inclusion and exclusion rules and clarified affiliates, placeholders and engagement letters. Stricter exclusions then added rules for counsel, agents and parties to agreements only described in a document.9

9. Two runs per row, each covering all 30 matters. Means and run ranges are shown. Cost covers listing only, averaged across all matters. The original instructions were repeated alongside prompt development; the initial pair remains separate to show the observed variation.

ConfigurationNormal F1Hard precisionHard recallHard F1Cost / matter
Original, initial test94.4%96.6%91.5%94.0%$0.036$0.023–$0.048
Original, repeated95.6%95.2–96.092.0%88.7–95.489.9%88.3–91.590.9%90.1–91.7$0.034$0.011–$0.057
Broader guidance93.7%92.9–94.584.3%83.8–84.894.1%93.6–94.788.9%88.4–89.4$0.036$0.013–$0.059
Stricter exclusions95.2%94.5–96.097.6%97.6–97.787.2%85.1–89.492.1%90.9–93.3$0.034$0.011–$0.057

Broader guidance raised Hard recall to 94.1% but lowered precision to 84.3%. Stricter exclusions reversed that tradeoff, reaching 97.6% precision while recall fell to 87.2%. Its 92.1% Hard F1 beat the repeated original result, but not the initial original result of 94.0%.

The revisions changed which errors Haiku made; they did not establish an unqualified accuracy improvement. The stricter version was written after inspecting the broader version’s errors on these same matters, so this was prompt development rather than validation on a new test set.10

10. Original-wording Hard F1 ranged from 90.1% to 94.0% across four runs. The initial pair was completed by 1 November 2026; the repeat and revisions were tested on 2 November. This variation limits what a small difference between prompt means can establish.

The GLiDE-9B run used the same stricter Haiku listing instructions as the complete Mammoth-1 run.

All-Haiku led on F1 and GLiDE-9B recorded $0 in API charges

Four complete implementations used the same prepared inputs, answer keys and task prompts, including the stricter listing instructions. Haiku for all three tasks had the highest F1 in both groups. GLiDE-9B with Haiku reached 95.1% on Normal matters, one tenth of a point below all-Haiku.11

11. One completed run per implementation. Normal has 23 matters with a median of two reference parties; Hard has seven with a median of 12. Costs cover all model stages. The GLiDE-9B row shows recorded API charges per matter. The other rows show API-rate estimates averaged within each group. Duplicates are group totals.

Normal matters

ConfigurationPrecisionRecallF1Cost / matterDuplicates
Mammoth + Haiku93.3%91.8%92.6%$0.0191
Luna + Terra93.5%93.5%93.5%$0.1141
Haiku for all three tasks95.2%95.2%95.2%$0.0422
GLiDE-9B + Haiku96.7%93.5%95.1%$0 in API charges0

Hard matters

ConfigurationPrecisionRecallF1Cost / matterDuplicates
Mammoth + Haiku89.5%90.4%89.9%$0.0700
Luna + Terra94.4%89.4%91.8%$0.5860
Haiku for all three tasks98.8%89.4%93.9%$0.1400
GLiDE-9B + Haiku89.9%85.1%87.4%$0 in API charges0
Overall F1Overall F190%92%94%96%Mammoth + Haiku91.0%Luna + Terra92.5%Haiku for all three tasks94.4%GLiDE-9B + Haiku90.5%
F1 scale runs from 90% to 96%. Each dot represents one completed 30-matter run.
Cost per matterCost per matter$0.02$0.05$0.10$0.20$0.30Mammoth + Haiku$0.031Luna + Terra$0.224Haiku for all three tasks$0.065GLiDE-9B + Haiku$0 in API charges
The cost scale is logarithmic, from $0.02 to $0.30. Dots show estimated API cost per matter. The GLiDE-9B annotation shows the recorded API charge.

Across all 30 matters, using Haiku for every task gained 3.4 F1 percentage points over Mammoth with Haiku for about 3.4 cents more per matter. Luna with Terra improved on Mammoth with Haiku’s F1, but was both more expensive and less accurate than all-Haiku in this comparison.12

12. All four completed 30 of 30 matters with zero failed calls recorded in the final outputs. That does not count every earlier attempt or internal retry. Median observed times were 28.1 seconds for Mammoth + Haiku, 47.5 for Luna + Terra, 53.8 for all-Haiku and 46.0 for GLiDE-9B + Haiku. The earlier runs overlapped and used batch workers. The GLiDE-9B run processed one matter at a time.

This comparison evaluates complete implementations. The subscription adapters requested yes, no or uncertain judgments; the Gateway adapter used probability cutoffs. The runner also checked candidates afresh and selected plausible merge pairs, unlike the earlier staged tests that reused saved checks. The scores therefore cannot be used to claim that one isolated model change caused the difference.13

13. Mammoth + Haiku and Luna + Terra completed on 12 November 2026, all-Haiku on 13 November, and GLiDE-9B + Haiku on 18 November. All 61 prepared-input and reference files match across the four implementations. Exact input identity for every earlier invocation is not established; the earlier component results remain separate.

Local GLiDE-9B improved routine F1 and lost recall on hard matters

On 18 November 2026, we ran Fastino GLiDE-9B locally for candidate checks and same-party decisions. We used Haiku 5.5 for listing through Claude CLI. The saved Mammoth run used Haiku 5.5 through Vercel AI Gateway.

GLiDE-9B with Haiku scored 90.5% overall F1, 0.5 percentage points below Mammoth with Haiku. Normal F1 rose 2.5 points, while Hard F1 fell 2.5 points as Hard recall fell from 90.4% to 85.1%. The local run returned zero duplicates and made two harmful merges. Mammoth returned one duplicate and made one harmful merge.14

14. One completed run per configuration on the same 30 matters. All 61 prepared-input and reference files matched the saved run. Both runs used the same rules, scorer, prompts (check.v1, listing.v3 and same.v1), and cutoffs (0.5 for checks and 0.8 for merges). A harmful merge joins distinct reference parties.

MattersConfigurationPrecisionRecallF1DuplicatesHarmful merges
Overall (30)Mammoth + Haiku91.0%91.0%91.0%11
Overall (30)Local GLiDE-9B + Haiku92.6%88.5%90.5%02
Normal (23)Mammoth + Haiku93.3%91.8%92.6%10
Normal (23)Local GLiDE-9B + Haiku96.7%93.5%95.1%01
Hard (7)Mammoth + Haiku89.5%90.4%89.9%01
Hard (7)Local GLiDE-9B + Haiku89.9%85.1%87.4%01

The local run took 52 min 0 s, with a median of 46.0 seconds per matter and zero failures across 522 calls. The runner spent 4 min 6 s on 169 GLiDE-9B checks, 4 min 34 s on 121 GLiDE-9B merge decisions and 43 min 18 s on 232 Haiku listing calls.15

15. These timings describe the local run. GLiDE-9B used Fastino’s native System One decision head on an Apple M4 Max with Metal (MPS), PyTorch 2.14.0, Transformers 5.17.0 and unquantized BF16 weights at revision ab54df5acba0eebf7df45560ffdaacd64e32df3b. The run recorded $0 in per-call API charges across all 30 matters. GLiDE-9B ran locally and Haiku used an existing Claude subscription. Subscription fees and Mac operating costs are separate.

GLiDE-9B is the decision model we intend to use for checking and merging in an all-local pipeline. The benchmark still uses hosted Haiku 5.5 to find parties the rules miss. An all-local pipeline needs a local escalation model for that step.

All-Haiku led on accuracy

For the configurations tested, all-Haiku is the strongest accuracy choice and Mammoth with Haiku had the lowest API-equivalent cost among the original three runs. Opus’s additional recovery on Hard matters came at much higher cost in the component tests. The evidence supports those bounded choices, not a universal model winner.

The experiments also explain what still needs human review. Name detection over-includes; filtering cannot recover missing names; stricter instructions can exclude real parties; merging can confuse related entities. All four complete implementations merged a fund with its manager in the selected antitrust example. In the fund-formation example, GLiDE-9B with Haiku and all-Haiku each found 14 of 19 reference parties. They returned 17 and 14 names, respectively.

Before treating the ranking as a production conclusion, the next evaluation should freeze the implementation and prompts and test unseen matters with repeated runs. That would test whether the observed accuracy–cost tradeoff survives beyond the examples used to develop it.

How to read the evidence

The 30 matters contain 1,259 document records. Reference lists were drafted with a model and reviewed before evaluation. They contain 156 entries, including 25 marked uncertain and four optional. Uncertain entries remain in the primary scores; optional parties enter recall’s denominator only when found. Name and alias matching normalizes punctuation, case and company suffixes. Scores pool parties within each group, penalize duplicates and do not grade every legal role or evidence quotation.

All figures come from completed saved outputs rescored with the same duplicate-sensitive rule. Repeated results show the mean and the minimum–maximum range, not statistical confidence. Prompt revisions and DeBERTa trimming used this benchmark during development. The five synthetic Hard matters and two selected failure examples are not estimates of production frequency.

What the costs include

Historical cost estimates use recorded usage and the experiment’s saved API rates, including retained cache effects. The earlier subscription runs use API-equivalent estimates. The local GLiDE-9B run reports recorded API charges. Component tables price only the stage being compared; complete-implementation tables include checking, listing and merging. Missing merger usage prevents a full cost estimate for the earlier staged tests.

The all-Haiku calculation includes cache and long-context adjustments and totals $1.949 across 30 matters; raw CLI estimates totaled $1.875. The report consistently uses the calculated amount. Historical listing estimates cannot be fully repriced from aggregate usage because some cache detail was not retained. These are cost comparisons under the saved assumptions, not current price quotes or total experiment spending, which also includes preliminary tests, failures and retries.