8 key takeaways from Andrew Ng's "ChatGPT Prompt Engineering Course for Developers".
Course cover of "ChatGPT Prompt Engineering Course for Developers" made by deeplearning.ai.

8 key takeaways from Andrew Ng's "ChatGPT Prompt Engineering Course for Developers".

"ChatGPT Prompt Engineering Course for Developers" is the latest course by Andrew Ng and Isa Fulford about using ChatGPT effectively. Here are the main takeaways I've learned from this course:


1. Follow the two principles: (1) write specific and clear prompts, (2) give the model time to "think".

If you want ChatGPT to understand you, you must be very clear about what you want.

  • For example, when presenting a text, you should delimit this text inside ```, "", < >, or <tag> </tag>. The preferred choice in this course is ```.
  • When asking for an output with a structure in mind, make it clear for ChatGPT by asking for the specific structure, like "... Provide the answers in JSON format with the following keys: book_id, title, author, genre."
  • When you want ChatGPT to do a specific task when some conditions are met, make it clear what you want; otherwise, say something like "ChatGPT, do this..., but if the text does not contain X, then simply write Y."

Also, like it was a person, you should give the model time to think.

  • For example, give the model the steps required to complete a task.
  • When asking ChatGPT to do something, give it a sequence of tasks it should complete to successfully finish the task. You can also ask for specific output formats for each step.
  • When you present the model to check if a solution to a problem is correct, ask the model to work on its solution before telling if it's correct.


2. ChatGPT's limitations: "Hallucinations"

This is the thing you should pay attention to when using ChatGPT.

There's a tendency to produce hallucinations or generate inaccurate information when presented with obscure or poorly understood topics.

Therefore, always double-check the answers!


3. "Perfect" prompts don't exist. Stop looking for it on internet!

Developing prompts using a large language model is an iterative process, and the first attempt may not be the final prompt. The important aspect is having a good process of iteratively refining and improving the prompt until it works well for the intended task.

Having a good process for developing a prompt for a specific application is much better than relying on perfect prompts found online! Here's the recommended process:

[Idea] -> [Prompt implementation] -> [Experimental result] -> [Error Analysis] -> (Back to the first step)

No alt text provided for this image


4. You can use ChatGPT to summarize texts

  • You can summarize texts with a word/sentence/character limit, but double-check the limits you've set because ChatGPT won't follow your instructions exactly.
  • You can also summarize texts with a focus on some text characteristics, like: "...generate a short summary of a product review from an e-commerce site to give feedback to the shipping department..."
  • Other capabilities are: you can experiment using extract instead of summarizing and use OpenAI's API to summarize multiple product reviews.


5. Thinking of training/deploying/maintaining an NLP model? Use ChatGPT instead!

There are several challenges with implementing a traditional machine learning workflow for NLP. Using ChatGPT for common tasks such as extracting labels, names, and sentiment analysis can make the process much simpler and faster.

You can use ChatGPT to extract sentiment, emotions, and information from text. You can also use it to make inferences! In the course, it's presented some cases for sentiment analysis and information extraction, such as customer support and e-commerce.

Capabilities: Translating text, correcting spelling and grammar, and transforming formats


6. You can use ChatGPT to perform several tasks:

  • Translation: You can translate text from one language to several other languages.
  • Tone transformation: You can change the tone of a text.
  • Universal translator: You can translate a text from multiple languages at once.
  • Format conversion: You can convert a text format to another format, such as from JSON to HTML.
  • Spellcheck/grammar check: You can use ChatGPT to check the spelling and grammar of your text.


7. Expanding task

This is an interesting task that must be used with responsibility!

You can make ChatGPT answer customer emails or complaints using details of each specific case. That old problem of knowing and denying a machine answer is closer to being solved...


8. Custom Chatbot

In my opinion, this is the best part of the course!

It's presented how you can create a custom chatbot using ChatGPT. With just a little code, you can create a great chatbot for specific tasks, such as an AI order taker for a restaurant.

I can see it being used in real-world scenarios by all restaurants that serve customers via apps like WhatsApp.


To view or add a comment, sign in

Insights from the community

Others also viewed

Explore topics