Skip to main content

M&A Due Diligence LLM Agent

[Write-up coming soon]


This project is a locally-hosted LLM agent designed to assist with M&A due diligence review. The system identifies and extracts complex contract provisions—such as change-of-control clauses, indemnity caps, and material adverse change definitions—while maintaining attorney-client privilege by running entirely on-device.


Architecture & Stack:

• Model: qwen2.5:7b via Ollama (open-source, locally hosted)

• Retrieval: Corrective Retrieval Augmented Generation (CRAG) workflow to reduce hallucination risks

• Chunking: Legal-aware document segmentation with metadata tagging

• Vector Store: Chroma DB, indexed by jurisdiction, deal structure, and clause type

• Pipeline: Custom preprocessing for legal PDFs with section-aware parsing


The agent is currently in training/evaluation phase. A live demo is available at the subdomain below.


→ Try the demo: demo.nickbattaglia.com