What is function calling used for?#
Function calling connects the AI to your business systems, allowing it to perform specific, pre-approved actions. This transforms the AI from a general knowledge base into a practical assistant that can look up live data or trigger processes, automating real work.
How does function calling work?#
Developers provide the AI model with a list of available tools, or "functions," and descriptions of what they do. These functions could be anything from "checkdatabasefororderstatus" to "addappointmentto_calendar." When a user makes a request, the AI can intelligently determine if one of its available functions can help fulfill it.
Instead of executing the task itself, the AI generates a structured command that tells your company's software exactly which function to run. Your system then executes the function, retrieves the necessary information (like an order status), and feeds that data back to the AI. The AI then uses this fresh, specific information to provide a complete and accurate answer to the user.