C.W.K.
Stream
Lesson 03 of 06 · published

Tool use 와 function calling 은 architecture 아냐

~9 min · tools, product, framework

Level 0Scout
0 XP0/41 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete

Function calling 이 실제로 무엇

Function calling (tool use 라고도) 이 학습된 output format + orchestration wrapper. 모델이 tool 호출 원하면 structured JSON (또는 등가물) emit 하도록 post-train. External 시스템이 그 output 파싱, tool 실행, 결과를 다른 모델 input 으로 다시 feed. 모델 backbone unchanged.

두 조각 — 어느 것도 architecture 아님

  1. Structured output format emit 하도록 모델 학습. Post-training data — 언제 어떻게 tool-call JSON 생산할지 보여주는 예시.
  2. Tool 실행하는 execution 레이어. Application 코드 — function dispatcher, sandbox, API 호출, retry 로직.

Reasoning + tool 조합

현대 reasoning 모델 (o4-mini, extended thinking 중 tool use 하는 Claude) 이 thinking phase tool 호출 허용해서 line blur. 이것도 architecture 아냐 — 더 풍부한 post-training format ("thinking, OR tool 호출, OR 최종 답 어느 시점에든 emit 가능") + thought 중 tool 실행하는 orchestration.

모델이 'tool use 좋음' 일 때 변하는 것

  • Tool-call 예시의 post-training data quality 와 양.
  • 모델이 tool error 와 retry 에서 얼마나 잘 회복.
  • 모델이 tool call 얼마나 reliably 포맷 (correct schema, hallucinated tool 없음).

안 변하는 것

네트워크 wiring. Chat-completions API 와 right post-training 가진 어떤 base 모델도 tool call 가능. Tool use enable, disable, partial 어떤 거든 architecture unchanged.

Code

Tool use 내부 — 모델이 텍스트 생성·python
 1. The model's response when it wants to call a tool:

{"tool": "get_weather", "args": {"city": "Seoul"}}
# That's just text the model emitted. The orchestrator parses it,
# runs the actual function, and feeds the result back as the next turn.

# 2. The orchestrator's job (no model changes here):
def run_tool_call(json_str, tool_registry):
    call = json.loads(json_str)
    return tool_registry[call["tool"]](**call["args"])

External links

Exercise

주요 API (Claude, OpenAI, Gemini) 의 tool-use docs 열어. Tool call 이 모델 output 에서 어떻게 포맷되는지 묘사하는 섹션 찾아. JSON shape 적어. 그다음 tool use 지원하는 어떤 open-weight 모델의 chat template 봐 — format 구조적으로 비슷. Tool 은 공유 output convention, hidden architecture 아냐.

Progress

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

댓글 0

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

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