Model-driven document automation
Remember working with Word in the era before document automation?
Reading time: 6 minutes
Maybe we’re getting ahead of ourselves. Even today, lawyers often reuse existing Word documents for new clients and contracts. They open the old document, pore over each clause, and insert the information pertaining to the new client. It works, but it comes at a cost. Not just of time and myopia, but of risk, too. Anyone who has looked over a printed copy of a document they just drafted knows how easy it is to miss spelling errors when working in Word. Reusing a prior document runs the risk of carrying over old information to the new document; at best, it’s embarrassing, and at worst, it gets you a malpractice claim. When it comes to document drafting, clients are less and less willing to pay expensive lawyer hours.
So how to save time and mitigate risks? There’s always the temptation to copy and paste information from old documents and edit for bespoke content. But copying and pasting only exacerbates the problems of manual review, as well as creating errors in formatting inconsistencies.
What about Find and Replace? Size matters. Find and Replace works fine for editing repeated, simple information, such as names. But it’s impracticable once a document reaches a certain size; there’s no way an attorney can handle a complex acquisition that way. And Find and Replace cannot deal with complete clauses or number values.
One template fits all?
But Word has a template function! you might say. You can even create forms in Word by adding content controls to a template, including check boxes, text boxes, date pickers, and drop-down lists. Then you or whoever needs it can fill out the form and create the right content. What do I need fancy document assembly software for?

Simple document automation software is usually not much more sophisticated than Word-based solutions. In fact, they often work as extensions inside Word. One startup offers “plain text” document automation. Simply bracket the text you want to be replaced, and the program treats it as a variable. They serve as placeholders for the actual information you need. Another software solution creates “smart forms”–a Q&A asks the author simple questions, who enters the information into a table. Next, you add “fields” to the document where the information from the table is supposed to end up. It also offers more complex underlying logic, such as conditionals and calculations, as well as nested variables.
Deep down, however, these solutions are no different from the basic template method. None allow you to build the complex logic underlying most legal documents used in actual practice, where different parties may need their own customized versions with different clauses and values, sometimes even in several languages. The problem with Word is that it gives you no way to centralize all these complex operations.
Programming for Dummies: low-code and no-code modeling
What document automation gives you is relief from the tedious revision process, the mindless labor that goes into document drafting. Automation requires you to think thoroughly about how to capture the underlying logic of your document in a model. The key is to abstract the thinking process from the legal language and to leave the actual drafting to the end. Models then preserve the structure and logic that go into creating the document for later management, maintenance, sharing, or publishing (using a variety of styles and platforms).
Model-driven document automation
Berkeley Bridge has taken the benefits and best practices from model-driven development to document automation. It’s a what-you-see-is-what-you-get approach.
The advantages are manifold:
- Short time to market (quick results and feedback resulting from frequent iteration and close collaboration between IT, business stakeholders, and domain experts).
- Transparent and traceable development process through the graphic interface.
- Independence from individual developers, competencies, and software platforms (such as versions of Microsoft Office).
- Easy recycling and updating of component clauses and underlying logic.
- Extensive testing possibilities = better quality assurance.
- Centralized version control.
- Integration with other document management software and office suites.
- Less long-term compliance or malpractice risk.
- Document automation is only one of the possible uses of automated expertise: for instance, tools for calculations, risk assessment, content marketing, and internal business rules.
The bottom line is that you save time, mitigate risks and provide the opportunity to generate new revenue.
Separate style from substance
The trick? Making a strict distinction between style and structure, on the one hand, and content and logic on the other. Starting with a template on Microsoft Word to establish the basic structure and style of the documents you need to automate, you turn to our graphic development model for the underlying logic and content. Programming is not what Word was made for, after all.
Linking Word to the development environment (Berkeley Studio), we’ve built a broad platform for development, maintenance, and end users alike. Both decision trees (the logical backbone) and Word templates first appear as a web application. The application enables end users to assemble complex sets of documents. The final document can be published as a Word document, in a previously specified style, as well as multiple other formats.
Get on the same page in a graphic interface
Because the decision model is developed in a graphic environment, independent from any Word template, all stakeholders can understand and collaborate on development. Handing development over to another party proceeds smoothly as well, since the new developer can quickly assess the situation. The same holds for the testing phase; a domain expert who was not necessarily part of development can quickly get a good sense of the system’s workings. Each separate calculation, clause, or question can be housed in a separate ‘sub’ decision tree–this ensures easy navigation and oversight within complex projects.
Where do you go to find knowledge? Libraries.
To replace ctrl-c and ctrl-v as ways to reuse clauses, we came up with what we call libraries. You can compare them to a database of clauses. Except that libraries also store all logic, calculations, and questions that belong to a specific piece of text. Each of the possible appearances of that text (think: languages, plural/singular, question-sensitive details) are stored in one place. This means that the number of entries is significantly lower than a traditional database. It’s more accurate to compare a library to a complete ‘sub-document’ that any other document can call on.
What’s the magic word?
The chamber of commerce registration code. Say you’re drafting documents for an acquisition. Enter it into the model, and there it is: all the data you need not just from one company, but from all of its shareholders and other parties involved in a transaction, whether they’re corporations or natural persons. Libraries allow linkages between models and data providers (like a chamber of commerce) while preserving security.
Version management: first time right

Then there’s the infamous ctrl-z command: who has not frantically hit those buttons to recover an earlier version of a document? Those days may be in the past, but good version control does more than just a glorified ctrl-z button and is more than a way to keep track of which version is where in the maintenance process. Separating logic from content is the basis of a professional version control system that can also assist in managing larger groups of developers and executing processes such as branching, patching, and merging.
The Swiss Army knife of knowledge applications
Finally, developing documents in a dedicated environment allows the automated knowledge to be used in a variety of other ways. A document is only one of many possible outputs of that expertise. Other uses might include tools for calculations, risk assessment, content marketing, and internal business rules. You’ve automated expertise instead of creating a sophisticated Word template, saving you time, mitigating risks and generating new revenue.
After reading this blog, have you become curious what benefits model-driven document automation has in store for your organization? We are happy to help you find a suitable application for your organization.
Please contact us and one of our colleagues will contact you as soon as possible.