Chuyển đến nội dung
Bản đồ AI

Gọi công cụ và gọi hàm

Để mô hình chọn API và điền tham số

Tác nhân & gọi công cụTrung cấp #35
đầu vàoVăn bảnHành động

Toàn văn của trang này được trình bày bằng tiếng Anh; tiêu đề và phần dẫn đã được bản địa hóa.

NĂNG LỰC NÀY NGHĨA LÀ GÌ

Takes a user request and a list of available tools — names, descriptions, argument schemas — and outputs a structured call such as get_weather with city set to Shanghai. The model executes nothing itself; it selects a tool and assembles arguments, while the actual call is made by external code whose result is fed back for further reasoning.

Làm ra sao về mặt kỹ thuật

Fine-tuning on many examples of when to call, which tool to use and what arguments look like teaches the model to emit a call when it needs external information or action; at inference the tool definitions go into the prompt and the output is constrained to a valid structure. With many tools, retrieval first narrows the candidates, and a multi-turn loop that feeds results back handles complex tasks.

Sản phẩm tiêu biểu

10

LangChain

2022
LangChain

Ghép mô hình, công cụ và truy hồi lại với nhau

Công cụ Mã nguồn mở

GPT-4o

2024
OpenAI

Mô hình đa phương thức gốc, xử lý văn bản, hình ảnh và âm thanh qua một cửa vào

Mô hình Đóng
Văn bảnHình ảnhÂm thanhVăn bảnÂm thanh

Claude

2023
Anthropic

Mô hình hội thoại phổ thông nổi bật với ngữ cảnh dài và căn chỉnh an toàn

Mô hình Đóng
Văn bảnHình ảnhVăn bản

Gemini

2023
Google DeepMind

Mô hình đa phương thức gốc, xử lý ngữ cảnh siêu dài

Mô hình Đóng
Văn bảnHình ảnhÂm thanhVideoVăn bản

Qwen

2023
Alibaba (Qwen)

Dòng trọng số mở với nhiều kích cỡ và bản đa phương thức

Mô hình Trọng số mở
Văn bảnHình ảnhVăn bản

MiniMax-M

2025
MiniMax

Mô hình suy luận trọng số mở với attention lai và ngữ cảnh một triệu token

Mô hình Trọng số mở
Văn bảnVăn bản

Command R

2024
Cohere

Mô hình thương mại dành cho tăng cường truy hồi và gọi công cụ

Mô hình Trọng số mở
Văn bảnVăn bản

Mistral Large

2024
Mistral AI

Mô hình thương mại chủ lực của phòng lab trọng số mở châu Âu

Mô hình Đóng
Văn bảnVăn bản

GLM

2023
Zhipu AI

Mô hình phổ thông tiếng Trung khởi đầu bằng tiền huấn luyện điền khuyết tự hồi quy

Mô hình Đóng
Văn bảnVăn bản

Llama

2023
Meta AI (FAIR)

Dòng mô hình đưa trọng số mở trở thành xu hướng chính

Mô hình Trọng số mở
Văn bảnVăn bản

Tổ chức liên quan

Cách dùng tiêu biểu

  • Fetching live data such as weather, prices or stock
  • Performing business actions such as orders and messages
  • Calling calculators, search and code executors
  • Chaining several APIs for a composite task

Đánh giá nó tốt hay không thế nào

Function-selection accuracy
Share of requests where the right tool was chosen
Exact argument match
Share with arguments exactly matching the reference
End-to-end task success
Whether the task completes once tools actually run

Ranh giới và điểm khó

  • Slightly complex argument shapes — nested objects, arrays, optional fields — are easily filled wrongly
  • As the tool list grows, wrong selections rise sharply, and similar-purpose tools are the most confusable
  • Recovery after a failed call is unreliable, and the model often loops on the error instead of adapting

Các khái niệm đằng sau