Legal & ComplianceAI AutomationLeading law firm in Eastern Europe

28,800 hours and €3.5M a year saved with LLM-generated contracts, delivered in 4.5 months

A custom-trained LLM with a verification controller generates Word contracts from 10,000+ precedents via an intranet chatbot, making drafting 10x faster.

saved per year
28,800 h
saved per year
€3.5M
faster contract creation
10x
from R&D to production
4.5 months
Laptop on a desk displaying a web application with a colour-coded scheduling grid

Client story

Our client, a leading law firm in Eastern Europe, was looking for a technical partner with solid legal expertise, extensive experience with law firms, and stringent security and compliance standards. Erbis fit: our CTO had served as Chief Innovation Officer at a top law firm for three years and knew legal practice from the inside.

The firm recognized that manual processing of Microsoft Word documents was slow and error-prone and was holding back its financial growth. It needed an automated solution that would generate contracts at the push of a button, but the specifics still had to be worked out.

We ran an extensive R&D phase to test feasibility, confirmed we could deliver it, and started the partnership.

“Partnering with Erbis has built on trust and deep domain expertise. Their years of experience in engineering legal solutions have propelled us forward, ensuring we don’t get stuck in outdated practices. Looking to the future is crucial for our success, and Erbis has provided the innovative automation we needed to stay ahead.”

Managing Partner, leading Eastern European law firm

Challenge

Automating documents created in Microsoft Word is technically demanding because of the complexity of the underlying XML structure: small changes can shift the document layout. Preserving the exact layout and design was critical to the client, because the finished document is its main product. Lawyers also had to be able to edit documents manually after generation.

To make field mapping accurate, we had to catalogue and structure data from over 10,000 existing contracts and identify every key component. Doing that by hand would have taken thousands of hours, so automation was essential.

We trained a large language model (LLM) specifically on this firm’s contracts to raise efficiency and accuracy, eliminate hallucinations and protect the integrity of contract data.

We also built a solution controller that double-checks the AI’s output, verifying that all extracted data is accurate and consistent with the original contracts. This two-layer verification is what makes the system reliable enough for legal work.

The client’s request, in its own words:

“We needed a solution to automate over 10,000 Microsoft Word contracts without compromising layout integrity.”

Managing Partner, leading Eastern European law firm

Solution

We started with an R&D phase in which we collected, structured and catalogued all of the client’s documents. We then trained an LLM, building on existing models, so the AI could analyse text and identify the key aspects of each document.

Next we built a web and mobile interface for the system, accessible only from the firm’s intranet. Lawyers generate ready-made contracts in the corporate design and Microsoft Word format by interacting with an AI chatbot.

Security was built in from the start. Not even attorneys have direct access to the entire contract database, which limits the risk of data leakage and lets paralegals and assistants create documents safely.

Team: Legal Engineer, CTO, Full-stack Engineer, AI Engineer.

Architecture and tech stack

Apache Airflow pipelines ingest and structure the contract corpus into PostgreSQL. The custom-trained LLM and the verification controller run in Python. Documents are stored on Ceph, and lawyers work through a React interface that is reachable only inside the firm’s intranet.

  • Python
  • Apache Airflow
  • PostgreSQL
  • React
  • Ceph
  • Custom-trained LLM with a verification controller

Results

In 4.5 months we transformed the client’s document workflow, saving 28,800 hours and €3.5 million a year.

We began by building a comprehensive document database with every key field populated. That foundation made contract creation ten times faster and drastically reduced manual errors.

The automation also lets non-lawyers finalize agreements, which cuts costs further.

The client has rolled the solution out across several practices, including M&A, corporate and commercial law, intellectual property, and tax and customs, with substantial efficiency gains and cost reductions in each.

What made it work

Erbis’s takeaways from this engagement:

  • Structure the corpus before training the model. Cataloguing 10,000+ contracts into a field-level database is what made both the LLM and the generated documents accurate.
  • Pair the LLM with a deterministic controller. A second layer that checks extracted data against the source contracts is how hallucinations were kept out of legal documents.
  • Keep the output in the client’s native format. Generating real Word files that lawyers can still edit by hand removed the biggest barrier to adoption.
  • Put a legal engineer on the team. Domain expertise inside the delivery team, not just on the client side, shortened R&D and kept the tool aligned with how practices actually draft.
“The document automation system developed by Erbis has exceeded our expectations. It integrates seamlessly with our operations, maintains high standards, and provides robust security. Their expertise and dedication have been invaluable to our firm's growth.”
Managing PartnerLeading Eastern European law firm
Related

More from Legal & Compliance

Have a similar problem?

Tell us about the operation, the systems it runs on and the outcome you need. We will say directly whether custom AI is the right move.

AWS partner · Databricks partner · ISO 27001 · You own the code from day one