Remote Legal Aid for Ukrainians in Wartime
A Telegram Platform Connecting 3,500+ People with Volunteer Lawyers
My Role
- Load-balancing algorithm spreading lawyers' daily consultations
- TF-IDF FAQ search before involving a lawyer
- One Telegram bot with four role interfaces
Approach at a Glance
Details- 1One Telegram Bot, Four Roles
- 2FAQ Search First
- 3Virtual Consultation Rooms
- 4Lawyer Load Balancing
- 5Administration
Executive Summary
After the full-scale invasion in 2022, many Ukrainians, including people in the occupied territories, needed legal help with ordinary things in extraordinary circumstances:
- how to register a newborn;
- where to take exams;
- how to get or fill in documents;
- how to enter an inheritance.
Lawyers were willing to help, but there was no simple, safe channel connecting the people with questions to the lawyers who could answer them.
I designed and built a remote legal-aid platform inside Telegram, the messenger most Ukrainians already use. The work was done as volunteering for the OSCE (Organization for Security and Co-operation in Europe) and the initiative Protect Your Rights UA, funded only by an OSCE grant. A question first goes through an FAQ search. If the answer isn't there, the platform opens a private virtual room with a volunteer lawyer, chosen by a load-balancing algorithm I developed to spread each day's requests fairly across the registered lawyers.
The platform helped more than 3,500 people. This was before the LLM era, so it was built on classic information retrieval and a carefully designed bot rather than a generative model.
Context
The situation set unusual requirements:
- Ordinary questions in an extraordinary situation: civil registration, education, documents and inheritance had all become complicated by war, displacement and occupation.
- Accessibility: people needed help on their phones, in an app they already had, without installing anything new.
- Language: people could write in Ukrainian or Russian, and answers were always given in Ukrainian.
- Limited lawyer time: volunteer lawyers had their own jobs, so their time had to go to questions that really needed a lawyer, spread evenly over the day.
Technical Approach
-
One Telegram Bot, Four Roles – The same bot serves users, lawyers, admins and super admins. Each role gets its own interface and set of actions. Users ask questions, lawyers take consultations, admins manage lawyers and content, and super admins manage the admins.
-
FAQ Search First – A user's message is matched against a curated FAQ with TF-IDF similarity search. Common questions get an answer immediately, without waiting for a lawyer.
-
Virtual Consultation Rooms – If the FAQ has no good answer, the platform creates a private virtual room inside the bot that connects the user with a lawyer, so the conversation stays one to one and organised.
-
Lawyer Load Balancing – A load-distribution algorithm I developed assigns each new room to a registered lawyer, balancing the number of consultations each one handles during the day, so no volunteer is overloaded and users aren't left waiting.
-
Administration – Admins and super admins manage the lawyers, the FAQ and access, so the service could grow and keep running with a small volunteer team.
Outcome
More than 3,500 people got legal help through the platform, from registering a child to entering an inheritance, without leaving the messenger they already used. Common questions were answered instantly from the FAQ, and lawyers' time went to the cases that needed them, shared evenly across the volunteer team. The project ran from April 2022 to May 2023 as volunteering funded by an OSCE grant.
Technologies
Planning something similar?
Tell me about it on a short call. New projects can start within 2 weeks