HomeLearnCoursesHackathonsAccount
Tool Use & Function Calling
What Function Calling Actually Is · 1/2

A structured request instead of a wall of text

observethinkact

A language model on its own can only produce text. It has no hands, no network connection, no ability to check today's weather, query a database, or send an email. Function calling changes what the model is allowed to output. Instead of always replying in prose, the model is given a list of available functions, each with a name, a description, and a schema describing what parameters it takes and what type each one is. When the model decides one of those functions would help answer the request, it outputs a structured object naming the function and the specific argument values to use, instead of a sentence.

That structured output is not itself an action. The model does not execute anything, it only requests an execution. Your application code reads that request, actually calls the real function (hitting an API, running a database query, whatever it is), and gets a real result back. The model is the decision-maker about what to call and with what arguments, but it is your code, running outside the model, that does the doing.