Optimizing Large Language Models: A Deep Dive into Effective Prompt Engineering Techniques

被引:0
|
作者
Son, Minjun [1 ]
Won, Yun-Jae [2 ]
Lee, Sungjin [3 ]
机构
[1] Sungkyunkwan Univ, Dept MetabioHlth, Suwon 16419, South Korea
[2] Korea Elect Technol Inst, Seongnam 13488, South Korea
[3] Soonchunhyang Univ, Dept Smart Automot, Asan 31538, South Korea
来源
APPLIED SCIENCES-BASEL | 2025年 / 15卷 / 03期
关键词
large language model; prompt engineering; in-context learning; chain of thought; retrieval-augmented generation; step-by-step reasoning; tree of thought;
D O I
10.3390/app15031430
中图分类号
O6 [化学];
学科分类号
0703 ;
摘要
Recent advancements in Natural Language Processing (NLP) technologies have been driven at an unprecedented pace by the development of Large Language Models (LLMs). However, challenges remain, such as generating responses that are misaligned with the intent of the question or producing incorrect answers. This paper analyzes various Prompt Engineering techniques for large-scale language models and identifies methods that can optimize response performance across different datasets without the need for extensive retraining or fine-tuning. In particular, we examine prominent Prompt Engineering techniques including In-Context Learning (ICL), Chain of Thought (CoT), Retrieval-Augmented Generation (RAG), Step-by-Step Reasoning (SSR), and Tree of Thought (ToT), and we apply these techniques to leading LLMs such as Gemma2, LlaMA3, and Mistral. The performance of these models was evaluated using the AI2 Reasoning Challenge (ARC), HellaSwag, Massive Multitask Language Understanding (MMLU), TruthfulQA, Winogrande, and Grade School Math (GSM8k) datasets across metrics such as BLEU, ROUGE, METEOR, BLEURT, and BERTScore. The experimental results indicate that the most suitable Prompt Engineering technique can vary depending on the characteristics of each dataset. Specifically, for datasets emphasizing mathematical and logical reasoning, Prompt Engineering strategies centered around CoT, SSR, and ToT were found to be advantageous. For datasets focusing on natural language understanding, ICL-centric strategies were more effective, while RAG-based strategies were beneficial for datasets where factual accuracy is crucial. However, it was also observed that the optimal combination of Prompt Engineering techniques could differ depending on the specific LLM, indicating that fine-tuning the Prompt Engineering approach to the model and dataset is essential for achieving the best performance. The findings indicate that as LLMs become more advanced, their reliance on Prompt Engineering (PE) techniques diminishes, yet the magnitude of their performance improvement when PE strategies are applied increases. Furthermore, these advanced models tend to depend less on ICL techniques while exhibiting a greater reliance on RAG strategies. It is also evident that implementing RAG with PE-based preprocessing yields superior performance enhancements compared to the mere application of RAG on raw data.
引用
收藏
页数:32
相关论文
共 50 条
  • [41] Assessing the Impact of Prompt Strategies on Text Summarization with Large Language Models
    Onan, Aytug
    Alhumyani, Hesham
    COMPUTER APPLICATIONS IN INDUSTRY AND ENGINEERING, CAINE 2024, 2025, 2242 : 41 - 55
  • [42] Soft prompt tuning for augmenting dense retrieval with large language models
    Peng, Zhiyuan
    Wu, Xuyang
    Wang, Qifan
    Fang, Yi
    KNOWLEDGE-BASED SYSTEMS, 2025, 309
  • [43] Robust Prompt Optimization for Large Language Models Against Distribution Shifts
    Li, Moxin
    Wang, Wenjie
    Feng, Fuli
    Cao, Yixin
    Zhang, Jizhi
    Chua, Tat-Seng
    2023 CONFERENCE ON EMPIRICAL METHODS IN NATURAL LANGUAGE PROCESSING, EMNLP 2023, 2023, : 1539 - 1554
  • [44] Prompt Wrangling: On Replication and Generalization in Large Language Models for PCG Levels
    Karkaj, Arash Moradi
    Nelson, Mark J.
    Koutis, Ioannis
    Hoover, Amy K.
    PROCEEDINGS OF THE 19TH INTERNATIONAL CONFERENCE ON THE FOUNDATIONS OF DIGITAL GAMES, FDG 2024, 2024,
  • [45] CSPO: chain-structured prompt optimisation for large language models
    Wang, Jinshui
    Lin, Sining
    Xue, Xingsi
    Chen, Shuguang
    Tang, Zhengyi
    International Journal of Ad Hoc and Ubiquitous Computing, 2025, 48 (04) : 233 - 243
  • [46] Detection avoidance techniques for large language models
    Schneider, Sinclair
    Steuber, Florian
    Schneider, Joao A. G.
    Rodosek, Gabi Dreo
    DATA & POLICY, 2025, 7
  • [47] A Study on Performance Improvement of Prompt Engineering for Generative AI with a Large Language Model
    Park, Daeseung
    An, Gi-taek
    Kamyod, Chayapol
    Kim, Cheong Ghil
    JOURNAL OF WEB ENGINEERING, 2023, 22 (08): : 1187 - 1206
  • [48] The Promises and Pitfalls of Large Language Models as Feedback Providers: A Study of Prompt Engineering and the Quality of AI-Driven Feedback
    Jacobsen, Lucas Jasper
    Weber, Kira Elena
    AI, 2025, 6 (02)
  • [49] Prompt engineering to inform large language model in automated building energy modeling
    Jiang, Gang
    Ma, Zhihao
    Zhang, Liang
    Chen, Jianli
    ENERGY, 2025, 316
  • [50] Optimizing Resource Allocation in Cloud for Large-Scale Deep Learning Models in Natural Language Processing
    Dhopavkar, Gauri
    Welekar, Rashmi R.
    Ingole, Piyush K.
    Vaidya, Chandu
    Wankhade, Shalini Vaibhav
    Vasgi, Bharati P.
    JOURNAL OF ELECTRICAL SYSTEMS, 2023, 19 (03) : 62 - 77