OpenAI prompt-engineering best practices
Guidance on stating the task clearly, supplying context, specifying format, and using examples.
Compute College
Turn a vague AI request into a measurable task with a clear outcome, constraints, and acceptance criteria.
Defining an AI task means explaining what you need and how you will check the result. Name the intended reader, allowed sources, and any limits. For a report summary, you might ask for three main findings with supporting passages. The result passes only if those findings are supported and use the requested format.
Memory trick: A prompt tells the model what to do. Success criteria tell the team whether it did it.
A model cannot reliably optimize for a success condition that the product team has not defined. Clear task boundaries reduce prompt revisions, ambiguous outputs, retries, and human correction. They also make compute economics visible: a task that needs fewer retries, shorter outputs, or a smaller model can reduce tokens, latency, and cost per successful result.
Instead of “Review this support ticket,” ask for a category: billing, access, bug, or other. Ask what the customer wants and which sentence supports the category. Request JSON with `category`, `requestedOutcome`, and `evidence`. A successful result uses one allowed category, includes evidence from the ticket, and leaves a field empty rather than inventing information.
Example figures are illustrative calculations, not current quoted market prices.
Current example
Prompt-engineering guidance consistently treats clear instructions, relevant context, desired format, and examples as inputs that improve model behavior. These references support the design principles here; they do not prove that a particular prompt will work for every workload.
Guidance on stating the task clearly, supplying context, specifying format, and using examples.
Prompting strategies for breaking down tasks, providing examples, and making instructions specific.
Source discipline: provider guidance describes useful techniques, but teams should test their own representative tasks and record the model, prompt version, and evaluation conditions.
“Make this better” is a request, not an evaluation. It may start a useful conversation, but it is not enough to compare prompts or models. Define better for whom, according to which criteria, with what unacceptable outcomes and what evidence of success.
Practical takeaway
Write a one-page task contract before refining a prompt: goal, input, output, constraints, failure cases, acceptance criteria, and the smallest useful test set. Ask a second person to grade sample outputs using only that contract; disagreements reveal missing definitions.
Decision check: could two reviewers use the written criteria to agree whether the same output passes? If not, the task is not defined enough to optimize.
Compute College track
Step 2 of 18: Define the AI task and success criteria