
Buy New
Learn more
Return this item for free
We offer easy, convenient returns with at least one free return option: no shipping charges. All returns must comply with our returns policy.
Learn more about free returns.- Go to your orders and start the return
- Select your preferred free shipping option
- Drop off and leave!
Save with Used - Very Good
Book details
- ISBN-101098156153
- ISBN-13978-1098156152
- Edition1st
- PublisherO'Reilly Media
- Publication dateDecember 31, 2024
- LanguageEnglish
- Dimensions7 x 0.59 x 9.19 inches
- Print length280 pages
Large language models (LLMs) are revolutionizing the world, promising to automate tasks and solve complex problems. A new generation of software applications are using these models as building blocks to unlock new potential in almost every domain, but reliably accessing these capabilities requires new skills. This book will teach you the art and science of prompt engineering-the key to unlocking the true potential of LLMs.
Industry experts John Berryman and Albert Ziegler share how to communicate effectively with AI, transforming your ideas into a language model-friendly format. By learning both the philosophical foundation and practical techniques, you'll be equipped with the knowledge and confidence to build the next generation of LLM-powered applications.
- Understand LLM architecture and learn how to best interact with it
- Design a complete prompt-crafting strategy for an application
- Gather, triage, and present context elements to make an efficient prompt
- Master specific prompt-crafting techniques like few-shot learning, chain-of-thought prompting, and RAG
About the Author
Before his work on Copilot, John built an impressive career as a search engineer. His diverse experience includes helping to develop next-generation search system for the US Patent Office, building search and recommendations for Eventbrite, and contributing to GitHub's code search infrastructure. John is also coauthor of Relevant Search (Manning), a book that distills his expertise in the field.
John's unique background, spanning both cutting-edge AI applications and foundational search technologies, positions him at the forefront of innovation in LLM applications and information retrieval.
Albert Ziegler has been designing AI-driven systems long before LLM applications became mainstream. As founding engineer for GitHub Copilot, he designed its prompt engineering system and helped inspire a wave of AI-powered tools and "Copilot" applications, shaping the future of developer assistance and LLM applications.
Today, Albert continues to push the boundaries of AI technology as Head of AI at XBOW, an AI cybersecurity company. There, he leads efforts blending large language models with cutting-edge security applications to secure the digital world of tomorrow.
About the authors
Follow authors to get new release updates, plus improved recommendations.Albert Ziegler has been designing AI-driven systems long before LLM applications became mainstream. As founding engineer for GitHub Copilot, he designed its prompt engineering system and helped inspire a wave of AI-powered tools and "Copilot" applications, shaping the future of developer assistance and LLM applications.
Today, Albert continues to push the boundaries of AI technology as Head of AI at XBOW, an AI cybersecurity company. There, he leads efforts blending large language models with cutting-edge security applications to secure the digital world of tomorrow.
John Berryman is the founder and principal consultant of Arcturus Labs, where he specializes in LLM application development. His expertise helps businesses harness the power of advanced AI technologies. As an early engineer on GitHub Copilot, John contributed to the development of its completions and chat functionalities, working at the forefront of AI-assisted coding tools.
Before his work on Copilot, John built an impressive career as a search engineer. His diverse experience includes helping to develop next-generation search system for the US Patent Office, building search and recommendations for Eventbrite, and contributing to GitHub's code search infrastructure. John is also coauthor of Relevant Search (Manning), a book that distills his expertise in the field.
John's unique background, spanning both cutting-edge AI applications and foundational search technologies, positions him at the forefront of innovation in LLM applications and information retrieval.
Frequently bought together
Frequently bought together

You might also like
-  
-  
-  
-  
-  
From the brand
-
Browse more NLP & LLM books
-
Machine Learning, AI & more
-
More from O'Reilly
-
Sharing the knowledge of experts
O'Reilly's mission is to change the world by sharing the knowledge of innovators. For over 40 years, we've inspired companies and individuals to do new things (and do them better) by providing the skills and understanding that are necessary for success.
Our customers are hungry to build the innovations that propel the world forward. And we help them do just that.
From the Publisher

From the Preface
This book is written for application engineers. If you build software products that customers use, then this book is for you. If you build internal applications or data-processing workflows, then this book is also for you. The reason that we are being so inclusive is because we believe that the usage of LLMs will soon become ubiquitous. Even if your day-to-day work doesn’t involve prompt engineering or LLM workflow design, your codebase will be filled with usages of LLMs, and you’ll need to understand how to interact with them just to get your job done.
However, a subset of application engineers will be the dedicated LLM wranglers—these are the prompt engineers. It’s their job to convert problems into a packet of information that the LLM can understand—which we call the prompt—and then convert the LLM completions back into results that bring value to those who use the application. If this is your current role—or if you want this to be your role—then this book is especially for you.
LLMs are very approachable—you speak with them in natural language. So, for this book, you won’t be expected to know everything about machine learning. But you do need to have a good grasp of basic engineering principles—you need to know how to program and how to use an API. Another prerequisite for this book is the ability to empathize, because unlike with any technology before, you need to understand how LLMs “think” so that you can guide them to generate the content you need. This book will show you how.
What You Will Learn
The goal of this book is to equip you with all the theory, techniques, tips, and tricks you need to master prompt engineering and build successful LLM applications.
In Part I of the book, we convey a foundational understanding of LLMs, their inner workings, and their functionality as text completion engines. We cover the extension of LLMs to their new role as chat engines, and we present a high-level approach to LLM application development.
In Part II, we introduce the core techniques for prompt engineering—how to source context information, rank its importance for the task at hand, pack the prompt (without overloading it), and organize everything into a template that will result in high-quality completions that elicit the answer you need.
In Part III, we move to more advanced techniques. We assemble loops, pipelines, and workflows of LLM inference to create conversational agency and LLM-driven workflows, and we then explain techniques for evaluating LLMs.
Throughout this book, we highlight one principle that underlies all others:
If you process that statement deeply, then you’ll arrive at the same conclusions that we share throughout this book: when you want an LLM to behave a certain way, you have to shape the prompt to resemble patterns seen in training data—use clear language, rely upon existing patterns rather than creating new ones, and don’t drown the LLM in superfluous content. Once you master prompt engineering, you can build upon these skills by creating conversation agency and workflows—the dominant paradigms for LLM applications.
Product information
Publisher | O'Reilly Media |
Publication date | December 31, 2024 |
Edition | 1st |
Language | English |
Print length | 280 pages |
ISBN-10 | 1098156153 |
ISBN-13 | 978-1098156152 |
Item Weight | 1 pounds |
Dimensions | 7 x 0.59 x 9.19 inches |
Best Sellers Rank |
|
---|---|
Customer Reviews | 4.2 out of 5 stars 20Reviews |
Customers who bought this item also bought
You might also like
-  
-  
-  
-  
-  
Related books
Top reviews from the United States
There was a problem filtering reviews. Please reload the page.
- 5.0 out of 5 starsVerified PurchaseA fantastic read, even for seasoned prompt engineersReviewed in the United States on March 20, 2025Format: PaperbackI just finished reading Prompt Engineering for LLMs. The authors have done a fantastic job. I've recommended the book to a few people already. Even though my team has worked on a fair amount of LLM implementations the past two years, I found something insightful in...I just finished reading Prompt Engineering for LLMs. The authors have done a fantastic job. I've recommended the book to a few people already. Even though my team has worked on a fair amount of LLM implementations the past two years, I found something insightful in every chapter: either some new strategy to employ or a clarifying thought about some practice I had stumbled into in prompt engineering and previously had difficulty explaining to others.
My dev team has weekly internal talks led by team members on various topics they're interested in, and I've been wanting to do more with them around AI best practices. This book is giving me a good blueprint to hopefully start that. So thank you!
- 5.0 out of 5 starsVerified PurchaseExcellent Resource!Reviewed in the United States on April 9, 2025Format: PaperbackExcellent resource! This book was incredibly helpful in growing my ability to articulate and improve my understanding of state of the art prompt engineering. I’ve recommended this book to several others and have heard similar positive reviews. Many thanks to the...Excellent resource! This book was incredibly helpful in growing my ability to articulate and improve my understanding of state of the art prompt engineering. I’ve recommended this book to several others and have heard similar positive reviews. Many thanks to the authors!
- 5.0 out of 5 starsVerified PurchasePragmatic, hands-on approach to learning prompt engineeringReviewed in the United States on December 9, 2024Format: KindleThere are, by now, quite a lot of LLM-related books to choose from, and I'm glad I got this one. It gives you a great overview of and deep dive into the necessary steps to create applications incorporating LLMs, including how to construct effective prompts and all the...There are, by now, quite a lot of LLM-related books to choose from, and I'm glad I got this one. It gives you a great overview of and deep dive into the necessary steps to create applications incorporating LLMs, including how to construct effective prompts and all the details that go into that, as well as how to "think like an LLM" to make use of them effectively. It also discusses tool usage and RAG, agents, as well as the all-important evals to make sure your application works, and keeps working, as expected.
It's filled with small nuggets of wisdom and insightful comments that can only come from people who've been actively applying their knowledge for years already, and I'm happy to be able to use that to get a jump-start for applying it in my own work.
- 4.0 out of 5 starsA Clear, Insightful Guide to Becoming an LLM WhispererReviewed in the United States on April 14, 2025Format: PaperbackPrompt Engineering for LLMs is a well-crafted introduction to one of the most important emerging skills in the age of AI: communicating effectively with large language models. Whether you're building LLM-powered apps or just trying to get better responses from AI, this...Prompt Engineering for LLMs is a well-crafted introduction to one of the most important emerging skills in the age of AI: communicating effectively with large language models. Whether you're building LLM-powered apps or just trying to get better responses from AI, this book will help you become an LLM Whisperer.
Authors John Berryman and Albert Ziegler strike a great balance—delivering a thorough, yet not overly academic, treatment of key concepts in prompt engineering. I especially appreciated the way they frame both the philosophical underpinnings and the practical techniques. They provide a solid overview of LLM history and architecture, then dive into effective prompting strategies like few-shot learning, chain-of-thought prompting, and RAG.
The illustrations are clean and thoughtfully done—they complement the text rather than distract from it. And the book is refreshingly light on code, which makes it easier to focus on understanding the why behind prompt engineering instead of just the how.
Highly recommended for developers, tech leads, or anyone serious about tapping into the full potential of modern AI.
- 5.0 out of 5 starsWhy Prompt Engineering Belongs in Every Developer’s ToolkitReviewed in the United States on May 4, 2025Format: PaperbackPrompt Engineering for LLMs: The Art and Science of Building Large Language Model-Based Applications is a practical, insightful guide that meets software engineers exactly where they are; at the crossroads of traditional development and the fast-evolving world of AI...Prompt Engineering for LLMs: The Art and Science of Building Large Language Model-Based Applications is a practical, insightful guide that meets software engineers exactly where they are; at the crossroads of traditional development and the fast-evolving world of AI integration. As large language models become embedded in both customer-facing products and internal systems, the ability to work fluently with them is quickly becoming a fundamental engineering skill. This book makes the case for that future and it provides a path to get there.
John Berryman and Albert Ziegler succeed not just in defining what prompt engineering is, but in teaching how to do it well. They present prompt engineering as both a science and an art, rooted in clear communication, structured thinking, and a deep understanding of how LLMs interpret and respond to language. The book moves fluently from foundational concepts to advanced techniques like retrieval-augmented generation, looped inference workflows, and conversational agency design. Whether you’re optimizing prompts for performance or architecting entire LLM-based systems, the material is grounded, accessible, and deeply applicable.
Perhaps most importantly, this book reflects a truth too often overlooked: prompt engineering isn’t a fringe specialization / job (as is being shown by that job currently going out of fashion at the time of writing). It’s becoming a core competency in software development. If you’re already building applications, or expect to in a world increasingly shaped by AI, this is a book you should take a strong look at.
- 5.0 out of 5 starsEssential reading if you work with LLMsReviewed in the United States on March 20, 2025Format: PaperbackI've been working with deep learning models for several years and this book still surprised me in many ways. At a high level the authors really help you develop a deep understanding of what LLMs are, which, of course is super important to getting the most out of the...I've been working with deep learning models for several years and this book still surprised me in many ways. At a high level the authors really help you develop a deep understanding of what LLMs are, which, of course is super important to getting the most out of the technology.
One of the most interesting sections of the books is on logprobs. The authors do an excellent job of explaining how logprobs can help you estimate the model's confidence in its response. And interestingly enough, you can generate multiple completions with high temperature and use the logprobs to choose the completion that the model is most confident in. While this technique may fade away with time as companies look to be moving away from providing logprobs, it's an example of extremely very problem solving with LLMs. It is these kinds of creative problem solving techniques that have helped me get a lot more out of frontier models.
Another standout technique taught in the book is about using three characters in your prompt to achieve higher quality model output. The book also cover's the Red Riding Hood principle, which is a great reminder for all of us. I also found great utility out of its suggestion on what kind of language to use in your prompts (positives instead of negatives). The section on online validation is also such an important chapter to help you build production grade LLM applications.
The book has a lot of great content that I can't cover in this short review. It should be considered essential reading for anyone working with LLMs.
- 2.0 out of 5 starsVerified PurchaseFor a Book About Prompt Engineering, There is Very Little In this Book About ItReviewed in the United States on March 15, 2025Format: PaperbackFor how much this book costs, there's not enough about actual prompt engineering in this book to justify the cost. I thought the book would cover more advanced information about building prompts, types of prompts, how to structure prompts for different types of...For how much this book costs, there's not enough about actual prompt engineering in this book to justify the cost. I thought the book would cover more advanced information about building prompts, types of prompts, how to structure prompts for different types of output.
This is purportedly an advanced book about prompt engineering. There's no need for a history of LLMs. There are a multitude of books that do that already. There's only 59 pages out of close to 300 that cover actual prompting. This was a disppontment.
- 5.0 out of 5 starsA Foundational View of Prompt EngineeringReviewed in the United States on March 27, 2025Format: PaperbackI'm not sure what the other reviewer was referring to when they said the book didn't have a lot of prompt engineering content. There were only maybe 3 chapters out of 11 that didn't explicitly content information about prompt engineering. And I can forgive them...I'm not sure what the other reviewer was referring to when they said the book didn't have a lot of prompt engineering content. There were only maybe 3 chapters out of 11 that didn't explicitly content information about prompt engineering. And I can forgive them for including those because the explanations were really great. Especially to someone that may not be technically adept.
In terms of the prompt engineering content, the author does a really great job showing you the foundations of prompt engineering. He doesn't go into the specifics of techniques because they likely, they would likely be out of date by the time the book comes into print. In addition, there are a lot of tutorials on those topics on the LangGraph and other sites that stay pretty up to date. That the author does show you how LLM's see text, why they stumble on certain tasks because of the way they see text, and how to organize your prompts around these pitfalls. It solidifies a more long term view of prompt engineering that will be timeless for the most part.
Top reviews from other countries
- MR G STEWART5.0 out of 5 starsVerified PurchaseGreat book on Prompt EngineeringReviewed in the United Kingdom on June 12, 2025Well written and extensive reference of "what it is" and "how to use it" in the Prompt Engineering domain, and very readable.
How customer reviews and ratings work
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.Learn more how customers reviews work on Amazon