How to write better ChatGPT prompts in 5 steps

Andrey Rudakov/Bloomberg by way of Getty Photographs

ChatGPT is the generative artificial intelligence (AI) software that is taken the world by storm. Whereas there’s at all times the likelihood it’ll merely make stuff up, there’s quite a bit you are able to do when crafting prompts to make sure the absolute best consequence. That is what we’ll be exploring on this how-to.

On this article, I am going to present you find out how to write prompts that encourage the big language mannequin (LLM) that powers ChatGPT to supply the absolute best solutions. 

Additionally: I’ve tested dozens of AI chatbots since ChatGPT’s debut. Here’s my new top pick

Writing efficient prompts, referred to as immediate engineering, has even turn into a highly-paid discipline. Who is aware of? The following tips might provide help to construct the talents to turn into a immediate engineer. Apparently, these gigs will pay from $175,000 to $335,000 per yr.  

The way to write efficient ChatGPT prompts

One of many extra attention-grabbing issues I needed to get used to when working with ChatGPT is that you do not program it; you speak to it. As a formally educated programmer, I’ve needed to abandon many habits when partaking with AI. Speaking to it (and with it) requires a mindset shift.

After I say speak to it like an individual, I imply speak to it such as you would a coworker or workforce member. If that is laborious to do, give it a reputation. Alexa is taken, so perhaps consider it as Bob. This naming helps as a result of once you speak to Bob, you would possibly embrace conversational particulars and anecdotes that give your story texture.

Additionally: How to use ChatGPT to write code

Once you’re speaking to an individual, it will be pure for them to overlook your level initially and require clarification or veer away from the subject at hand and must be wrangled again. You would possibly have to fill within the backstory for them or restate complicated questions primarily based on the solutions they offer you. 

That is referred to as interactive prompting. Do not be afraid to ask ChatGPT multi-step questions: ask, get a response, and primarily based on that response, ask one other query. I’ve finished this myself, typically 10 or 20 instances in a row, and gotten very highly effective outcomes. Consider this as having a dialog with ChatGPT.

Writing a ChatGPT immediate is extra than simply asking a one-sentence query. It usually includes offering related background info to set the context of the question.

As an instance that you just need to put together for a marathon (for the report, I don’t run, dance, or leap — that is merely an instance). You could possibly ask ChatGPT:

How can I put together for a marathon?

Nevertheless, you will get a much more nuanced reply in the event you add that you just’re coaching on your first marathon. Do this as an alternative: 

I’m a newbie runner and have by no means run a marathon earlier than, however I need to full one in six months. How can I put together for a marathon?

By giving the AI extra info, you are serving to it return a extra targeted reply. 
Listed below are two extra examples of questions that present context:

I’m planning to journey to Spain in just a few months and wish to be taught some fundamental Spanish to assist me talk with native residents. I’m searching for on-line assets which are appropriate for novices and supply a structured and complete method to studying the language. Are you able to advocate some on-line assets for studying Spanish as a newbie?

On this case, fairly than simply asking about studying assets, the context helps focus the AI on studying find out how to talk on the bottom with native residents. Here is one other instance: 

I’m a enterprise proprietor fascinated about exploring how blockchain expertise can be utilized to enhance provide chain effectivity and transparency. I’m searching for a transparent and concise clarification of the expertise and examples of the way it has been used within the context of provide chain administration. Are you able to clarify the idea of blockchain expertise and its potential purposes in provide chain administration?

On this instance, fairly than simply asking for info on blockchain and its workings, the main target is particularly on blockchain for provide chain effectivity and the way it is perhaps utilized in a real-world situation. 

Additionally: The most popular programming languages in 2024 (and what that even means)

Lastly, let’s get into find out how to assemble an in depth immediate. 

One be aware: I restrict the reply to 500 phrases as a result of ChatGPT typically breaks when requested to provide someplace between 500 and 700 phrases, leaving tales mid-sentence and never resuming correctly when requested to proceed. I hope future variations present longer solutions as a result of premises like this will generate enjoyable story beginnings: 

Write a brief story for me, not more than 500 phrases.

The story takes place in 2339, in Boston. Your complete story takes place inside a Victorian-style bookstore that would not be misplaced in Diagon Alley. Inside the shop are the next characters, all human:

The proprietor: make this particular person attention-grabbing and a bit uncommon, give them a reputation and a minimum of one ability or attribute that influences their backstory and probably influences your complete brief story.

The helper: it is a clerk within the retailer. His title is Todd.

The shopper and his pal: Two clients got here into the shop collectively, Jackson and Ophelia. Jackson is dressed as if he will a Steampunk conference, whereas Ophelia is clearly coming dwelling from her day working in an expert workplace.

One other buyer is Evangeline, an everyday buyer within the retailer, in her mid-40s. Yet one more buyer is Archibald, a person who may very well be wherever from 40 to 70 years outdated. He has a mysterious air about himself and appears each considerably grandiose and secretive. There’s something about Archibald that makes the others uncomfortable.

A typical idea in retail gross sales is that there is at all times extra stock “within the again,” the place there is a storeroom for added items which may not be proven on the cabinets the place clients browse. The premise of this story is that there’s something very uncommon about this retailer’s “within the again.”

Put all of it collectively and inform one thing compelling and enjoyable.

You may see how the element offers extra for the AI to work with. First, feed “Write me a narrative a few bookstore” into ChatGPT and see what it offers you. Then feed within the above immediate, and you may see the distinction.

Certainly one of ChatGPT’s coolest options is that it could actually write from the standpoint of a particular particular person or occupation. In a earlier article, I confirmed how you can make ChatGPT write like a pirate or Shakespeare, however you may also have it write like a instructor, a advertising government, a fiction author — anybody you need. 

Additionally: Have 10 hours? IBM will train you in AI fundamentals – for free

For instance, I can ask ChatGPT to explain the Amazon Echo sensible dwelling gadget from the standpoint of a product supervisor, a caregiver, or a journalist in three separate prompts: 

From the standpoint of its product supervisor, describe the Amazon Echo Alexa gadget.

From the standpoint of an grownup youngster caring for an aged mother or father, describe the Amazon Echo Alexa gadget.

From the standpoint of a journalist, describe the Amazon Echo Alexa gadget.

Strive dropping these three prompts into ChatGPT to see its full response. 

I’ve pulled just a few traces from ChatGPT’s responses so you may see the way it interprets totally different views. 
From the product supervisor identification: I can confidently say that this is among the most modern and revolutionary merchandise within the sensible dwelling business.

From the caregiver identification: The gadget’s means to set reminders and alarms may be significantly useful for aged people who might have hassle remembering to take their treatment or attend appointments.

Additionally: How to use Claude (and how it’s different from ChatGPT)

And from the journalist identification: From a journalistic perspective, the Echo has made headlines because of privateness considerations surrounding the gathering and storage of consumer knowledge.

You may see how totally different identities enable the AI to supply totally different views as a part of its response. To increase this, you may let the AI do a thought experiment. Let us take a look at among the points that went into the creation of one thing like Alexa:

The yr is 2012. Siri has been out for the iPhone for a few yr, however nothing like an Alexa sensible dwelling gadget has been launched. The scene is an Amazon board assembly the place the Echo sensible assistant primarily based on Alexa has simply been proposed. 

Present the arguments, professional and con, that board members at that assembly would have been more likely to talk about as a part of their technique of deciding whether or not or to not approve spending to put money into creating the gadget. 

Be happy to additionally embrace participation by engineering design consultants and product champions, if that gives extra complete perspective.

It is also good to know that making minor modifications to your prompts can considerably change ChatGPT’s response. For instance, after I modified the phrase, “Present the arguments, professional and con, that…” to “Present the professional and con arguments as dialogue, that…,” ChatGPT rewrote its reply, switching from a listing of enumerated professionals and cons to an precise dialogue between individuals.

As talked about above, ChatGPT tends to go off the rails, lose observe of the dialogue, or fully fabricate solutions. 

There are just a few methods you should use to assist preserve it on observe and sincere.

Certainly one of my favourite issues to do is ask ChatGPT to justify its responses. I am going to use phrases like “Why do you suppose that?” or “What proof helps your reply?” The AI will usually apologize for making stuff up and are available again with a brand new reply. Different instances, it’d offer you some helpful details about its reasoning path. In any case, do not forget to use the tips I provide for having ChatGPT cite sources.

Additionally: My two favorite ChatGPT Plus features and the remarkable things I can do with them

If in case you have a reasonably lengthy dialog with ChatGPT, you will begin to discover that the AI loses the thread. Not that that is distinctive to AIs — even in prolonged conversations with people, somebody is sure to get misplaced. That stated, you may gently information the AI again on observe by reminding it what the subject is and what you are attempting to discover.

I’ve had some luck by telling the AI to re-read my prompt. Principally, the method is to concern a immediate, then inform the AI one thing like: “re-read this,” and observe that up with the precise immediate handed earlier. You could possibly refine or add to the immediate if you need, and see what occurs. The concept is that re-reading forces the AI to rethink and make clear what it simply learn.

Probably the greatest methods to up your ability at this craft is to mess around with what the chatbot can do.

Strive feeding ChatGPT quite a lot of attention-grabbing prompts to see what it’ll do with them. Then change them up and see what occurs. Listed below are 5 to get you began:

  • Think about you’re a raindrop falling from the sky throughout a thunderstorm. Describe your journey from the second you kind within the cloud to the second you hit the bottom. What do you see, really feel, and expertise?
  • You’re a toy that has been left behind in an attic for many years. Narrate your emotions, recollections of playtimes previous, and your hopes of being rediscovered.
  • Write the ultimate diary entry of a time traveler who has determined to quiet down in a particular period, explaining why they selected that point and what they’ve discovered from their travels.
  • Think about a dialogue between two unlikely objects, like a teacup and a wristwatch, discussing the day by day routines and challenges they face.
  • Describe a day in an ant colony from the attitude of an ant. Dive deep into the politics, challenges, and social constructions of the ant world.

Additionally: If you want a career in AI, start with these 5 steps

Listen not solely to what the AI generates however the way it generates what it does, what errors it makes, and the place it appears to run into limits. All of that element will provide help to increase your prompting horizons.

Extra prompt-writing ideas 

  • Be happy to re-ask the query. ChatGPT will usually change its reply with every ask.
  • Make small modifications to your prompts to information it into supplying you with a greater reply.
  • ChatGPT will retain its consciousness of earlier conversations so long as the present web page is open. If you happen to go away that web page, it’ll lose consciousness. To be clear, ChatGPT can even typically lose the thread of the dialog with out purpose, so remember you might want to start out over occasionally.
  • Equally, opening a brand new web page will begin the dialogue with recent responses.
  • Make sure you specify the size of the response you need. Solutions longer than about 500 phrases typically break down. 
  • You may appropriate and make clear prompts primarily based on how the AI answered beforehand. If it is misinterpreting you, you could possibly simply inform it what it missed and proceed.
  • Rephrase questions if ChatGPT would not need to reply what you are asking. Use personas to elicit solutions that it won’t in any other case need to give.
  • In order for you sources cited, inform it to help or justify its solutions.
  • ChatGPT customized directions at the moment are obtainable to free customers. You may give ChatGPT a set of prompts that are always available, so you do not have to retype them.
  • Hold experimenting.
  • Take into account getting the ChatGPT Plus subscription. You will get extra time to work together with the AI earlier than it shuts you down and asks you to attend for an additional session. 
  • Strive asking the identical query of Gemini (previously Bard) or Copilot (previously Bing Chat). Each will interpret your prompts otherwise and reply otherwise. That is successfully getting a second opinion in your immediate, and can provide you alternate views.
  • Ask for examples. If you wish to see how nicely ChatGPT understands what you are asking for, ask it, “Are you able to give me three examples of how that works?” or comparable questions.
  • Ask it to repeat elements of your unique requests again to you. For instance, in the event you feed it an article to research, you may inform it one thing like, “Simply to make certain you perceive, please echo again the primary three headlines,” or “I need to make certain you perceive what I imply, so summarize the primary battle mentioned on this article.” 
  • Generally ChatGPT simply fails. Hold attempting, but additionally be prepared to surrender and transfer on to different instruments. It is not excellent…but.

What sort of prompts work greatest with ChatGPT? 

A part of what makes ChatGPT so compelling is you may ask it virtually something. That stated, needless to say it is designed to supply written solutions. In order for you a listing of internet sites, you are higher off speaking to Google. 

Additionally: How to use DALL-E 3 in ChatGPT

In order for you some type of computation, speak to Wolfram Alpha. Give ChatGPT open-ended prompts, encourage creativity, and do not be afraid to share private experiences or feelings. Plus, needless to say the AI’s knowledge ends in 2021 for ChatGPT 3.5 and December 2023 for ChatGPT 4 in ChatGPT Plus and ChatGPT 4o, which is out there in each Plus and free modes.

How can I regulate the complexity of ChatGPT responses?

You may instantly specify the complexity stage by together with it in your immediate. Add “… at a highschool stage” or “… at a stage meant for a Ph.D. to grasp” to the top of your query. It’s also possible to improve the complexity of output by rising the richness of your enter. The extra you present in your immediate, the extra detailed and nuanced ChatGPT’s response might be. It’s also possible to embrace different particular directions, like “Give me a abstract,” “Clarify intimately,” or “Present a technical description.”

Additionally: How does ChatGPT actually work?

It’s also possible to pre-define profiles. For instance, you might say “When evaluating one thing for a supervisor, assume a person with a four-year enterprise faculty training, an absence of detailed technical understanding, and a reasonably restricted consideration span, who likes to get solutions which are clear and concise. When evaluating one thing for a programmer, assume appreciable technical information, an enjoyment of geek and science fiction references, and a need for a whole reply. Accuracy is deeply necessary to programmers, so double-check your work.”

If you happen to ask ChatGPT to “clarify C++ to a supervisor” and “clarify C++ to a programmer,” you will see how the responses differ.

How can I regulate the creativity stage of ChatGPT’s responses?

In the identical manner that you could regulate the complexity stage, you may regulate the creativity stage. It is a matter of offering a immediate that guides the AI in that route. For instance, use “please embrace artistic, open-ended responses” or “please present factual, concise replies” in your prompts.

What do I do if ChatGPT refuses to reply or I do not like its reply? 

There are some guardrails constructed into ChatGPT. It tends to close down in the event you ask it political questions, for instance. That is what’s constructed into the system. Whilst you would possibly be capable to tease out a solution, it is in all probability not going to supply nice worth. That stated, be at liberty to maintain attempting with totally different phrasing or views. 


You may observe my day-to-day challenge updates on social media. Make sure you subscribe to my weekly replace e-newsletter on Substack, and observe me on Twitter at @DavidGewirtz, on Fb at Facebook.com/DavidGewirtz, on Instagram at Instagram.com/DavidGewirtz, and on YouTube at YouTube.com/DavidGewirtzTV.

Shopping cart