tags
chatgptprompt-engineeringtechincal
All concepts are discussed in this short deeplearning.ai course.
Principles
- Principle I: Write clear and specific instructions
- Principle II: Give the model time to “think”
‣
Principle I:
‣
Principle II:
How to reduce model hallucinations?
- Find relevant info/quotes from the text
- Ask it to use those quotes to answer questions
Iterative Prompt Development
Iteratively analyze and refine your prompts:
- Try something
- Analyze where the result doesn’t give what you want
- Clarify instructions, give it more time to think
- Refine prompts with a batch of examples
Example:
‣
‣
‣
‣
In practice, you’d end up with a prompt like this only after multiple iterations. No way around it.
‣
Summarizing
Several techniques to get the most out of GPT’s summarizing capabilities:
‣
‣
‣
‣
‣
Inference
In just a few minutes you can make multiple systems for making inferences from text that would’ve taken many days or weeks for a skilled ML developer!
‣
‣
‣
‣
Note: Output of LLMs is pretty inconsistent, so to be able to use its output in a prod env, we’d need to force a JSON output, and then parse it.
Transforming
‣
‣
‣
Also there’s translation!
Expanding
‣
Temperature
‣