Get the daily emailDaily email
  1. Home
  2. Guides
  3. This story

Building a legal conflict detector with encoder models and NLI only

A legal engineer at Isaacus built an open-source pipeline that finds deviations and gaps between pairs of legal documents using encoder models and natural language inference instead of generative LLMs. Documents are parsed into clause trees, embedded…

Published Read the original
Building a legal conflict detector with encoder models and NLI only

Why it matters

Shows non-generative models can beat LLM calls on cost and recall for quadratic pairwise comparison tasks.

What happened

1 min read

A legal engineer at Isaacus built an open-source pipeline that finds deviations and gaps between pairs of legal documents using encoder models and natural language inference instead of generative LLMs. Documents are parsed into clause trees, embedded, filtered and compared pairwise; the longest sampled pairs ran in under 20 seconds.

inscraper analysis

Our analysis

The cost argument against LLM-per-pair comparison is sound, but no quantitative accuracy evaluation is given, and the author's employer sells the legal encoder models used. Still a useful architecture pattern for teams building contract review.

More in Guides