ChatGPT Prompt Engineering Basics: Writing effective prompts

Here is a formula for writing effective ChatGPT prompts that works very well for giving you the desired results that you want.

ChatGPT prompt setup

Part 1: Information you provide for your prompt

In order to use ChatGPT most effectively, you have to treat it as a tool that turns one format of information into another format of information. To that end, you must give it information to work from and tell it to use your information whenever possible.

Here’s an example. Let’s say I want ChatGPT to make me a workout plan. I will give it this article from the Australian government, which is an open source given the agreement between the US and AUS for data sharing.

ChatGPT data prompt

My instruction here is “I would like to make a workout plan using this data” and then I put in the data. I put the data in a wrapper <data> </data> so that ChatGPT knows where the data begins and ends.

Prompt Engineering Notes:

  • Label your data: keep this simple. In my example I just said “I would like to make a workout plan using this data”
  • Markup your data: I used <data> and a closing bracket at the end </data> this tells ChatGPT or any other LLM that I want to use what’s contained in that markup.
  • Keep instructions simple: The more you tell ChatGPT about this data the less accurate it will be in using the data effectively.

Part 2: Action you want ChatGPT to take

Tell ChatGPT what you want it to do with the information you provided. Here’s my example where I ask it to give me a workout plan.

ChatGPT prompt action

Prompt engineering notes:

  • Include a number of repetitions if your prompt requires multiple iterations. ChatGPT can be lazy like a human and won’t complete the whole task unless your prompt includes the number of times you want it to do something.
  • Be detailed in how complex you want your output to be. Are you looking for an overview or a full detailed output? Tell ChatGPT how much it should be detailed and how much it should glaze over details.

Part 3: Output format for ChatGPT to use

This is the most detailed part of your whole prompt. You have to tell ChatGPT exactly how you want your output to look.

Here’s my super simple workout example. I tell it what format I want my workout plan to be in.

ChatGPT output prompt example

Prompt engineering notes:

  • Break down the format to every single step, don’t assume ChatGPT will know what you mean if you say “I want a 7 day plan” you have to break down how you want that to actually look.
  • Include length in your prompt. If you want the output to be 200 words, say that explicitly. Without a guardrail on the length of output it will decide on its own and not always match what you want.

Prompt Output

Here’s my output, a perfectly formatted 7-day workout plan that pulls from the Australian government site so I can be sure it’s valid and it gives me a full plan I can follow.

This prompt engineering framework works for any use case. If you follow the three steps you’ll end up with a perfect output every time and need minimal editing on the backend.

prompt output chatgpt
Josh Haynam

Josh Haynam is the co-founder of Interact, the ai-powered personalization platform where brands create experiences to make every customer interaction unique. Josh is a student of psychology and interaction design, striving to build a platform that connects businesses and customers for a mutually beneficial collaboration.

Make a quiz for your business with AI

Use our AI quiz maker to create a beautiful quiz for your brand in a minute.

Make a quiz - for free