Skip to Content
生成AIデザインパターン ―AIエージェント構築、アプリケーション開発のベストプラクティス
book

生成AIデザインパターン ―AIエージェント構築、アプリケーション開発のベストプラクティス

by Valliappa Lakshmanan, Hannes Hapke, 中田 秀基
May 2026
Intermediate
520 pages
8h 21m
Japanese
O'Reilly Japan, Inc.
Content preview from 生成AIデザインパターン ―AIエージェント構築、アプリケーション開発のベストプラクティス

7章行動するエージェント

これまでに紹介したパターンは、何らかの形で「コンテンツ」を作成することに関係していた。本章では、基盤モデル上に構築された「アプリケーション」が、世界と何らかのやり取りを行うことを可能にする3つのパターンについて説明する。これらのパターンが境界線となっていて、この境界線を超えるとアプリケーションはエージェントになる。ツール呼び出し[パターン21]は、構造化されたインタフェースを介してモデルが外部関数を呼び出すことを可能にする。コード実行[パターン22]は、モデルが複雑な問題を解決するためにコードを書いて実行することを可能にする。マルチエージェントコラボレーション[パターン23]は、階層型、ピアツーピア型、またはマーケットベースのアーキテクチャで、複数のそれぞれ特化したAIエージェントを協調させて、分業によって複雑なタスクに取り組む。

7.1 パターン21:ツール呼び出し

ツール呼び出しパターンは、LLMが世界の中で行動することを可能にする。情報を得る(例えばWeb検索)、環境に変更を加える(例えばファイルを書き出す)などだ。LLMがある関数を呼び出す必要があると判断すると、特殊なトークンとその関数に渡すべき引数とを出力する。クライアント側のポストプロセッサが、これらのパラメータを使って関数を呼び出し、その結果をLLMに送り返す。

7.1.1 問題

マルチモーダルLLMの中心となる機能は、さまざまな形態(テキスト、画像、音声、動画)のコンテンツの生成である。この機能は、研究レポートの作成、言語間の翻訳、コードの生成などの機能を提供するのに十分だ。訓練時に基盤モデルが獲得した内部知識によって、生成できるコンテンツが制約されるなら、RAGを使って新しい知識を注入すればいい( ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

大規模データ管理 ―エンタープライズアーキテクチャのベストプラクティス

大規模データ管理 ―エンタープライズアーキテクチャのベストプラクティス

Piethein Strengholt, 村上 列

Publisher Resources

ISBN: 9784814401635Publisher Website