Client work
Legal triage assistant for Microsoft Teams
The legal triage assistant for Microsoft Teams is a bot that rates each question green, yellow or red and answers only from an approved document library.
- Technologies used
- Status
- Proof of concept
The problem
People outside the legal department have legal questions, and not every question can be answered by a machine. Answering without a source, or handling on its own a case that needs a lawyer, is the risk this assistant exists to prevent. It was built for a large company and does the first pass over incoming questions: it answers on its own only what the knowledge base explicitly covers, and the rest goes to people.
What was built
The assistant works inside Microsoft Teams. It provides:
- triage of every question as green, yellow or red before any answer;
- answers only from an approved document library, with sources cited;
- automatic refusal and escalation to the legal team on red cases;
- multi-turn conversation, with the last six exchanges as context;
- a record of every interaction (question, answer, triage and citations) for audit;
- an anonymized weekly report sent to a configured recipient.
How it works
Triage uses three colors. A question is rated green only when the legal rule is clear, the case has been validated in the knowledge base and there is a source to cite. Yellow is a known topic with a variable that can change the outcome, and the answer carries a warning about what changes the case. Anything else, including an unmapped topic or an uncertain case, is rated red.
Claude decides the color. It queries the library through Libriq and delivers the triage and the answer together, in one structured result. Safeguards enforced in code protect the result:
- a green answer without a source is downgraded to yellow;
- on red, the text written by the model never reaches the user, only the fixed institutional text;
- search reaches only documents that are already synchronized; with none synchronized it returns nothing, rather than opening the whole Libriq account;
- any inconsistency in the model’s output is treated as a safe failure.
The library is fed automatically. Every six hours by default, a process queries SharePoint through Microsoft Graph, with access to the library site only and not the whole environment. It downloads what changed and sends it to Libriq. A document that fails gets at most three attempts.
The legal content starts in an authoring spreadsheet written by a legal specialist, with four tabs. The system compiles it into one file per topic plus a master index, using only rows with approved validation. A rule marked as repealed in the spreadsheet is left out of the compiled base and is never cited.
Teams waits about 15 seconds for a reply, and triage can take 10 to 30 seconds. So the bot acknowledges the message immediately, shows that it is typing and delivers the answer afterward as a proactive message.
Where it stands
The assistant is a proof of concept. It began as a question-and-answer bot over a document library and evolved into the risk triage assistant described here. Sending a formal email to the legal team was left for a later stage.
Acceptance testing uses a set of questions prepared by a legal specialist, each with its expected color. A case expected to be red that comes out in any other color fails acceptance. Accuracy on the other colors is only reported and does not fail acceptance. The full record of each triage is kept for audit and acceptance testing.
How it connects to other Sigil Labs projects
The assistant is built on Libriq, the Sigil Labs platform that turns documents into a searchable base with source citation. Here Libriq only retrieves the passages and generates no text, and the library it searches is restricted to approved documents.
It is the same standard Libriq applies: the answer arrives with its source and comes from a known collection.
Frequently asked questions
What is the legal triage assistant for Microsoft Teams?
It is a Sigil Labs bot, built for a large company, that receives legal questions in Microsoft Teams and rates them green, yellow or red before answering. It answers only from an approved document library and records every interaction for audit.
What happens when a question is rated red?
The assistant does not answer the substance. It returns a fixed institutional refusal and alerts the legal team through a proactive Teams message that says who asked, what was asked and which trigger made the question red.
Where do the assistant's answers come from?
Answers come from passages retrieved from an approved document library synchronized from SharePoint, and they cite the sources found. Without a citable source, an answer is never rated green.
Does the assistant replace a lawyer?
No. It does the first pass, it does not give formal legal opinions and it never decides a sensitive case on its own. If there is any uncertainty, the question is rated red and goes to the legal team.
Are conversations with the assistant recorded?
Yes. By design decision, the user's identity and the text of each question are stored in a PostgreSQL database, for audit and acceptance testing. Technical logs do not keep the content of questions or answers, and the weekly report is anonymized.
What stage is the assistant at?
It is a proof of concept. The formal escalation email was left out of this stage.