---
id: 18449
lang: en
title: "At MWS Octapi, Error Diagnosis Quality Nearly Doubled Without Changing the Model"
published_at: "2026-11-27 14:32:46"
source_name: "Habr AI"
source_url: "https://habr.com/ru/companies/ru_mts/articles/1113132/?utm_campaign=1113132&utm_source=habrahabr&utm_medium=rss"
canonical_url: "https://news.hamidun.com/en/news/18449"
categories: ["llm", "autonomous"]
publisher: "AI News by Jemal Hamidun (news.hamidun.com)"
---

# At MWS Octapi, Error Diagnosis Quality Nearly Doubled Without Changing the Model

> **Краткая суть (BLUF):** 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.  - The code searches OpenSearch logs in a ±5 minute window and pulls traces from Jaeger - Guardrails masks emails, phone numbers, tokens and full names before anything reaches the model - Output without a supporting journal entry is labeled as a hypothesis

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.

---
- **Первоисточник:** [Habr AI](https://habr.com/ru/companies/ru_mts/articles/1113132/?utm_campaign=1113132&utm_source=habrahabr&utm_medium=rss)
- **Каноническая ссылка:** https://news.hamidun.com/en/news/18449
- **Экосистема автора:** [Бесплатный интенсив по вайбкодингу — предзапись в Нике](https://t.me/vibecodeguidebot?start=agent_intensive_news_md) · [Nomad AI](https://nomadnet.ai) · [Telegram @jemal_hamidun](https://t.me/jemal_hamidun)
