Version 1
: Received: 16 October 2024 / Approved: 16 October 2024 / Online: 17 October 2024 (10:51:01 CEST)
How to cite:
Gozzi, M.; Di Maio, F. Comparative Analysis of Prompt Strategies for LLMs: Single-Task vs. Multitasking Prompts. Preprints2024, 2024101334. https://doi.org/10.20944/preprints202410.1334.v1
Gozzi, M.; Di Maio, F. Comparative Analysis of Prompt Strategies for LLMs: Single-Task vs. Multitasking Prompts. Preprints 2024, 2024101334. https://doi.org/10.20944/preprints202410.1334.v1
Gozzi, M.; Di Maio, F. Comparative Analysis of Prompt Strategies for LLMs: Single-Task vs. Multitasking Prompts. Preprints2024, 2024101334. https://doi.org/10.20944/preprints202410.1334.v1
APA Style
Gozzi, M., & Di Maio, F. (2024). Comparative Analysis of Prompt Strategies for LLMs: Single-Task vs. Multitasking Prompts. Preprints. https://doi.org/10.20944/preprints202410.1334.v1
Chicago/Turabian Style
Gozzi, M. and Federico Di Maio. 2024 "Comparative Analysis of Prompt Strategies for LLMs: Single-Task vs. Multitasking Prompts" Preprints. https://doi.org/10.20944/preprints202410.1334.v1
Abstract
This study examines the impact of prompt engineering on large language models (LLMs), focusing on a comparison between multitasking and single-task prompts. Specifically, we explore whether a single prompt handling multiple tasks — such as Named Entity Recognition (NER), sentiment analysis, and JSON output formatting — can achieve similar efficiency and accuracy to dedicated single-task prompts. The evaluation uses a combination of performance metrics to provide a comprehensive analysis of output quality. Experiments were conducted using a selection of open-source LLMs, including LLama3.1 8B, Qwen2 7B, Mistral 7B, Phi3 Medium, and Gemma2 9B. Results show that single-task prompts do not consistently outperform multitasking prompts, highlighting the significant influence of the model’s data and architecture on performance.
Keywords
artificial intelligence; large language model; prompt engineering
Subject
Computer Science and Mathematics, Artificial Intelligence and Machine Learning
Copyright:
This is an open access article distributed under the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.