Prompting is a skill that everyone needs today. Prompt is an input given to a generative AI model to guide its output. Prompting is the act of feeding a prompt to generative AI, which then generates a response.
(Schulhoff et al., 2024).
Six key points to successful prompting
(Losey, 2024 & Prompt Engineering, 2024)
- Clear instructions
- Time to think
- Task breakdown
- Reference text
- Experiment with changes
- Tools
1. Clear instructions
Describe precisely what you want the model to produce. If a short response is desired, you should specify that. Conversely, requesting a professional and lengthy explanation will yield such a result. A language model cannot guess the type of response you want without context.
2. Time to think
Ask the model first to generate a chain of thought before reaching a conclusion. This means not asking directly for the answer but prompting the model to form a reasoning path that leads to the answer, then requesting the answer itself. This approach causes the neural network to process the response multiple times, often resulting in a better outcome. For example if you want model to give tenth decimal of approximation of pi. You need to ask it first define what is a pi, approximation of pi and decimal and then give tenth decimal of pi.
3. Task breakdown
Like in software development, when prompting, a complex task should be broken down into parts and then assembled. You can ask the model to split the task into smaller parts and then generate a solution from those parts. This guideline also works well when asking questions from an actual person.
4. Reference text
Provide reliable information as a reference for the model to use. This often helps, as the model has a limited window of context, and the provided information assists in bringing related knowledge to the surface.
5. Experiment with changes
Evaluate prompt modifications against real data in a systematic way. Some instructions given to the model might work in specific instances but may not be generally applicable. Try small changes on prompt and generate several outputs and keep track of their quality. This is valuable especially when prompt is used to generate several answers automatically.
6. Tools
Generative models are not always the best tools for certain types of information retrieval. If another tool can reliably provide an answer, it is worth using. In example generative language models are not good doing arithmetics. They can form input for some tool to calculate results and interpret answer tool gives.
References
- Losey, R. (2024, July 23). Bill Gates on the Next ‘Big Frontier’ of Generative AI: Programming Metacognition Strategies into ChatGPT. EDRM. Retrieved October 23, 2024
- Prompt engineering. (2024). OpenAI API. Retrieved November 4, 2024
- Schulhoff, S., Ilie, M., Balebur, N., Kahadze, K., Liu, A., Si, C., Li, Y., Gupta, A., Han, H., Schulhoff, S., Dulepet, P. S., Vidyadhara, S., Ki, D., Agrawal, S., Pham, C., Kroiz, G., Li, F., Tao, H., Srivastava, A., … Resnik, P. (2024, June 6). [2406.06608] The Prompt Report: A Systematic Survey of Prompting Techniques. arXiv. Retrieved November 4, 2024