0% found this document useful (0 votes)
3 views1 page

gpt-5-for-coding-cheatsheet

Arquivo PDF

Uploaded by

Marcos de Castro
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

gpt-5-for-coding-cheatsheet

Arquivo PDF

Uploaded by

Marcos de Castro
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

GPT-5 for Coding

While powerful, prompting with GPT-5 can differ from other models. Here are tips to get the most out of it via the API or in
your coding tools.

#1. Be precise and avoid conflicting information

#2. Use the right reasoning effort

The new GPT-5 models are significantly better at GPT-5 will always perform some level of reasoning as it
instruction following, but a side effect is that they can solves problems. To get the best results, use high reasoning
struggle when asked to follow vague or conflicting effort for the most complex tasks. If you see the model
instructions, especially in your .cursor/rules or AGENTS.md overthink simple problems, be more specific or choose a
files. lower reasoning level like medium or low.

#3. Use XML-like syntax to help structure #4. Avoid overly firm language

instructions

With other models you might have used firm language like:

Together with Cursor, we found GPT-5 works well when


using XML-like syntax to give the model more context. For Be THOROUGH when gathering information.

example, you might give the model coding guidelines:

Make sure you have the FULL picture before

replying.

<code_editing_rules>

<guiding_principles>
 With GPT-5, these instructions can backfire as the model


- Every component should be modular and
might overdo what it would naturally do. For example, it
reusable
might be overly thorough with tool calls to gather context.

- ...

</guiding_principles>

<frontend_stack_defaults>

- Styling: TailwindCSS

</frontend_stack_defaults>

</code_editing_rules>

#5. Give room for planning and self-reflection

#6. Control the eagerness of your coding agent

If you’re creating zero-to-one applications, giving the model GPT-5 by default tries to be thorough and comprehensive
instructions to self-reflect before building can help.

in its context gathering. Use prompting to be more


prescriptive about how eager it should be, and whether it
<self_reflection>
should parallelize discovery/tool calling.

- First, spend time thinking of a rubric

until you are confident.


Give the model a tool budget, specify when to be more or
- Then, think deeply about every aspect of
less thorough, and when to check in with the user. For
what makes for a world-class one-shot web
example:

app. Use that knowledge to create a rubric

that has 5-7 categories. This rubric is


<persistence>

critical to get right, but do not show


- Do not ask the human to confirm or

this to the user. This is for your


clarify

purposes only.
assumptions, as you can always adjust

- Finally, use the rubric to internally


later

think and iterate on the best possible


— decide what the most reasonable assumption

solution to the prompt that is provided.


is, proceed with it, and document it for

Remember that if your response is not


the user's reference after you finish

hitting the top marks across all


acting

categories in the rubric, you need to


</persistence>

start again.

</self_reflection>

For more details, check out our prompting guide. Use our prompt optimizer to help with improving your prompts for GPT-5.

You might also like