Function Calling
Core Facts
Mainstream Agent architectures typically use a large language model as the brain, combined with memory modules, planning modules, and tool interfaces to accomplish complex tasks
Function Calling (Tool Use) is a standardized mechanism for large models to invoke external tools, where developers pre-declare tool names, descriptions, and parameter schemas, and the model autonomously determines when to make a call.
The underlying mechanism of Tool Use is that developers pre-define the name, description, and parameter structure (Schema) of tools, and the model determines during inference when and which tool to call and outputs structured invocation instructions.
Timeline (last 90 days)
The Function Calling mechanism carries the risk of the model calling nonexistent tools, passing incorrectly formatted parameters, or calling when it shouldn't, so robust parameter validation and error feedback design are needed.
Without Function Calling, an Agent can only generate text; with it, the model can proactively obtain real-time information and operate business systems.
OpenAI's Function Calling and the Instructor library can both implement structured output with citations.
The "observe—think—act" loop implemented in Spring AI 2.0 based on built-in Function Calling recursive Advisors is essentially ReAct.
When modifying the Schema of Function Calling or Structured Outputs, active conversations do not automatically reset, and old conversation turns and replayed tool calls may emit the old data shape, causing subsequent conversation turns to crash.
Building a file management Agent based on NanoGPT, the core structure includes: defining tools in __init__ (JSON Schema describing function names, parameters, required fields), and the run method sends the user instruction and tools to the model and returns the model message content.
Tool Calling is a capability of large language models: when generating a reply, the model outputs structured JSON indicating which function to call and what parameters to pass, but the model only outputs intent and does not execute code; the responsibility for execution lies on the application side.
Before MCP appeared, if developers wanted AI to call external services, they usually had to write Function Calling code separately for each service, and the interfaces of different model providers were mutually incompatible.
Function Calling has now become the de facto standard for Agent tool invocation.
The advanced chapter of the tutorial covers hands-on practice with the LangChain and AutoGen frameworks, multi-Agent collaboration, Function Calling tool invocation, hybrid architectures of RAG and Agents, as well as evaluation, debugging, and safety boundaries, with each section accompanied by code courseware.
40 more timeline events
All Facts (20)
Mainstream Agent architectures typically use a large language model as the brain, combined with memory modules, planning modules, and tool interfaces to accomplish complex tasks
90%VerifiedFunction Calling (Tool Use) is a standardized mechanism for large models to invoke external tools, where developers pre-declare tool names, descriptions, and parameter schemas, and the model autonomously determines when to make a call.
90%VerifiedThe underlying mechanism of Tool Use is that developers pre-define the name, description, and parameter structure (Schema) of tools, and the model determines during inference when and which tool to call and outputs structured invocation instructions.
90%VerifiedThe tool-calling (Function Calling) mechanism allows the model to invoke external tools during reasoning, such as file read/write operations, terminal commands, and search APIs.
90%VerifiedOpenAI first introduced the Function Calling feature in June 2023, after which Anthropic's Claude and Google's Gemini also successively added support.
90%VerifiedOpenAI launched the Function Calling specification in 2023, allowing developers to describe function interfaces in JSON Schema format, with the model autonomously deciding when to call them and what parameters to pass.
90%VerifiedEach tool in MCP has a strict JSON Schema description, including the name, functional description, and parameter specifications
90%VerifiedA typical Agent is composed of a cycle of 'Perception—Planning—Action—Reflection'.
85%VerifiedThe core mechanism of Function Calling is that developers describe external function signatures in JSON Schema format, and the model outputs structured JSON invocation instructions that conform to the schema specification.
80%VerifiedThe underlying operational logic of an Agent Loop is an iterative cycle of 'perception–planning–action–observation.'
80%VerifiedDeepSeek R1 does not support Function Calling by default, whereas DeepSeek V3 supports Function Calling.
80%VerifiedFunction Calling is the core mechanism for large models to interact with external systems, allowing the model to call predefined functions after identifying user intent.
80%Verified在MCP出现之前,AI调用外部工具主要依赖OpenAI的Function Calling机制或各框架自定义的插件系统
80%VerifiedTool-Augmented AI is an important development direction for current large model applications, with mechanisms such as OpenAI's Function Calling and Anthropic's Tool Use underpinning this paradigm at the foundational level.
80%VerifiedThe principle of Function Calling is that, in addition to generating natural language text during inference, the model can also output structured function-call instructions (JSON containing the function name and parameters).
80%VerifiedFunction Call is a capability introduced by OpenAI in June 2023 with the GPT-3.5/GPT-4 API update, allowing developers to define JSON Schema descriptions of functions in API requests.
80%VerifiedOpenAI was the first to introduce Function Calling capability in June 2023.
80%VerifiedThe Function Calling mechanism was first introduced into the GPT series of models by OpenAI in 2023.
80%VerifiedFunction Calling is a feature first introduced by OpenAI in mid-2023 and subsequently adopted by major model vendors.
80%VerifiedFunction Calling机制中,开发者将工具的名称、功能描述、参数Schema(通常为JSON Schema格式)注入到模型的请求中,模型输出结构化的JSON而非自然语言来调用工具
80%