Glossary · AI & ML

Function Calling

Function calling is an AI model capability where the model responds with a structured request to invoke a specific tool–such as "run this SQL query"–instead of plain text, letting applications execute the action and return results.

Function calling is the mechanism that turns a language model from a text generator into something that can act. The application defines tools the model may use–run a query, fetch a schema, render a chart–and the model emits structured calls with arguments instead of prose. The application executes the call and feeds the result back, and the loop continues. For database products this is foundational: it is how "ask a question, get an answer from your live data" actually works under the hood, with the model deciding which query to run and the application controlling what is allowed to execute.

In practice

How AI for Database applies it

AI for Database uses this pattern internally: the AI requests queries, the platform validates and executes them read-only, and results flow back as tables, charts, or summaries.
AI & ML · aifordatabase glossaryRead-only ✓

Fig — every answer ships with the tables, rows and SQL behind it.

See it on your own database

Connect read-only in minutes. Free models included.

Start free