Adapting Large Language Models: A Comparative Study of Prompt Engineering and Fine-Tuning
DOI:
https://doi.org/10.63282/3050-922X.IJERET-V6I3P102Keywords:
Large Language Models, Prompt Engineering, Fine-Tuning, Transfer Learning, Parameter-Efficient TuningAbstract
Large Language Models (LLMs) have become foundational tools in natural language processing but adapting them effectively remains a technical and practical challenge. This paper presents a comparative analysis of prompt engineering and fine-tuning as key strategies for customizing LLM behavior. Drawing on secondary data from studies and technical documents, the study evaluates each method in terms of performance, cost-efficiency, robustness, and use-case suitability. The analysis concludes that such fine-tuning results in a higher task-specific accuracy and stability, especially in domain-intensive uses, but that prompt engineering allows a more flexible over-all task as well as having a reduced resource requirement. LoRA and prefix tuning are parameters-efficient methods that are found as potential trade-offs. It has also been noted in the study that there is a variation in the interpretability and risk exposure between the approaches. The findings serve the purpose of assisting developers and researchers in the recommendation of proper adaptation strategies in accordance with the technical constraints and task requirements
References
[1] M. A. K. Raiaan, M. S. H. Mukta, K. Fatema, N. M. Fahad, S. Sakib, M. M. J. Mim, et al., "A review on large language models: Architectures, applications, taxonomies, open issues and challenges," IEEE Access, vol. 12, pp. 26839–26874, 2024, doi: 10.1109/ACCESS.2024.3365742.
[2] P. Kumar, "Large language models (LLMs): survey, technical frameworks, and future challenges," Artif. Intell. Rev., vol. 57, no. 10, p. 260, 2024. [Online]. Available: https://doi.org/10.1007/s10462-024-10888-y
[3] G. B. Mohan, R. Prasanna Kumar, P. Vishal Krishh, A. Keerthinathan, G. Lavanya, M. K. U. Meghana, et al., "An analysis of large language models: their impact and potential applications," Knowl. Inf. Syst., vol. 66, no. 9, pp. 5047–5070, 2024. [Online]. Available: https://doi.org/10.1007/s10115-024-02120-8
[4] Z. A. Nazi and W. Peng, "Large language models in healthcare and medical domain: A review," Informatics, vol. 11, no. 3, p. 57, Aug. 2024. [Online]. Available: https://doi.org/10.3390/informatics11030057
[5] G. Menghani, "Efficient deep learning: A survey on making deep learning models smaller, faster, and better," ACM Comput. Surv., vol. 55, no. 12, pp. 1–37, 2023. [Online]. Available: https://doi.org/10.1145/3578938
[6] J. D. Velásquez-Henao, C. J. Franco-Cardona, and L. Cadavid-Higuita, "Prompt engineering: A methodology for optimizing interactions with AI-language models in the field of engineering," Dyna, vol. 90, no. SPE230, pp. 9–17, 2023.
[7] P. Sahoo, A. K. Singh, S. Saha, V. Jain, S. Mondal, and A. Chadha, "A systematic survey of prompt engineering in large language models: Techniques and applications," arXiv preprint, arXiv:2402.07927, 2024. [Online]. Available: https://arxiv.org/abs/2402.07927
[8] E. Jiang, K. Olson, E. Toh, A. Molina, A. Donsbach, M. Terry, and C. J. Cai, "Promptmaker: Prompt-based prototyping with large language models," in Proc. CHI Conf. Human Factors Comput. Syst. Extended Abstracts, Apr. 2022, pp. 1–8. [Online]. Available: https://doi.org/10.1145/3491101.3503564
[9] L. Wang, S. Chen, L. Jiang, S. Pan, R. Cai, S. Yang, and F. Yang, "Parameter-efficient fine-tuning in large models: A survey of methodologies," arXiv preprint, arXiv:2410.19878, 2024. [Online]. Available: https://arxiv.org/abs/2410.19878
[10] Z. Han, C. Gao, J. Liu, J. Zhang, and S. Q. Zhang, "Parameter-efficient fine-tuning for large models: A comprehensive survey," arXiv preprint, arXiv:2403.14608, 2024. [Online]. Available: https://arxiv.org/abs/2403.14608
[11] Y. Luo, Z. Yang, F. Meng, Y. Li, J. Zhou, and Y. Zhang, "An empirical study of catastrophic forgetting in large language models during continual fine-tuning," arXiv preprint, arXiv:2308.08747, 2023. [Online]. Available: https://arxiv.org/abs/2308.08747
[12] Y. Liu, T. Han, S. Ma, J. Zhang, Y. Yang, J. Tian, et al., "Summary of ChatGPT-related research and perspective towards the future of large language models," Meta-radiology, vol. 1, no. 2, p. 100017, 2023. [Online]. Available: https://doi.org/10.1016/j.metrad.2023.100017
[13] A. Chowdhery, S. Narang, J. Devlin, M. Bosma, G. Mishra, A. Roberts, et al., "PaLM: Scaling language modeling with pathways," J. Mach. Learn. Res., vol. 24, no. 240, pp. 1–113, 2023.
[14] H. Naveed, A. U. Khan, S. Qiu, M. Saqib, S. Anwar, M. Usman, et al., "A comprehensive overview of large language models," ACM Trans. Intell. Syst. Technol., pp. 1–69, 2023. [Online]. Available: https://doi.org/10.1145/3744746
[15] S. Schulhoff, M. Ilie, N. Balepur, K. Kahadze, A. Liu, C. Si, et al., "The prompt report: A systematic survey of prompt engineering techniques," arXiv preprint, arXiv:2406.06608, 2024. [Online]. Available: https://doi.org/10.48550/arXiv.2406.06608
[16] N. D. Kulkarni and P. Tupsakhare, "Crafting effective prompts: Enhancing AI performance through structured input design," J. Recent Trends Comput. Sci. Eng. (JRTCSE), vol. 12, no. 5, pp. 1–10, 2024.
[17] A. Webson and E. Pavlick, "Do prompt-based models really understand the meaning of their prompts?," in Proc. 2022 Conf. North Am. Chapter Assoc. Comput. Linguistics: Human Lang. Technol., pp. 2300–2344, July 2022.
[18] K. Chang, S. Xu, C. Wang, Y. Luo, X. Liu, T. Xiao, and J. Zhu, "Efficient prompting methods for large language models: A survey," arXiv preprint, arXiv:2404.01077, 2024. [Online]. Available: https://arxiv.org/abs/2404.01077
[19] H. Ma, C. Zhang, Y. Bian, L. Liu, Z. Zhang, P. Zhao, et al., "Fairness-guided few-shot prompting for large language models," in Advances Neural Inf. Process. Syst., vol. 36, pp. 43136–43155, 2023.
[20] P. Liu, W. Yuan, J. Fu, Z. Jiang, H. Hayashi, and G. Neubig, "Pre-train, prompt, and predict: A systematic survey of prompting methods in natural language processing," ACM Comput. Surv., vol. 55, no. 9, pp. 1–35, 2023. [Online]. Available: https://doi.org/10.1145/3560815
[21] C. Wang, Y. Yang, C. Gao, Y. Peng, H. Zhang, and M. R. Lyu, "No more fine-tuning? An experimental evaluation of prompt tuning in code intelligence," in Proc. 30th ACM Joint Eur. Software Eng. Conf. Symp. Found. Software Eng., pp. 382–394, Nov. 2022.
[22] Y. Gao, Y. Xiong, X. Gao, K. Jia, J. Pan, Y. Bi, et al., "Retrieval-augmented generation for large language models: A survey," arXiv preprint, arXiv:2312.10997, vol. 2, no. 1, 2023. [Online]. Available: https://arxiv.org/abs/2312.10997
[23] S. Zhao, Y. Yang, Z. Wang, Z. He, L. K. Qiu, and L. Qiu, "Retrieval augmented generation (RAG) and beyond: A comprehensive survey on how to make your LLMs use external data more wisely," arXiv preprint, arXiv:2409.14924, 2024. [Online]. Available: https://arxiv.org/abs/2409.14924
[24] Y. Zhou, A. I. Muresanu, Z. Han, K. Paster, S. Pitis, H. Chan, and J. Ba, "Large language models are human-level prompt engineers," in Proc. 11th Int. Conf. Learn. Representations (ICLR), Nov. 2022.
[25] H. Strobelt, A. Webson, V. Sanh, B. Hoover, J. Beyer, H. Pfister, and A. M. Rush, "Interactive and visual prompt engineering for ad-hoc task adaptation with large language models," IEEE Trans. Vis. Comput. Graph., vol. 29, no. 1, pp. 1146–1156, 2022. doi: 10.1109/TVCG.2022.3209479
[26] N. Ding, Y. Qin, G. Yang, F. Wei, Z. Yang, Y. Su, et al., "Parameter-efficient fine-tuning of large-scale pre-trained language models," Nat. Mach. Intell., vol. 5, no. 3, pp. 220–235, 2023. [Online]. Available: https://doi.org/10.1038/s42256-023-00626-4
[27] A. Panigrahi, N. Saunshi, H. Zhao, and S. Arora, "Task-specific skill localization in fine-tuned language models," in Proc. Int. Conf. Mach. Learn. (ICML), Jul. 2023, pp. 27011–27033. PMLR.
[28] H. Zheng, L. Shen, A. Tang, Y. Luo, H. Hu, B. Du, et al., "Learning from models beyond fine-tuning," Nat. Mach. Intell., vol. 7, no. 1, pp. 6–17, 2025. [Online]. Available: https://doi.org/10.1038/s42256-024-00961-0
[29] L. Xu, H. Xie, S. Z. J. Qin, X. Tao, and F. L. Wang, "Parameter-efficient fine-tuning methods for pretrained language models: A critical review and assessment," arXiv preprint, arXiv:2312.12148, 2023. [Online]. Available: https://doi.org/10.48550/arXiv.2312.12148
[30] B. Huber, G. Fazelnia, A. Damianou, S. Peleato, M. Lefarov, P. Ravichandran, et al., "Embedding-to-Prefix: Parameter-efficient personalization for pre-trained large language models," arXiv preprint, arXiv:2505.17051, 2025. [Online]. Available: https://doi.org/10.1609/aaai.v38i2.27830
[31] S. Bai, M. Zhang, W. Zhou, S. Huang, Z. Luan, D. Wang, and B. Chen, "Prompt-based distribution alignment for unsupervised domain adaptation," in Proc. AAAI Conf. Artif. Intell., vol. 38, no. 2, pp. 729–737, Mar. 2024.
[32] R. R. Golani, "LLM fine-tuning vs prompt engineering for consumer products," Int. J. Sci. Technol. (IJSAT), vol. 16, no. 2, 2025.
[33] Z. R. K. Rostam, S. Szénási, and G. Kertész, "Achieving peak performance for large language models: A systematic review," IEEE Access, 2024.
[34] M. U. Hadi, R. Qureshi, A. Shah, M. Irfan, A. Zafar, M. B. Shaikh, et al., "Large language models: A comprehensive survey of its applications, challenges, limitations, and future prospects," Authorea Preprints, vol. 1, no. 3, pp. 1–26, 2023.
[35] J. Zheng, H. Hong, F. Liu, X. Wang, J. Su, Y. Liang, and S. Wu, "Fine-tuning large language models for domain-specific machine translation," arXiv preprint, arXiv:2402.15061, 2024. [Online]. Available: https://arxiv.org/abs/2402.15061
[36] C. Pornprasit and C. Tantithamthavorn, "Fine-tuning and prompt engineering for large language models-based code review automation," Inf. Softw. Technol., vol. 175, p. 107523, 2024.
[37] K. G. Barman, N. Wood, and P. Pawlowski, "Beyond transparency and explainability: On the need for adequate and contextualized user guidelines for LLM use," Ethics Inf. Technol., vol. 26, no. 3, p. 47, 2024.
[38] T. T. Kim, M. Makutonin, R. Sirous, and R. Javan, "Optimizing large language models in radiology and mitigating pitfalls: Prompt engineering and fine-tuning," RadioGraphics, vol. 45, no. 4, p. e240073, 2025.
[39] Medium, “Prompt Engineering vs Fine-tuning vs RAG,” Available at: https://medium.com/@myscale/prompt-engineering-vs-finetuning-vs-rag-cfae761c6d06
[40] Zhang, N. Talukdar, S. Vemulapalli, S. Ahn & J. Wang, “Comparison of Prompt Engineering and Fine-Tuning Strategies in Large Language Models in the Classification of Clinical Notes,” 2024, preprint. Doi: https://doi.org/10.1101/2024.02.07.24302444;
[41] Khan, S., Noor, S., Awan, H.H. et al. Deep-ProBind: binding protein prediction with transformer-based deep learning model. BMC Bioinformatics 26, 88 (2025). https://doi.org/10.1186/s12859-025-06101-8
[42] Govindarajan Lakshmikanthan, Sreejith Sreekandan Nair (2022). Securing the Distributed Workforce: A Framework for Enterprise Cybersecurity in the Post-COVID Era. International Journal of Advanced Research in Education and Technology 9 (2):594-602.