Preprint Article Version 1 This version is not peer-reviewed

Comparative Analysis of Prompt Strategies for LLMs: Single-Task vs. Multitasking Prompts

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. 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. Preprints 2024, 2024101334. 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

Comments (0)

We encourage comments and feedback from a broad range of readers. See criteria for comments and our Diversity statement.

Leave a public comment
Send a private comment to the author(s)
* All users must log in before leaving a comment
Views 0
Downloads 0
Comments 0


×
Alerts
Notify me about updates to this article or when a peer-reviewed version is published.
We use cookies on our website to ensure you get the best experience.
Read more about our cookies here.