Skip to Content
LLMのプロンプトエンジニアリング ―GitHub Copilotを生んだ開発者が教える生成AIアプリケーション開発
book

LLMのプロンプトエンジニアリング ―GitHub Copilotを生んだ開発者が教える生成AIアプリケーション開発

by John Berryman, Albert Ziegler, 服部 佑樹, 佐藤 直生
May 2025
Intermediate to advanced
276 pages
4h
Japanese
O'Reilly Japan, Inc.
Content preview from LLMのプロンプトエンジニアリング ―GitHub Copilotを生んだ開発者が教える生成AIアプリケーション開発

5章プロンプトのコンテンツ

新しいLLM駆動の書籍推薦アプリケーションを作っているところを想像してみてください。競争はとても激しく、すでに無数の書籍推薦アプリケーションが存在しています。それらの多くは、ユーザー同士の利用パターンを比較しておすすめの書籍を導き出すような、協調フィルタリングなどの高度に数値的な手法に依存しています。

しかし、LLMはこうした領域に新しい価値をもたらす可能性があります。なぜなら、従来のかたくなで計算重視の推薦アルゴリズムとは異なり、LLMはユーザーに関する文章データを読み込み、人間に近い常識的な推論を使って推薦を行えるからです。これはあたかも、すべてのパブリックインターネット上の書評を端から端まで読んでしまった人間が、書籍をおすすめしてくれるようなイメージです。

実際にどんな感じになるか、ちょっと見てみましょう。図5-1は、ChatGPTによる2つの書籍おすすめの例です。最初の例では、私が最近読んだ本、ハーマン・メルヴィルの『白鯨』とマーク・トウェインの『ハックルベリー・フィンの冒険』の情報だけを与えています。従来の推薦システムでも使われる「過去に読んだ本」の情報に相当するわけです。その結果出てきたおすすめがハーパー・リーの「アラバマ物語」なのですが、これはそこまで悪い提案ではありません。

しかし、ここからがLLMの力の見せどころです。図の右側では、私の属性や本以外の好み、最近の体験といった、いろいろなテキスト情報をさらに追加してみました。すると、LLMはそれらを統合しつつ常識的に推論し、より「ずっと」的を射た魅力的な提案をしてくれます。ここでは、更新後のおすすめ結果に、私の興味により深く関連するコンテンツが含まれています。

図5-1 ChatGPTに本の推薦を依頼する場合:コンテキストなしの場合(上)と個人的なコンテキストを追加した場合(下)の比較 ...

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

実用 Git 第3版

実用 Git 第3版

Prem Kumar Ponuthorai, Jon Loeliger, 萬谷 暢崇, 長尾 高弘
入門 Kubernetes

入門 Kubernetes

Kelsey Hightower, Brendan Burns, Joe Beda, 松浦 隼人

Publisher Resources

ISBN: 9784814401130Publisher Website