Commercial and openly available large language models can help software testers be faster and more creative in their tasks, and there’s a rich body of best practices to help get that best out of these tools.
Propmpt engineering is an ever-evolving subject though, and what works today may not be the best approach tomorrow but there are some general rules that continue to apply
Prompt Engineering tips
- Make good use of formatting and punctuation throughout
- Provide a persona – define what role is the AI performing
- Be specific – provide clear instructions on the task
- List any starting conditions
- Define any constraints
- Provide sample outputs – one shot / few shot prompting
- Avoid negative conditions
instead of: ‘do not include’, ‘don’t forget to’, ‘do not exceed’
use: ‘exclude’, ‘include’, ‘limit to’ - Clearly deleniate inputs
- Specify output format
- Continue the converstion (chain of thought reasoning)