本文へスキップ

ツール呼び出しと関数呼び出し

モデルが呼ぶ API を選び、引数を埋める

入力テキスト動作

本ページの本文は英語で提供されています。タイトルと導入は日本語化されています。

この能力とは何か

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.

技術的にどう実現するか

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.

代表的な製品

10

LangChain

LangChain

モデル・ツール・検索をつなぐ

3能力
ツール オープンソース
2022

OpenAI

GPT-4o

ネイティブにマルチモーダルな汎用モデル。テキスト・画像・音声をひとつの入口で扱う

4能力
モデル クローズド
テキスト画像音声テキスト音声
2024

Anthropic

Claude

長い文脈と安全性の調整で知られる汎用対話モデル

4能力
モデル クローズド
テキスト画像テキスト
2023

Google DeepMind

Gemini

ネイティブにマルチモーダルで、超長文脈を扱う汎用モデル

4能力
モデル クローズド
テキスト画像音声動画テキスト
2023

Alibaba (Qwen)

Qwen

多様な規模とマルチモーダル版を備えたオープンウェイトのモデル群

4能力
モデル オープンウェイト
テキスト画像テキスト
2023

MiniMax

MiniMax-M

ハイブリッド注意と100万トークン文脈をもつオープンウェイトの推論モデル

4能力
モデル オープンウェイト
テキストテキスト
2025

Cohere

Command R

検索拡張とツール呼び出しのために設計された商用モデル

4能力
モデル オープンウェイト
テキストテキスト
2024

Mistral AI

Mistral Large

欧州のオープンウェイト研究所による商用フラッグシップモデル

4能力
モデル クローズド
テキストテキスト
2024

Zhipu AI

GLM

自己回帰空白穴埋め事前学習から始まった中国語の汎用モデル

4能力
モデル クローズド
テキストテキスト
2023

Meta AI (FAIR)

Llama

オープンウェイト路線を主流にした汎用モデル群

4能力
モデル オープンウェイト
テキストテキスト
2023

関連する組織

代表的な用途

  • 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

どう評価するか

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

限界と難しさ

  • 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

背景にある概念

AI エンジニアリング・安全性・倫理

エージェントとツール利用中級

モデルに「答える」だけでなく、調べ、API を呼び、コードを走らせる力を持たせ、その結果から次の一手を決めさせる

4関連
図解 1 · データ 1

自然言語処理と大規模言語モデル

Transformer アーキテクチャ中級

「一語ずつの伝言」を「全員が同時に話す会議」に置き換え、長距離依存を一跳で届かせる

4関連
図解 2 · データ 2