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エージェント構築、アプリケーション開発のベストプラクティス

2章コンテンツスタイルの制御

本章のパターンはすべて、基盤モデルによって生成されるコンテンツ(テキスト、画像、動画など)のスタイルを制御することに関係している。基盤モデルは、大規模なデータセットで訓練されており、多様なコンテンツを生成できる。ただし、そのコンテンツのスタイルは、デフォルトではモデル提供者が行った訓練プロセスに依存する。1つのバージョンのモデルを使う場合であっても、モデルのレスポンスは確率的で、まったく同じ質問をしても(キャッシュが行われていないなら)異なるレスポンスが返される可能性がある。ということは、生成AIモデルのレスポンスを利用する下流のアプリケーションやエンドユーザが、さまざまなスタイルに対応しなければならないことだ。

例として、いくつかの基盤モデルに同じ質問をしてみよう。

What’s a good side dish for pierogi? Answer in a single sentence.

ピエロギ†1に合う付け合わせは? 一文で答えよ。

回答を表2-1に示す。回答のスタイルを一文という形に制限しても、同じ質問に対する答えがモデルによって大きく異なることがわかる。回答のスタイルに一切制限を設けていなかったとしたら、どれほど多様な結果になったか想像してみてほしい。

表2-1 同じ質問に対する異なるスタイルでの回答(2025年2月にモデルから取得した回答)

モデル モデルプロバイダ 回答
GPT-4bit OpenAI ピエロギには、バターでソテーした玉ねぎにカリカリのベーコンを散らした付け合わせが最適だ。
Claude Sonnet 3.5 Anthropic ピリッとしたザワークラウトやキャラメリゼした玉ねぎは、餃子に対照的な酸味や甘みを加えてピエロギを完璧に引き立てる。 ...
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