Short answer
OpenAI's GPT-4.1 prompting guide, published in the OpenAI Cookbook on April 14, 2025, explains how to write instructions for the new GPT-4.1 models, which take prompts more literally than GPT-4o did. Its core advice is to state exactly what you want, give agents three standing reminders (keep going, use tools instead of guessing, plan between steps), place instructions carefully around long documents and organize prompts into clear labeled sections.
Follow-up question How do you rewrite an old prompt for GPT-4.1?
Alongside yesterday's launch of the GPT-4.1 models in its API, OpenAI published a companion document in the OpenAI Cookbook, its public collection of worked examples for developers: the GPT-4.1 Prompting Guide. It collects tips that OpenAI's staff gathered while testing the new models, together with complete sample prompts you can copy and adapt.
The guide exists because GPT-4.1 behaves a little differently from the models many people are used to. OpenAI says it reads instructions more literally. Earlier models often guessed what you meant and filled in the gaps; GPT-4.1 tends to do what you actually wrote. That is good news if your prompt is clear, and a source of surprises if it is vague.
When, where and who
The guide went online on April 14, 2025, the same day as the models, at cookbook.openai.com. It is credited to two OpenAI authors, Noah MacCallum and Julian Lee. It is written for developers who call the models through the API, the programming interface apps use to send requests, since GPT-4.1 is not offered inside ChatGPT. Its lessons still apply to anyone who writes prompts.
The guide is careful about its own limits. It reminds readers that model output varies from one run to the next, and it advises building evals, small sets of test questions with known good answers, so you can check whether a change to your prompt really helps.
What the guide advises
The guide has five main parts. Here they are in plain terms:
| Topic | Main advice |
|---|---|
| Agents | Add three reminders to every agent prompt: persist until the task is done, use tools rather than guess, and plan before and after each tool call |
| Tools | Describe tools in the API's dedicated tools field, with clear names and descriptions, instead of pasting them into the prompt |
| Long context | With long documents, repeat your instructions above and below them; if only once, put them above |
| Chain of thought | Ask the model to think step by step when a task is hard, accepting more cost and delay |
| Instruction following | Start with a short rules section, add detail sections, and use numbered steps for workflows |
A few terms need unpacking. An agent is a setup where the model works through a task in several moves, calling tools (functions your app offers, such as "read this file" or "look up this order") and deciding what to do next. The system prompt is the standing set of instructions a developer gives the model before any user message. Chain of thought means asking the model to write out its reasoning before the final answer. GPT-4.1 does not count as a reasoning model, one trained to think privately before replying, so this kind of prompt makes it reason in the open, a little like a student told to show their work.
OpenAI reports measurable gains from this advice on SWE-bench Verified, a test where a model must fix real bugs in open-source code. The three agent reminders raised its internal score by close to 20%, explicit planning added about 4%, and passing tools through the proper field added about 2%.
A worked example: the three agent reminders
Here is how the three reminders look when combined into the start of a system prompt, rewritten for a research helper rather than a coding agent:
You are a research assistant working through a multi-step task.
Keep working until the question is fully answered; do not hand control
back to the user early.
If you are unsure what a document says, open it with your tools.
Never guess at its contents.
Before each tool call, write a short plan. After each call, note what
you learned and what you will do next.The first two lines are the persistence reminder, the third and fourth the tool-use reminder, and the last two the optional planning reminder. OpenAI describes the effect as turning a chatty assistant into one that drives the work forward on its own.
Try it: Take a prompt you use often and add one sentence that states the single behavior you most want, such as "Answer in three bullet points, no introduction." Run it before and after. The guide says one firm, clear sentence is often enough to steer GPT-4.1.
Structure, delimiters and common mistakes
For longer prompts, the guide offers a skeleton of sections in this order: role and objective, instructions (with sub-sections), reasoning steps, output format, examples, context, and a closing instruction to think step by step. You can drop sections you don't need.
To separate those sections, it recommends delimiters, markers that show where one part ends and the next begins. Markdown headings are the suggested starting point; XML-style tags such as <example> also work well. When you paste in many documents, XML tags or a simple "ID | TITLE | CONTENT" line per document did well in OpenAI's tests, while JSON did poorly.
The guide also lists traps to avoid:
- Conflicting rules. If two instructions disagree, GPT-4.1 tends to obey the one nearer the end.
- "Always" rules without an exit. Telling a model it must always call a tool can make it invent inputs. Add what to do instead, such as asking the user for missing details.
- Sample phrases repeated word for word. Ask the model to vary them.
- Shouting. Capital letters, bribes or promised tips are usually unnecessary.
Why it matters
GPT-4.1 arrives with a context window of up to 1 million tokens (a token is a word or part of a word), and TechCrunch notes that OpenAI's own tests show accuracy dropping as inputs grow very long. Clear structure and well-placed instructions are the practical way to get reliable answers from a model that can read so much at once. The guide also signals a broader shift: as models follow instructions more literally, the skill of prompting moves from coaxing toward plain, precise specification.
How do you rewrite an old prompt for GPT-4.1?
Start by reading your old prompt as if you were a very obedient new employee who does exactly what is written and nothing more. Wherever you relied on the model to "get the idea," spell out the behavior: the length, the format, what to do when information is missing, and what to avoid.
Next, reorganize it into labeled sections, roughly role, instructions, steps, output format and examples, and remove any rules that contradict each other. If you include examples, make sure the behavior they show also appears in your written rules. If you attach long documents, copy your key instructions to both the top and the bottom.
Finally, test. Keep five or ten real requests with answers you consider good, run them through the old and new prompt, and compare. Change one thing at a time, so you know which sentence made the difference.
Sources
- GPT 4.1 Prompting Guide — OpenAI Cookbook, April 14, 2025
- Introducing GPT-4.1 in the API — OpenAI, April 14, 2025
- OpenAI's new GPT-4.1 AI models focus on coding — TechCrunch, April 14, 2025