Specify the task, constraints, and output
OpenAI recommends giving reasoning models a clear goal, firm constraints, and a well-defined output. The prompt should specify what the model needs to do, which constraints it must follow, and the desired output format. There’s no need to spell out every intermediate step.
The task and the output format serve different purposes. The task describes what you want the model to do. The output format specifies how the response should be presented. OpenAI treats the task, constraints, and output format as separate parts of the prompt.
For agentic or research-heavy workflows, OpenAI also recommends defining what counts as finished and how the model should verify its work. These give the prompt both a completion criterion and a verification method.
OpenAI uses reasoning.effort to control how much reasoning the model does. It describes this setting as a way to fine-tune that behavior and gives priority to prompt changes when addressing output quality. Its guidance on specifying the task, constraints, and output format applies to the prompt itself.
Using examples in a prompt
Google Research’s study on chain-of-thought prompting examines a method that adds task-specific examples to the prompt. Each chain-of-thought example in the study contains an input, intermediate reasoning steps that lead to a result, and an output. The researchers describe those steps as a coherent sequence leading to the final answer.
In the standard few-shot prompting format used for comparison, examples consist of input-output pairs. They’re written as questions and answers, with the answer given directly. In the chain-of-thought format, each example also includes the intermediate steps leading to its answer. The model is then asked to produce an output for a new input.
In the researchers’ arithmetic example, Roger starts with five tennis balls. He buys two more cans with three balls each. The example first calculates that the cans contain six balls in total. It then adds the original five balls to get eleven.
In the same demonstration, the model is given a different question to answer. A cafeteria starts with twenty-three apples, uses twenty for lunch, and buys six more. The model’s chain-of-thought response shows the subtraction first, then the addition, and gives nine as the result.
In the standard prompting demonstration, the answer to Roger’s question contains no intermediate calculations. The model’s response to the cafeteria question also gives a direct answer. Together, the two demonstrations show how including intermediate steps in an example changes the format of the prompt.
The study’s arithmetic tasks include free-response problems and a multiple-choice task. The researchers used the same set of examples for the free-response math problems. For the multiple-choice task, they used examples and solutions from the training set.
One multiple-choice example asks how many digits are needed to write the numbers in a given range. The sample answer groups the numbers by digit count and works out how many digits each group contributes. It then gives the option that matches the calculated total.
How intermediate steps vary across tasks
Alongside arithmetic, the Google Research study examines chain-of-thought examples for commonsense reasoning and symbolic reasoning tasks. The examples follow the same format, with intermediate steps and an output following the input. What those steps contain depends on the task.
One commonsense reasoning example asks where someone looking for a crowded place could go. The sample answer explains that the place should be somewhere many people gather. It then considers the options against that criterion and gives the selected answer.
Another example asks whether a pear will sink in water. The answer compares the pear’s density with that of water. It then explains that the pear will float and answers no. The comparison comes before the final answer.
One symbolic reasoning task involves joining the last letters of the words in a name. In the study’s example, the last letter of each of two words is identified separately. The letters are joined, and the resulting string is given as the answer. The output follows the steps of finding and joining the letters.