← Engineering experience

AI case study · Customer name withheld · Published

Court AI designed to show where every statement came from.

A Thai court agency wants Thai-language AI on both sides of its paperwork: citizens preparing a complaint, and judges and case officers working through large case files. UNIXDEV is part of the team developing the system, which is still being delivered.

The problem the agency set out to solve

Many complaints filed by members of the public arrive incomplete and have to be corrected before the case can move on. That slows down the earliest stage.

Each case also involves a large volume of varied documents. Judges and staff spend a lot of time checking those documents and summarizing the facts.

What the system covers

Guided complaint drafting

AI suggests wording so a citizen’s complaint is complete. Drafts can be saved and edited, are locked once submitted, and their status can be tracked.

OCR for case documents

AI OCR is specified to handle Thai and English text, Thai and Arabic numerals, and tables and forms. Documents can be uploaded in batches and are processed through a queue.

Search and fact summaries

An LLM with retrieval-augmented generation (RAG) over a vector index helps judges and case officers search documents and summarize facts. Each answer must carry bracketed citations to the source document and page.

Document store and search

A document store and database with full-text search that respects each user’s access rights.

Principles written into the requirements

AI assists; people decide. Every AI-generated statement must cite its source so a person can verify it, and users edit AI drafts before they are used. In legal work, an answer that reads well but cannot be checked is of little use.

One case at a time. Each answer may draw only on the documents of the case in progress, to prevent material from other cases or classified documents from leaking into a draft or summary. Access follows the permissions already defined in the case-management system.

Personal data first. Personal data in the documents is to be handled before any fine-tuning, and the model is to be adapted to the agency’s legal language.

The agency chooses the model. Before development, candidate models are compared on strengths, weaknesses and cost so the agency can make the decision.

A system the agency can own. Deliverables include:

  • a risk assessment covering data, cybersecurity and model bias
  • an AI governance report
  • a change-management plan
  • user acceptance testing with real users in the real environment
  • training and manuals
  • a maintenance plan
  • the full source code

After acceptance, model performance is to be re-evaluated and re-tuned at least once during the warranty period.

Related prototype

A related prototype explores AI-assisted drafting of judgments, using an LLM adapted to legal language and installed on GPU servers inside the agency’s own network, because case data is sensitive. It is developed in two-week iterations, each with demos and focus groups with judges and case officers.

Where the project stands

The project is in delivery during 2026–2027. There are no results to report yet, so this page describes the problem, the scope and the design principles only. It contains no accuracy figures, user numbers or time savings.

This account is based on the project’s requirements and scope. It withholds the agency’s name, contract details, the models under consideration, security architecture, screenshots and any case data. UNIXDEV’s specific responsibilities within the team are not disclosed. It is not a prediction of the results another project will achieve.

Planning document AI for your organization?

Many of these requirements carry over to any public agency or enterprise that wants Thai-language AI for high-stakes documents. Check them before you write the terms of reference (TOR) or start a prototype.

Decide where people review

Which tasks will AI draft or summarize, and who edits and signs off before the output is used?

Require citations

State that every statement must point back to its source document and page.

Limit retrieval per request

Restrict answers to the documents of the matter at hand and reuse the access rights of your existing system rather than building a separate permission model.

Look at the real documents

Scans, tables, forms and Thai numerals affect OCR and search. Collect representative samples for testing.

Plan for personal data

Agree how personal data will be handled before documents are used to adapt a model.

Compare models before choosing

Ask for the strengths, weaknesses and cost of each option, including whether it must run inside your own network.

Write acceptance criteria into the TOR

A test set drawn from real documents, how answer and citation accuracy are measured, and who signs off.

List every deliverable

Use the deliverables listed above as a starting point.

Schedule re-evaluation

Decide when the model will be measured and re-tuned after acceptance, rather than treating handover as the end.

If you are unsure how ready your documents are, start with a small pilot that has clear acceptance criteria, then decide whether to expand, revise or stop.