Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: Drew Farris, Edward Raff, Stella Biderman for Booz Allen Hamilton

Rating No ratings yet

How GPT Works is an introduction to LLMs that explores OpenAI’s GPT models. The book takes you inside ChatGPT, showing how a prompt becomes text output. In clear, plain language, this illuminating book shows you when and why LLMs make errors, and how you can account for inaccuracies in your AI solutions. Once you know how LLMs work, you’ll be ready to start exploring the bigger questions of AI, such as how LLMs “think” differently that humans, how to best design LLM-powered systems that work well with human operators, and what ethical, legal, and security issues can—and will—arise from AI automation. Learn how large language models like GPT and Gemini work under the hood in plain English. How GPT Works translates years of expert research on Large Language Models into a readable, focused introduction to working with these amazing systems. It explains clearly how LLMs function, introduces the optimization techniques to fine tune them, and shows how to create pipelines and processes to ensure your AI applications are efficient and error-free. In How GPT Works you will learn how to: Test and evaluate LLMs Use human feedback, supervised fine tuning, and Retrieval augmented generation (RAG) Reducing the risk of bad outputs, high-stakes errors, and automation bias Human-computer interaction systems Combine LLMs with traditional ML

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A plain-English tour of how GPT-style large language models actually turn a prompt into text—and why they fail—for developers, managers, and anyone who needs to reason about LLM-powered systems without wading through research papers. 【Book Arc】 - **Opening (~0%–10%)**: Frames the big picture: what GPT and generative AI are, how machine language representation differs from human language, and why ChatGPT performs so well (and where it breaks down). - **Early (~10%–30%)**: Builds the conceptual foundation—what "intelligence" means (and why the term misleads), how AI/ML tackles hard-to-specify tasks, and the convergence of neural algorithms, data, and GPUs that made LLMs possible. - **Early–Middle (~30%–45%)**: Introduces GPT as Generative Pretrained Transformer, situates ChatGPT among a broader ecosystem of models (EleutherAI, BigScience, Meta, Google), and argues that scale—model size and data volume—often matters more than clever architecture. - **Middle (~45%–55%)**: Examines GPT in action: the good, bad, and scary. Covers failure modes, adversarial prompting, the scale of automated harm, and why skepticism and verification are essential when deploying LLMs. - **Late (~55%–80%)**: Moves from "what LLMs do" to "what humans do"—interaction design, human feedback, supervised fine-tuning, RAG, and combining LLMs with traditional ML. (Excerpts do not cover these chapters in detail.) - **Ending (~80%–100%)**: Addresses ethical, legal, and security issues arising from AI automation, plus how to design LLM-powered systems that work well with human operators. (Excerpts do not cover these chapters in detail.) 【Key Takeaways】 - **LLMs represent language learned through a static training process, not interactive understanding** (Early): Unlike humans who learn language through evolution and conversation, LLMs mechanically participate in dialogue despite never having been in a conversation. This distinction bounds what you should expect from them. - **Scale beats cleverness more often than researchers like to admit** (Middle): The two details that matter most are model size and training data volume. Many architectural "improvements" could have been matched simply by making the model bigger—a lesson worth applying to your own ML design choices. - **Bigger is not better by every metric** (Middle): LLMs are a logistical and computational challenge to deploy. Response time, power draw, battery drain, and maintainability all suffer. "Performance" improves only in a narrow sense. - **LLMs fail on simple tasks, which should make you skeptical about hard ones** (Middle): If GPT fails on things a child can do, using it for tasks you cannot verify yourself sets you up for failure. Safe use requires doubt, verification, and adaptability. - **Adversarial prompting is a real, scalable risk** (Middle): Researchers have shown how to bypass safety guardrails on commercial LLMs. At scale—100 million+ users—even a 0.01% failure rate produces thousands of dangerous responses. - **Training an LLM from scratch is out of reach for most** (Early): Minimum investment is $100,000, and competing with OpenAI would cost hundreds of millions. The book focuses on durable knowledge rather than code that goes stale in months. - **The book splits into two halves: what LLMs do and what humans do** (Early): The first half covers inputs, outputs, and constraints; the second covers human-computer interaction, risks, ethics, and system design. This structure mirrors the shift from technical mechanics to practical deployment. - **No coding background required, but minimal programming familiarity helps** (Early): The book assumes you know logic, functions, and maybe data structures—not mathematics. Very little code is presented; the goal is conversational competence, not hands-on implementation. 【Reading Tips】 - **Deep-read the first half** (chapters on tokenizers, transformers, and the big picture): This is where the conceptual foundation lives, and it is what makes the second half's design and risk discussions intelligible. - **Skim the "what is intelligence" philosophical detour** if you already have ML background—it is aimed at readers who need the mental model corrected, not at practitioners. - **Pay attention to failure examples**: The book deliberately shows GPT failing on easy tasks. Treat these as diagnostic tools for understanding where LLMs are and are not appropriate, not as entertainment. - **Use the second half as a design checklist**: When you reach the chapters on human feedback, RAG, and human-computer interaction, map each technique back to a real system you are building or evaluating. - **Keep a running list of "when not to use an LLM"**: The book repeatedly returns to this question. By the end, you should have your own criteria, not just the authors'. 【Coverage Limits】 This guide is based on stratified excerpts covering roughly the first half of the book (through the "GPT in action" section). The later chapters on fine-tuning, RAG, human-computer interaction, and ethical/legal/security issues are referenced in the table of contents and blurb but not covered in detail by the available excerpts.
Page 4
e’ve contributed to the problem ourselves with our research! That's why we wanted to write this book on understanding what GPTs and LLMs are. Once you are do...
View in text
Page 10
ding: logic, functions, and maybe even some data structures. You also do not need to be a mathematician; we will show you a bit of math where it is helpful,...
View in text
Page 14
age that implies the literal cognitive functions of a human. As LLMs demonstrate capabilities at a level close to what humans can do, these analogies become...
View in text
Page 19
as we discuss how to use GPT more throughout the book. NOTE Chat-GPT can often be quite verbose, to put it politely. Our prompts will often include instructi...
View in text
Excerpt 5
is the feature engineering for LLMs; thus, it is critically essential because tokens are the only information a model interacts with. Tokens are seen as indi...
View in text
Excerpt 6
aset to shrink the most. Those two tokens are combined into a single token, and the process is repeated until the vocabulary is “small enough”. This is much...
View in text
Excerpt 7
ult, homoglyphs can be used to inflate the number of tokens that occur in a text, change how an LLM parses the information, or be used to run up your bill/co...
View in text
Excerpt 8
e one at https://platform.openai.com/tokenizer. backstopped Large Language Models Schoolhouse How you process sentences to understand them is a complex proce...
View in text
Tags
AI categories
Artificial IntelligenceProgramming LanguageTechnology
ISBN: 1633437086
Publish Year: 2024
Language: English
Pages: 60
File Format: PDF
File Size: 2.5 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…