ChatGPT Prompt Engineering

Chat GPT is a popular Generative Pre-Trained Transformer, which is a deep learning language model based on semi supervised learning with human feedback

It’s not without its own flaws, below is the questions I asked ChatGPT about itself. It did correct itself in the end.

Then I tell it that on OpenAI page I have seen a reference

ChatGPT: 0, Me: 1

Now I ask the original question again

This article is about Prompts, how we ask correct questions so it responds with correct answer what we need, it comes out in minimal back and forth and is to a level of our expectation.

Yes you can experiment, play around, make mistakes and do some level of information gathering from the tool. But to use a tool properly, you need to understand details on how the tool works and how to use it.

The prompt includes 3 main parts (Guidance, Modifiers, Output)

Guidance

How we want ChatGPT to behave, this is not the question. It is part of priming the prompt. you can have a initial prompt to tell it that, or include the information along with the question in the main prompt.

Persona – What we want ChatGPT to act like, an expert in some area, example (Chef, Personal trainer, Doctor etc).

Audience – Explain this information to a programmer, to a 10 yr old, teenager or a TLDR version.

Constraint – What kind of response do you want, what kind of person is responding like friendly, sarcastic, professional.

Goal – What is my goal to ask this question, do I want to improve sales, revenue or I am looking for a solution to a personal problem.

Modifiers

There are qualifiers we can add to our prompts to get better information

Adjectives – that define the noun/subject/item on which we are looking information on – big, happy, fun

Adverb – that define the verb or action done by the subject – quickly, never, today

Quantifiers – What kind of data do we expect ChatGPT to respond with, like top 10 or just a few, or a few more (as a continuation of the previous prompt).

Location – The data we want ChatGPT to consider when forming a response like worldwide, US only, Europe

Output

What we want it to do about the item

Do we want to compare, contrast, explain/detail, improve, summarize, brainstorm, Some options which are available are

  • Compare one item to another item
  • Compare or contrast or critique an opinion or a topic from different perspectives. Example: Provide contrasting feedback for climate change from perspective of a environmentalist vs scientist
  • Summarize a transcript and give top 10 items discussed, or top 10 keywords
  • Improve a piece of text and make it more professional, or explain that text to a person with certain role, in this mode it knows the person with have some context in the field and not start from basics.

We also can prompt it to ask us questions to give a more fulfilling answers by telling it to – (ask bullet point questions for clarifications before generating answers. Is that understood?)

Output formats

Do we want it categorized in top 5 categories, subcategories, a table format.

We can tell chatGPT to categorize a response into N sections based on chronological or geographical events, or based on main factors in the article

Ask it to organize the categories in tabular format, ask it to add more categories to the table or add more description to the existing columns.

Reverse prompting

This is reverse engineering a prompt to learn how to write good prompts.

You give some good text which you like and ask ChatGPT on what prompt will generate similar text

Once you have the prompt, you can enrich it further or you can ask chatGPT to improve over existing text by giving it subsequent directions in followup prompts on the area you want it to improve upon.

Here are some good references:

Awesome ChatGPT prompts: https://github.com/f/awesome-chatgpt-prompts

 

ChatGPT prompts for marketers: https://www.greataiprompts.com/prompts/chat-gpt-prompts-for-marketers

 

 

Cheers – Amit Tomar