Skip to content
Open access

Evaluating Prompt Engineering Techniques for LLaMA-3: A Study of Zero-Shot, Few-Shot, and Chain-of-Thought Prompts Across Reasoning and Classification Tasks

Sep 2026 · Information · 0 citations · 12 references

TL;DR

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.

Read PDF

Similar papers

Review Open access Oct 2026

Evaluating prompting strategies and large language models in systematic literature review screening: Relevance and task-stage classification.

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. · 1 citation
Preprint Oct 2026

A Cross-Domain Evaluation of Prompting Techniques for Large Language Models

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
#small language model Open access Oct 2026

Prompt Engineering for Small Language Models: Evaluating ICL for Portuguese Sentiment Analysis

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. · 0 citations
Open access 2026

Comparative Evaluation of Prompt Engineering Configurations and Open-Source Large Language Models for Phishing Email Detection

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 · 0 citations
Open access Aug 2026

Empowering Small Language Models With Chain of Thought and Parameter Efficient Fine Tuning for Efficient Deep Reasoning

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. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.