Function Calling · Tool Use
Function Calling / Tool Use
What is function calling?
- AI calls external tools and APIs on its own
- Extends conversational AI into “action-taking” AI
- The agent’s hands
When function calling is on, the nature of the model’s output changes. Instead of producing a sentence as usual, it returns a structured request (usually JSON) saying 'call this function with these arguments,' and your own system, outside the model, does the actual execution. The model decides and the application executes, and the result must be passed back to the model before a human-readable answer is complete. The starting point of this design is that the developer keeps final control over what gets called.
Three design points make or break it. The first is the function specification: how clearly you write the name, one-line description, and parameter types determines how accurately the model picks a tool. The second is the number of tools: once you pass 20 to 30 candidates, similar functions get confused more often, so it is safer to add a separate routing step up front. The third is the split between reads and writes. Reversible calls such as lookups and calculations should not be treated the same as irreversible ones such as placing an order, sending an email, or making a payment. It is easy to confuse with RAG, but the two differ: RAG inserts search results in advance, whereas with function calling the model decides case by case whether to make a call.
The mistake we see most often in the field is complacency: “it’ll figure it out.” When a function description is thin, the model doesn’t give up on the call; it makes up plausible-looking arguments. A part number that doesn’t exist or a date in the wrong format goes straight into the production database. Other failures include repeating the same request endlessly after a failed call and burning through the API quota, or opening a write function without an approval step so that an order that can’t be canceled goes out. Attach input validation, a retry cap, and an execution log to every call, and for any action that spends money or sends something outside the company, leave the final button press to a person.
John KimInstructor John Kim, author of B2B Marketing Design and CEO of Nanum Consulting
Seolyeong ParkGenerative AI and AX training specialist with 17 years of hands-on experience and 200+ lectures, helping non-technical staff put AI to work right awayIt grew out of efforts to give large language models the ability to use external tools (ReAct and others, 2022). As the feature of AI calling predefined functions became standardized, it became the foundation of agents.
Consider a hypothetical case: Company A, an industrial materials distributor with 140 employees and annual revenue in the KRW 62 billion (≈ US$46,386,400) range. Its sales support team takes 70+ calls a day asking 'Do you have that part number in stock? When can it ship?', and every answer meant opening two ERP screens. They tried an in-house chatbot, but it kept repeating 'Please contact the person in charge for details,' and usage hit rock bottom within three months.
- Manager Park on the IT team found the cause. The chatbot was reading only the product manual PDFs, so it had no channel at all for looking at real-time stock figures that change every hour.
- So we opened just two ERP functions, stock lookup and delivery-date calculation, as read-only functions. In the function description, we spelled out that “the part number is an 8-digit number.”
- In the two-week pilot, the model made up nonexistent part numbers and looked them up 17 times a week. They added a part-number validation function up front, so that when the format is wrong, the AI asks again: 'Please give me the 8-digit part number again.'
- Sales Manager Kim blocked the order-entry function: 'A person presses the button when money goes out.' In the end, the AI only brings up a draft order, and it is sent only after the person in charge presses the approve button.
- Three months later, the average handling time per call fell from 4 minutes 30 seconds to 55 seconds, and the 4 people on the sales support team won back 21 hours a week. Wrong-answer reports dropped from 17 a week to 2.