Home » AI for lawyers
by Adrian

AI finds answers. Sometimes right, sometimes wrong. Good lawyers find the right questions. Always.

This site covers two topics:

  • Best Practices with AI Tools – Using AI effectively for legal work.
  • AI in Contracts – managing AI-related issues in contracts

With more than 25 years of experience as a lawyer in multinational companies (IBM and Syngenta) focusing on multinational contracts, litigation and environmental matters I have developed a particular interest for AI. The “AI for lawyers” playlist of my Youtube channel covers best practices for lawyers in using AI tools as well as considerations around how to cover the use of AI in contracts.

DISCLAIMER: The views expressed on this website are my personal views and reflect the knowledge and tools as per the date of the recording.

How to Successfully Switch to Mistral — Resolving the Word File Problem

Posted September 24, 2026

Annoyed by Office 365’s forced shift to a subscription model and the hypocritical doomsday rhetoric of US AI tech giants I decided earlier this week to break on through — to the other side. Here’s what I replaced them with:
🔹 OnlyOffice (https://www.onlyoffice.com) — Open source, handles .docx, .pptx and .pdf natively. Free.
 🔹 Thunderbird (https://lnkd.in/ev_UzvVG) — Free, mature mail client.
 🔹 K-Drive (https://lnkd.in/eznsGrAh) — Swiss cloud storage, 3 TB, ~$5/month. Data stays in Switzerland.
 🔹 Mistral Pro (https://mistral.ai) with the OpenCase and OnlineKommentar connector for legal resources — European AI model, $15/month.
 🔹 Firefox (https://www.firefox.com) — Independent browser.
The migration took less than a day. So far the capabilities cover everything I need as a lawyer, judge, and board member. The other side is real — and it’s closer and better than I thought.

Mistral provided better legal content than Opus 5.5 faster (per September 2026). Both use the same MCP connectors to Legal Sources but Mistral found more relevant issues, wrote shorter and to the point. The only downer was the lack of native XML capability. Content had to be copied to Word where it had only basic formatting. If I wanted more elaborate formatting (eg for client facing documents) I had to run it through Claude for make it nicer without touching the content.

As I daily draft memos or do contract markup, I created some skills which create nice looking memos and do markups in my name in Word format and save them on Google Drive.

What actually breaks: the seam, not the drafting

A .docx file is a ZIP of XML files. When an AI generates that XML “by hand” instead of through a well-tested library, it makes small, predictable mistakes — and Word is merciless about them. In my case, three:

  1. One element missing its namespace prefix — a single bare <vAlign>, invisible in any preview, well-formed enough that every XML check passed, and enough to make Word refuse the whole file.

  2. Child elements in the wrong schema order — Word enforces a fixed sequence inside every properties block, and one pair out of order kills the document.

  3. A duplicated element in one paragraph’s properties.

The weak point of Mistral is not drafting, it is the seams — the boring interfaces where open-source tools meet Microsoft’s file formats.

The fix: stop letting the AI improvise

The insight that solved it: separate the content from the container.

  • The AI drafts content in Markdown — the master. That is what AI is good at.

  • A small, deterministic Python script turns the master into the .docx — always the same way, always schema-valid, always in your house style.

  • A built-in validator refuses to green-light the file unless it is actually clean. If it does not print VALIDATION OK, the job is not done.

The AI never touches the XML again. Neither do you. The script needs nothing but Python’s standard library — no Microsoft 365, no python-docx, no internet. It produces an A4 memo in a consistent corporate format (Arial, 18 pt title, To/From/Date/Status/Re box with shaded label column, confidentiality header, page footer, repeating table headers). Colours, fonts, margins and orientation are constants at the top of the file — five minutes to adapt to your own house style.

It also means your house style lives in your repo, not in a subscription.

The distribution problem — solved with a tool you already have

Another surprise was the lack of a download button. The solution is trivial: storage on Google Drive (although this is a bit ironical considerung the background of moving away from big US tech…)

-> chat for drafting, cloud drive for storage.

The template pack

I have put the whole loop online so you do not have to repeat my debugging afternoon:

  1. memo_builder.py — the generator with the validator built in.

  2. sample-master.md — a worked example so you can produce your first test memo in under a minute.

  3. ai-memo-skill.md — a drop-in instruction file for your AI assistant. This file tells Mistral  the workflow: draft in Markdown, build with the script, validate, deliver to the cloud folder as a real .docx.

Getting started — in Mistral

The pack consists of one instruction and two data files. 

  • The instruction (ai-memo-skill.md) tells the assistant how to behave when a document task appears: draft in Markdown, build with the script, validate, deliver as a real .docx.

  • The data files (memo_builder.py, sample-master.md) are not instructions — the assistant must be able to read and execute them when needed. 

The fully automatic loop requires the paid plan of Mistral (15 Usd per month, 7 USD for students) as it needs Work mode (Vibe), because it can execute code and deliver files.

Work mode (Vibe)

  1. Install the skill. Got to Context -> Skills → create new, with the content of ai-memo-skill.md. The description is the trigger — write it as “Load this when the user wants a memo or document as Word/.docx…”. The skill sleeps until its trigger words appear, so it does not clutter unrelated chats.

  2. Store the data files where every chat can reach them: Context -> Knolwedge.  as Personal Knowledge files.

  3. Test in a fresh, ordinary chat. Say: “Build the sample memo and deliver it as a .docx.” The assistant should find the builder, generate the document, run the validation, and only then deliver to the connected cloud folder. Open the file in Word or OnlyOffice. 

  4. Adapt the house style. Tell the assistant what differs from the default — sender name and title, confidentiality marking, orientation, fonts, colours — and have it edit the MEMO defaults and house-style constants in memo_builder.py. Rebuild the sample and check. Iterate until “finalise this memo” reliably produces a file you would put your name on.

    Right-click → Save link as…
    https://adrianschaub.com/memoskill/memo_builder.py
    https://adrianschaub.com/memoskill/sample-master.md
    https://adrianschaub.com/memoskill/ai-memo-skill.md

Don't accept the AI excuse

Recorded May 10, 2026

Suppliers are increasingly using AI as an argument to water down their obligations — on IP, warranty, confidentiality or data privacy. The pattern is consistent: dedicated AI clauses shift responsibility from the supplier to the buyer in ways that are not appropriate.

The answer is not to add more AI-specific clauses. It is to understand that your standard clauses already cover this — and to know what to push back on when you see it.

This video explains the underlying principle: The deliverable is what matters, not how it was produced. Standard clauses apply to the AI age, mutatis mutandis. It then walks through the four areas where suppliers most commonly try to introduce AI carve-outs — IP (warranty and indemnity), confidentiality, data privacy and governance — and shows exactly what to decline, what to require, and what to flag.

Video: https://youtu.be/llvSn-lukKs?si=WAveyT5D4gOTFY64

Slide deck: 20260511 dont_accept_ai_excuse_v6

Cheat sheet: 20260511 supplier_ai_cheatsheet

Supervised AI markup for complex Contracts

Recorded April 16, 2026

Most AI markup tools work as a black box: input goes in, output comes out, you fix what’s wrong at the end.

This one is different. The model has four steps and two players: you and AI: 1. AI spots the gaps. 2. You decide how to handle them. 3. AI creates the markup. 4. You validate.

The key difference to other approach is, that instead of creating a markup for each deviation, AI proposes a concept — not specific wording — for how to address it. Then you decide: proceed as proposed, skip it, or go a different direction. That initial steer, given before a single tracked change is written, substantially improves the quality of the output compared to standard markup tools.

This video shows how to build this supervised markup workflow for complex, recurring supplier contracts reviewed against your own templates, group standards and policies and general legal and contractual knowledge .

Video: https://youtu.be/qHMj5fVynk4

Slide deck: 20260417 External supervised_ai_markup_video final

Instructions: 20260417_instructions_markup_video_updated

AI-Automated Workflows for Lawyers: a step-by-step guide

Recorded March 29 2026

AI tools can help lawyers to handle complex, structured legal tasks with remarkable speed and accuracy. But only if you teach them to think like a lawyer.

This video shows how to build a reusable AI workflow for recurring, structured, reference-based legal tasks — without any coding.

The example used throughout is a supplier contract review against your own template, group standards and policies.

It covers five steps:

Prepare — upload the reference documents and instruct AI to internalise them

Check — verify document completeness of the documents to be reviewed, and determine hierarchy before analysis begins

Review — compare supplier position against the reference

Output — populate a pre-defined structured assessment template

Validate — human review

The workflow in this video builds directly on the prompting principles from the Basic AI Training video and applies the governance model from the AI Errors video — in particular the mandatory human validation step that closes every workflow.

Video: https://youtu.be/REYAJYPtmuQ?si=iX1HUr6GHWW2D8oZ

Slide deck: 20260328final AI_Workflows_for_Lawyers

Assessment Template: 20260328_Generic AI_assessment_template

Workflow Instructions: 20260327 workflow_instructions_v2 

Dealing with AI errors in legal practice

Recorded March 1st 2026

A Governance Model for Leveraging the Benefits While Mitigating the Risks of AI Use by Lawyers.

“A danger known is a danger avoided.” 

AI tools have transformed legal work — improving quality, speed, and efficiency across drafting, reviewing, and analysing documents. But even the most sophisticated models hallucinate. They produce fundamental errors that follow no pattern, appear without warning, and cannot be reliably caught by spot checks.

This video is for lawyers who already use AI regularly and want to move beyond the basics. It covers four things: the structural reasons why AI errors occur and why they will persist regardless of tool sophistication; why these errors are particularly difficult for lawyers to detect; a practical risk-based governance model for defensible AI use; and a structured approach to client transparency — including when disclosure of AI involvement is required and when it is not. 

The framework presented is consistent with ABA Formal Opinion 512 on Generative Artificial Intelligence Tools (July 29, 2024).

Video: https://youtu.be/Kk7ENH7iwKw?si=nxP-VmY6v0mTJK5Z

Slide deck: 20260301 AI_Risks for Lawyers

Checklist: 20260301 checklist AI errors for lawyers

ABA opinion 512: aba-formal-opinion-512 (or here directly from the ABA website)

Basic AI Training for Lawyers

recorded June 17, 2025

Materials related to the Video “Basic AI training for lawyers” which covers generic prompting tipps  and the basic uses cases, i.e. drafting, review, summarizing, analysis / matter strategy, translation, information searching / research): 

Training video: https://youtu.be/xKA-fOe5-DM?si=pTLP5aNNrP71TlsJ

Cheat Sheet (with sample prompts): 20260223 Basic AI Use Cases for Lawyers – Cheat Sheet

ACC toolkit: https://www.acc.com/resource-library/artificial-intelligence-toolkit-house-lawyers