This blog post is a quick summary of the book “The Art of Prompt engineering with ChatGPT”, by Nathan Hunter.

This book is about 150 pages in length, but one can speed-read it in 30 minutes to grasp the main ideas. More than the content of the book, I was impressed that the author could produce it in just 10 days, thanks to ChatGPT and Midjourney.

The key ideas mentioned in the book are:

  • Iteration is an effective way to provide context in a conversation. Iteration around prompts could involve:
    • Giving feedback on the generated responses.
    • Asking for variations.
    • Seeking clarification.
    • Adding explanations.
  • Assigning a role to ChatGPT so that the responses can be tailored to the assumed role of the chat engine.
  • Utilizing zero-shot, one-shot, or few-shot learning to provide sufficient context.
  • Writing prompts in a manner that directs ChatGPT to produce the response in the desired output format.

For someone who has experimented with ChatGPT for a few days, the above guidelines may seem obvious. However, the book presents many use cases that could inspire one to employ ChatGPT in various beneficial ways. One such use case is pair programming. It would be interesting to use ChatGPT as a pair programmer and see if it enhances coding effectiveness.