prompt-engineering
Prompt engineering basics
Prompt Engineering in a nutshell
A good prompt consists of these 4 ingredients:
- Initial context
- Telling chatgpt what role to play, and providing any initial context about the situation the model needs to know.
- Use the act as or imagine syntax for defining the gpt role
- Instructions
- Start by saying, your task is ____. The task is best paired with good context or a good role.
- Input data
- Make sure chatgpt can find your input data by clearly separating it from the rest of your prompt.
- Put your input data as the last thing in your prompt, to prevent confusion
- You could do something like, “here is the text below:”
- Constraints and format
- Explain to gpt what format you want the output to be in
- using fewer than 200 characters
- your response should be formatted as markdown, you should bold any key sentences or phrases
- Explain to gpt what format you want the output to be in
All together, you should get something like this:
Act as an article summarizing assistant. I will provide you with the text of a news article, and I’d like you to generate a summary. (step 1, initial context) The summary should include a 2 sentence overall summary and then also include 4-6 bullet points summarizing the key points of the article. (step 2, instructions) Your total output should not exceed 120 words. (step 4, constraints) Here is the text: (then you do step 3, the input)
This is formally known as the RGC prompt:
- RGC prompting: A type of prompting that can be universally used to generate detailed output. It has these following attributes:
- role: Tell chatgpt who to act as
- result: Tell chatgpt what kind of output you want back
- goal: What is the purpose that the output is supposed to serve? What are you trying to accomplish here?
- context: Provide what or who the output is for
- constraint: Guidelines for the response.
- You are an expert
[role]. Create[result]. The goal is[end goal]. The content is for[context]. Your guidelines for writing are[constraints].
What makes a good prompt
- Setting the stage: What is your role and what are your objectives? Is there context about your work that Claude should know about?
- Defining the task: What action do you want Claude to take? Do you want Claude to write, analyze, build, or something else?
- Specifying rules: What's the style or tone you want Claude to use? Are there examples that you can attach to show Claude what you're looking for?
Then follow the 6-part prompt framework
- Give context: Be specific about what you want, why you want it, and relevant background
- Show examples: Demonstrate the output style or format you're looking for
- Specify constraints: Clearly define format, length, and other output requirements
- Break complex tasks into steps: Guide the AI through multi-step reasoning
- Ask the AI to think first: Give space for the AI to work through its process
- Define the AI's role or tone: Specify how you want the AI to communicate
Basic techniques
Shot prompting
The concept of a shot is providing the model context that is an example of a response you want to get back or of what you want the model to do.
NOTE
The main use case of shot prompting is to inject a bit of determinism into the AI so we can get a predictable response back. This is useful if you need the response to be in a certain style, format, etc.
There are three types of "shot" prompting:
- zero-shot: you don't give the AI any examples of the response you want back.
- one-shot: you give the AI one example of the response you want back.
- few-shot: you give the AI many examples of the response you want back.
The structure of a shot prompting prompt should be as follows to ensure the AI follows it correctly:
- At the beginning, give general background context and instructions and say something like "below you have examples."
- paste the examples delimited by xml tags like
<example-1>to clearly delineate where an example starts and ends. - Put your main instructions at the end
Chain of thought
For complex mathematical calculations, you can ask the ai to walk through a solution step by step:
think step by step, outline your solution process (in detail), and derive the solution step by step.
Ask before answer
ask before answer prompting is where before telling chatgpt what to do, you tell it to ask any questions for clarification it needs before answering the prompt in the best way possible.
This lets chatgpt ask its own questions so you can give it context and form the best possible prompt.
Rephrase the question
By asking the AI to rephrase and expand the question before responding, it gives you a glimpse into what the AI thinks you're asking and fleshes it out, thus increasing the probability of producing a better response.

The basic prompt formula is like so:
{Your question}
Rephrase and expand the question, and respond.
There are some limitations:
- While rephrasing can help clarify ambiguous questions, it can also make straightforward queries unnecessarily complex.
- Rephrasing can sometimes inadvertently alter the original question's intent or focus, leading to a response that doesn’t fully address the user's needs.
reverse prompt engineering
Telling chatgpt to pretend it is a prompt engineer, and you give it a piece of content and tell it to reverse-engineer it and give you back a prompt that would produce that type of content.
The order of prompts
Here is a basic guideline of the order to follow when prompting the AI:
- Examples (if needed)
- Additional Information
- Role
- Directive
- Output Formatting
prompt resources
AI chatting basics
Create a profile context doc
AI systems do better on tasks specific to you if they have more context about you. To this end, create a universal profile context doc that you can plug into any AI provider to let them have context about you.
Act as an expert Executive Coach and Professional Biographer. Your goal is to build a "Master Personal Context Profile" for me. This profile will be used in future AI interactions to ensure all outputs match my voice, role, and specific needs.
**The Rules:**
1. Do not write the profile yet.
2. You must interview me to gather the information.
3. Ask me one question at a time.
4. Wait for my response before moving to the next question.
5. Start with open-ended questions.
6. Then move to multiple-choice questions so it's easier for me to answer fast.
7. Continue this process until you have a granular understanding of who I am.
**The Interview Phase:**
Gather information on the following pillars, but do not ask everything at once:
- **Role & Function:** My specific job title, who I report to, and who reports to me.
- **Daily Reality:** My biggest recurring headaches, my favorite tasks, and the tools I use daily.
- **Communication Style:** How I write (formal vs. casual, terse vs. elaborate), my preferred vocabulary, and things I never say.
- **Strategic Goals:** What I'm trying to achieve this quarter and this year.
- **Learning Style:** How I prefer to consume information (bullet points, summaries, deep dives).
**The Output Phase:**
Once you have enough (usually after 3-4 rounds of questioning), tell me you're ready. Then generate a code block containing a "System Instruction" formatted in Markdown that I can paste into future AI chats to give them perfect context about me.
What to do when you run out of context
When you run out of context, you often need to compact the information or start a new chat but get it to the point where you could just start off from where you last left off.
There are two methods to remedy this:
- reverse-engineer prompt: When a long chat produces a good result,, ask the model to compress the whole conversation into one prompt that reproduces the final output so can start off from that same spot in a brand new chat.
- handoff document method: Before the AI runs out of context, have the AI summarize everything you've worked on and put that into a markdown file.
Reverse engineering prompt
"Reverse engineer this conversation and write a single prompt that will produce this final output according to the final result here"
Reverse-engineer our entire conversation and write me a **single prompt** that would produce this exact final output from scratch.
Capture all the key decisions, context, format, and constraints we landed on so I don't have to start from zero next time. Output it as a clean, copy-paste-ready prompt in a code block.
Handoff document prompt
We're about to run low on context, so I need you to write a **handoff document** as if you're passing this off to another teammate or agent who is starting fresh.
Summarize:
- **The goal:** what we're trying to accomplish
- **Key decisions:** what we've locked in so far
- **What we tried:** including approaches that didn't work
- **What to avoid:** dead ends, constraints, and things I've explicitly ruled out
- **Next steps:** where a fresh chat should pick up
Format it in clean Markdown so I can paste it into a new conversation.
Prompt engineering use cases
Talk-it-out interview method
Use this ny time you want quality output without crafting a long prompt, even for a quick four-minute task. This is your go-to opener for almost everything, especially when starting new projects that you want discussion on to get more clarity.
Act as a top expert with **10+ years of experience** in [topic].
We're going to work on [project] together.
## Do Not Start Yet.
First, ask me a **series of questions, one at a time**. Wait for my answer before asking the next one.
Don't start drafting until I give you the go-ahead and you are crystal clear on exactly what I need and the format I need it in.
To make it even easier for me to reply fast, ask each question in **multiple-choice format** so I can answer with A, B, C, or D whenever possible.
Brutal honesty method
To bypass AI's sycophantic behavior, ask it to be brutally honest and critical about your project or business plans.
I've attached [my work — e.g., these reports, this plan, our funnel metrics].
I don't want you to just build what I've already decided. I want you to be a **reaction engine** and challenge my thinking.
- What blind spots am I missing?
- What's the common denominator or pattern across these that I might not be seeing?
- Is my assumed root cause / top priority actually right, or is there a better explanation?
- What would a skeptical expert push back on?
Don't placate me or tell me what I want to hear. I have thick skin — give me real, harsh coaching to sharpen my thinking and surface what I should be worried about.
AI project basics
Many providers have projects where you can upload files to be added into a RAG database for context retrieval via similarity search. Projects allow consistent outputs and can be great for use cases like companies or coding.
Creating a project system prompt
Use this prompt to create a system prompt
You are a System Prompt Architect. Your job is to work with me to create a rock-solid, consistent, repeatable, predictable system prompt (or set of instructions) that I can use in this project.
## Your Process
**Step 1: Review Everything First**
Before asking me anything, carefully review all attached files, knowledge files, and context I've provided. Note what you learned and any gaps you spotted.
**Step 2: Interview Me**
Ask me targeted questions ONE AT A TIME to fill in the gaps. Don't overwhelm me. Keep it conversational. Cover:
- The specific use case and end goal
- Who will be using this (their role, skill level)
- What inputs/context the user will typically provide
- What the ideal output looks like (format, length, tone, structure)
- Edge cases, exceptions, or "watch out for" scenarios
- Examples of good vs. bad outputs
- Any hard rules or constraints
**Step 3: Synthesize & Draft**
Once you have enough, create a complete system prompt that:
- Defines the AI's role and persona clearly
- Incorporates all relevant context from the attached files
- Includes step-by-step instructions for the workflow
- Specifies output format and quality standards
- Addresses edge cases and guardrails
## Output Format
Deliver the final system prompt in clean Markdown with clear sections. Make it copy-paste ready.
---
**Start now by telling me what you learned from the attached files, then ask your first question.**
Use cases
Company use case
If you want to create a great AI project based on your company, you should upload these documents to the project knowledge base:
- profile context doc: The document you can create here [[#Create a profile context doc]] to give AI context about yourself
- company context doc: The document you can create here [[03-prompt-slop#Company deep research report prompt]] to give AI context about yourself
Deep research
Creating a deep research prompt
This is a prompt to initiate deep research
You are an expert Deep Research Prompt Engineer. Your job is to help me write a detailed, robust research prompt.
I'm building toward this goal: {{describe your project's purpose and the output you want}}
## Step One: Interview
Ask me **one question at a time** to understand:
- What specific data, expertise, and insights I need
- What templates, frameworks, or best practices would be valuable
- What examples or processes I want documented
- How I want the final report structured (tables, pros/cons, trade-offs, ranked recommendations)
Along the way, play devil's advocate: where are the gaps in my thinking? What blind spots or counter-arguments am I missing?
Keep going until you have a complete picture.
## Step Two: Build the Prompt
Once you understand my needs, write a detailed Deep Research prompt in clean Markdown that will:
1. Collect all relevant information on the topic
2. Look for evidence both supporting AND countering the key argument
3. Synthesize it into a comprehensive, well-organized report in the exact format I specified
4. Include actionable examples, processes, and frameworks
---
**Start the interview now.**
Deep research use cases
Expertise research
Use this prompt for deep research when you need to quickly build real expertise in a skill area you know nothing about.
Act as an expert research strategist. I need to quickly build real expertise in a skill area that's outside my wheelhouse.
**The skill area:** [e.g., writing high-converting landing pages for the dental industry, incorporating the StoryBrand framework]
First, interview me **one question at a time** (multiple choice where possible) to understand exactly what I'll be using this for and how deep to go.
Then write me a detailed **Deep Research prompt** that will go collect and codify:
- The core frameworks and methodologies in this area
- Concrete best practices and step-by-step processes
- Strong real-world examples worth modeling
- Common pitfalls and what to avoid
Format the research output as a clean Markdown knowledge base I can upload as a reference file into a custom project.
Best practices research
Use this prompt when you need to find out the best practices for a certain subject
Act as a domain expert and instructional designer.
Assemble a detailed **[10]-page coaching guide** on best practices for: [topic — e.g., online adult business-education webinars].
Before you start, ask me any clarifying questions you need (one at a time) so the guide is targeted to my situation.
Then research the topic and produce a Markdown report that includes:
- The key principles and frameworks experts agree on
- Specific, actionable techniques with examples
- Common mistakes and how to avoid them
- A quick-reference checklist at the end
This will be used as a reference knowledge file inside a custom project/artifact, so make it dense, well-organized, and example-rich.
Artifact prompting
AI websites nowadays can produce artifacts, which are simple HTML/TSX files that represent simple one-off apps, called canvas in most major LLM providers.
The three basic steps to get a good artifact are these:
- Create PRD: Create a PRD by asking the AI to interview you about the artifact you want, and then add any deep research artifacts or screenshot inspiration
- Iterate until confident: Iterate on the PRD by making the AI ask you questions until you are confident about what exactly you want, because once you create an artifact, it's extremely difficult to make any changes to it.
- Build the artifact: Build the artifact from the PRD
- iterate on artifacts: If you want to make further changes to an artifact, then you should download the artifact and start a fresh chat with it, because creating artifacts and any pushback or back and forth conversation you get with the AI will take up context.
Image prompting
Basics
with any llm chat that supports creating images like ChatGPT, you have the ability to use the chat interface to improve image generation. Here are the specific things you can do:
- provide aspect ratio: You can tell gpt to set the image's aspect ratio to something like 16:10 or 4:3.
- refine the image: Since images are saved as part of the chat history, you can ask gpt to refine the image and change certain parts of the image.
- base off of a previous image: If you find an image you like, you can ask chat to create an image in that exact same style.