logo

NJP

Prompt Engineering – Master ChatGPT and LLM Responses

Import · Dec 10, 2023 · article

This is my summary of this wonderful course on Prompt Engineering

The sauce of the course is to understand that by using correct and specific prompts, you can get the best results from ChatGPT or any other Chatbot in general

Other important notes:

  • Don’t assume that ChatGPT knows what you are asking for. Provide it the context and clear instructions so it can better answer your question
  • For example:
  • Instead of immediately asking ChatGPT to correct a paragraph you can give it first a detailed prompt about the persona you would want to get an answer from:

  • This way you will have a completely different experience interacting with ChatGPT and the result will be much better
  • You can also use their API to embed in your platform:
  • You can calculate how many Tokens you are using on the OpenAI platform

Clear Instructions

Bad example:

Good example:

Adopt a persona

Bad example:

Good example:

  • Zero-shot prompting refers to a way of querying models like GPT without any explicit training examples
  • Few-shot prompting refers to a way of querying models by showing a few examples of the tasks we want to perform

AI hallucination - misinterpretation of data

Example: the word food is represented by these vectors:

  • OpenAI also provides a way to create your text embeddings of a word or of a whole sentence

Key Takeaway

  • Be super specific in providing the instructions of what you want to get

Image

Image

View original source

https://www.dancovic.com/2023/12/prompt-engineering-master-chatgpt-and.html