Back to list
Lv.2

Function Calling

Function Calling

A feature that lets AI automatically decide which program to run and call it on its own.

In Simple Terms

Function Calling is a mechanism that lets AI decide, based on the conversation, to call an appropriate external program. For example, if you ask AI "What's the weather like tomorrow?", it tells a weather-lookup program to run, then receives the latest data that program returns. This lets AI weave up-to-date information it wouldn't otherwise know, or precise results from a calculation program, right into its answer.

Behind the Name

The name combines two programming terms: a "function" is a self-contained block of code that performs a specific task, and "calling" it means telling the program to run that code. Function Calling refers to an AI deciding on its own to call one of these pre-built functions to get a task done.

Take a Closer Look!

Function Calling is a feature that lets generative AI understand a user's question and automatically choose one of its pre-built programs to prompt for execution.
The AI itself decides, "To answer this question, I need to run this program," and issues the instruction.

Here's how it actually works: instead of launching the program directly, the AI identifies and outputs the "name of the program" and the "data it needs to pass in (the arguments)."
The system then reads that instruction, runs the actual program, and sends the result back to the AI.
The AI takes that returned data and translates it into a natural-language answer for the user.

This mechanism makes it possible for AI to handle advanced tasks it couldn't do on its own, like looking up real-time information or operating a database.
In the world of programming, it's widely used as a key technology that connects AI to external systems.