Here’s what people are saying:
“The absolute best book-length resource I’ve read on prompt engineering. Mike and James are masters of their craft.”
– Dan Shipper, Cofounder & CEO, Every
“If you’re looking to improve the accuracy and reliability of your AI systems, this book should be on your shelf.”
– Mayo Oshin, Founder & CEO, Siennai Analytics, early LangChain contributor
What is this book about?:
Everything changes so quickly in AI, so we wanted to define a set of principles that are transferrable across models and modalities. The Five Principles of Prompting form the foundation for this book, and they’re based on what worked for us with GPT-3, still works for us with GPT-4 and therefore will continue to work with GPT-5, or whatever model we use in the future.
- Give Direction: Describe the desired style in detail, or reference a relevant persona.
- Specify Format: Define what rules to follow, and the required structure of the response.
- Provide Examples: Insert a diverse set of test cases where the task was done correctly.
- Evaluate Quality: Identify errors and rate responses, testing what drives performance.
- Divide Labor: Split tasks into multiple steps, chained together for complex goals.
The book is ten chapters long, covering both text and image prompting, as well as using Python to build AI automation scripts and products. This isn’t a list of prompting hacks to find the right combination of magic words, it’s a practical guide for building systems that provide the right context to AI applications, as well as how to test and scale AI systems for production.
The book will be useful for you if:
- Your time is worth more than $40 an hour, and saving a few hours reading this book instead of piecing everything together from multiple sources is worth it to you.
- You’re not just using AI casually but you’re actually building an AI application or internal template many people will use hundreds or thousands of times a day.
- You want tips for reducing hallucination and improving the reliability of AI, while learning from 100s of real-world examples of how to solve common issues working with AI.
- You’d like to compare the strengths and weaknesses of OpenAI vs other models, as well as common frameworks like LangChain, different vector database options, and AUTOMATIC1111
- You want to see what it looks like to build an end-to-end AI application, from a naive prompt to a full AI agent, including building a basic user interface with Gradio