Skip to content

Instantly share code, notes, and snippets.

@rajvermacas
Last active October 23, 2025 22:08
Show Gist options
  • Select an option

  • Save rajvermacas/ef8bf3883c54820f423d2af41a645575 to your computer and use it in GitHub Desktop.

Select an option

Save rajvermacas/ef8bf3883c54820f423d2af41a645575 to your computer and use it in GitHub Desktop.
gpt5
  • Keep the architecture lean, concise and simple.
  • Always keep a check on the number of lines in the file. If the file exceeds the limit of 800 lines, break it down into multiple files.
  • Always keep function within 100 lines of code and it should follow single responsibility principle

⁤- Keep the architecture lean, concise and simple.

  • Always keep a check on the number of lines in the file. If the file exceeds the limit of 800 lines, break it down into multiple files.

Based on the video, here are the six prompt engineering tips from OpenAI for using GPT-5 for coding:

  1. Be Precise and Avoid Conflicting Information GPT-5 models are better at following instructions, but they can struggle with vague or conflicting directions. Clear and specific prompts yield better results.

  2. Use the Right Reasoning Effort The model has different reasoning effort levels: minimal, low, medium, and high. The speaker recommends sticking to "high" for coding tasks, as "low" and "medium" produce much worse answers.

  3. Use XML Tags Delineate different sections of your prompts with XML tags to improve the model's understanding. This helps structure instructions and reduces misinterpretations by clearly defining the start and end of each section, such as <context> or <task>.

  4. Avoid Overly Firm Language Using firm language like "must" can backfire with GPT-5, as the model might overthink or over-engineer the task. Being less aggressive in your prompting can be more effective and prevent the model from making an excessive number of tool calls.

  5. Give Room for Planning and Self-Reflection Let the model think before it acts. The speaker suggests splitting a task into a few separate steps, recommending a plan with five to seven categories. You can also use tags like self-reflection to improve the model's reasoning, allowing it to plan and iterate on the best approach before writing any code.

  6. Control the Eagerness of Your Coding Agent GPT-5 is designed to be thorough by default. You can control its eagerness by setting boundaries on the scope and execution of the task. An interesting method is giving the model a "tool budget," which limits the number of tools it can call to prevent overthinking. You can also use persistence XML tags to encourage the model to be more decisive and not ask for unnecessary confirmations.

idea
problem
approach
research

Re-articulate to me the concrete and specific requirements I have given you using your own words, include what those specific requirements are and for each requirement what actions you need to take, what steps you need to take to implement my requirements, and a short plain text description of how you are going to complete the task and also clearly include what, how and why part of the action you are planning to take.

Also, re-organise the requirements into their logical & sequential order of implementation including any dependancies, and finally finish with a complete TODO list. Wait for confirmation on the plan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment