본문 바로가기
C.W.K.
Stream
Lesson 07 of 07 · published

효과적인 Tool Description 설계

~22 min · tool-descriptions, prompting

Level 0Tokenizer
0 XP0/54 lessons0/10 achievements
0/120 XP to next level120 XP to go0% complete

description 은 모델의 routing 판단을 직접 바꿔. 'Get the weather'처럼 넓게 쓰면 날씨와 조금만 관련 있어도 호출할 수 있어. '도시의 현재 날씨에만 사용하고 24 시간 이후 예보나 도시가 아닌 장소에는 사용하지 않는다'처럼 경계를 적으면 더 정확하게 골라.

하지 않는 일도 description 에 포함해

tool 이 하는 일뿐 아니라 하지 않는 일도 명시해. 'X에는 호출하지 않는다', 'Y일 때 null을 반환한다' 같은 negative example 이 오호출을 줄여줘.

parameter 설명에는 의미 있는 정보만

모델은 parameter description 도 읽어. 'units: temperature unit, celsius or fahrenheit' 는 값의 의미를 알려주지만 'units: required' 는 schema 의 required 를 되풀이할 뿐이야.

모호한 prompt 다섯 개로 점검해

현재 description 으로 애매한 prompt 다섯 개를 실행해 올바른 호출과 오호출을 기록해. 사용 경계를 더 분명하게 고친 뒤 같은 prompt 를 다시 실행해 차이를 측정해.

Code

Bad description vs good description·python
# Good tool description
{
    "type": "function",
    "name": "search_products",
    "description": "Search the product catalog by name, category, or price range. "
                   "Returns up to 10 matching products with name, price, and description. "
                   "Use this when the user asks about available products or wants to compare options.",
    "parameters": {
        "type": "object",
        "properties": {
            "query": {
                "type": "string",
                "description": "Search query — product name or keywords (e.g., 'wireless headphones')"
            },
            "category": {
                "type": ["string", "null"],
                "enum": ["electronics", "clothing", "books", "home", null],
                "description": "Filter by product category"
            },
            "max_price": {
                "type": ["number", "null"],
                "description": "Maximum price in USD (e.g., 50.00)"
            }
        },
        "required": ["query", "category", "max_price"],
        "additionalProperties": False,
    },
    "strict": True,
}

External links

Exercise

tool 하나를 골라 애매한 prompt 다섯 개를 실행하고 올바른 호출과 오호출을 기록해. description 에 사용 경계를 분명히 적은 뒤 같은 prompt 를 다시 실행해 차이를 측정해.

Progress

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

댓글 0

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

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