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

Tool calling — 모델이 어떻게 결정하나

~18 min · tools, tool-calling

Level 0수련생
0 XP0/100 lessons0/14 achievements
0/120 XP to next level120 XP to go0% complete

Tool은 프롬프트의 일부

Tool 노출은 일종의 instruction이야: '여기 너가 할 수 있는 게 있어'라고 모델한테 알려줘. 모델이 tool 부를지, 어떤 argument로, 결과를 어떻게 응답에 통합할지 결정. 대부분의 tool-calling 버그는 prompt 버그 — tool의 이름, description, input schema가 일하고 있어.

모델이 read하는 것

  • Tool 이름 — 동사나 동사-명사 (search_documents, create_ticket).
  • Description — 짧고, 뭐 하는지와 언제 쓰는지 명시. 가장 under-written field; 작은 prompt처럼 다뤄.
  • Input schema — JSON Schema. Field description 모델한테 visible.
  • Example — 일부 provider가 example tool call 지원. obvious 아닌 tool에 써.

흔한 실수

  • tool 언제 쓸지 안 알려주는 한 줄 description.
  • 경쟁하는 overlap tool (같은 거 두 가지 방법으로).
  • description 없는 generic field 이름 (id, data).
  • tool error 시 뭘 할지 guidance 없음.

Code

rich한 description 박힌 tool·json
{
  "name": "search_orders",
  "description": "Find a customer's orders by customer_id, date range, or status. Use this when the user mentions an order, a delivery, a refund, or a tracking number. Do not use it for general account questions.",
  "input_schema": {
    "type": "object",
    "properties": {
      "customer_id": {"type": "string", "description": "Internal customer ID, format CUST-NNNNNN."},
      "status": {"type": "string", "enum": ["pending", "shipped", "delivered", "returned"]},
      "date_from": {"type": "string", "format": "date"}
    },
    "required": ["customer_id"]
  }
}

External links

Exercise

tool definition 하나 감사. Description을 'use when'과 'do not use for' guidance 포함하게 다시 써. Field description 추가. typical request 5개에 agent 돌려서 tool selection 개선됐는지 봐.

Progress

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

댓글 0

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

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