This repository contains Python scripts of prompt examples taken from Isa Fulford and Andrew Ng fantastic ChatGPT Prompt Engineering Course. The course is a must for everyone to effectively work with AI prompt engineering. The course is free for a limited time. All credit for these scripts goes to Deeplearning.ai.
- Use delimiters to differentiate different parts of the input (ticks, quotes, tags)
- Ask for structured output (HTML, JSON)
- Ask the model to check whether the conditions are satisfied. Check assumptions required to do the tasks.
- Few shot prompting - give successful examples of completing tasks, then ask model to perform the task
“If a model given a task that’s too complex to do in a short amount of time and small amount of words, it will likely make a guess that is incorrect”
- Specify the steps required to complete the tasks
- Instruct the model to work out its own solution before rushing to a conclusion
Models can make statements that sound plausible but are not true
To reduce hallucinations, first find relevant information, then answer the question based on the relevant information