#6 of 25

Function calling

This is what turns a chatbot into a product that actually does things

What is function calling

You have used a phone menu. Press 1 for billing. Press 2 for support. Press 3 for account. The menu does not answer your question — it routes you to the system that can.

Function calling is the same idea, but the model decides which button to press.

You define a set of functions your application can run — look up a user, check a price, book a meeting, query a database. You describe them to the model in plain language. When a user asks something that requires one of those functions, the model says: run this function with these parameters. Your code runs it. The result comes back. The model uses it to answer.

The model is the router. Your functions are the buttons.

The number that makes it real

Function calling support is a boolean on every model page on sourc.dev — it either supports it or it does not. Among the 30 models currently tracked, the majority of frontier models support it. Claude 3.5 Sonnet: yes. GPT-4o: yes. Gemini 1.5 Pro: yes. Verified March 2026.

Why this matters to you

Without function calling, a model can tell a user what their order status probably is. With function calling, it can look it up.

That is not a small difference. It is the line between an AI that sounds helpful and one that is helpful. A customer support bot that can actually pull an order. A scheduling assistant that can actually check a calendar. A data analyst that can actually query your database.

If you are building something people will use to get things done — not just to get information — function calling is the capability that makes it possible.

How to use this

Define your functions with clear, specific descriptions. The model uses those descriptions to decide when to call them. Vague descriptions lead to wrong calls. "Get order status by order ID" is better than "look up orders."

Start with one function. See how the model uses it. Add more once the pattern is clear.

Verified March 2026 · Source: Anthropic, OpenAI function calling documentation

← All terms