Day 60 of 100 Days of AI
I watched a video lesson on prompt engineering today. I’m 23% of the way through this short course and already have a few useful tips on how to get more from LLMs. Basics include:
- Clear instructions.
- They can be short, but often need to be long for more complex tasks.
- Delimiters.
- Using symbols like triple quotes (something I do often already) is useful not just for clearly separating various distinct bits of a prompt, but also to limit the risks of prompt injection.
- Structured outputs.
- You can get models to output their results in JSON or other formats, which is super useful if you wish to run code on the outputs. For example you can take a JSON result and use it as a python dictionary later.