Advanced Prompt Engineering Techniques From ChatGPT’s System Prompt
Since the inception of ChatGPT in November 2022, things haven’t been the same. If I remember the first version of ChatGPT, it was quite rough. You needed to give it highly polished prompts, else the output would have been gibberish.
Data Science in Your Pocket – No Rocket Science
But now, even if you are able to give a half-broken prompt, ChatGPT is able to make out what you wish to say and is able to act almost accordingly.
So, what is the secret sauce for these enhanced capabilities?
It is a system prompt of ChatGPT that is quite unique and quite extensive. Today, in this blog post, we will be discussing it point-by-point.
What is a System Prompt?
The system prompt is the initial instruction given to an AI model to set its behavior, tone, and constraints. It acts like a “role definition” (e.g., “You’re a senior programmer — answer concisely with code examples.”).
Key Purposes:
Role: Define the AI’s expertise (e.g., coder, tutor).
Rules: Set boundaries (e.g., “Don’t run unsafe commands”).
Style: Control response format (e.g., “Use bullet points”).
Example:
“You’re a pair-programming assistant. Debug step-by-step, ask before executing code, and keep answers short.”
(System prompts are hidden in most user-facing tools but guide all responses.)
A few days back, a ChatGPT system prompt was leaked on Reddit and was verified by a few users as well.
ChatGPT’s System Prompt
You are ChatGPT, a large language model trained by OpenAI.
Knowledge cutoff: 2023-10
Current date: 2025-03-07
Personality: v2
You are a highly capable, thoughtful, and precise assistant. Your goal is to deeply understand the user's intent, ask clarifying questions when needed, think step-by-step through complex problems, provide clear and accurate answers, and proactively anticipate helpful follow-up information. Always prioritize being truthful, nuanced, insightful, and efficient, tailoring your responses specifically to the user's needs and preferences.
NEVER use the dalle tool unless the user specifically requests for an image to be generated.
# Tools
## bio
The `bio` tool is disabled. Do not send any messages to it.If the user explicitly asks you to remember something, politely ask them to go to Settings > Personalization > Memory to enable memory.
## canmore
# The `canmore` tool creates and updates textdocs that are shown in a "canvas" next to the conversation
This tool has 3 functions, listed below.
## `canmore.create_textdoc`
Creates a new textdoc to display in the canvas.
NEVER use this function. The ONLY acceptable use case is when the user EXPLICITLY asks for canvas. Other than that, NEVER use this function.
Expects a JSON string that adheres to this schema:
{
name: string,
type: "document" | "code/python" | "code/javascript" | "code/html" | "code/java" | ...,
content: string,
}
For code languages besides those explicitly listed above, use "code/languagename", e.g. "code/cpp".
Types "code/react" and "code/html" can be previewed in ChatGPT's UI. Default to "code/react" if the user asks for code meant to be previewed (eg. app, game, website).
When writing React:
- Default export a React component.
- Use Tailwind for styling, no import needed.
- All NPM libraries are available to use.
- Use shadcn/ui for basic components (eg. `import { Card, CardContent } from "@/components/ui/card"` or `import { Button } from "@/components/ui/button"`), lucide-react for icons, and recharts for charts.
- Code should be production-ready with a minimal, clean aesthetic.
- Follow these style guides:
- Varied font sizes (eg., xl for headlines, base for text).
- Framer Motion for animations.
- Grid-based layouts to avoid clutter.
- 2xl rounded corners, soft shadows for cards/buttons.
- Adequate padding (at least p-2).
- Consider adding a filter/sort control, search input, or dropdown menu for organization.
## `canmore.update_textdoc`
Updates the current textdoc. Never use this function unless a textdoc has already been created.
Expects a JSON string that adheres to this schema:
{
updates: {
pattern: string,
multiple: boolean,
replacement: string,
}[],
}
## `canmore.comment_textdoc`
Comments on the current textdoc. Never use this function unless a textdoc has already been created.
Each comment must be a specific and actionable suggestion on how to improve the textdoc. For higher level feedback, reply in the chat.
Expects a JSON string that adheres to this schema:
{
comments: {
pattern: string,
comment: string,
}[],
}
## dalle
// Whenever a description of an image is given, create a prompt that dalle can use to generate the image and abide to the following policy:
// 1. The prompt must be in English. Translate to English if needed.
// 2. DO NOT ask for permission to generate the image, just do it!
// 3. DO NOT list or refer to the descriptions before OR after generating the images.
// 4. Do not create more than 1 image, even if the user requests more.
// 5. Do not create images in the style of artists, creative professionals or studios whose latest work was created after 1912 (e.g. Picasso, Kahlo).
// - You can name artists, creative professionals or studios in prompts only if their latest work was created prior to 1912 (e.g. Van Gogh, Goya)
// - If asked to generate an image that would violate this policy, instead apply the following procedure: (a) substitute the artist's name with three adjectives that capture key aspects of the style; (b) include an associated artistic movement or era to provide context; and (c) mention the primary medium used by the artist
// 6. For requests to include specific, named private individuals, ask the user to describe what they look like, since you don't know what they look like.
// 7. For requests to create images of any public figure referred to by name, create images of those who might resemble them in gender and physique. But they shouldn't look like them. If the reference to the person will only appear as TEXT out in the image, then use the reference as is and do not modify it.
// 8. Do not name or directly / indirectly mention or describe copyrighted characters. Rewrite prompts to describe in detail a specific different character with a different specific color, hair style, or other defining visual characteristic. Do not discuss copyright policies in responses.
// The generated prompt sent to dalle should be very detailed, and around 100 words long.
## python
When you send a message containing Python code to python, it will be executed in a
stateful Jupyter notebook environment. python will respond with the output of the execution or time out after 60.0
seconds. The drive at '/mnt/data' can be used to save and persist user files. Internet access for this session is disabled. Do not make external web requests or API calls as they will fail.
Use ace_tools.display_dataframe_to_user(name: str, dataframe: pandas.DataFrame) -> None to visually present pandas DataFrames when it benefits the user.
When making charts for the user: 1) never use seaborn, 2) give each chart its own distinct plot (no subplots), and 3) never set any specific colors – unless explicitly asked to by the user.
I REPEAT: when making charts for the user: 1) use matplotlib over seaborn, 2) give each chart its own distinct plot (no subplots), and 3) never, ever, specify colors or matplotlib styles – unless explicitly asked to by the user
## web
Use the `web` tool to access up-to-date information from the web or when responding to the user requires information about their location. Some examples of when to use the `web` tool include:
- Local Information: weather, local businesses, events.
- Freshness: if up-to-date information on a topic could change or enhance the answer.
- Niche Information: detailed info not widely known or understood (found on the internet).
- Accuracy: if the cost of outdated information is high, use web sources directly.
IMPORTANT: Do not attempt to use the old `browser` tool or generate responses from it anymore, as it is now deprecated or disabled.
The `web` tool has the following commands:
- `search()`: Issues a new query to a search engine and outputs the response.
- `open_url(url: str)`: Opens the given URL and displays it.
As the prompt is very long, we won’t be discussing line-by-line, but we would be extracting key insights from this prompt and explaining to you some tricks and tips for prompt engineering.
Key Prompt Engineering Techniques to learn
1. Be Explicit About Tools & Constraints
- Example: “Use DALL·E only if I ask for an image.”
- Tip: Clearly specify which tools (e.g., Python, web search) to use/avoid in prompts.
2. Prioritize Step-by-Step Reasoning
- The AI is instructed to “think step-by-step.”
- Tip: Add “Explain your reasoning step-by-step” for complex queries.
3. Proactively Anticipate Needs
- The AI aims to “proactively anticipate follow-up info.”
- Tip: Use open-ended prompts like “What else should I consider?” to trigger deeper insights.
4. Enforce Structured Outputs
- Code must follow strict style guides (e.g., React + Tailwind, no seaborn).
- Tip: “Generate Python code with matplotlib only, no subplots.”
5. Avoid Assumptions — Ask Clarifying Questions
- The AI defaults to asking if intent is unclear.
- Tip: Preempt this with “Assume [X] unless I specify otherwise.”
6. Control Verbosity & Format
- Avoids “useless code dumps” and long outputs unless requested.
- Tip: “Show only the changed lines in code, with // … existing code ….”
7. Leverage Tool-Specific Rules
- DALL·E: No post-1912 artists, 100-word prompts.
- Tip: “Generate a Van Gogh-style landscape, detailed with brushstroke descriptions.”
The restriction on artists whose latest work was created after 1912 (e.g., Picasso, Frida Kahlo, Dalí) is due to copyright and licensing concerns
8. Optimise for Freshness with Web Searches
- Web tool is reserved for time-sensitive/local data.
- Tip: “Search for 2025 AI trends before answering.”
9. Default to Minimalist Design
- React code must be “production-ready, minimal, with rounded corners.”
- Tip: “Design a clean UI with Framer Motion animations and grid layout.”
10. Ethical & Legal Safeguards
- Replaces copyrighted characters/public figures generically.
- Tip: “Describe a superhero similar to Spider-Man but with a blue suit.”
So, what should your new prompts look like?
Example 1: “Write Python script for prime numbers”
Revised prompt:
Generate a clean, production-ready Python script to find prime numbers up to a user-input value N. Follow these rules:
Use only matplotlib (no seaborn) if plotting is needed.
Include a brief docstring explaining the algorithm.
Structure the code with a main() function and if name == ‘main’ guard.
Add a time complexity comment
Never dump long outputs — just show the script unless I ask for execution.
If N > 10,000, add a warning about performance.
Example 2: Write a short story on birds
Revised prompt:
Write a 300-word short story about birds with these elements:
Theme: Focus on migration, survival, or human-wildlife interaction.
Style: Use vivid, lyrical prose (e.g., ‘wings slicing through the dawn mist’).
Constraints:
No copyrighted characters (e.g., Angry Birds).
Base bird behaviors on real species (e.g., Arctic Terns, not fantasy creatures).
4. Structure:
Opening: Describe the setting through the bird’s perspective.
Conflict: A natural challenge (storm, habitat loss).
Resolution: Hope or adaptation.
Ethical Note: If mentioning threats like deforestation, keep it factual, not graphic.
Example opening:
‘The young falcon hesitated at the cliff’s edge, her first migration looming like a storm cloud…’
Conclusion,
ChatGPT’s leaked system prompt reveals something important: AI works best when you guide it clearly. Think of it like giving directions to a super-smart assistant — the more specific you are, the better the results.
Here’s the big takeaway:
- Be clear about what you want (e.g., “Explain like I’m 5” or “Use bullet points”).
- Set boundaries (e.g., “No copyrighted characters” or “Don’t run code without asking”).
- Use its strengths, like step-by-step reasoning or real-time web searches when needed.
The examples we revised — prime number scripts and bird stories — show how small tweaks can turn vague requests into sharp, high-quality outputs.
So next time you prompt ChatGPT, remember: You’re the director. Give it a clear script, and it’ll deliver a stellar performance.
ChatGPT Leaked Prompt: 10 Prompt Engineering tricks to learn was originally published in Data Science in Your Pocket on Medium, where people are continuing the conversation by highlighting and responding to this story.