S8-08 · 基础S8-08 · Foundation

调用追踪 · 最终答案看不出哪一站先坏,瀑布图可以Trace · The Final Answer Hides the First Broken Stage; a Waterfall Does Not

request → spans in time → latency / token / status → upstream failure chain

调用追踪(Trace)记录一次请求跨模型、检索、工具和校验节点的时序与输入输出摘要。单条最终答案无法定位链路中哪一站失效。A trace records the timing and redacted input/output summaries of one request across model, retrieval, tool, and validation stages. A final answer alone cannot identify the failing stage.

01 · 包裹晚到,只看签收结果能知道卡在哪个中转站吗01 · If a parcel arrives late, can the delivery receipt reveal the delayed hub?

一次请求最终返回 500。检索慢、工具拒绝、校验失败都可能发生;不看每个 span 的时间与状态,修哪里只是猜。A request ends with HTTP 500. Retrieval may be slow, the tool may deny access, or validation may fail. Without span timing and status, any fix is a guess.

02点击瀑布图节点查看耗时、token 与状态,并让失败上游自动串联高亮Click Waterfall Spans for Latency, Tokens, and Status, with the Failure's Upstream Chain Auto-highlighted

瀑布图 · 可点 spanwaterfall · clickable spans
状态 AMetric A
状态 BMetric B
状态 CMetric C

所有概率、分数、成本、token 与输出均为固定种子的教学模拟,不代表真实模型输出。把主变量拖回即可复核结论。All probabilities, scores, costs, tokens, and outputs are fixed-seed teaching simulations, not real model output. Move the main variable back to verify the conclusion.

03把刚才的变化拆成 4 个零件Break the Change into Four Parts

Trace
TRACE

一次请求One request

trace_id 绑定完整端到端链路。A trace_id binds the complete end-to-end chain.

SPAN

阶段 spanStage span

每个模型、检索、工具与校验节点各有开始和结束。Each model, retrieval, tool, and validation stage has start and finish times.

ATTR

节点属性Span attributes

耗时、token、状态与脱敏摘要支持下钻。Latency, tokens, status, and redacted summaries support inspection.

CAUSE

因果串联Causal chain

失败节点连同必经上游一起高亮,不误伤并行无关节点。The failed node and required upstream path highlight together without implicating unrelated parallel work.

04最小机制:主交互能逐项验证Minimal Mechanism: Verify Each Link in the Interaction

MECHANISM
durationtrace = max(endspan) − min(startspan)
瀑布图用同一时间轴摆放 span;失败链按 parent_span_id 回溯,而不是按颜色猜上下游。The waterfall places spans on one clock. Failure ancestry follows parent_span_id rather than guessing from visual proximity.
记录 spanRecord spans开始 / 结束 / 父节点start / end / parent
点击检查Inspect耗时 / token / 状态latency / token / status
回溯失败Backtrack failure上游链自动亮upstream path highlights

05让工具 span 失败并只看最终 500Fail the Tool Span and Inspect Only the Final 500

主动制造失败Create a failure

边界实验Boundary experiment

只看最终状态会把症状当原因。实验应高亮工具失败及其必经上游,并显示下游为何被跳过。The final status confuses symptom with cause. The lab must highlight the failed tool and required upstream path and explain skipped downstream work.

尚未执行。先在主交互中观察正常机制。Not run yet. Observe the normal mechanism in the main interaction first.
trace 就是一串日志。A trace is just a list of logs.→ ✓ trace 还保留 span 时序、父子关系与耗时。A trace preserves span timing, parentage, and duration.
总耗时等于所有 span 耗时相加。Total latency equals the sum of every span.→ ✓ 并行 span 会重叠,总耗时取端到端时间轴。Parallel spans overlap; total latency comes from the end-to-end clock.
节点输入输出可以原样记录。Span inputs and outputs can be stored verbatim.→ ✓ 只留脱敏摘要与必要诊断字段。Retain redacted summaries and necessary diagnostic fields only.
06 · 一句话带走06 · One line to keep

调用追踪用一个 trace_id 把节点时序、耗时、token、状态与父子关系连起来;点中失败 span 就能沿真实上游链定位。A trace ties timing, latency, tokens, status, and parentage to one trace_id. Selecting a failed span follows the real upstream chain to the cause.