Contract as data
A contract is made of fields inserted into a template: parties, codes, amounts, terms, conditions. Here we take three contracts apart into fields, check them in three ways and turn clauses into dates. Contracts are approved not only by lawyers but also by buyers, accountants and project managers, and an invoice, an acceptance certificate or a specification is made of fields in a template in the same way.
- 1A contract is fields
- 2The machine computes derived fields
- 3Who catches the error
- 4From clause to date
- 5Materials for the session
- 6Blocks of work
A contract is fields
A four-page supply contract holds a few dozen values: the names of the parties, their EDRPOU company codes, bank accounts, prices, quantities, terms. The rest of the text is the same in every contract made from the same template. So a contract can be described as a set of fields plus the template the fields are inserted into.
Fields come in four kinds. A variable field is entered for each deal. A derived field is computed from other fields. Fixed text is always the same. An option is a choice between ready versions of a clause.
Sort the values into kinds
Ten fragments from one contract. Choose the kind of field for each, then press “Check”.
More: template, clause library, playbook
Once a contract is broken into fields, each kind of field has its own place to live. Fixed clauses live in a versioned clause library: a designated person, usually a lawyer, changes them, and every change has a date. Options are ready versions of one clause with a rule for choosing: when to go to the commercial court, when to arbitration. Such a set of rules is called a playbook. Variable fields are filled in like a questionnaire.
A new contract is then a filled-in questionnaire plus the chosen options, and the template assembles the text. A person checks the field values and the choice of options instead of rereading the whole text every time.
The machine computes derived fields
The line sum, the total excluding VAT, the VAT, the grand total, the prepayment and every amount in words are computed from the quantity, the price and the percentage. When the template computes them, they never disagree with each other; a wrong price or percentage at the input is still repeated in all of them. When a person types them by hand, one change to the price leaves the old value in three other places, and the page looks just as neat.
Change the quantity or the price in both modes and watch the check under the contract.
Contract template
More: where to compute derived fields
There is one rule: every number is entered once, and everything else refers to it. This can be done in Word (fields and formulas in a table), in a spreadsheet the contract is assembled from, or in a document generator.
Amounts in words are generated from the number by a separate function, not typed. If the contract came from the other side, check the derived fields in reverse: recompute the lines, the totals, the VAT and the prepayment, and compare the figures with the words.
Who catches the error
Errors in a contract are caught by three kinds of check, and each catches its own. An algorithm checks whatever has a formula: the check digit of an EDRPOU code, the checksum of an IBAN, the arithmetic of a table, figures against words, whether a date exists. A register answers whether the company exists and whether its name and address match. A person compares parts of the contract with each other and checks the logic of the terms.
A language model helps at every step if you tell it what exactly to compare. To the request “check the contract” it answers confidently, regardless of what it actually checked. The look of a document says nothing about its content, so the check is the same for a scan, a Word file and a tidy PDF.
Check a code or an account
Paste an EDRPOU code (8 digits) or an IBAN (starts with UA). The check runs in the browser and sends nothing.
Amount in words
More: how check digits work and how to ask AI to check
An EDRPOU code has eight digits. The first seven are multiplied by weights, the sum is divided by 11, and the remainder must equal the eighth digit. Swapped or missing digits almost always break this equation.
An IBAN is checked like this: the first four characters move to the end, letters are replaced with numbers, and the whole number is divided by 97. The remainder must be 1. Digits 5-10 of a Ukrainian IBAN are the bank code.
Both checks catch a typing error, but neither proves that the company exists or that the account belongs to the party. The register and a bank letter confirm that.
A request to an AI to check works better when it contains the list of fields, the source to compare against and the form of the result: “List every amount in figures and in words in a table: clause, figures, words, match or not”. The model does not consult registers on its own unless the product has such a tool.
From clause to date
Once signed, a contract becomes a list of obligations. Each has five fields: who, what, trigger, term and type of days. The trigger is the event the term is counted from: signing, receipt of payment, delivery, receipt of a demand.
Some dates can be computed right away. The rest wait for an event whose date nobody knows yet, and the tracker has to hold exactly that, “waiting for the event”, not an invented date. Some obligations are conditional: they arise only if something has happened.
Compute a deadline
Assumption of this exercise: banking and working days are counted as Monday to Friday, because under martial law public holidays and non-working days are, as a general rule, not days off for employees. A bank or a contract may count differently. The trigger day is not counted. Check how your contract counts the term.
More: how the law counts terms
The Civil Code of Ukraine sets the general rules. A term begins on the day after the event its start is tied to (art. 253 of the Civil Code). If the last day of a term falls on a weekend, public holiday or other non-working day, the term ends on the first working day after it (art. 254(5) of the Civil Code). The calculator above moves a term only off Saturday and Sunday.
A contract may set a different order: banking days, working days, a specific date. That is why the type of days goes into the tracker as a separate field instead of being guessed.
Under martial law, public holidays and non-working days are not days off for employees as a general rule (art. 73 of the Labor Code does not apply). The law does not say directly whether a civil-law term moves off a holiday date because of this; for such a term, check the case law as of the date of the event.
Materials for the session
Three supply contracts on one template. They reached you in different ways: a scan of a signed paper copy, a Word file from the other side and a PDF from a layout program. Check each one in full: numbers, codes, dates, names, links between clauses. The contracts are in Ukrainian.
- Task sheetPDF · 1 page · in Ukrainian
- Tables: fields and obligations trackerXLSX · 2 sheets · in Ukrainian
- Self-check: the fields and errors of each contractpassword required · in Ukrainian
All contracts are for teaching; the deals are made up. Names and codes of real companies are used only for the register-checking exercise. The parties' representatives, powers of attorney and bank accounts are made up.
Blocks of work
A convenient order for going through the practicum. The time for each block depends on the group.
- The contract life cycleRequest, draft, approval, signing, performance, renewal or closing. Where a company loses money or time.
- Anatomy: by hand first, then AIList all the fields of the three contracts, then give the same task to a model: a simple request first, then your own. Compare in three columns: found by us, found by AI, found by no one.
- From document to templateBreak a contract into variable, derived and fixed fields and options. Write a check rule for each field. Assemble a contract for your own made-up deal.
- After signingCopy every obligation from the signed contract into the tracker: who, what, trigger, term, type of days, date or “waiting for the event”.
- Questions for a practitionerThree questions from the team to a person who manages contracts at a large company: what they check, where they keep the fields, how they avoid missing deadlines, what they could not automate.
Concepts in the Toolkit
Explainers of the concepts this session builds on (in Ukrainian).