At MWS Octapi, Error Diagnosis Quality Nearly Doubled Without Changing the Model
When a request in the MWS Octapi platform fails, support staff manually hunt for the guilty service in the logs. The model kept confusing services when it read raw logs, so the search and filtering moved to ordinary code. The model now gets the five most suspicious records and makes its diagnosis from them. Diagnosis quality nearly doubled on the same LLM (the team's estimate), so the first step is building the data pipeline.
AI-processed from Habr AI; edited by Hamidun News
Imagine a request between two corporate systems fails with an error, and the user cannot tell whose fault it is: their own system, the intermediary platform, or a third-party service. MWS Octapi is an integration platform through which companies' systems exchange data, and these questions come up there constantly. A language model fed raw logs often answers confidently but names the wrong service. Pavel Vasilyev, a DevOps specialist at Octapi, described at the twelfth MWS meetup how the team fixed this: ordinary code took over data preparation, and the model was kept only for interpretation. According to him, diagnosis quality nearly doubled even though the model itself did not change.
What problem they faced
When a request ends in an error, finding the cause is not easy. Previously, first- and second-line support engineers did this by hand: they searched the logs (event journals), found the request identifier, and examined its path in Jaeger, a system that shows the chain of calls between services within a single request.
The first attempt was straightforward: pass the model the raw logs and traces. The results were unstable. The model could mix up services and point to the wrong source of the error. It resembled a newcomer scanning someone else's journal and latching onto the first line with "error". So Pavel rebuilt the analyzer on the Exoskeleton principle: code performs the main preparatory work, and the model receives already filtered data and only interprets it. The analyzer is split into eight layers, and some instructions moved from the prompt into program logic.
How the pipeline works
The model takes part in only two stages: it helps understand the user's request, and then it formulates a diagnosis from the prepared data. Everything else is done by code.
First, regular expressions pull parameters from the request and select a scenario. If a trace identifier is given, the analyzer parses it right away. If a log file is attached, the program searches it for the required identifier. Otherwise, the full scenario runs: if needed, the model recognizes which term to search for, and the program builds a query to OpenSearch. The search takes into account the request address, the response code, and a five-minute interval before and after the event.
Next, the analyzer goes to Jaeger, finds the inbound call, checks its address and status, and records the details in the Evidence Ledger, the investigation journal. The model receives no more than five records showing signs of an error, sorted by duration so that the longest operations stand out. This way it sees both the calls to internal services and the response the user received.
Before data is sent, the Guardrails layer runs. It strips parameters from URLs and masks personal data: email addresses, phone numbers, tokens, secrets, and internal identifiers. Full names are recognized by the Natasha library, and everything else is handled by regular expressions. The rules are checked by tests. Some masked values can be restored after analysis, but secrets and tokens cannot be restored.
Checking the answer: hypothesis or fact
A separate layer, grounding, ties the model's output to a specific record. If the model states that a certain service returned the error, the program looks for the matching record in the trace and cross-checks it against the investigation journal. If there is confirmation, the reference stays in the answer. If there is no confirmation, the output is labeled as a hypothesis. If the source cannot be determined, the system says so directly instead of presenting a guess as a diagnosis.
The tool was first built for support staff, then added to the Octapi portal so clients could run diagnostics themselves. The user gets an answer with links to logs and traces and does not need to understand Jaeger. A support engineer can copy the ready explanation into a reply to a ticket. The analyzer has also started filtering out conclusions that the data does not confirm.
What to take away from this
For those building agents for operations, the lesson is practical: accuracy depends not only on the model but also on what it is shown. Steps with clear rules, such as searching, filtering, sorting, and masking, are more reliable when done by code. The model should be brought in where interpretation is needed, its outputs should be checked programmatically, and it should be honestly labeled a hypothesis until confirmed.
There are caveats too. The talk did not disclose how quality was measured, so "nearly doubled" remains the team's own estimate rather than an independent measurement. The approach requires engineering investment: eight layers, tests for masking, and maintenance of the scenarios do not appear on their own. Still, this design is easier to debug: when something goes wrong, you can see which step caused it, and you do not need to change the model to find out.
- Jan 30, 2026AI Catches Aggressive Cancer: A Swedish Trial That Could Save Thousands of Lives
- Oct 27, 2026Glas fine-tunes GigaAM-v3 speech recognition: IT terms correct 87% of the time instead of 44%
- May 17, 2026Cursor in Enterprise Development: An AI Editor for Rapid Prototyping
- Nov 21, 2026Gondola Used Codex to Ship 25% More Code Without Hiring and Doubled Revenue
Key Questions Answered
What problem they faced?
When a request ends in an error, finding the cause is not easy. Previously, first- and second-line support engineers did this by hand: they searched the logs (event journals), found the request identifier, and examined its path in Jaeger, a system that shows the chain of calls between services within a single request. The first attempt was straightforward: pass the model the raw logs and traces. The results were unstable. The model could mix up services and point to the wrong source of the error.
How the pipeline works?
The model takes part in only two stages: it helps understand the user's request, and then it formulates a diagnosis from the prepared data. Everything else is done by code. First, regular expressions pull parameters from the request and select a scenario. If a trace identifier is given, the analyzer parses it right away. If a log file is attached, the program searches it for the required identifier.
What are the key details on Checking the answer: hypothesis or fact?
A separate layer, grounding, ties the model's output to a specific record. If the model states that a certain service returned the error, the program looks for the matching record in the trace and cross-checks it against the investigation journal. If there is confirmation, the reference stays in the answer. If there is no confirmation, the output is labeled as a hypothesis. If the source cannot be determined, the system says so directly instead of presenting a guess as a diagnosis.
Test Frontier LLMs & Autonomous Agents in One Workspace
Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.
Daily 60-sec AI Voice Brief + Weekly Production AI Agent Playbook
Listen to a 60-second AI news brief every morning and get a weekly hands-on playbook for shipping AI agents to production — tools, MCP servers and patterns that work. Curated by Jemal Hamidun, Head of AI at Alpina Digital.
