What is function calling in LLMs?
Updated May 16, 2026
Short answer
Function calling allows LLMs to invoke external tools or APIs using structured outputs instead of generating only free-form text.
Deep explanation
Function calling enables LLMs to behave as orchestrators rather than isolated text generators. Instead of answering directly, the model outputs a structured function request with parameters.
The workflow is:
- User sends request.
- LLM identifies required external capability.
- Model generates structured function call.
- Backend executes tool/API.
- Tool results are returned to LLM.
- LLM generates final grounded response.
This significantly improves reliability because factual operations are delegated to deterministic systems.…
Unlock with a Pro subscription to view this section.
View pricingReal-world example
No real-world example available yet.
Unlock with a Pro subscription to view this section.
Upgrade to ProCommon mistakes
No common mistakes listed yet.
Unlock with a Pro subscription to view this section.
Upgrade to ProFollow-up questions
No follow-up questions available yet.
Unlock with a Pro subscription to view this section.
Upgrade to Pro