What is best way to write prompts to ChatGPT?

I recently cam across a post on LinkedIn which highlighted how we can increase our chances of getting desired output from ChatGPT or any other LLM by using standard prompts. It mentioned the general structure of how to write a prompt starting. And if we believe the creator, then it came from the current co-founder at OpenAI, Greg Brockman. The general format is :

  • Set a clear goal
  • Provide the output you want (format)
  • Provide warnings of what you don’t want
  • Provide context

This is the general format. I think this skill of getting desired output from LLMs is the most highly desired skill right now. It should be relevant in any field and help with almost anything from making a smoothie to writing a code for work!

Here’s an example:

(Goal) I want a list of the best medium-length hikes within two hours of Thane. Each hike should provide a cool and unique adventure, and be lesser known.

(Return Format) For each hike, return the name of the hike as I’d find it on AllTrails, then provide the starting address of the hike, the ending address of the hike, distance, drive time, hike duration, and what makes it a cool and unique adventure.

Return the top 3.

(Warnings) Be careful to make sure that the name of the trail is correct, that it actually exists, and that the time is correct.

(Context Dump) For context my friends and I have recently moved to the city. We haven’t been on any treks but we are looking to start with an easy one and we have only two days off from office, so we are looking at shorter ones which are near the city and of an easy level. There are tons of treks we have heard off from around but we are not sure of the difficulty level and that from we should start.

About the author

vaibhavgandotra2002@gmail.com

View all posts

Leave a Reply

Your email address will not be published. Required fields are marked *