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アプリケーション開発

4章LLMアプリケーションの設計

前の2つの章で、これから本書で学ぶ内容の基礎を固めてきました。「2章 LLMを理解する」では、LLMの動作の仕組みを詳しく解説し、その本質は「トークンを1つずつ予測してコンテンツを補完していくモデル」であることを明らかにしました。「3章 チャット形式への移行」では、そのLLMを基盤としてチャットAPIがどのように構築されているのかを説明しました。APIレベルでの工夫と適切なファインチューニングによって、ドキュメント補完モデルは「ユーザーと仮想アシスタントの対話」を補完するモデルへと進化したのです。つまり、チャットモデルの本質は依然としてドキュメント補完モデルであり、ただ扱うドキュメントがトランスクリプトという形を取っているだけなのです。

これからは、皆さんが所属する組織やユーザーの課題を解決するためのLLMアプリケーションを構築するために必要な知識を、すべて学んでいきます。本章は、そうした実践的な知識への入り口となります。ここでは「LLMアプリケーション」について掘り下げていきますが、これは「ユーザーの問題ドメイン」と「モデルのテキストドメイン」を橋渡しする変換レイヤとして機能します。さらに重要なのは、この変換レイヤが「問題解決」という明確な目的を持って機能するという点です。

4.1 ループの仕組み

図4-1では、LLMアプリケーションを「ループ」として表現しています。つまり、ユーザーとモデルの間で行われる双方向のやり取りを示しているのです。モデルとユーザーでは、それぞれが活動するドメインが大きく異なることがよくあります。ユーザーの場合、たとえばメールを書いていて、自分の意図を正確に伝えるための適切な表現を探しているかもしれません。あるいは、グループ旅行の計画を立て、航空券を予約し、宿泊先を確保するといった、より複雑なタスクに取り組んでいるかもしれません。さらには、ユーザーがLLMアプリケーションと直接やり取りをしないケースもあります。たとえば、定期的な分析タスクを事前に設定しておき、新しいデータが利用可能になるたびにLLMアプリケーションが自動的に分析を実行するような場合です。このように、ユーザー側での活動は実に多様なバリエーションを取り得るのです。 ...

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