From Data Room to Report: End-to-End AI Support for M&A Legal Due Diligence

Johannes R. Hübers, Daniel Uedelhoven, Manuela Bergau, Markus Beyer, Lars Weber, Tobias Riethmüller, Arkadiusz Rzepka, Tobias Schuh, Maximilian Glaß, Omer Faruk Aydin, Jens Henneberg, Thiago Bell Felix de Oliveira, Lars Hillebrand, Rafet SifaarXiv 2026

TL;DR

When one company buys another, lawyers have to sift through chaotic digital dumps of thousands of files to uncover hidden legal risks—a grueling process called due diligence. This paper introduces LEXI, an end-to-end AI workflow that sorts these messy documents, extracts key facts with exact page citations, and drafts structured reports. Crucially, it puts lawyers at strict "review gates" between steps, ensuring AI does the heavy lifting while humans retain total control over legal judgment.

What Problem Does This Paper Address?

Imagine someone hands you a flash drive with thousands of unlabeled PDFs—employment contracts, tax filings, real estate deeds, corporate charters—and gives you two weeks to figure out if buying their company is a good idea. Welcome to Mergers & Acquisitions (M&A) legal due diligence.

In these transactions, sellers upload documents into a Virtual Data Room (VDR). Because seller-provided folder structures rarely match how lawyers actually assess risk, legal teams spend massive amounts of time just opening files to figure out what they are, which subsidiary they belong to, and which specialist lawyer should read them.

While NLP researchers have studied how to extract clauses from single English contracts, real-world due diligence involves wildly heterogeneous, multi-language data rooms. Lawyers need a system that handles the entire pipeline—from messy file dump to polished client report—without hallucinating facts or overriding human legal judgment.

Methods

Developed alongside a corporate law firm, LEXI (Legal Extraction and Intelligence) connects zero-shot Large Language Models (LLMs) across three stages, separated by mandatory human "review gates":

  1. Ingestion & Zero-Shot Classification: Documents undergo OCR and layout analysis to preserve text coordinates (paragraphs, tables, page numbers). An LLM then classifies each file into a practitioner-defined taxonomy (72 document types across 14 legal areas) and tags which target corporate entities it involves. Because it operates zero-shot using human-written descriptions, lawyers can tweak the categories per deal without retraining a model.
Figure 2: Schematic wireframe of the intended document classification interface. The illustration shows the due diligence structure alongside predicted document types, review status and lawyer assignments; the production LEXI interface is still under iteration.
  1. Chunked Extraction & Verification: Once a lawyer confirms a document's type, LEXI triggers a tailored checklist of questions ("extractables," like Governing Law or Notice Period). To prevent "context rot" on long contracts, documents are split into overlapping multi-page windows processed in parallel, followed by a reconciliation LLM call to merge answers. Every answer requires structured output: a derivation label (exact, inferred, or not_found to discourage guessing) and verbatim source snippets. Crucially, LEXI programmatically verifies these snippets against the parsed text to highlight the exact lines on the original PDF.
Figure 3: Schematic wireframe of the intended extraction review interface. The illustration shows source-document passages alongside extracted data points, provenance and lawyer review controls; the production LEXI interface is still under iteration.
  1. Grounded Report Preparation: Only lawyer-verified extractions move forward. Lawyers add risk ratings and recommendations, and an LLM compiles these reviewed records into customizable Word report tables—strictly prohibited by prompt constraints from altering the lawyer's assessments.

Datasets

Because corporate M&A documents are fiercely confidential, there is no training dataset—the entire pipeline runs zero-shot. For evaluation, the authors used two real-world, German-language M&A Virtual Data Rooms:

  • Data Room 1: 76 documents annotated by experts with ranked ground-truth document types.
  • Data Room 2: 73 similarly annotated documents.
  • Extraction subset: 41 German-language document–question pairs reviewed by a legal expert.

Key Insights and Ideas

  • Workflow Architecture Over Raw Autonomy: AI hallucinations are unacceptable in law. By chaining structured LLM outputs through human review gates, unverified AI text can never silently slip into a final client report.
  • Programmatic Grounding: High answer accuracy doesn't guarantee a model isn't making up citations. Mapping verbatim LLM quotes back to OCR coordinates visually separates verified facts (highlighted on the page) from unverified model claims.
  • "Thinking" Boosts Confidence and Routing: Enabling reasoning ("thinking" tokens) didn't just make classification more accurate; it also shrank the number of candidate labels the models returned per document, showing higher confidence and reducing human review clutter.

Key Results

The authors tested GPT-5.4, GPT-5.4 mini, and GPT-5.4 nano on document classification, toggling medium-effort "thinking" on and off:

  • Top-Tier Routing: With thinking enabled, GPT-5.4 achieved a primary-label Hit@1 of 98.1% on Data Room 1 and 95.2% on Data Room 2 (up from 84.2% and 90.4% without thinking).
  • Small Models Punch Above Their Weight: Turning thinking on lifted the smallest model (nano) from 66.5% to 84.2% Hit@1 in Data Room 1, and from 72.6% to 89.8% in Data Room 2—matching or beating larger non-thinking models.
  • Fewer Guesses: Across 5 of 6 comparisons, enabling thinking reduced the average number of predicted labels per document (e.g., mini dropped from 1.82 to 1.21 labels in Data Room 1).
  • Preliminary Extraction: On the small 41-prediction sample, GPT-5.4 and GPT-5.4 mini achieved a 100% match (41/41) with human expert answers.

Limitations and Future Work

LEXI is explicitly presented as a work-in-progress. The classification test sets are small (~150 documents total), the 41-item extraction check didn't formally grade snippet highlights, and the report-drafting module hasn't been formally evaluated yet.

Next, the authors plan to run full workflow user studies with practicing lawyers to measure time saved and editing effort. Technically, they aim to move beyond single-document extraction into cross-document reasoning—such as reconstructing "chains of title" (tracking who owns what across historical transfer deeds), matching contract amendments to base agreements, and catching contradictions across the entire data room.

Summary updated

Abstract

Legal due diligence in mergers and acquisitions requires lawyers to organize heterogeneous virtual data room documents, extract transaction-relevant information and consolidate reviewed findings into a due diligence report. We present LEXI (Legal Extraction and Intelligence), a work-in-progress system that demonstrates how large language models can support this process from document ingestion to report preparation. LEXI classifies documents under a configurable due diligence taxonomy, assigns relevant target entities, extracts predefined information with supporting passages and page-level provenance and prepares report content from reviewed findings. Structured outputs connect these stages and allow model-generated results to be passed through the workflow in a controlled form. Lawyers review and correct classifications and extractions and retain responsibility for legal assessments, recommendations, risk ratings and final report wording. Initial evaluations of the classification and extraction components provide preliminary evidence that the approach is feasible. LEXI illustrates how AI can be integrated across the legal due diligence workflow while preserving lawyer control over substantive legal judgment.
BibTeX
@misc{hubers2026from,
  author = {Johannes R. Hübers and Daniel Uedelhoven and Manuela Bergau and Markus Beyer and Lars Weber and Tobias Riethmüller and Arkadiusz Rzepka and Tobias Schuh and Maximilian Glaß and Omer Faruk Aydin and Jens Henneberg and Thiago Bell Felix de Oliveira and Lars Hillebrand and Rafet Sifa},
  title = {{From Data Room to Report: End-to-End AI Support for M\&A Legal Due Diligence}},
  year = {2026},
  eprint = {2611.34120},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.34120},
}
Figure