Artificial Intelligence

Function Calling

A capability where an LLM can generate structured output to invoke specific functions or APIs. The model decides which function to call and what parameters to pass based on the user's request.

Why It Matters

Function calling is the bridge between AI conversations and real-world actions. It enables AI to interact with databases, services, and business systems programmatically.

Example

A user asks 'What is the weather in Tokyo?' and the LLM generates a structured call: get_weather(city='Tokyo', units='celsius') which is then executed by the application.

Think of it like...

Like a doctor writing a precise prescription — they decide what medication and dosage you need, but the pharmacist (the function) actually prepares and dispenses it.

Related Terms