← Blog

latte-v2-lex: a Context Compressor for Legal AI

August 23, 2026

A lawyer working calmly inside a glowing Compresr shield while contract pages storm around it

The context window is a hard budget, and legal work spends it fast: a single contract runs tens of thousands of words, a matter is many contracts, and the teams using AI for legal and financial documents process them at staggering volume — a Harvey Vault upload or connector sync can drop millions of documents into the system, and Hebbia, serving finance and legal teams, pushes 250 billion tokens a month. Compression multiplies that budget: shrink every document 4× without losing the relevant info, and whatever window your model has now covers 4× more source material — more documents per call, more agent tool calls before the context overflow forces compaction.

The multiplier is worth more than it looks, because the actual window you command is smaller than what the model release claims. Chroma ran 18 models through deliberately simple long-input tasks and found that performance "grows increasingly unreliable as input length grows" (Context Rot); when the question doesn't share words with the evidence — the normal case in contract QA — 11 of 13 models drop below half of their short-context accuracy when reaching just 32K tokens (NoLiMa, ICML 2025). Anthropic recommended treating context as a finite resource "attention budget". Legal use-cases are among ones affected the most: on multi-document case files exceeding 100K tokens, frontier models omit key facts more often than they hallucinate, and get worse as cases get longer (Gavel). Teams building legal-document analysis report replacing whole-corpus prompting precisely because "long-context degradation scales with it" (Inject or Navigate?).

The catch sits in "without losing the relevant info." Legal text does not forgive careless cuts, and the harder you compress, the more it matters which parts survive

In this report, we present benchmarking results of our new legal data compression model, latte-v2-lex, and compare it against the state-of-the-art general-purpose latte-v2.

Setup

Two readers — gpt-5.4-mini and gemini-3.6-flash — answer the same questions over the same documents, with the context compressed at four rates (~1.3×, ~2×, ~3×, ~4×) by two checkpoints: the general-purpose latte-v2 and the legal specialist latte-v2-lex. The readers' temperature is fixed at 0. We consider three benches, each shown as a side-by-side pair of panels: ContractNLI (n=300, NDA entailment), CUAD (n=300, contract clause retrieval), FinanceBench (n=142, 10-K / 10-Q filings QA).

ContractNLI and CUAD measure the model's legal performance. We include FinanceBench to make sure the specialized chekpoint does not degrade outside of the domain of interest.

Each compressed run is compared against the same reader's uncompressed run with exact McNemar (per-sample comparison). Dots on the charts are accuracy; whiskers are the 95% CI on the paired difference. * marks p < 0.05.

Results

ContractNLI — NDA entailment, accuracy vs compression rate

latte-v2

n=300 · dot = accuracy, whiskers = 95% CI paired vs dashed anchor · * = p<0.05

65%70%75%80%85%90%gpt-5.4-minino compression 77.31.31×77.71.97×79.02.96×79.33.94×78.3gemini-3.6-flashno compression 81.71.31×82.31.97×81.02.96×80.73.94×80.7

latte-v2-lex

same construction

65%70%75%80%85%90%gpt-5.4-minino compression 77.31.32×76.32.0×76.32.99×77.33.97×74.7gemini-3.6-flashno compression 81.71.32×82.32.0×80.72.99×82.33.97×81.3
CUAD — clause retrieval, accuracy vs compression rate

latte-v2

n=300 · dot = accuracy, whiskers = 95% CI paired vs dashed anchor · * = p<0.05

60%65%70%75%80%85%gpt-5.4-minino compression 74.01.31×72.71.96×71.02.95×70.33.94×67.3*gemini-3.6-flashno compression 78.71.31×77.01.96×74.72.95×73.0*3.94×72.3*

latte-v2-lex

same construction

60%65%70%75%80%85%gpt-5.4-minino compression 74.01.32×73.31.99×72.32.99×72.73.99×69.7*gemini-3.6-flashno compression 78.71.32×76.01.99×76.32.99×78.73.99×77.3
FinanceBench — SEC-filing QA, accuracy vs compression rate

latte-v2

n=142 · dot = accuracy, whiskers = 95% CI paired vs dashed anchor · * = p<0.05

70%75%80%85%90%95%gpt-5.4-minino compression 79.61.32×79.61.98×80.32.99×81.73.99×81.0gemini-3.6-flashno compression 85.91.32×89.41.98×86.62.99×88.03.98×85.2

latte-v2-lex

same construction

70%75%80%85%90%95%gpt-5.4-minino compression 79.61.31×80.31.96×81.72.96×81.03.95×78.9gemini-3.6-flashno compression 85.91.31×88.71.96×84.52.96×85.93.94×83.1

On FinanceBench and ContractNLI, none of the compression runs show a significant difference with the uncompressed baselines, for either checkpoint or reader — up to ~4× compression, performance holds within noise. CUAD is different: v2 degrades with rate, dropping significantly below uncompressed from 3× under gemini (−5.7pp, p=.027) and at ~4× under both readers (mini −6.7pp, p<.001; gemini −6.3pp, p=.009). latte-v2-lex flattens that slope: its only significant drop is under mini at ~4× (−4.3pp, p=.047), and under gemini it holds within noise at every rate.

These results make sense. ContractNLI asks for a document-level entailment verdict, and FinanceBench answers depend on a handful of figures — in both, inputs are highly redundant, so a compressor can drop most of them without sacrificing the actual signal. CUAD is different: the reader has to pinpoint one specific clause, and every word of that clause the compressor deletes is fatal. That is exactly the regime where knowing which legal language matters starts to matter a lot. This reflects in the results: at up to 2×, compression is essentially free for both checkpoints — past that, clause-retrieval work is where generic compression is not enough — and where latte-v2-lex stretches the safe range further, enabling 3× or 4× compression depending on the reader. Remarkably, specialized latte-v2-lex maintains up to 4× lossless compression on the "out-of-distribution" FinanceBench.

Below is one contract end to end, exactly as latte-v2-lex compressed it — what a 4× cut keeps, and what it throws away.

Case study — one whole contract at 3.97דDoes the contract award liquidated damages for breach?”Struck-through words were deleted by the compressor; the reader saw only the rest. Highlighted is the lawyer-annotated ground truth — all 49 words of it survived.
Exhibit 10.1 Oceanic Time Warner Cable and Watchit Media Content and License Agreement Effective Dates: September 1, 2006, August 31, 2007 Watchit agrees to provide Oceanic Time Warner Cable the following content: - Watchit Gaming Guides - Lunchtime with Ira segments every week Watchit will provide the content on BetaSp format and reserves the right to modify the content to reflect sponsorship by an advertiser and advertisers. Oceanic Time Warner Cable agrees to not edit or modify the above content. Oceanic Time Warner Cable will use the content solely on channel 777, the Las Vegas channel. In the event that Oceanic Time Warner Cable removes the above content and or terminates this agreement prior to December 31, 2006, Oceanic Time Warner Cable agrees to pay a cancellation fee of Five Thousand Dollars ($5,000) per month multiplied by the number of months remain on the agreement. Watchit shall have the exclusive right to sell third party advertising as sponsors of their content and will have the right to brand the content under the Watchit brand and place a "bug" on the screen identifying the content with a Watchit trademark. Oceanic Time Warner Cable will include the following disclaimer on the Watchit Content: "The materials shown are for entertainment purposes only and does not provide any guarantees of winning or improving your odds of winning on this program. The rules of the games as shown may not apply to all properties and may change from time to time." Ocean Time Warner Cable will provide Watchit with data on viewership to both Channel 777 and specifically to the content provided by Watchit. Ocean Time Warner Cable will be able to not include any content that it deems inappropriate or distasteful. This agreement will be in effect until the end of 2006 and will be evaluated at that time. Both parties agree to discuss use of information gathered form this arrangement before using it in any kind of promotional or public message. Accepted by: Oceanic Time Warner Cable/Date Watchit Media/Date Source: WATCHIT MEDIA, INC., 8-K, 12/1/2006

latte-v2-lex is available upon request!

Everything above was measured on public benchmarks, but what matter most is the actual performance on your data. If you want to give your legal agents more reliable context at any given time - please reach out, and we will show how much additional context Compresr unlocks on your data!