Evaluating Prompt Engineering Techniques for LLaMA-3: A Study of Zero-Shot, Few-Shot, and Chain-of-Thought Prompts Across Reasoning and Classification Tasks
Experimental results showed that Few-Shot prompts are particularly effective in structured classification tasks, while CoT prompts excel in logic-heavy tasks that require multi-step reasoning.
Abstract
Prompt engineering has emerged as a practical and resource-efficient alternative to fine-tuning large language models (LLMs), particularly as these methods have a lower computation cost than fine-tuning. In this paper, three widely adopted prompting techniques—Zero-Shot, Few-Shot, and Chain-of-Thought (CoT)—were assessed. While these prompting strategies are well established, practitioners still lack clear guidance on when each technique should be preferred, which types of tasks they fail to support reliably, and how performance trade-offs may affect the practical use of LLM-based systems. These techniques are tested across three benchmark tasks: sentiment classification (SST-2), multiple-choice questions (CommonsenseQA), and multi-step math problem solving (GSM8K) using Meta’s LLaMA-3 8B Instruct model. We provide a thorough performance comparison based on accuracy, F1 score, and solve rate. The solve rate is highlighted as a complementary metric for evaluating the usability of LLM outputs—a factor often overlooked in the existing literature. Experimental results showed that Few-Shot prompts are particularly effective in structured classification tasks, while CoT prompts excel in logic-heavy tasks that require multi-step reasoning. On the classification task, Few-Shot prompting improved the solve rate but achieved lower accuracy and F1 score than Zero-Shot prompting. On the multiple-choice questions, Zero-Shot, Few-Shot, and CoT prompting achieved a solve rate of 100%. On multi-step math problem solving, CoT improved the solve rate and interpretability compared to Zero-Shot but did not surpass Zero-Shot accuracy. Overall, the results demonstrate that the effectiveness of prompting strategies is task-dependent, with differences observed in both accuracy and output validity across the three benchmark tasks.
This study quantifies how prompting strategies interact with large language models (LLMs) to automate the screening stage of systematic literature reviews (SLRs). We evaluate six LLMs (GPT-4o, GPT-4o-mini, DeepSeek-Chat-V3, Gemini-2.5-Flash, Claude-3.5-Haiku, and Llama-4-Maverick) under five prompt types (zero-shot, fe...
Bing-Lan Han, A. Mathrani, Vajisha U. Wanniarachchi et al.· Research Synthesis Methods· 1 citation
Prompt engineering has become a central mechanism for guiding the behavior of Large Language Models (LLMs) across a wide range of reasoning and language understanding tasks [1], [2]. However, existing studies frequently evaluate prompting techniques using different LLMs, datasets, or task settings, making direct compar...
Kevin Krazius, Tim Schlippe, P. Libbrecht· 1 citation
Results support ZS as a low-overhead reference within the four evaluated benchmarks and the stated model, quantization, prompt, and decoding settings, with model–task exceptions.
Seyoung Kim, Bonggyun Ko· Applied Sciences· 0 citations
The In-Context Learning (ICL) paradigm enables adapting LLMs without parameter tuning. This work evaluates the impact of prompt engineering on 9B models for Brazilian Portuguese sentiment classification, comparing six prompting formats (fewand zero-shot) across three linguistically diverse models (Gemma2-9B-it, Boto-9B...
André da F. Schuck, G. L. Garcia, J. R. Manesco et al.· Brazilian Symposium in Infor...· 0 citations
Overall, the results show that prompt configuration and model choice jointly influence phishing detection performance, false-alarm rates, output reliability, and local processing efficiency.
Naavin A/L Rajeswaren, Agus Hartoyo, Farhad Nadi· International journal of res...· 0 citations
A systematic, multi-model framework that combines Chain-of-Thought prompting with Low-Rank Adaptation parameter-efficient fine-tuning, and measures the contribution of each component independently is investigated, making capable SLM-based reasoning deployable without datacenter-scale infrastructure.
Aryan Raina, Shiwani Gupta, Jagruti Jadhav et al.· Journal of Computer Science· 0 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.