Urgent.News

600+ sources. One page. See who else covered it.

Editions

Culture

My LLM app was fully traced. During an incident the trace was still useless.

A regression came in for our German enterprise users on the support agent. Quality had dropped for that one cohort, and I opened the trace store expecting to find the problem in a couple of minutes. We had tracing. I had set it up myself. What I got was a flat list of 28 spans. None of them carried the prompt version. The model-call spans were named three different things across the same service,…

Abstract editorial illustration

A fully traced LLM app was not actually helpful during an incident, despite having comprehensive tracing in place. The trace store presented a flat list of 28 spans, many of which lacked crucial information such as the prompt version, model-call details, and retrieval queries. This made it difficult to pinpoint the regression, which had caused a drop in quality for German enterprise users.

The rewritten tracing system aimed to answer key questions instantly, such as the prompt version used, the slowest retrieval, failed tool calls, quality score changes, affected cohort, and the model responsible for the response. A good trace should be structured as a tree, mirroring the actual user request and subsequent steps, rather than a flat list of spans.

Adding the prompt version to every model-call span as three tags—prompt, version, and A/B variant—proved to be the most valuable change, allowing for quick identification of the regression's cause. Including quality scores on spans, rather than just latency and errors, enabled better monitoring of the model's output quality. Separating token costs into reasoning and cache categories helped in identifying cost anomalies more effectively.

Redaction of sensitive data should occur at the collector level, ensuring compliance while maintaining traceability. Stable span names were essential for consistent dashboard and alert grouping. Lastly, focusing on tail traces instead of head traces during incidents proved more beneficial, as rare failures were less likely to be captured through random sampling.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Culture

More from Thursday 6 August →