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

2章LLMを理解する

LLMを巧みに操り、洗練されたプロンプトでその膨大な知識と処理能力を引き出す「LLM使い」になりたいですか? そのためには、まずどのようなプロンプトが「賢明」で、どのようにすればLLMから適切な回答を引き出せるのかを知る必要があります。その第一歩として、LLMが情報を処理する仕組み、つまりLLMがどのように「考える」のかを理解することが重要です。

本章では、段階的なアプローチでLLMの仕組みを探っていきます。まず、「2.1 LLMとは何か」では、LLMを外側から眺めて「テキストを模倣する装置」としてとらえてみましょう。続いて、「2.2 LLMが見る世界」では、LLMがテキストをどのように「トークン」と呼ばれる小さな単位に分割するのか、またその分割がうまくいかない場合に何が起こるのかを学びます。

次に、「2.3 1つのトークンずつ」で、LLMがどのようにトークンの連続を1つずつ生成していくのか、「2.4 temperatureと確率」では次に生成されるトークンを選ぶための手法について説明します。最終的には、「2.5 トランスフォーマーアーキテクチャ」でLLMの内側を掘り下げ、「アテンション機構」と呼ばれるQ&A形式のやり取りでミニブレインが協力し合う仕組みを理解し、プロンプトの順序がどう影響するのかを学びます。

ただし、本書はLLMそのものを解説するのではなく、LLMの「使い方」に焦点を当てています。そのため、プロンプトエンジニアリングに関係のない技術的な詳細の多くを省略しています。たとえば、行列計算や活性化関数については、他のリソースに頼る必要があります。参考資料として、「The Illustrated Transformer」(https://jalammar.github.io/illustratedtransformer ...

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