Discover Trending Automotive Accessories and More
Enjoy fast, free delivery, exclusive deals, and award-winning movies & TV shows.
Buy New
-32% $54.51
close
FREE delivery Thursday, September 10
Ships from: Amazon.com
Sold by: Amazon.com
$54.51 with 32 percent savings
List Price: $79.99 BERJAYA
FREE delivery Thursday, September 10
Or Prime members get FREE delivery Tomorrow, September 6. Order within 7 hrs 24 mins. Join Prime
In Stock
$$54.51 () Includes selected options. Includes initial monthly payment and selected options. Details
Price
Subtotal
$$54.51
Subtotal
Initial payment breakdown
Shipping cost, delivery date, and order total (including tax) shown at checkout.
Shipper / Seller
Amazon.com
Amazon.com
Shipper / Seller
Amazon.com
Returns
FREE 30-day refund/replacement
FREE 30-day refund/replacement
Quick refund
Usually issued within 24 hours. See exceptions
FREE return
At least one free return option available.
Convenient dropoff
At any of our 50,000 US locations.
See return policy
Gift options
Available at checkout
Available at checkout This item is a gift. Change
At checkout, you can add a custom message, a gift receipt for easy returns and have the item gift-wrapped
Payment
Secure transaction
Your transaction is secure
We work hard to protect your security and privacy. Our payment security system encrypts your information during transmission. We don’t share your credit card details with third-party sellers, and we don’t sell your information to others. Learn more
Support
Product support included
What's Product Support?
In the event your product doesn't work as expected or you need help using it, Amazon offers free product support options such as live phone/chat with an Amazon associate, manufacturer contact information, step-by-step troubleshooting guides, and help videos. By solving product issues, we help the planet by extending the life of products. Availability of support options differ by product and country. Learn more
$45.59
FREE delivery September 15 - 21. Details
Only 1 left in stock - order soon.
$$54.51 () Includes selected options. Includes initial monthly payment and selected options. Details
Price
Subtotal
$$54.51
Subtotal
Initial payment breakdown
Shipping cost, delivery date, and order total (including tax) shown at checkout.
Access codes and supplements are not guaranteed with used items.
Ships from and sold by Bay State Book Company.
Added to

Sorry, there was a problem.

There was an error retrieving your Wish Lists. Please try again.

Sorry, there was a problem.

List unavailable.
Kindle app logo image

Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.

Read instantly on your browser with Kindle for Web.

Using your mobile phone camera - scan the code below and download the Kindle app.

QR code to download the Kindle App

  • Prompt Engineering for LLMs: The Art and Science of Building Large Language Model-Based Applications

Follow the authors

Get new release updates & improved recommendations
Something went wrong. Please try your request again later.

Prompt Engineering for LLMs: The Art and Science of Building Large Language Model-Based Applications

4.0 out of 5 stars (63)

{"desktop_buybox_group_1":[{"displayPrice":"$54.51","priceAmount":54.51,"currencySymbol":"$","integerValue":"54","decimalSeparator":".","fractionalValue":"51","symbolPosition":"left","hasSpace":false,"showFractionalPartIfEmpty":true,"offerListingId":"BI7W3tB4k0lHZoFb2mBnyOISC5xtWpyvSZUOm2t7Li1AI%2Bi0HHiZJ21LP87DqyZ%2BLMyp90DbWWOhfdt4pJRt%2FIMrEYNTJ5OLPITu6%2FZIYYWt7hE1VWecO3R%2FX3D9%2Bz38Y6zmSOFRDT%2FGjXZ7XBhBBw%3D%3D","locale":"en-US","buyingOptionType":"NEW","aapiBuyingOptionIndex":0}, {"displayPrice":"$45.59","priceAmount":45.59,"currencySymbol":"$","integerValue":"45","decimalSeparator":".","fractionalValue":"59","symbolPosition":"left","hasSpace":false,"showFractionalPartIfEmpty":true,"offerListingId":"BI7W3tB4k0lHZoFb2mBnyOISC5xtWpyvnIoNFA86JT%2FUbZgLOHBznkuh5N8jX5gsoDBvFAoEG0nCw0NbJzh3P31hVHULjtTHDDw%2FGsqEBGOUBJkiOt6ShmH59so34qQOhDxK9oVfzRWQeXP7uy6isO14dKjXdgkcLjz6t6HouRfh4Q9rTUInA2rBk0MDYfmk","locale":"en-US","buyingOptionType":"USED","aapiBuyingOptionIndex":1}]}

Purchase options and add-ons

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

Frequently bought together

This item: Prompt Engineering for LLMs: The Art and Science of Building Large Language Model-Based Applications
$54.51
Get it as soon as Thursday, Sep 10
In Stock
Ships from and sold by Amazon.com.
+
$52.40
Get it as soon as Thursday, Sep 10
In Stock
Ships from and sold by Amazon.com.
+
$50.00
Get it as soon as Thursday, Sep 10
In Stock
Ships from and sold by Amazon.com.
Total price: $00
To see our price, add these items to your cart.
Details
Added to Cart
Choose items to buy together.

Customers also bought or read

Loading...

From the brand


From the Publisher

Prompt Engineering for LLMs: The Art and Science of Building Large Language Model–Based Apps

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.

Editorial Reviews

About the Author

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.

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.

Product details

  • 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.03 pounds
  • Dimensions ‏ : ‎ 7 x 0.59 x 9.19 inches
  • Best Sellers Rank: #101,912 in Books (See Top 100 in Books)
  • Customer Reviews:
    4.0 out of 5 stars (63)

About the authors

Follow authors to get new release updates, plus improved recommendations.

Customer reviews

4 out of 5 stars
63 global ratings

Top reviews from the United States

  • 5 out of 5 stars
    Pragmatic, hands-on approach to learning prompt engineering
    Reviewed in the United States on December 9, 2024
    Brief content visible, double tap to read full content.
    Full content visible, double tap to read brief content.

    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.

    6 people found this helpful
    Sending feedback...
    Thank you for your feedback.
    Sending feedback...
    Thanks, we'll investigate in the next few days.
  • 4 out of 5 stars
    A Clear, Insightful Guide to Becoming an LLM Whisperer
    Reviewed in the United States on April 14, 2025
    Brief content visible, double tap to read full content.
    Full content visible, double tap to read brief content.

    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.

    4 people found this helpful
    Sending feedback...
    Thank you for your feedback.
    Sending feedback...
    Thanks, we'll investigate in the next few days.
  • 5 out of 5 stars
    A fantastic read, even for seasoned prompt engineers
    Reviewed in the United States on March 20, 2025
    Brief content visible, double tap to read full content.
    Full content visible, double tap to read brief content.

    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!

    2 people found this helpful
    Sending feedback...
    Thank you for your feedback.
    Sending feedback...
    Thanks, we'll investigate in the next few days.
  • 2 out of 5 stars
    Mostly ideas and theory not much how to
    Reviewed in the United States on March 26, 2026
    Brief content visible, double tap to read full content.
    Full content visible, double tap to read brief content.

    Many things to think about, to do, conceptually, but almost nothing on how to actually do it, if you are looking for that

    Sending feedback...
    Thank you for your feedback.
    Sending feedback...
    Thanks, we'll investigate in the next few days.
  • 5 out of 5 stars
    Tremendous Information
    Reviewed in the United States on April 15, 2026
    Brief content visible, double tap to read full content.
    Full content visible, double tap to read brief content.

    Excellent information which I will be able to use.

    Sending feedback...
    Thank you for your feedback.
    Sending feedback...
    Thanks, we'll investigate in the next few days.
  • 5 out of 5 stars
    Excellent Resource!
    Reviewed in the United States on April 9, 2025
    Brief content visible, double tap to read full content.
    Full content visible, double tap to read brief content.

    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!

    One person found this helpful
    Sending feedback...
    Thank you for your feedback.
    Sending feedback...
    Thanks, we'll investigate in the next few days.
  • 2 out of 5 stars
    For a Book About Prompt Engineering, There is Very Little In this Book About It
    Reviewed in the United States on March 15, 2025
    Brief content visible, double tap to read full content.
    Full content visible, double tap to read brief content.

    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.

    25 people found this helpful
    Sending feedback...
    Thank you for your feedback.
    Sending feedback...
    Thanks, we'll investigate in the next few days.
  • 5 out of 5 stars
    Why Prompt Engineering Belongs in Every Developer’s Toolkit
    Reviewed in the United States on May 4, 2025
    Brief content visible, double tap to read full content.
    Full content visible, double tap to read brief content.

    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.

    2 people found this helpful
    Sending feedback...
    Thank you for your feedback.
    Sending feedback...
    Thanks, we'll investigate in the next few days.

Top reviews from other countries

  • 5 out of 5 stars
    Learning the Fundamentals
    Reviewed in Germany on May 16, 2026
    Brief content visible, double tap to read full content.
    Full content visible, double tap to read brief content.

    An insightful and comprehensive introduction to building applications using foundation models.

    Sending feedback...
    Thanks, we'll investigate in the next few days.
  • 5 out of 5 stars
    Learn why prompts work on a fundamental level.
    Reviewed in the United Kingdom on December 7, 2025
    Brief content visible, double tap to read full content.
    Full content visible, double tap to read brief content.

    I was a bit skeptical of this book when ordering, but it really impressed me. It doesn't give many concrete examples, but rather talks about how prompts work in relation to an AI's training data and how you can leverage knowledge you have of that to get the best performance from an LLM. There's lots of scenarios and lots of contingencies. Has helped me a lot when writing props for agents.

    Sending feedback...
    Thanks, we'll investigate in the next few days.
  • 5 out of 5 stars
    Excellent - clear and comprehensive.
    Reviewed in Canada on April 10, 2026
    Brief content visible, double tap to read full content.
    Full content visible, double tap to read brief content.

    Comprehensive and very clear. You will end up with deep knowledge on the topic - and very much more efficient at your day job.

    Sending feedback...
    Thanks, we'll investigate in the next few days.
  • 3 out of 5 stars
    Not so much examples
    Reviewed in Germany on September 27, 2025
    Brief content visible, double tap to read full content.
    Full content visible, double tap to read brief content.

    I neither liked the book nor disliked it. I didn't like that there weren't enough real examples and comparisons of prompts.

    Sending feedback...
    Thanks, we'll investigate in the next few days.
  • 4 out of 5 stars
    Excellent resource on LLM concepts and prompt engineering
    Reviewed in the United Kingdom on September 30, 2025
    Brief content visible, double tap to read full content.
    Full content visible, double tap to read brief content.

    This book manages to include enough technical detail and principles to make it interesting and usable for developers, while also distilling more complex topics for all tech enthusiasts to understand and enjoy.

    I particularly enjoyed the tips throughout the book and diagrams that I will surely revisit.

    To list some of the concepts covered in this book:

    - Transformer architecture / LLM history

    - Little Red Hiding Hood principle

    - Zero-shot, few-shot and chain-of-thought prompting

    - Elastic snippets

    - logprobs

    - ReAct

    - Tools

    - Offline and online evaluation

    And much, much more.

    Highly recommended!

    Sending feedback...
    Thanks, we'll investigate in the next few days.