Prompt engineering is the practice of writing, testing and refining the instructions you give an AI model so it produces what you actually need. In plain terms, it's briefing. The more clearly you describe the job, the better the result, and the more systematically you test, the more reliable it gets.
This guide explains the five levers that matter, shows the research behind two of the best-known techniques, walks through a before-and-after example, and ends with how to apply it to long projects like books.
What does a prompt engineer actually do?
They choose what to tell the model, in what order, with what examples, and then check the output and revise. That's it. The name sounds technical, but the daily work is writing and editing. Major vendors treat it as a documented craft: OpenAI, Anthropic and Google each publish prompting guides covering roles, examples, formatting and step-by-step tasks.
It helps to see the five levers side by side:
| Lever | What you do | Example |
|---|---|---|
| Context | Say who it's for and why | "Readers are new freelancers who dislike spreadsheets." |
| Task | State the one job | "Draft a 500-word chapter intro." |
| Examples | Show what good looks like | A sample paragraph in your voice |
| Format | Say how the answer should look | "A numbered list with a one-sentence purpose each." |
| Steps | Break big jobs into stages | Outline first, then draft, then edit |
Everything else, from "act as" lines to temperature settings, is a refinement of one of these. A role is one way to supply context, and as we cover in whether to tell AI to act as an expert, it works better for tone than for facts.
Where did these techniques come from?
Mostly from a short run of research papers between 2020 and 2023 that showed how much wording and examples matter. Three landmarks:
| Year | Paper | Finding |
|---|---|---|
| 2020 | Brown et al., "Language Models are Few-Shot Learners" | A 175-billion-parameter model (GPT-3) could do tasks from instructions and a few examples placed in the prompt, with no further training |
| 2022 | Wei et al., chain-of-thought prompting | Giving worked reasoning steps as examples improved performance on math and reasoning; eight such exemplars with a 540B-parameter model set a new best on the GSM8K math benchmark |
| 2022 | Kojima et al., zero-shot reasoners | Simply adding "Let's think step by step" raised MultiArith accuracy from 17.7% to 78.7% and GSM8K from 10.4% to 40.7% on InstructGPT (text-davinci-002) |
Read these numbers carefully. They come from specific older models and math or logic benchmarks. Modern assistants often reason step by step on their own, and OpenAI's current guide even distinguishes reasoning models from standard GPT models, saying they need different prompting. So don't expect "think step by step" to transform a chapter draft. What the research shows is the principle: what you put in the prompt can change results by large margins, so it's worth being deliberate.
What does better prompting look like?
It looks like adding the five levers to a vague request. Here's a before and after, written by me for illustration:
Before: Write about habits.
After: Write the opening section (about 250 words) of a short guide for people who have quit new habits within two weeks before. Voice: warm and direct, second person, no jargon. Start with a small scene of someone missing day 3. End with one action the reader can do in under two minutes today. Format: two short paragraphs, then a one-line takeaway.
The "after" supplies context (who and why they failed before), task (opening section), format (two paragraphs and a takeaway) and a constraint on the end. It doesn't have a single clever trick. Our post on how long a prompt should be explains why that extra detail isn't padding: relevant information helps, irrelevant filler hurts.
Vendors give the same advice in different words. Anthropic suggests the "colleague test": show the prompt to someone with no context and see whether they'd be confused. OpenAI describes a reasoning model as like a senior co-worker you can give a goal to, and a GPT model as like a junior co-worker who needs explicit instructions. Google's guide recommends always including few-shot examples. Those are three descriptions of one idea: tell the model what you'd tell a capable new hire.
What mistakes do beginners make?
The common ones are vagueness, overloading, and treating the first answer as final. This table is my own summary of patterns that the vendor guides warn about, so treat the "fix" column as practical advice rather than a rule:
| Mistake | Why it hurts | Fix |
|---|---|---|
| One-line request for a big job | The model must guess reader, scope and format | Add the five levers or split the job |
| Ten tasks in one prompt | Instructions compete and some get dropped | One task per prompt; chain the rest |
| Only saying what not to do | Anthropic's guide advises saying what to do instead | Rewrite "don't be wordy" as "use under 120 words" |
| Pasting a giant source with no question | Model summarizes instead of doing your task | State the task clearly, ideally after the material |
| Accepting the first answer | Facts may be wrong or invented | Check claims and iterate |
Setup details also add friction. Before any prompt, you need answers to basic questions: what's the book, who's it for, what's the voice. In Interactive eBook Builder those live in the Configuration Hub, whose Quick Start randomizer can generate a starting configuration if you want to see how the pieces fit, which makes it a gentle way to learn what a complete brief contains.
Is it a one-time skill or an ongoing process?
It's an ongoing loop: write, run, score, revise. Google's guide says plainly that prompt design often takes a few iterations, and offers moves like rephrasing and switching to an analogous task. Building that habit matters more than memorizing any one trick. How to test and improve a prompt gives you a practical rubric. And because prompts that work in one tool can behave differently in another, reusing prompts across ChatGPT, Claude and Gemini is worth reading before you commit to one.
How does prompt engineering apply to writing a book?
For a book, the useful skill is decomposition: split the job into stages and prompt each one. A single request to "write my ebook" asks the model to decide everything at once. A staged approach asks it to plan, then draft one chapter, then edit. Both Anthropic and Google recommend this chaining, and a user study of the idea (Wu et al., 2021, 20 participants) found that chaining AI steps improved quality, transparency and control. Prompt chaining for planning, drafting and editing shows how that looks for a book.
Some tools build the stages into the product so you don't write each prompt from scratch. Interactive eBook Builder does this with a Seed Prompt that sets up the book's structure and separate agents for planning (Agent A Spec Builder), drafting (Agent B Drafter) and polishing (Agent C Polisher). You still make the creative decisions, but the staging is done. If you prefer to work in your own way, the agents' instructions are editable, which is prompt engineering you control.
Before you hit send
- Did you say who it's for and why?
- Is there one clear task?
- Did you show an example or describe the format?
- Did you break a big job into stages?
- Will you check and revise rather than accept the first answer?
The takeaway: prompt engineering is clear briefing plus testing. Learn the five levers, apply them in stages, and keep a record of what works.