PDF download Download Article PDF download Download Article

If you have ever interacted with an AI chatbot, you know that they rely on well-written prompts to understand you and respond appropriately. However, vague or overly broad prompts can sometimes generate irrelevant or incomplete responses, which can be frustrating. This is where prompt engineering comes in.

A lot of research has been done on creating effective prompts that provide helpful context and get you the answers you want. In this article, we will provide you with some useful tips on how to craft clear, specific prompts that will help you get the most out of your ChatGPT interactions.

1

Give context.

PDF download Download Article
  1. Provide any necessary background information to make sure ChatGPT understands [1] .

    For example, say "ChatGPT, I want to talk about reforming public education. Specifically, I'm interested in making college more affordable and accessible. "
    Here are some examples. Note the italicised text provides context to the question, allowing GPT to provide better-suited answers.
    • ChatGPT, I want to discuss potential policy solutions for climate change. Specifically, I'm interested in options for transitioning to renewable energy and reducing emissions.
    • ChatGPT, I need some advice. I'm struggling with balancing work responsibilities and spending time with family. Can we talk through some strategies for creating better work-life balance?
    • ChatGPT, I'm thinking about adopting a dog from an animal shelter. Can we discuss some of the pros and cons of dog ownership and breed options that might suit my lifestyle? I live in an apartment, have limited outdoor space, and am away from home for 8-9 hours a day.
    • ChatGPT, I'm taking an online course in art history to learn more about European paintings. For an upcoming assignment, I need to analyze a few of Claude Monet's famous impressionist works. Can you give me some suggestions of paintings I should focus on and possible approaches for my analysis?
    • ChatGPT, I'm training for my first marathon and trying to establish a good running schedule. I want to fit in speed work, tempo/easy runs, long runs, strength and cross-training within my busy weekly schedule. Can you provide any advice for organizing a marathon training regimen? Things I should be sure to include and consider with how much I can handle as a beginner runner ?
    • The specific prompts provided above are good because they have a clear and narrow focus, making it easier to provide helpful and actionable advice. [2]
  2. Advertisement
3

Provide an example.

PDF download Download Article


  1. For instance, say "ChatGPT, please summarize the key points from the attached article in 3 sentences." Rather than the open-ended "What do you think about this article?"

    You can also provide example answers to guide ChatGPT; this is called few-shot prompting [3] . Example (this is a complete prompt):
    • Text: I had a wonderful time at the beach today. The weather was perfect, and the water was crystal clear. I enjoyed building sandcastles, playing volleyball, and soaking up the sun with my friends. It was a truly memorable and joyous day. Sentiment: positive
    • Text: The rundown old amusement park had clearly seen better days. Rusting rides that looked well past safe operating limits, trash strewn about the premises, exorbitant prices for cheap food and mile-long lines managed by apathetic teen staff did not make for an enjoyable family outing. Sentiment: negative
    • Text: Accepting the prestigious literary award, the renowned yet famously reclusive author delivered a moving speech highlighting the power of words to challenge assumptions, foster empathy and drive positive change.
    • ChatGPT, based on the context provided, would you say this sentiment is positive or negative?
  2. Advertisement
4

Keep it concise.

PDF download Download Article
  1. Keep your initial prompt to 1 or 2 sentences. Follow up with additional prompts if needed for clarification.
    EXPERT TIP

    Tyrone Showers

    Technologist
    Tyrone Showers is a Technologist and the Co-owner of Taliferro Group, an IT consulting company based in Seattle, Washington. With over 35 years of professional experience, he specializes in API Design, e-Commerce, Operational Efficiency, and website development. He has a B.S. in Computer Science from DeVry Institute of Technology.
    Tyrone Showers
    Technologist

    Be specific when using ChatGPT. Clear and concise prompts outlining your exact needs help ChatGPT tailor its response. Specify the desired outcome (e.g., creative writing, informative summary, functional resume), any length constraints (word or character count), and the preferred emotional tone (formal, humorous, etc.)

5

PDF download Download Article
  1. Let ChatGPT know if a response is heading in the wrong direction and needs to be re-focused. Examples:
    • If ChatGPT summarizes an article in 3 sentences as you requested but leaves out a key point, follow up by saying something like: "Thanks, that covers the main topics but can you include the author's argument about [X] in your summary?"
    • If ChatGPT makes a claim or statement you disagree with or think needs nuance, ask for clarification. You might say: "Can you explain your reasoning behind that statement?" or "I see it differently. Here is my view: [share your perspective]." Then ask for ChatGPT's reaction to your view. The algorithm will often refine its information as you ask it more specific questions.
    • If ChatGPT goes off-topic or redirects the conversation in an unhelpful direction, kindly re-focus the bot by restating your original prompt or question.
      For instance: "Let's get back to the issue of making college more affordable. What policy solutions would you suggest for lowering tuition costs?"
  2. Advertisement
6

Avoid yes/no questions.

PDF download Download Article
  1. Look for prompts that start with words like "Do you..." "Did you..." "Will I..." "Should I..." These typically require a one-word response and limit discussion. Examples:
    • Do you think I'll enjoy this book?
    • Did you agree with points made in the article?
    • Should I ask for a raise at work?
  2. Start with words like "What..." "Why..." or "How...". This gives ChatGPT more options for responding and encourages engaging dialogue. Examples:
    • What about this book do you think will appeal to me?
    • Why did you agree or disagree with ideas presented in the article?
    • How might I make a compelling case for earning a raise at my job?
  3. Keep the discussion going by probing ChatGPT's answers for more details, examples, reasoning, and depth.Remember to provide context and background as needed. Include any necessary additional information to help steer ChatGPT's responses in the most helpful direction. Describe your unique situation or priorities to receive customized advice. Examples:
    • What other books would you recommend to me based on what I've enjoyed in the past? I especially enjoy science fiction books with complex plots and well-developed characters.
    • Can you give an example from the article that supports your perspective? I found the argument around educational policy reform particularly unconvincing. My views tend to align more with Position A.
    • What key accomplishments or valuable skills have I gained this past year that warrant increased compensation? I have taken on additional responsibilities over the past 6–12 months, including training two new team members and reorganizing work flows to increase efficiency by 15%. My productivity and contributions are demonstrably greater, even in a challenging year.
  4. Advertisement
7

Use chain-of-thought prompting. [4]

PDF download Download Article
  1. This method involves providing a series of connected prompts that ask an AI system like ChatGPT to engage in a sequence of reasoning steps before responding [5] . Example prompt:
    • The odd numbers in this group add up to an even number: 4, 8, 9, 15, 12, 2, 1. Answer: Adding all the odd numbers (9, 15, 1) gives 25. The answer is False.
    • The odd numbers in this group add up to an even number:15, 32, 5, 13, 82, 7, 1. Answer: ?
  2. One recently proposed technique is "zero-shot chain-of-thought prompting" [6] . This method consists of adding the phrase "Let's think step by step" to the initial prompt. The idea behind this is that simply instructing ChatGPT to "think step by step" through a complex prompt, without providing explicit examples, may activate more systematic reasoning as the system determines how to logically break down its thought process on the fly. Example:
    • I have a total of $100 dollars to spend. I first spend $25 on lunch, then I go shopping and buy a new calculator for $35 and a notebook for $10. On my way home, I stop for gas and it costs me $12 to fill up my tank. How much money do I have left? Let's think step by step.
    • A librarian has a total of 227 books to put on 3 shelves. She places the same number of books on each shelf. After shelving all the books, she realizes she has 7 books left over that do not fit. How many books did she place on each shelf? Let's think step by step.
  3. Advertisement
8

Use the Self-Ask Technique.

PDF download Download Article
  1. The "self-ask method" [7] is an approach where the AI system asks itself additional follow-up questions before responding to the initial query. This requires you to provide ChatGPT with an example like this:
    • You: Question: Who lived longer, Theodor Haecker or Harry Vaughan Watkins?
    • ChatGPT: Are follow up questions needed here: Yes.
    • ChatGPT: Follow up: How old was Theodor Haecker when he died?
    • You: Intermediate answer: Theodor Haecker was 65 years old when he died.
    • ChatGPT: Follow up: How old was Harry Vaughan Watkins when he died?
    • You: Intermediate answer: Harry Vaughan Watkins was 69 years old when he died.
    • ChatGPT: So the final answer is: Harry Vaughan Watkins
  2. "Ask any follow-up questions you need to answer this question correctly, step by step".
  3. Advertisement
9

Provide feedback.

PDF download Download Article
  1. Say something like: "Thank you, that summary was very insightful." Or "I agree, those pros and cons were thoughtfully considered." Positive feedback will signal to ChatGPT how it should answer your follow-up questions.
    EXPERT TIP

    Tyrone Showers

    Technologist
    Tyrone Showers is a Technologist and the Co-owner of Taliferro Group, an IT consulting company based in Seattle, Washington. With over 35 years of professional experience, he specializes in API Design, e-Commerce, Operational Efficiency, and website development. He has a B.S. in Computer Science from DeVry Institute of Technology.
    Tyrone Showers
    Technologist

    Imagine yourself as a mentor to ChatGPT. To guide ChatGPT toward your writing style, provide writing samples. After receiving responses, offer constructive feedback, highlighting what aligns with your goals and areas for improvement. Be specific in prompts to avoid repetitive phrases or generic beginnings.

Expert Q&A

Ask a Question
      Advertisement

      Tips

      • Ask ChatGPT to "Act as <Persona> ". Example: Act as a copywriter, act as a maths teacher, act as a web developer, etc. Users report receiving higher quality answers by giving ChatGPT a persona related to their question [8] .
      • Ask ChatGPT to "self-reflect" on its answers by typing "why were you wrong?". Research has shown self reflection improves GPT-4's accuracy by 30%. [9]
      • Specify the desired response format (e.g. bullet points, short paragraphs)
      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Thanks for submitting a tip for review!
      Advertisement

      Warnings

      • Training data of ChatGPT is limited up to September 2021, and it is not connected to the internet unless the user has access to the browsing plugin. Users should not rely on ChatGPT for answers requiring real-time access to information.
      • ChatGPT can give incorrect or biased answers. Users should avoid relying on ChatGPT for advice pertaining to legal or medical matters.
      Advertisement

      About This Article

      Thanks to all authors for creating a page that has been read 9,541 times.

      Is this article up to date?

      Advertisement