AI back office for a municipal council
Incoming mail classified, registered and answered with drafts grounded in law, every day in production
- 99.7%
- of attachments reach the document system with no one touching them
- 5,800+
- council decisions searchable when drafting a reply
- 17
- institutions monitored on Prozorro
- 800+
- automated tests behind every release

The problem
A municipal council in Ukraine handled its mail by hand. Someone read every letter, registered it in the document system, picked an executor and chased the deadline. Replies need legal grounding - national law plus the council's own decisions - and finding the right decision among thousands took hours.
What we built
Incoming email is classified and registered in the council's document system with the right executor, attachments upload on their own, and staff get Telegram alerts and deadline reminders. An AI drafter writes replies on the council's letterhead in Word with a legal note: national law through the official Verkhovna Rada API and 5,800+ council decisions found by hybrid search (vector plus Ukrainian full-text search with morphology), quoted verbatim. When a letter has no readable text, no draft gets written - the system doesn't make things up. On top of that: procurement monitoring on Prozorro for 17 institutions, grant scouting and reports on how executors meet their deadlines.
The calls we made
On the council's first real day with the system, a letter arrived with nothing but a zip attachment the system could not read. The AI drafter still wrote a topic and a full reply, and the clerk had to work out alone that all of it was invented.
No readable text, no draft: the system now says why it stopped and names the files it could not read.
Instead of: Draft a reply from the subject line and whatever text there is
A confident reply to a letter nobody has read is worse than no reply. It looks finished, so it gets trusted, and the person checking it has to discover the invention on their own. Fixed and deployed the same morning. Drafts are written only for letters the system can actually read.
The exception: When a rough draft costs nothing to throw away, for example an internal brainstorm a person rewrites anyway, drafting from the subject line can save a minute.
The council wanted replies ready on its letterhead, with the legal basis for every answer.
A person approves and signs every reply, and every law is quoted from the official legislation portal and inserted by code: the model never types the name or number of an act.
Instead of: Send the replies automatically · Let the model cite laws from memory or from a stored copy of the legislation
Legislation changes every week, so a stored copy goes stale and a model's memory invents article numbers. And the officials who sign the letters did not want disputes that start with "the AI wrote it". Every reply that leaves the council carries a person's signature, and every citation in it comes from the official source.
The exception: For messages with no legal weight, such as a note that a letter was received, sending automatically is fine.
Every incoming letter needs the three to five council decisions that apply to it, out of more than 5,800.
Hybrid search: search by meaning merged with Ukrainian full-text search that understands word endings, run on the same AI vendor that already processed the letters.
Instead of: Search by meaning alone · Keyword search alone · Send every decision title to the model with each letter
Search by meaning alone misses decision numbers, institution names and surnames. Plain keyword search breaks on Ukrainian case endings. Sending about 5,000 titles with every letter is slow and expensive. And staying with one vendor meant no new company saw the letters. Indexing the whole archive cost about $0.20, and every draft is grounded in the 5,800+ decisions.
The exception: For a few hundred documents in plain language, with no ID numbers or names that matter, search by meaning alone is usually enough.
Result
The system runs every day in production and holds 6,000+ documents. 99.7% of attachments reach the document system without anyone touching them, and 800+ automated tests guard every release.

Or just text Dmitry 📱
Hate forms? Pick a messenger. I read everything and usually reply the same day