The work is dedicated to the study of fundamental prompting techniques to improve the efficiency of using large language models (LLMs). Significant attention is given to the issue of prompt engineering. Various techniques are examined in detail: zero-shot prompting, feedback prompting, few-shot prompting, chain-of-thought, tree of thoughts, and instruction tuning. Special emphasis is placed on Reaction & Act Prompting and Retrieval Augmented Generation (RAG) as critical factors in ensuring effective interaction with LLMs. The features of applying these techniques and their impact on results are highlighted. However, leveraging their full potential requires a careful approach and consideration of application specifics.
A review of the parameters of large language models, such as temperature, top P, maximum number of tokens, stop sequences, frequency and presence penalties, etc., is provided. It is noted that prompt development is an iterative process that involves sequential testing of different options to achieve optimal results. All techniques discussed in the study are supported by illustrative examples with obtained results. It is indicated which types of tasks each technique is more suitable for. The study results include comparisons of both fundamental techniques and more advanced technologies such as ReAct and RAG.
Prompt engineering is a key technology for the effective use of large language models. It is relevant due to the increasing application of artificial intelligence in all areas of human activity, and its role will only grow with the development of technology. The ability to correctly formulate prompts is becoming an important skill necessary for working with modern large models, especially given their versatility and complexity.
- Prompt Engineering Guide, URL: https://www.promptingguide.ai, (Accessed: 13 September 2024).
- Zhao, Wayne Xin, et al. (2023) "A survey of large language models." arXiv preprint arXiv:2303.18223 (2023). https://doi.org/10.48550/arXiv.2303.18223
- Pranab Sahoo, et al (2024) A Systematic Survey of Prompt Engineering in Large Language Models: Techniques and Applications. arXiv:2402.07927. https://doi.org/10.48550/arXiv.2402.07927
- OpenAI, URL: https://platform.openai.com/docs/introduction, (Accessed: 13 September 2024).
- Google AI, URL: https://ai.google.dev/gemini-api/docs/model-tuning, (Accessed: 13 September 2024).
- Anthropic, URL: https://docs.anthropic.com/claude/docs/intro-to-claude, (Accessed: 13 September 2024).
- Matthew Renze, Erhan Guven (2024) The Effect of Sampling Temperature on Problem Solving in Large Language Models. arXiv:2402.05201. https://doi.org/10.48550/arXiv.2402.05201.
- Matthew Renze, Erhan Guven. The Effect of Sampling Temperature on Problem Solving in Large Language Models (2024). arXiv:2402.05201, https://doi.org/10.48550/arXiv.2402.05201
- Sander Schulhoff, Michael Ilie, Nishant Balepur et al The Prompt Report: A Systematic Survey of Prompting Techniques (2024) arXiv:2406.06608v1, https://doi.org/10.48550/arXiv.2406.06608.