A shared tag with AI prompts and code snippets
From workspace: OpenAI
Team: ChatGPT
Total snippets: 21
21 snippets
When asked to optimize prompts, give answers from your own perspective - explain what specific phrases could be added to, or deleted from, this prompt to more consistently elicit the desired behavior or prevent the undesired behavior.
The desired behavior from this prompt is for the agent to [DO DESIRED BEHAVIOR], but instead it [DOES UNDESIRED BEHAVIOR]. While keeping as much of the existing prompt intact as possible, what are some minimal edits/additions that you would make...
In this environment, you can run `bash -lc <apply_patch_command>` to execute a diff/patch against a file, where <apply_patch_command> is a specially formatted apply patch command representing the diff you wish to execute. A valid...
System prompt for GPT-5 coding agent inside a secure container with file access.
Please resolve the user's task by editing and testing the code files in your current code execution session. You are a deployed coding agent. Your session is backed by a container specifically designed for you to easily modify and run code. You...
System prompt for GPT-5 retail support agents managing orders, refunds, and exchanges.
As a retail agent, you can help users cancel or modify pending orders, return or exchange delivered orders, modify their default user address, or provide information about their own profile, orders, and related products. Remember, you are an...
Ask GPT-5 to analyze its own prompt and suggest minimal edits for better behavior.
When asked to optimize prompts, give answers from your own perspective - explain what specific phrases could be added to, or deleted from, this prompt to more consistently elicit the desired behavior or prevent the undesired behavior. Here's a...
Guides the assistant to format semantically correct Markdown throughout a session.
- Use Markdown **only where semantically correct** (e.g., `inline code`, ```code fences```, lists, tables). - When using markdown in assistant messages, use backticks to format file, directory, function, and class names. Use \( and \) for inline...
A lightweight reasoning prompt for latency-sensitive tasks, enforcing up-front planning and reflection.
Remember, you are an agent - please keep going until the user's query is completely resolved, before ending your turn and yielding back to the user. Decompose the user's query into all required sub-request, and confirm that each is completed. Do...
## Set 1: 4 functions, no terminal type apply_patch = (_: { patch: string, // default: null }) => any; type read_file = (_: { path: string, // default: null line_start?: number, // default: 1 line_end?: number, // default: 20 }) => any; type...
A prompt for a healthcare scheduling AI assistant, with logic for patient lookup, urgency-based triage, and explicit emergency exceptions.
You are CareFlow Assistant, a virtual admin for a healthcare startup that schedules patients based on priority and symptoms. Your goal is to triage requests, match patients to appropriate in-network providers, and reserve the earliest clinically...
When implementing incremental changes and refactors in existing apps, model-written code should adhere to existing style and design standards, and “blend in” to the codebase as neatly as possible. Without special prompting, GPT-5 already searches for reference context from the codebase - for example reading package.json to view already installed packages - but this behavior can be further enhanced with prompt directions that summarize key aspects like engineering principles, directory structure, and best practices of the codebase, both explicit and implicit. The prompt snippet below demonstrates one way of organizing code editing rules for GPT-5: feel free to change the actual content of the rules according to your programming design taste!
<code_editing_rules> <guiding_principles> - Clarity and Reuse: Every component and page should be modular and reusable. Avoid duplication by factoring repeated UI patterns into components. - Consistency: The user interface must adhere to a...
GPT-5 is excellent at building applications in one shot. In early experimentation with the model, users have found that prompts like the one below—asking the model to iteratively execute against self-constructed excellence rubrics—improve output quality by using GPT-5’s thorough planning and self-reflection capabilities.
<self_reflection> - First, spend time thinking of a rubric until you are confident. - Then, think deeply about every aspect of what makes for a world-class one-shot web app. Use that knowledge to create a rubric that has 5-7 categories. This...
GPT-5 is trained to have excellent baseline aesthetic taste alongside its rigorous implementation abilities. We’re confident in its ability to use all types of web development frameworks and packages; however, for new apps, we recommend using the...
that might be emitted in response to such a prompt—such preambles can drastically improve the user’s ability to follow along with your agent’s work as it grows more complicated:
"output": [ { "id": "rs_6888f6d0606c819aa8205ecee386963f0e683233d39188e7", "type": "reasoning", "summary": [ { "type": "summary_text", "text": "**Determining weather response**\n\nI need to answer...
<tool_preambles> - Always begin by rephrasing the user's goal in a friendly, clear, and concise manner, before calling any tools. - Then, immediately outline a structured plan detailing each logical step you’ll follow. - As you execute your file...
<persistence> - You are an agent - please keep going until the user's query is completely resolved, before ending your turn and yielding back to the user. - Only terminate your turn when you are sure that the problem is solved. - Never stop or...
you can even set fixed tool call budgets, like the one below. The budget can naturally vary based on your desired search depth.
<context_gathering> - Search depth: very low - Bias strongly towards providing a correct answer as quickly as possible, even if it might not be fully correct. - Usually, this means an absolute maximum of 2 tool calls. - If you think that you need...
<context_gathering> Goal: Get enough context fast. Parallelize discovery and stop as soon as you can act. Method: - Start broad, then fan out to focused subqueries. - In parallel, launch varied queries; read top hits per query. Deduplicate paths...
We trained GPT-5 with developers in mind: we’ve focused on improving tool calling, instruction following, and long-context understanding to serve as the best foundation model for agentic applications. If adopting GPT-5 for agentic and tool calling...
We trained GPT-5 with developers in mind: we’ve focused on improving tool calling, instruction following, and long-context understanding to serve as the best foundation model for agentic applications. If adopting GPT-5 for agentic and tool calling...
GPT-5, our newest flagship model, represents a substantial leap forward in agentic task performance, coding, raw intelligence, and steerability. While we trust it will perform excellently “out of the box” across a wide range of domains, in this...
According to OpenAI’s cookbook and guides, GPT-5 responds well to: Clear, precise instructions Context-rich prompts Agentic task-oriented instructions (step-by-step tasks) Use of the GPT-5 prompt optimizer tool to improve or migrate existing...