Chuyển đến nội dung chính

Bài đăng

Hiển thị các bài đăng có nhãn Tracing

Observability for LLM apps: tracing a non-deterministic system

“A customer says the assistant told them we offer a 90-day return window. We don’t.” In a normal service you find the request, replay it, and read the code path. In an LLM application, replaying gives you a different answer, the retrieval may have changed, and the code path was identical for the thousand requests that behaved correctly. The trace is not a debugging aid here; it is the only record that the event happened at all. Record the whole run, not the endpoint A single user message can produce a dozen model calls, retrievals and tool invocations. Logging only the final response tells you what went wrong and nothing about where. Model the run as a trace with nested spans: trace: conversation_turn user_id, conversation_id, turn_index ├── span: retrieve query, k, latency, chunk_ids, scores ├── span: llm_call model, temperature, tokens_in/out, stop_reason │ └── span: tool.search_orders arguments, result_size, error, latency ├── span:...