C.W.K.
Stream
Lesson 04 of 05 · published

Context 단서용 Tool-Call Trace 읽기

~23 min · tools, traces, diagnosis

Level 0Window Watcher
0 XP0/50 lessons0/13 achievements
0/100 XP to next level100 XP to go0% complete

Tool call은 진단 금

Behavior가 mysterious할 때, tool-call trace가 자주 설명. 모형이 이번 session에 read("file_X") 세 번 호출 — file_X가 working set이었다는 뜻. 모형이 read("file_Y") 절대 호출 안 함 — file_Y가 working context에 없다는 뜻, 아빠가 언급했든 아니든. Trace 패턴이 모형이 실제로 attention 준 걸 expose, 줬길 바란 거 아니라.

Missing call 봐

가장 유용한 trace 관찰은 자주 *호출되지 않은* tool. Rule이 'commit 전 항상 validate' 인데 commit 전 run_tests call 없으면, rule이 silently 실패. Call 존재는 정상; 부재가 버그.

볼 trace 패턴

같은 파일 반복 read(working set 너무 작거나 eviction 너무 공격적). Cascading retrieval call(routing logic 실패). Complex task에 tool call 하나도 없음(모형이 priors에서 hallucinate). 각 패턴이 다른 fix 가리킴.

Code

Trace summary 모양·json
{
  "session_id": "...",
  "tool_calls": [
    {"tool": "read", "args": {"path": "backend/auth.py"}, "turn": 3},
    {"tool": "read", "args": {"path": "backend/auth.py"}, "turn": 7},
    {"tool": "read", "args": {"path": "backend/auth.py"}, "turn": 14}
  ],
  "never_called": ["run_tests", "git_status"]
}
Trace audit prompt·text
Looking only at the tool-call trace from this session:
  - Which files were loaded most often?
  - Which expected calls never happened?
  - Which calls cascaded together (pattern)?
Use these observations to diagnose where context attention concentrated and where it failed.

External links

Exercise

Tool call 있는 AI session 골라. Trace summarize — 가장 자주 호출된 tool, 절대 호출 안 된 tool, cascading 패턴. Trace만으로 본 behavior 하나 진단.
Hint
'never-called' 컬럼이 silent failure 사는 곳.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.