All case studies

Legal tech

Quality assurance for an AI contract review

For Neo.Law, we built a benchmark against reference answers and a check that only delivers suggested wording that actually fixes the issue.

Client
Neo.Law
Industry
Legal tech
Period
2025–2026
Status
Completed

How it works

  1. A change to a prompt, model or retrieval
  2. sourcecast Benchmark against reference contracts
  3. sourcecast Every suggestion re-checked before delivery
  4. Only suggestions that pass reach users

The starting point

In legal work, an AI suggestion that reads well but is wrong is worse than no suggestion. Neo.Law's contract review depends on many settings, from how texts are split and retrieved to prompts, model tiers and the rule texts written by legal experts. Each of them changed regularly.

Without a measuring instrument it was hard to tell whether a change made results better or worse. Suggested wording needed a safety net too, because a suggestion that does not actually fix the issue erodes trust quickly. And the legal team wanted to see and change what the AI was asked without waiting for a deployment.

What we built

We built a separate benchmarking service. It sends a set of anonymised contracts with expected answers to any environment through the public API, like a real client, and scores every answer as correct or incorrect. Valid but unexpected answers can be added to the reference set with one click, so it grows with the product. Runs can be cloned to compare before and after.

Inside the engine, every generated suggestion is inserted into the text and checked again against the rules it was meant to fix. It is only delivered if it passes, otherwise it is generated again. Every prompt and response is logged, and prompts and models live in the database instead of the code.

Outcome

Neo.Law can check analysis quality across environments in a repeatable way. Suggestions that fail the check never reach users, and the team can see what the AI was asked and how it answered. Legal experts adjust prompts and models without a deployment, and the team decides which experiments to keep based on the results.

I have never been able to launch a digital product this fast. Malte and Fabian think along actively, solve problems with confidence and always keep the long-term roadmap in view. This foresight was very valuable for our project.
Daniel Schaffeld · Managing Director, WEYV Technology GmbH
Technical details
  • The benchmark is its own Django application that runs against development, staging or production via the API.
  • Runs are asynchronous with Celery and Celery Beat, expire after a set time and record remote errors instead of failing.
  • Each question can have several valid answers.
  • Prompt templates with Jinja live in the database, and models are configurable per organisation.
  • Latency and check results are tracked in Prometheus and Grafana.
work with us
get in touch