betaFeedback

WorksComputer Science

MoPrO-SD: Modular Prompt Optimization for Stance Detection

Abstract

Stance detection remains challenging for large language models (LLMs) due to implicit opinions, sarcasm, and context-dependent expressions of stance. Although automatic prompt optimization offers an alternative to fine-tuning without updating model parameters, existing structured approaches are not specifically designed around stance-label semantics and class-specific ambiguities. We introduce MoPrO-SD, a stance-specific prompt optimization framework that decomposes prompts into functional semantic modules and refines them sequentially using LLM-based feedback. We study three refinement strategies: instruction-only optimization (I), instruction with reasoning (I+R), and instruction with per-example reasoning (I+R+E), using class-conditioned errors for stance-label refinement. We also introduce VaccineStance, a new human-annotated benchmark for vaccine stance detection. Experiments across four datasets and five open-weight LLMs show that MoPrO-SD improves upon the human-written Base prompt in many settings. On SemEval-2016, class-conditioned feedback achieves higher mean Macro-F1 than pooled feedback for four of five backbones. Both reasoning-based strategies, I+R and I+R+E, achieve strong performance, with their relative effectiveness varying across models and datasets, while remaining competitive with recent prompt optimization methods. The MoPrO-SD code and VaccineStance dataset are available on GitHub.

Introduction

Stance detection identifies the attitude toward a target or claim, typically categorized as In-Favor, Against, or Neutral ([31]). It supports applications including misinformation detection, political opinion analysis, public health monitoring, and social media analytics ([21, 3]). Despite advances in large language models (LLMs), stance detection remains challenging due to sarcasm, implicit opinions, and context-dependent expressions ([50, 12, 24]).

Prompting offers an alternative to fine-tuning without updating model parameters, but LLMs are sensitive to prompt wording, demonstrations, and example ordering ([27, 40] (Zhao et al. 2021)). Semantically similar prompts can yield different performance ([19] (Zhou et al. 2023)), and effective prompts are often task- and model-dependent ([7]), motivating automated prompt optimization (Chang et al., 2024).

Recent methods include OPRO ([51]), EvoPrompt ([14]), and CAPO ([52]), while UniPrompt ([16]) and SCULPT ([22]) optimize structured prompt components. Reasoning-based prompting has also shown promise for stance detection ([28, 13, 2]). However, existing optimization frameworks are largely task-general rather than organized around stance-specific class structure, where guidelines, label definitions, and output constraints serve distinct roles.

We introduce MoPrO-SD (Modular Prompt Optimization for Stance Detection), which decomposes a stance prompt into six functional modules and refines them sequentially. We study instruction-only (I), instruction with reasoning (I+R\mathbf{I}+\mathbf{R}), and instruction with per-example reasoning (I+R+E\mathbf{I}+\mathbf{R}+\mathbf{E}) optimization. Reasoning-based strategies use misclassification feedback for targeted refinement, with class-conditioned errors informing stance-label modules.

We evaluate MoPrO-SD on SemEval-2016 ([31]), COVID-19-Stance ([11]), GunStance ((Gyawali et al., 2024)), and VaccineStance using five open-weight LLMs, comparing against OPRO ([51]), CAPO ([52]), EvoPrompt-GA/DE ([14]), UniPrompt ([16]), and SCULPT ([22]). MoPrO-SD improves over the human-written base prompt across many model–dataset settings. We also introduce VaccineStance, a new human-annotated benchmark constructed from vaccine-related social media posts collected between 2013 and 2022.

Our contributions are:

  • We introduce MoPrO-SD, combining stance-specific modular refinement with class-conditioned error feedback.

  • We evaluate it across four datasets and five LLMs against established baselines, with analyses of modularity, optimization budget, cost, module contributions, few-shot prompting, and external-reasoner transfer.

  • We introduce VaccineStance, a new human-annotated benchmark.

Related Work

Prompting for Stance Detection. LLM-based stance detection uses prompting and reasoning strategies ([35]). Chain-of-Stance ([28]) and Stance Reasoner ([43]) use explicit reasoning, while other work explores rationale-augmented prompting ([23]) and zero-shot instruction and decoding strategies ([2]). Supervised adaptation ([13]) can achieve strong performance but requires additional training. In contrast, we optimize the stance prompt without updating the target LLM.

Automated and Structured Prompt Optimization. Automatic prompt optimization spans instruction generation, feedback, search, reinforcement learning, and evolutionary approaches ([37]). Representative methods include APE ((Zhou et al., 2023)), ProTeGi ([36]), RLPrompt ([9]), MAPO ([8]), PRewrite ([20]), Auto Evol-Instruct ([53]), PromptAgent ([47]), and Align-Pro ([44]). OPRO ([51]) uses evaluated solutions to guide optimization, EvoPrompt ([14]) combines LLMs with evolutionary algorithms, and CAPO ([52]) incorporates optimization cost.

Structured approaches include Decomposed Prompting ([18]), modular LLM programs in DSPy ([17]), structure-aware optimization in Symbolic Prompt Program Search ([38]), content-format optimization in CFPO ([26]), and section-wise modular prompt optimization ([39]). DS2 ([34]) and DeLLMa ([25]) explore data- or decision-aware selection, while Prompt Selection and Augmentation ([49]), BRIDGE ([45]), APT-Pipe ([6]), and Mixture of Demonstrations ([46]) study demonstration selection and organization.

Related work includes UniPrompt ([16]), SCULPT ([22]), and modular prompt optimization ([39]). While these methods optimize structured prompt components, MoPrO-SD specializes this paradigm to stance detection through fixed functional modules, sequential refinement, and class-conditioned misclassification feedback for stance-label modules.

Methodology

We introduce MoPrO-SD, a Modular Prompt Optimization framework for Stance Detection. MoPrO-SD decomposes a stance prompt into semantically distinct modules and iteratively refines them using LLM-based feedback. We study three strategies: instruction-only (I\mathbf{I}), instruction with reasoning (I+R\mathbf{I}+\mathbf{R}), and instruction with per-example reasoning (I+R+E\mathbf{I}+\mathbf{R}+\mathbf{E}). Figure 1 summarizes the framework.

Overview of MoPrO-SD

Figure 1. Overview of MoPrO-SD. Starting from a six-module base prompt, MoPrO-SD sequentially refines the modules using instruction-only (I), instruction with reasoning (I+R), or instruction with per-example reasoning (I+R+E). After each iteration, the updated prompt is evaluated using validation Macro-F1, and the highest-scoring prompt is selected for final test evaluation.

Stance Detection Prompt Modules

The base prompt consists of six modules: task definition, guidelines, favor definition, against definition, neutral definition, and output format. This design follows prior work on decomposing long prompts for more stable and controllable optimization [22, 18, 42]. The task module specifies the stance detection objective; guidelines provide general decision criteria, including sarcasm, implicit stance, and context-dependent expressions; the three label-specific modules define favor, against, and neutral and may include representative examples to reduce label ambiguity [31]; and the output module enforces label-only predictions. The complete modular base prompt is provided in Appendix § 7.§ 1.

Proposed MoPrO-SD Framework

Starting from a manually designed six-module base prompt, MoPrO-SD first evaluates the full prompt on a validation set using Macro-F1 and then refines the modules sequentially in a fixed order: task definition, guidelines, favor definition, against definition, neutral definition,

and output format. During each update, only the target module is rewritten using feedback determined by the optimization strategy below. After all six modules are processed, the full prompt is re-evaluated on the validation set. One pass over the six modules constitutes an iteration, and the prompt with the highest validation Macro-F1 across iterations is selected for final test evaluation. This procedure resembles coordinate descent in prompt space, preserving prompt substructures while refining individual modules. In the main experiments, the optimizer/reasoner is the same backbone as the stance classifier; we separately evaluate a stronger external optimizer.

Prompt Optimization Strategies

Instruction-only Optimization (I). All six modules are refined using instruction-only updates. For each module, the optimizer uses its previous variants and the validation Macro-F1 recorded for their corresponding iterations to propose a new version, without explicit analysis of misclassified examples (Zhou et al., 2023).

Instruction with Reasoning Optimization (I+R). The guidelines and three labelspecific modules are refined using aggregated reasoning over misclassified training examples, while the task definition and output format use instruction-only refinement. For each label-specific module, only errors whose gold label corresponds to that module are used; for example, the favor definition uses errors with gold label favor. For the guidelines module, errors from all three stance classes are considered. The aggregated reasoning identifies problems in the current module and guides its refinement [41].

Instruction with Per-example Reasoning Optimization (I+R+E). For the three label-specific modules, misclassified training examples are analyzed individually. Following Tang et al. [42], the optimizer generates an explanation for each error, summarizes these explanations, and uses the feedback to revise the corresponding module. The task definition, guidelines, and output format continue to use instruction-only updates within the same optimization loop. If no relevant errors are available for a label-specific module, that module remains unchanged for that iteration. Example meta-prompts are provided in Appendix § 7.§ 2.

I+R and I+R+E are treated as alternative configurations, as they differ in both reasoning granularity and the treatment of the guidelines module.

Experimental Setup

Stance Detection Datasets

We evaluate MoPrO-SD on three existing stance detection benchmarks—SemEval-2016 Task 6, GunStance, and COVID-19-Stance—and our new human-annotated VaccineStance benchmark.

  1. SemEval-2016 Task 6 [31] contains tweets labeled as Favor, Against, or None across multiple controversial targets. We exclude Donald Trump because it has no training instances and map None to Neutral for consistency across datasets.

  1. GunStance (Gyawali et al., 2024) contains stance-labeled tweets on gun-control debates, including the targets Banning Guns and Regulating Guns.

  1. COVID-19-Stance [11] contains stance-labeled tweets on COVID-19 measures, including face masks, school closures, and stay-at-home orders.

  1. VaccineStance is a new human-annotated stance detection benchmark introduced in this work. We curated 2,000 vaccine-relevant tweets from the corpus of Gyawali et al. [15] and obtained human annotations for Favor, Against, and Neutral, with Fleiss’ κ=0.778\kappa= 0.778. The dataset comprises 500 training, 500 validation, and 1,000 test instances.

Detailed dataset statistics, VaccineStance construction and preprocessing, and split distributions are provided in Appendix § 8.

Large Language Models

We evaluate five LLMs spanning different model families and scales: Phi-4-14B [1], GPT-OSS-20B [33], Mistral-Small-3.2-24B [30], Gemma-3-27B [10], and Llama-3.3-70B [29]. Tables abbreviate them as Phi, GPT-OSS, Mistral, Gemma, and Llama.

Baselines

We compare MoPrO-SD with the original zero-shot Base prompt and several prompting baselines built on the same Base prompt: chain-of-thought (Base+CoT) [48], few-shot prompting (k=3k = 3; Base+FS) [4], their combination (Base+CoT+FS), and Chain-of-Stance (Base+CoS) [28]. We also compare against automated prompt optimization methods OPRO [51], CAPO [52], and EvoPrompt with differential evolution (DE) and genetic algorithm (GA) variants [14]. Additionally, on SemEval-2016, we compare with the structured prompt optimization methods UniPrompt [16] and SCULPT [22] using Mistral, Gemma, and Llama.

Implementation Details

All experiments optimize prompts without fine-tuning model weights. MoPrO-SD uses 10 optimization iterations, with the six modules processed sequentially in a fixed order. After each iteration, the full prompt is evaluated on the validation set, and the prompt with the highest validation Macro-F1 across iterations is selected for final test evaluation. All methods in Table 1 were run in our experimental pipeline using fixed dataset splits and three independent runs per method. Across runs, validation subsampling, training-example sampling, and stochastic LLM generation can vary. Optimization budgets vary across methods.

DatasetMethodPhiGPT-OSSMistralGemmaLlama
SemEvalBase (zero-shot)55.37 ± 0.1260.02 ± 0.4453.90 ± 0.2865.82 ± 0.2073.52 ± 0.14
SemEvalBase+CoT66.60 ± 0.7457.90 ± 0.8767.06 ± 0.2567.45 ± 0.4371.77 ± 0.30
SemEvalBase+FS57.90 ± 1.4862.17 ± 0.7964.69 ± 0.3569.30 ± 0.0572.28 ± 0.11
SemEvalBase+CoT+FS64.85 ± 0.4459.89 ± 0.2867.32 ± 0.5666.98 ± 0.1170.41 ± 0.12
SemEvalBase+CoS53.40 ± 0.8160.18 ± 1.6763.94 ± 0.3759.92 ± 2.1262.96 ± 1.45
SemEvalOPRO67.49 ± 0.7466.59 ± 0.9456.61 ± 3.1964.76 ± 1.3973.45 ± 0.27
SemEvalCAPO63.71 ± 0.6067.32 ± 1.0560.32 ± 0.1267.80 ± 2.0274.87 ± 0.82
SemEvalEvoPrompt(DE)68.02 ± 0.3765.59 ± 0.8965.35 ± 1.4767.96 ± 1.6774.83 ± 1.14
SemEvalEvoPrompt(GA)67.28 ± 1.7964.85 ± 1.5362.32 ± 3.6169.11 ± 0.3972.51 ± 2.51
SemEvalI (ours)61.63 ± 1.3859.62 ± 0.6361.93 ± 4.0068.26 ± 1.7373.42 ± 0.43
SemEvalI+R (ours)69.65 ± 1.6262.96 ± 1.2667.85 ± 1.1569.64 ± 2.0874.85 ± 0.26
SemEvalI+R+E (ours)68.63 ± 0.5366.10 ± 1.1471.12 ± 0.8569.68 ± 1.1474.78 ± 0.38
GunStanceBase (zero-shot)39.55 ± 1.4960.34 ± 0.7756.24 ± 0.3047.09 ± 0.1454.85 ± 0.22
GunStanceBase+CoT61.17 ± 0.2659.76 ± 0.5657.55 ± 0.2052.48 ± 0.0956.27 ± 0.11
GunStanceBase+FS51.47 ± 1.5460.60 ± 0.2564.13 ± 0.1758.03 ± 0.0658.12 ± 0.20
GunStanceBase+CoT+FS59.32 ± 0.6858.85 ± 0.6461.72 ± 0.3063.56 ± 0.3859.01 ± 0.14
GunStanceBase+CoS43.16 ± 0.4450.20 ± 1.2562.55 ± 1.0759.30 ± 1.5949.74 ± 0.38
GunStanceOPRO55.90 ± 2.6659.10 ± 1.8057.36 ± 1.9645.63 ± 0.4554.28 ± 1.00
GunStanceCAPO56.69 ± 1.4460.47 ± 0.4662.19 ± 1.1353.97 ± 2.0654.38 ± 1.80
GunStanceEvoPrompt(DE)55.41 ± 3.6758.42 ± 1.0259.40 ± 1.8652.20 ± 2.0757.05 ± 1.02
GunStanceEvoPrompt(GA)56.14 ± 1.7859.54 ± 1.6459.14 ± 0.9254.88 ± 2.1653.83 ± 1.70
GunStanceI (ours)53.69 ± 2.4161.82 ± 0.6661.43 ± 2.4558.53 ± 1.6057.55 ± 0.44
GunStanceI+R (ours)60.99 ± 3.1361.07 ± 0.7163.68 ± 1.8764.05 ± 0.8558.98 ± 1.40
GunStanceI+R+E (ours)59.74 ± 0.2662.12 ± 1.7665.01 ± 2.1860.21 ± 1.8459.03 ± 3.58
COVID-19-StanceBase (zero-shot)50.36 ± 1.7173.20 ± 1.4561.15 ± 0.8359.52 ± 0.1966.50 ± 0.36
COVID-19-StanceBase+CoT67.10 ± 1.2673.85 ± 0.5471.08 ± 0.4364.93 ± 0.5471.27 ± 0.41
COVID-19-StanceBase+FS53.72 ± 0.9273.73 ± 0.3967.93 ± 0.3066.97 ± 0.4372.69 ± 0.14
COVID-19-StanceBase+CoT+FS62.63 ± 2.2173.46 ± 0.4371.41 ± 0.6267.29 ± 0.3672.51 ± 0.13
COVID-19-StanceBase+CoS49.68 ± 0.2660.43 ± 1.0561.47 ± 0.2559.54 ± 1.2457.96 ± 0.75
COVID-19-StanceOPRO62.82 ± 0.6869.43 ± 0.8960.59 ± 0.8057.37 ± 0.8666.17 ± 0.94
COVID-19-StanceCAPO62.89 ± 0.3073.83 ± 0.3664.10 ± 1.0161.85 ± 1.1366.49 ± 1.61
COVID-19-StanceEvoPrompt(DE)62.60 ± 2.2772.08 ± 0.4164.50 ± 1.6865.05 ± 2.5466.38 ± 1.62
COVID-19-StanceEvoPrompt(GA)64.69 ± 2.7972.33 ± 1.4865.00 ± 0.7366.43 ± 1.3067.31 ± 1.75
COVID-19-StanceI (ours)60.82 ± 1.0672.50 ± 0.3267.36 ± 1.2364.56 ± 1.6464.80 ± 1.30
COVID-19-StanceI+R (ours)72.26 ± 1.7774.79 ± 1.5673.99 ± 2.7973.01 ± 2.2871.78 ± 2.62
COVID-19-StanceI+R+E (ours)69.97 ± 2.4371.14 ± 1.8978.03 ± 2.2469.55 ± 1.9673.58 ± 3.29
VaccineStanceBase (zero-shot)49.47 ± 0.3158.84 ± 1.3755.58 ± 0.6937.78 ± 0.2460.23 ± 0.47
VaccineStanceBase+CoT54.93 ± 0.5659.46 ± 0.3559.98 ± 0.7452.36 ± 0.2560.80 ± 0.32
VaccineStanceBase+FS49.88 ± 1.0062.37 ± 0.6065.24 ± 0.2454.26 ± 0.2560.51 ± 0.13
VaccineStanceBase+CoT+FS62.94 ± 0.3063.53 ± 0.9463.95 ± 0.4462.72 ± 0.3762.45 ± 0.20
VaccineStanceBase+CoS53.83 ± 0.5461.14 ± 0.6563.18 ± 0.9658.89 ± 0.8754.48 ± 0.43
VaccineStanceOPRO53.48 ± 6.4562.59 ± 0.6058.80 ± 3.1548.53 ± 1.2956.90 ± 3.93
VaccineStanceCAPO57.37 ± 0.4161.76 ± 0.2059.15 ± 0.9954.18 ± 4.7658.41 ± 0.41
VaccineStanceEvoPrompt(DE)58.04 ± 1.0760.74 ± 0.2655.73 ± 2.1746.26 ± 3.2458.04 ± 0.37
VaccineStanceEvoPrompt(GA)56.45 ± 0.2562.67 ± 1.8055.66 ± 5.6655.00 ± 1.0356.94 ± 0.74
VaccineStanceI (ours)54.83 ± 5.9862.74 ± 0.5258.90 ± 2.8840.02 ± 3.7760.39 ± 1.65
VaccineStanceI+R (ours)60.21 ± 0.0665.35 ± 1.6168.96 ± 2.0066.00 ± 1.7259.06 ± 1.74
VaccineStanceI+R+E (ours)63.87 ± 3.5766.99 ± 1.2067.85 ± 3.5955.12 ± 1.8359.76 ± 1.27

Table 1. Average Macro-F1 across targets for each dataset, model, and prompting strategy. I = instruction-only; I+R = instruction with reasoning; I+R+E = instruction with per-example reasoning. Base = human-written prompt; CoT = chain-of-thought prompting; FS = few-shot prompting; CoS = Chain-of-Stance prompting. Results are reported as mean ± standard deviation across three independent runs. Shaded cells indicate differences relative to the Base score within each dataset–model column: gray denotes improvements, red denotes decreases, and darker shades indicate larger absolute differences. The best score within each dataset–model column is shown in bold.

Unless otherwise specified, the same backbone serves as the stance classifier and optimizer/reasoner. We additionally evaluate GPT-5 as a stronger external reasoner [32]. In frozen-module ablations, one module remains fixed while the others are optimized.

Evaluation Metrics

We use three-class Macro-F1, computed as the unweighted mean of the F1 scores for Favor, Against, and Neutral, as the primary evaluation metric. This differs from the official SemEval-2016 metric, which averages F1 over Favor and Against only. Prompt selection is based on validation Macro-F1, and final test results are reported as mean ±\pm standard deviation across three independent runs.

Results and Discussion

We evaluate MoPrO-SD from both performance and diagnostic perspectives. We first examine optimization dynamics and aggregate Macro-F1 performance across datasets and models, followed by comparisons with structured prompt optimization methods, external-reasoner effects, computational cost, modular versus full-prompt optimization, and module-level ablations.

Optimization Dynamics

Figure 2 shows validation Macro-F1 trajectories across 10 optimization iterations using I+R+E. Most models improve over the Base prompt during the early iterations, while later iterations show smaller gains and greater fluctuations. Some trajectories exhibit sharp drops followed by recovery, particularly on VaccineStance, indicating variation across optimization iterations. The shaded regions also show run-to-run variability in validation performance. Overall, the trajectories show that useful refinements are often identified early and that continued optimization does not guarantee monotonic improvement. The trajectories for I and I+R are provided in Appendix § 10.

Validation Macro-F1 trajectories across 10 optimization iterations

Figure 2. Validation Macro-F1 trajectories across 10 optimization iterations using I+R+E. Curves show mean validation Macro-F1 across three independent runs, with shaded regions indicating the corresponding standard deviation.

Main Performance Results

Table 1 summarizes Macro-F1 across datasets, backbone models, and prompting strategies, with per-target results provided in Appendix § 11. I+R+E improves over the human-written Base prompt in 18 of 20 dataset–model combinations. The improvements are nevertheless model- and dataset-dependent: I+R outperforms I+R+E in several settings, indicating that the preferred reasoning-based refinement configuration depends on the model and dataset.

The largest I+R+E gains over Base are observed for Phi on GunStance (39.55→59.7439.55 \to59.74, +20.19 Macro-F1), Phi on COVID-19-Stance (50.36→69.9750.36 \to69.97, +19.61), and Gemma on VaccineStance (37.78→55.1237.78 \to55.12, +17.34). Across all methods, CAPO with Llama obtains the highest SemEval score (74.87), while I+R+E achieves 74.78. I+R+E with Mistral also performs strongly on GunStance (65.01) and achieves the highest score on COVID-19-Stance (78.03), while I+R with Mistral obtains the highest VaccineStance score (68.96).

Static prompting also yields substantial improvements in some settings. For example, Base+FS increases Mistral from 53.90 to 64.69 on SemEval and from 55.58 to 65.24 on VaccineStance. MoPrO-SD frequently improves further, suggesting that iterative module refinement can provide gains beyond static prompt augmentation. However, the variation across models, datasets, and refinement strategies indicates that no single optimization strategy dominates in every setting. Additional zero-shot and few-shot comparisons are provided in Appendix § 12.

Comparison with Structured Prompt Optimization. We further compare MoPrO-SD with UniPrompt and SCULPT, two related structured prompt optimization methods. As shown in Table 2, I+R+E achieves 71.12, 69.68, and 74.78 Macro-F1 with Mistral, Gemma,

MethodMistralGemmaLlama
UniPrompt (Original Init.)71.06 ± 0.6869.82 ± 0.6273.99 ± 0.11
UniPrompt (Shared Init.)71.42 ± 1.9469.90 ± 2.4973.33 ± 0.73
SCULPT53.93 ± 0.4065.41 ± 0.0174.19 ± 0.48
I+R+E (Ours)71.12 ± 0.8569.68 ± 1.1474.78 ± 0.38

caption: Comparison with structured prompt optimization methods on SemEval-2016. Results are Macro-F1 (%), reported as mean ± standard deviation across runs. Exploratory two-sided Welch tests are unadjusted for multiple comparisons; Mistral–SCULPT gives p<0.001p < 0.001 and Gemma–SCULPT p=0.023p = 0.023, with all others p>0.05p > 0.05.

:::

DatasetPhiGPT-OSSMistralGemmaLlama
SemEval+0.48+0.25−5.82+2.23+1.68
GunStance+1.87−1.56−0.87+2.78+9.42
COVID-19+0.10+0.07+1.04+8.44+9.23
VaccineStance+2.27+1.02+3.66+11.64+8.55

Table 3. Effect of using GPT-5 as the external reasoner for the label-specific modules in I+R+E. Values report Δ\Delta Macro-F1 = GPT-5 − Same LLM. Full results are in Appendix § 13.

and Llama, respectively. Its performance is similar to both UniPrompt settings on Mistral and Gemma, while achieving the highest numerical score on Llama (74.78). Overall, MoPrO-SD performs comparably to recent structured prompt optimization approaches; computational cost is examined separately in § 5.3.

External Reasoner Comparison. We evaluate GPT-5 [32] as an external reasoner for the three label-specific I+R+E modules, while retaining the target backbone for classification and other module updates. This tests whether stronger reasoning during optimization improves prompts without replacing the target classifier. Table 3 shows gains in 17 of 20 dataset–model combinations, with substantial variation across settings.

The largest gains occur for Gemma on VaccineStance (+11.64), Llama on GunStance (+9.42), and Llama on COVID-19-Stance (+9.23). However, Mistral on SemEval declines by 5.82 points, showing that stronger reasoning does not always improve optimization. Overall, reasoning quality can substantially affect optimization outcomes, but its benefits remain model- and dataset-dependent.

Token Cost Analysis

As shown in Table 4, I, I+R, and modular I+R+E consume 8.43×, 18.10×, and 25.21×

MethodCallsIn.Out.TotalRel.
Base1,249768.9K4.4K773.4K1.00×
Base+FS1,2491.14M4.3K1.14M1.48×
Base+CoT2,5211.85M423.4K2.27M2.94×
Base+CoT+FS2,5202.60M420.8K3.02M3.91×
SCULPT9,6806.08M306.5K6.38M8.26×
I+R+E (FP-5)7,8516.25M133.8K6.39M8.26×
I7,7416.14M376.9K6.52M8.43×
Base+CoS7,4945.96M1.24M7.19M9.30×
I+R+E (FP-BM)9,56310.98M142.7K11.12M14.38×
I+R9,87813.67M332.9K14.00M18.10×
OPRO36,03517.03M181.4K17.21M22.25×
I+R+E (Mod.)12,56818.34M1.16M19.50M25.21×
UniPrompt-O36,94415.84M8.47M24.31M31.43×
UniPrompt-S30,21121.49M3.30M24.79M32.05×
CAPO48,22429.80M363.2K30.17M39.01×
EvoPrompt-GA53,43728.79M2.83M31.61M40.88×
EvoPrompt-DE40,97239.72M7.50M47.22M61.05×

Table 4. LLM cost on SemEval-2016 using Mistral for one run across five targets. Costs include all algorithmic LLM calls under each evaluated protocol, including one final test pass. Relative cost is normalized by Base (773,391 tokens). FP-5 and FP-BM denote five-iteration and best-only-memory full-prompt I+R+E; Mod. denotes modular I+R+E.

the Base token budget, respectively. Modular I+R+E uses fewer tokens than both UniPrompt variants, CAPO, and both EvoPrompt variants, but more than OPRO and the evaluated full-prompt variants. These costs reflect prompt development and evaluation under the specified protocol; once optimized, the selected prompt requires no additional optimization calls at inference.

Ablation Studies

Modular vs. Full-Prompt Optimization. Table 5 compares modular I+R+E with full-prompt optimization on SemEval-2016. Modular optimization achieves higher mean Macro-F1 for four of five backbones, with the largest gain for Mistral (+3.49), while Llama remains nearly unchanged (+0.05) and Gemma favors full-prompt optimization (−0.85).

TargetMethodPhiGPT-OSSMistralGemmaLlama
Anthony FauciBase57.47 ±\pm 1.8470.76 ±\pm 3.0372.65 ±\pm 0.1358.08 ±\pm 0.4370.91 ±\pm 0.33
Anthony FauciBase+CoT66.75 ±\pm 0.4673.35 ±\pm 1.3673.71 ±\pm 0.8361.95 ±\pm 1.3569.71 ±\pm 0.42
Anthony FauciBase+FS63.23 ±\pm 2.4973.28 ±\pm 0.9675.20 ±\pm 0.7764.53 ±\pm 0.3473.28 ±\pm 0.50
Anthony FauciBase+CoT+FS63.29 ±\pm 0.8674.83 ±\pm 0.8470.62 ±\pm 0.6367.22 ±\pm 0.5471.31 ±\pm 1.10
Anthony FauciBase+CoS53.62 ±\pm 2.2652.93 ±\pm 0.6962.66 ±\pm 1.0157.88 ±\pm 3.5960.67 ±\pm 3.26
Anthony FauciOPRO70.12 ±\pm 0.3269.48 ±\pm 2.3272.61 ±\pm 2.4259.12 ±\pm 0.5069.39 ±\pm 0.49
Anthony FauciCAPO72.77 ±\pm 0.4473.30 ±\pm 1.5370.45 ±\pm 2.7458.74 ±\pm 1.4469.17 ±\pm 0.54
Anthony FauciEvoPrompt(DE)69.43 ±\pm 1.3472.81 ±\pm 2.3271.45 ±\pm 0.4963.48 ±\pm 0.4572.16 ±\pm 2.74
Anthony FauciEvoPrompt(GA)73.01 ±\pm 0.7272.24 ±\pm 1.8872.87 ±\pm 1.7563.49 ±\pm 1.6573.66 ±\pm 3.40
Anthony FauciI69.42 ±\pm 1.2275.42 ±\pm 1.3672.75 ±\pm 1.1959.96 ±\pm 3.5870.02 ±\pm 0.33
Anthony FauciI+R74.75 ±\pm 1.1874.80 ±\pm 2.1077.76 ±\pm 1.8167.47 ±\pm 7.6469.91 ±\pm 0.29
Anthony FauciI+R+E75.65 ±\pm 3.4372.77 ±\pm 2.2680.62 ±\pm 1.3661.79 ±\pm 4.2675.40 ±\pm 2.44
Face masksBase51.62 ±\pm 2.7175.62 ±\pm 1.2766.12 ±\pm 0.7367.78 ±\pm 0.0078.26 ±\pm 0.09
Face masksBase+CoT76.28 ±\pm 3.3675.89 ±\pm 1.7375.88 ±\pm 0.8871.37 ±\pm 1.2078.13 ±\pm 1.00
Face masksBase+FS54.71 ±\pm 1.1173.60 ±\pm 0.6773.59 ±\pm 0.8572.63 ±\pm 0.9275.04 ±\pm 0.48
Face masksBase+CoT+FS71.08 ±\pm 2.2071.82 ±\pm 0.4879.68 ±\pm 1.2073.45 ±\pm 0.1877.47 ±\pm 0.30
Face masksBase+CoS62.44 ±\pm 3.5468.43 ±\pm 0.5169.94 ±\pm 3.8568.81 ±\pm 1.0267.20 ±\pm 0.52
Face masksOPRO66.16 ±\pm 4.3272.57 ±\pm 1.5367.85 ±\pm 0.0864.03 ±\pm 3.7578.84 ±\pm 0.54
Face masksCAPO64.51 ±\pm 2.3577.00 ±\pm 0.4673.62 ±\pm 1.9366.63 ±\pm 4.4079.71 ±\pm 2.49
Face masksEvoPrompt(DE)67.36 ±\pm 6.4674.59 ±\pm 3.1871.34 ±\pm 0.5975.10 ±\pm 0.5780.16 ±\pm 2.54
Face masksEvoPrompt(GA)66.08 ±\pm 3.9075.27 ±\pm 2.1571.51 ±\pm 1.8173.43 ±\pm 2.0780.27 ±\pm 1.71
Face masksI66.40 ±\pm 3.6275.44 ±\pm 1.4675.04 ±\pm 6.5069.77 ±\pm 3.6776.45 ±\pm 4.37
Face masksI+R78.69 ±\pm 1.7473.91 ±\pm 0.8479.08 ±\pm 2.2676.02 ±\pm 2.4378.75 ±\pm 3.19
Face masksI+R+E70.89 ±\pm 1.5476.67 ±\pm 2.3080.34 ±\pm 0.8876.03 ±\pm 1.4881.49 ±\pm 1.90
School closuresBase33.87 ±\pm 2.2270.74 ±\pm 1.7740.97 ±\pm 0.9339.44 ±\pm 0.3140.45 ±\pm 0.73
School closuresBase+CoT50.85 ±\pm 1.1170.20 ±\pm 1.7059.90 ±\pm 1.2051.02 ±\pm 0.2860.60 ±\pm 0.32
School closuresBase+FS35.91 ±\pm 2.5171.77 ±\pm 1.4948.65 ±\pm 0.7351.44 ±\pm 0.0061.93 ±\pm 0.91
School closuresBase+CoT+FS44.34 ±\pm 3.6872.21 ±\pm 1.5258.17 ±\pm 0.6847.16 ±\pm 0.8761.10 ±\pm 1.20
School closuresBase+CoS39.31 ±\pm 1.3655.01 ±\pm 0.2143.67 ±\pm 1.4843.21 ±\pm 4.7434.36 ±\pm 0.97
School closuresOPRO45.76 ±\pm 3.5462.98 ±\pm 1.0634.50 ±\pm 5.9637.60 ±\pm 2.4241.67 ±\pm 3.48
School closuresCAPO42.39 ±\pm 2.6169.84 ±\pm 1.3142.57 ±\pm 1.9050.63 ±\pm 1.9643.29 ±\pm 1.69
School closuresEvoPrompt(DE)44.59 ±\pm 3.2266.35 ±\pm 0.7245.91 ±\pm 2.5647.70 ±\pm 7.7940.60 ±\pm 0.11
School closuresEvoPrompt(GA)50.53 ±\pm 7.2068.50 ±\pm 3.6045.24 ±\pm 3.4957.24 ±\pm 4.2642.62 ±\pm 9.11
School closuresI42.65 ±\pm 0.2965.00 ±\pm 1.2948.33 ±\pm 8.6050.79 ±\pm 1.7239.06 ±\pm 2.89
School closuresI+R62.66 ±\pm 4.6874.47 ±\pm 2.9762.04 ±\pm 6.1871.70 ±\pm 6.7463.87 ±\pm 6.00
School closuresI+R+E60.23 ±\pm 1.2970.41 ±\pm 3.8374.30 ±\pm 6.6763.79 ±\pm 7.5860.52 ±\pm 15.46
Stay at home ordersBase58.47 ±\pm 0.3275.67 ±\pm 0.8364.88 ±\pm 3.5372.80 ±\pm 0.4976.36 ±\pm 0.50
Stay at home ordersBase+CoT74.52 ±\pm 1.4275.96 ±\pm 0.6674.83 ±\pm 0.7175.32 ±\pm 0.4276.01 ±\pm 0.36
Stay at home ordersBase+FS61.04 ±\pm 1.9876.26 ±\pm 1.6874.30 ±\pm 1.2079.29 ±\pm 0.5080.53 ±\pm 0.00
Stay at home ordersBase+CoT+FS74.34 ±\pm 4.2075.85 ±\pm 1.4679.54 ±\pm 1.2281.33 ±\pm 0.5580.14 ±\pm 0.04
Stay at home ordersBase+CoS43.38 ±\pm 3.3965.35 ±\pm 2.8069.61 ±\pm 3.3368.27 ±\pm 2.3769.61 ±\pm 0.69
Stay at home ordersOPRO69.24 ±\pm 4.8072.69 ±\pm 4.8667.41 ±\pm 0.3468.73 ±\pm 3.4174.81 ±\pm 1.47
Stay at home ordersCAPO71.90 ±\pm 3.9175.20 ±\pm 1.7369.74 ±\pm 0.6571.38 ±\pm 3.1173.80 ±\pm 4.01
Stay at home ordersEvoPrompt(DE)69.04 ±\pm 0.7374.57 ±\pm 0.0469.30 ±\pm 4.2773.92 ±\pm 1.3672.59 ±\pm 1.10
Stay at home ordersEvoPrompt(GA)69.12 ±\pm 1.1573.30 ±\pm 2.6970.36 ±\pm 2.2771.55 ±\pm 4.6572.67 ±\pm 3.28
Stay at home ordersI64.83 ±\pm 2.9774.15 ±\pm 1.8873.30 ±\pm 4.5677.77 ±\pm 1.6473.67 ±\pm 2.45
Stay at home ordersI+R72.93 ±\pm 3.2275.99 ±\pm 0.8677.10 ±\pm 3.3376.85 ±\pm 0.5574.58 ±\pm 1.38
Stay at home ordersI+R+E73.12 ±\pm 0.8764.73 ±\pm 8.4676.85 ±\pm 2.6876.59 ±\pm 3.8976.81 ±\pm 3.72

Table 5. Per-target results on COVID-19-Stance using Macro-F1. I = instruction-only; I+R = instruction + reasoning; I+R+E = instruction + per-example reasoning. Base = original prompt; CoT = chain-of-thought prompting; FS = few-shot prompting; CoS = Chain-of-Stance prompting. Values are mean ±\pm standard deviation across three runs. Shaded cells indicate differences from the corresponding Base score: gray denotes improvements, red denotes decreases, and darker shades indicate larger absolute differences. The best score for each target across all models and methods is shown in bold.

Module Ablation. Table 6 presents the frozen-module ablation results on SemEval-2016 under I+R+E optimization, where each experiment freezes one module at its base-prompt version while optimizing the remaining modules.

DatasetReasonerPhiGPT-OSSMistralGemmaLlama
SemEvalI+R+E (Same)68.63 ±\pm 0.5366.10 ±\pm 1.1471.12 ±\pm 0.8569.68 ±\pm 1.1474.78 ±\pm 0.38
SemEvalI+R+E (GPT-5)69.11 ±\pm 0.2666.35 ±\pm 1.1765.30 ±\pm 2.4671.91 ±\pm 1.2176.46 ±\pm 0.27
GunStanceI+R+E (Same)59.74 ±\pm 0.2662.12 ±\pm 1.7665.01 ±\pm 2.1860.21 ±\pm 1.8459.03 ±\pm 3.58
GunStanceI+R+E (GPT-5)61.61 ±\pm 1.4060.56 ±\pm 0.0464.14 ±\pm 1.0862.99 ±\pm 1.3468.45 ±\pm 1.75
COVID-19-StanceI+R+E (Same)69.97 ±\pm 2.4371.14 ±\pm 1.8978.03 ±\pm 2.2469.55 ±\pm 1.9673.58 ±\pm 3.29
COVID-19-StanceI+R+E (GPT-5)70.07 ±\pm 1.0771.21 ±\pm 0.5779.07 ±\pm 0.2677.99 ±\pm 0.1782.81 ±\pm 0.10
VaccineStanceI+R+E (Same)63.87 ±\pm 3.5766.99 ±\pm 1.2067.85 ±\pm 3.5955.12 ±\pm 1.8359.76 ±\pm 1.27
VaccineStanceI+R+E (GPT-5)66.14 ±\pm 1.6768.01 ±\pm 1.2871.51 ±\pm 0.5866.76 ±\pm 3.2168.31 ±\pm 1.85

Table 6. Macro-F1 comparison of I+R+E using the classifier itself (Same) or GPT-5 as an external reasoner. Results are mean ±\pm standard deviation across three independent runs. Shaded GPT-5 cells indicate differences relative to the corresponding Same setting; gray denotes improvement and red denotes degradation, with darker shading indicating larger absolute differences.

Freezing the Favor definition produces the largest degradation for Phi (−9.34) and Gemma (−4.50), whereas freezing the Against definition has the largest effect for GPT-OSS (−6.59) and Mistral (−9.66). Llama is comparatively less sensitive, with its largest degradation (−1.78) occurring when Guidelines is

MethodPhiGPT-OSSMistralGemmaLlama
Base55.37 ± 0.1260.02 ± 0.4453.90 ± 0.2865.82 ± 0.2073.52 ± 0.14
I+R+E (Full Prompt, 5 iter.)65.69 ± 1.8865.46 ± 0.6267.02 ± 1.0870.82 ± 0.3974.03 ± 0.83
I+R+E (Full Prompt, Best-Only Memory, 10 iter.)66.67 ± 0.7665.10 ± 0.9467.63 ± 0.6170.53 ± 0.5874.73 ± 0.77
I+R+E (Modular, 10 iter.)68.63 ± 0.5366.10 ± 1.1471.12 ± 0.8569.68 ± 1.1474.78 ± 0.38

caption: Comparison of full-prompt and modular I+R+E optimization on SemEval-2016 (Macro-F1, mean ± standard deviation over three runs). Standard full-prompt optimization uses five iterations due to context growth; the best-only-memory and modular variants use ten. Bold indicates the best optimized result for each backbone.

:::

Frozen ModulePhi Macro-F1Phi ΔF1GPT-OSS Macro-F1GPT-OSS ΔF1Mistral Macro-F1Mistral ΔF1Gemma Macro-F1Gemma ΔF1Llama Macro-F1Llama ΔF1
None (All Modules Optimized)68.63 ± 0.53–66.10 ± 1.14–71.12 ± 0.85–69.68 ± 1.14–74.78 ± 0.38–
Favor definition59.29 ± 2.32−9.3459.93 ± 2.77−6.1763.39 ± 1.43−7.7365.18 ± 1.07−4.5073.88 ± 0.90−0.90
Neutral definition61.74 ± 1.66−6.8965.16 ± 1.24−0.9467.52 ± 0.41−3.6068.32 ± 1.62−1.3674.15 ± 0.39−0.63
Task definition61.49 ± 1.91−7.1462.45 ± 1.35−3.6564.96 ± 0.73−6.1667.82 ± 0.64−1.8673.23 ± 1.21−1.55
Guidelines65.09 ± 2.39−3.5462.97 ± 0.34−3.1365.46 ± 2.76−5.6669.17 ± 1.03−0.5173.00 ± 1.04−1.78
Against definition61.02 ± 2.41−7.6159.51 ± 1.46−6.5961.46 ± 2.53−9.6668.02 ± 1.28−1.6673.22 ± 0.65−1.56
Output format60.40 ± 4.09−8.2363.18 ± 1.09−2.9266.64 ± 2.28−4.4870.10 ± 0.75+0.4275.11 ± 0.51+0.33

caption: Frozen-module ablation on SemEval-2016 under I+R+E optimization (Macro-F1, mean ± standard deviation over three runs). Each row freezes one module while optimizing the remainder. ΔF1 is relative to optimizing all modules.

:::

frozen. Notably, the Output format is the only module for which freezing does not consistently reduce performance, yielding small improvements for Gemma (+0.42) and Llama (+0.33). Overall, these results indicate that the contribution of individual prompt modules varies substantially across backbone models. Qualitative examples are provided in Appendix § 14.§ 1.

Error Analysis

Class-Conditioned Error Routing. We compare I+R+E with a pooled-error variant using the same initial prompt, ten iterations, and training batches of up to 45 examples. Validation subsets are fixed within each run and shared across variants with the same run ID. Class-conditioned routing uses all errors of the corresponding gold label, whereas pooled routing samples an equal number across labels. Modules with no class-specific errors remain unchanged. Table 7 shows higher mean Macro-F1 for four of five backbones: Phi (+3.40), GPT-OSS (+1.05), Mistral (+4.99), and Gemma (+2.21), while Llama decreases by 0.15 points.

RoutingPhiGPTMistralGemmaLlama
Pooled65.23 ± 3.8765.05 ± 1.0166.13 ± 1.9467.47 ± 1.4874.93 ± 0.89
Class-conditioned68.63 ± 0.5366.10 ± 1.1471.12 ± 0.8569.68 ± 1.1474.78 ± 0.38

caption: Class-conditioned versus pooled error routing on SemEval-2016. Values are mean Macro-F1 ± standard deviation over three runs, averaged across five targets.

:::

Case Study: Sarcastic Stance

Dataset: SemEval-2016 Target: Atheism Tweet: “Irony: When a #creationist tweets about #science being wrong on a device that couldn’t have existed without it. #SemST” Gold: favor Base: against I: favor I+R: against I+R+E: favor

Analysis: The tweet uses sarcasm to criticize a creationist position, requiring the stance toward the target to be inferred beyond surface polarity. The Base and I+R prompts predict against, whereas I and I+R+E recover the gold favor label.

Conclusion

We introduced MoPro-SD, a modular prompt optimization framework for stance detection that refines prompt components without model fine-tuning. Across four datasets and multiple LLM backbones, MoPro-SD improves over the Base prompt in many settings, although performance varies by model and refinement strategy.

Class-conditioned error feedback achieves higher mean Macro-F1 than pooled feedback for four of five backbones on SemEval-2016, supporting the value of label-specific refinement. Modular optimization also outperforms full-prompt optimization for several models, with varying module contributions. Despite higher development-time costs, MoPro-SD requires no additional optimization at inference.

Limitations

MoPrO-SD has several limitations. First, although it improves performance across multiple stance detection datasets, its generalizability to other NLP tasks remains unexplored. Second, optimized prompts are model- and domain-dependent, so transferring them across backbone models or datasets may require re-optimization. Third, the current framework uses a fixed modular structure tailored to stance detection, with explicit favor, against, and neutral definition modules; extending this design to tasks with larger label spaces or more complex reasoning requirements remains future work. Fourth, MoPrO-SD incurs additional optimization-time cost due to repeated validation and optimizer calls, especially for reasoning-based strategies. Finally, experiments involving API-based LLMs may be affected by model updates over time, which can impact reproducibility.

Modular Prompt Design and Meta-Prompts

Complete Prompt Template

Complete Base Prompt for Stance Detection

1. Task Definition

Stance detection is a task of determining the attitude or position expressed by an author in a text regarding a particular topic or claim. Your task is to classify the stance of a tweet toward the target “{target}” as either Favor, Against, or Neutral.

2. Guidelines

  1. Stance Indicators: Look for keywords, phrases, emoticons, and tone that indicate a favor, against, or neutral attitude toward {target}.

  1. Implicit vs. Explicit Stance: Consider both implicit and explicit expressions of stance. If a tweet implies a stance without directly stating it, use the context and language to determine the intended stance.

  1. Sarcasm and Irony: Be aware of sarcasm and irony, which can be used to express an opposing stance. Look for inconsistencies between the literal meaning and the tone or language used.

3. Favor Definition

Classify the tweet as favor if it:

  1. Shows an explicitly positive stance: openly supports {target}

  1. Uses pro-{target} keywords: languages that frames {target} in positive light

4. Against Definition

Classify the tweet as against if it:

  1. Shows an explicitly negative stance: openly opposes {target}

  1. Uses against {target} keywords: languages that frames the target {target} in negative light

5. Neutral Definition

Classify the tweet as neutral if it:

  1. Shows no clear stance: it neither supports nor opposes {target}

  1. Uses neutral or tentative language: e.g., simply asking a question or stating opinion that signals indifference/uncertainty

6. Output Format

Strictly follow the guidelines above and classify the tweet if it is Favor, Against, or Neutral to the target “{target}”. Reply with the classification label only, without any additional text or explanation.

Tweet: \{tweet\}

Stance: [Favor/Against/Neutral]

Meta Prompts

Instruction-Only Update

Your task is to write only the {module_name} section of the prompt for stance detection toward the target {target}.

Below are the previous prompts with their Macro-F1 scores. The Macro-F1 score ranges from 0 to 100, and higher scores indicate better-performing prompts.

{prompt_1}

{score_1}

...

{prompt_n}

{score_n}

Carefully analyze the previous prompts and their Macro-F1 scores, and write a new, improved prompt to replace the prompt below:

{to_rewrite_prompt}

Wrap the new improved prompt between START and END tags. Do not explain your changes or include any other text.

Reasoning Step

Your task is to point out the problems with the current prompt based on the wrong examples. The current prompt is:

{current_section_prompt}

This prompt gets the following examples wrong. You should analyze the differences between wrong predictions and ground truth answers, and carefully consider why this prompt led to incorrect predictions.

Below are the examples with Tweets, Wrong predictions, and Ground truth answers.

{error_demonstrations}

Give a reason why the prompt could have gotten these examples wrong, and how we can improve the prompt? Wrap the reason with START and END tags.

Reasoning Update

Your task is to write an improved prompt based on the feedback. Below is the current prompt with its Macro-F1 score. The Macro-F1 score ranges from 0 to 100, and a higher score indicates better performance.

Prompt: {current_prompt}

Macro-F1 Score: {current_prompt_score}

Below are the problems with this prompt.

{problems_reasoning}

Carefully analyze the previous prompt and the problems with this prompt. Write a short, concise and improved prompt to replace the current prompt without losing the important information. The current prompt is:

{current_section_prompt}

Wrap the new improved prompt between <START> and <END> tags. Do NOT explain your changes or include any other text between <START> and <END> tags.

Per-Example Reasoning

Your task is to point out the problems with the current prompt based on why this prompt leads to incorrect predictions. The current prompt is:

{current_section_prompt}

You should analyze the differences between the wrong prediction and the ground truth answer. Below is an example with a Tweet, a Wrong prediction, and the Ground truth answer.

Tweet: {tweet}

Target: {target}

Ground Truth: {ground_truth}

Wrong Prediction: {wrong_prediction}

Give a reason why the prompt could have gotten this example wrong, and how we can improve the prompt? Wrap the reason with START and END tags.

Per-Example Reasoning Summarization

Your task is to summarize the problems with the current prompt and ways to improve the prompt based on the problems defined below:

{problem_reasoning}

Write a short and concise summary between START and END tags. Do NOT explain your changes or include any other text between START and END tags.

Post-Summary Module Update

Your task is to write an improved prompt based on the feedback. Below is the current prompt:

{current_section_prompt}

Below is an example with a Tweet, Wrong prediction, and Ground truth answer.

Tweet: {tweet}

Target: {target}

Ground Truth: {ground_truth_answer}

Wrong Prediction: {wrong_prediction}

Below are the problems with this prompt.

{problems_reasoning}

Carefully analyze the previous prompt and the problems with this prompt. Write a short, concise and improved prompt to replace the current prompt without losing the important information. The current prompt is:

{current_section_prompt}

Wrap the new improved prompt between <START> and <END> tags. Do NOT explain your changes or include any other text between <START> and <END> tags.

Additional Experimental Details

Dataset Statistics

Table T1 summarizes the target-wise train, validation, and test distributions for the four datasets used in our experiments.

DatasetTargetTrainValidTestTotal
COVID-19-StanceAnthony Fauci1,4642002001,864
COVID-19-StanceFace Masks1,3072002001,707
COVID-19-StanceSchool Closures7902002001,190
COVID-19-StanceStay at Home Orders9722002001,372
COVID-19-StanceTotal4,5338008006,133
GunStanceGuns Should Be Banned9009009002,700
GunStanceGuns Should Be Regulated9369329322,800
GunStanceTotal1,8361,8321,8325,500
SemEval-2016Atheism389124220733
SemEval-2016Climate Change Is a Real Concern32471169564
SemEval-2016Feminist Movement536128285949
SemEval-2016Hillary Clinton557132295984
SemEval-2016Legalization of Abortion525128280933
SemEval-2016Total2,3315831,2494,163
VaccineStanceVaccines5005001,0002,000
VaccineStanceTotal5005001,0002,000

Table T1. Target-wise train, validation, and test distributions for the stance detection benchmarks.

VaccineStance Construction and Annotation

We construct VaccineStance from the vaccine-discourse corpus of [15], comprising public English-language posts collected from X (formerly Twitter) using the Full Archive Search API between January 2013 and December 2022. Preprocessing retained original posts, limited users to one post per day, removed reposts, URLs, emoticons, non-ASCII characters, and user mentions, and filtered references to the band “The Vaccines” using Sentence-Transformer similarity. The resulting corpus contained approximately 18.7 million posts from 5.8 million users.

From this corpus, we sampled 240,000 tweets (2,000 per month) and used Llama-3.3 ([29]) to identify posts relevant to vaccine stance detection. We then selected 2,000 tweets for human stance annotation. Each tweet was independently labeled by three annotators as Favor, Against, or Neutral, achieving Fleiss’ κ=0.778\kappa= 0.778. The resulting benchmark contains 724 Favor (36.2%), 464 Against (23.2%), and 812 Neutral (40.6%) instances, divided into 500 training, 500 validation, and 1,000 test instances. All tweet identifiers and texts are unique, with no exact overlap across splits.

Sample Annotated VaccineStance Examples

Representative VaccineStance examples with Llama-3.3 stance predictions and final human annotations are shown below. These stance predictions are distinct from the relevance-filtering step used during candidate selection.

Example 1: Neutral Agreement

Post: “Parents: heard the new vaccine requirement? Meningitis vaccine required for IL students entering 6th, 12th grade.”

Llama-3.3: neutral Human: neutral

Example 2: Against Agreement

Post: “Then it’s not recommended. The govt is making the public suffer by gambling with this, I can’t. Make the non-medical govt officials take the vaccine first.”

Llama-3.3: against Human: against

Example 3: Annotation Disagreement

Post: “One of the last holy grails of HIV research is the development of a HIV vaccine.” #homenews #news #cryptonews

Llama-3.3: neutral Human: in-favor

Example 4: Implicit Support Disagreement

Post: “Watching the age go up for what’s considered eligible for the vaccine. KNOCK IT OFF.”

Llama-3.3: against Human: in-favor

Effect of Optimization Budget

We examine the effect of optimization budget under the I+R+E setting by varying the number of optimization iterations among 1, 5, and 10 on SemEval-2016. Figure S1 reports test Macro-F1 across all five backbone models.

Effect of optimization budget on SemEval-2016 test Macro-F1

Figure S1. Effect of optimization budget on SemEval-2016 under the I+R+E setting. Bars show mean test Macro-F1 over three independent runs using 1, 5, and 10 optimization iterations; error bars denote standard deviation.

Increasing the optimization budget from 1 to 10 iterations improves mean Macro-F1 for all five backbones, although the magnitude of the gain varies across models. The largest improvement is observed for Mistral (+12.55 points), followed by Phi (+4.23), with smaller gains for GPT-OSS, Gemma, and Llama. Paired two-sided tt-tests across the three runs show significant improvements from 1 to 10 iterations for Mistral (p=0.0018p = 0.0018), Gemma (p=0.0210p = 0.0210), and Phi (p=0.0211p = 0.0211), but not for GPT-OSS or Llama. For 5 versus 10 iterations, no statistically significant difference is detected for any backbone with three runs (p>0.05p > 0.05).

SplitFavorAgainstNeutralTotal
Train159103238500
Validation169102229500
Test3962593451,000
Total7244648122,000

Table T2. Class distribution of VaccineStance across the train, validation, and test splits.

Implementation Details

All LLM calls are performed through remote APIs, with OpenRouter as the primary provider. Stance classification uses a temperature of 0.2, whereas reasoning-generation steps use a temperature of 0.7. For few-shot evaluation, the final optimized I+R+E prompts are kept frozen and augmented at inference time with training-set demonstrations retrieved by embedding similarity. We evaluate k=1k = 1 and k=3k = 3 demonstrations per stance class.

Additional Optimization Trajectories

Figures S2 and S3 present the validation Macro-F1 trajectories for the I and I+R optimization strategies, respectively. Each curve represents the mean validation Macro-F1 across three independent runs, while the shaded regions indicate the corresponding standard deviation. In both figures, “Base” denotes the validation Macro-F1 of the original prompt before optimization.

Detailed Dataset-Specific Results

This section provides detailed target-level Macro-F1 results for the SemEval-2016, GunStance, and COVID-19-Stance datasets discussed in the main paper. Since VaccineStance contains a single target, its full results are reported in the main paper.

Table T3 reports the detailed target-level results for SemEval-2016. Table T4 reports the detailed target-level results for GunStance. Table T5 reports the detailed target-level results for COVID-19-Stance.

TargetMethodPhiGPT-OSSMistralGemmaLlama
Guns should be bannedBase39.84±1.9239.84 \pm1.9257.53±0.8157.53 \pm0.8153.75±0.5653.75 \pm0.5643.49±0.2343.49 \pm0.2352.17±0.5052.17 \pm0.50
Guns should be bannedBase+CoT60.73±1.2460.73 \pm1.2457.26±1.2057.26 \pm1.2054.44±0.4354.44 \pm0.4349.46±0.0849.46 \pm0.0854.66±0.8154.66 \pm0.81
Guns should be bannedBase+FS51.99±2.0751.99 \pm2.0758.69±0.7058.69 \pm0.7062.86±0.1362.86 \pm0.1357.18±0.1457.18 \pm0.1453.61±0.2953.61 \pm0.29
Guns should be bannedBase+CoT+FS59.92±0.5359.92 \pm0.5356.41±0.7656.41 \pm0.7658.77±0.5858.77 \pm0.5862.44±0.0862.44 \pm0.0855.84±1.1055.84 \pm1.10
Guns should be bannedBase+CoS42.52±1.0642.52 \pm1.0650.39±1.5050.39 \pm1.5062.19±1.1162.19 \pm1.1157.98±0.4957.98 \pm0.4946.87±0.6346.87 \pm0.63
Guns should be bannedOPRO54.13±3.0354.13 \pm3.0356.74±3.0256.74 \pm3.0254.09±0.6254.09 \pm0.6242.60±0.7142.60 \pm0.7152.14±0.8452.14 \pm0.84
Guns should be bannedCAPO54.64±1.5754.64 \pm1.5758.79±1.1858.79 \pm1.1860.73±2.2360.73 \pm2.2349.45±2.9549.45 \pm2.9552.96±3.3552.96 \pm3.35
Guns should be bannedEvoPrompt(DE)55.32±3.4655.32 \pm3.4655.76±0.1655.76 \pm0.1655.28±2.2855.28 \pm2.2849.04±6.5349.04 \pm6.5357.56±1.1357.56 \pm1.13
Guns should be bannedEvoPrompt(GA)55.49±3.4455.49 \pm3.4458.05±1.9958.05 \pm1.9956.10±1.7856.10 \pm1.7852.83±4.0852.83 \pm4.0851.82±3.3351.82 \pm3.33
Guns should be bannedI50.80±2.0150.80 \pm2.0160.34±0.4860.34 \pm0.4860.10±5.7060.10 \pm5.7056.14±3.1956.14 \pm3.1954.71±1.4654.71 \pm1.46
Guns should be bannedI+R57.96±5.3857.96 \pm5.3860.51±1.9360.51 \pm1.9362.82±3.2462.82 \pm3.2461.81±1.5661.81 \pm1.5657.00±3.5657.00 \pm3.56
Guns should be bannedI+R+E58.02±1.7558.02 \pm1.7560.07±3.1660.07 \pm3.1664.78±1.8964.78 \pm1.8957.50±4.7957.50 \pm4.7956.58±4.4056.58 \pm4.40
Guns should be regulatedBase39.27±1.2639.27 \pm1.2663.16±0.7463.16 \pm0.7458.73±0.5058.73 \pm0.5050.69±0.3850.69 \pm0.3857.54±0.4457.54 \pm0.44
Guns should be regulatedBase+CoT61.62±0.6861.62 \pm0.6862.27±0.3062.27 \pm0.3060.65±0.7160.65 \pm0.7155.49±0.0655.49 \pm0.0657.88±0.4757.88 \pm0.47
Guns should be regulatedBase+FS50.95±1.6750.95 \pm1.6762.50±0.5362.50 \pm0.5365.40±0.4265.40 \pm0.4258.88±0.1358.88 \pm0.1362.63±0.2462.63 \pm0.24
Guns should be regulatedBase+CoT+FS58.71±0.6658.71 \pm0.6661.29±0.9861.29 \pm0.9864.66±0.3464.66 \pm0.3464.68±0.7364.68 \pm0.7362.19±0.9162.19 \pm0.91
Guns should be regulatedBase+CoS43.81±0.5543.81 \pm0.5550.02±1.0450.02 \pm1.0462.90±1.4562.90 \pm1.4560.61±2.6960.61 \pm2.6952.60±0.1452.60 \pm0.14
Guns should be regulatedOPRO57.66±2.5557.66 \pm2.5561.46±1.1261.46 \pm1.1260.64±4.4660.64 \pm4.4648.65±1.6048.65 \pm1.6056.42±1.2956.42 \pm1.29
Guns should be regulatedCAPO58.73±3.2158.73 \pm3.2162.15±0.3662.15 \pm0.3663.65±0.5863.65 \pm0.5858.49±1.2158.49 \pm1.2155.80±0.7855.80 \pm0.78
Guns should be regulatedEvoPrompt(DE)55.51±3.8755.51 \pm3.8761.06±1.8761.06 \pm1.8763.52±1.4463.52 \pm1.4455.36±2.3955.36 \pm2.3956.54±0.9156.54 \pm0.91
Guns should be regulatedEvoPrompt(GA)56.79±0.8656.79 \pm0.8661.03±1.3461.03 \pm1.3462.17±0.2062.17 \pm0.2056.93±2.2156.93 \pm2.2155.85±1.2655.85 \pm1.26
Guns should be regulatedI56.57±2.8256.57 \pm2.8263.31±1.7763.31 \pm1.7762.76±2.6762.76 \pm2.6760.91±0.1260.91 \pm0.1260.38±1.1460.38 \pm1.14
Guns should be regulatedI+R64.01±1.7864.01 \pm1.7861.63±0.5661.63 \pm0.5664.53±0.7064.53 \pm0.7066.29±0.7466.29 \pm0.7460.97±0.9460.97 \pm0.94
Guns should be regulatedI+R+E61.47±1.7961.47 \pm1.7964.16±0.7664.16 \pm0.7665.24±2.7365.24 \pm2.7362.93±2.9462.93 \pm2.9461.48±3.7361.48 \pm3.73

Table T4. Per-target results on GunStance using Macro-F1. I = instruction-only; I+R = instruction + reasoning; I+R+E = instruction + per-example reasoning. Base = original prompt; CoT = chain-of-thought prompting; FS = few-shot prompting; CoS = Chain-of-Stance prompting. Values are mean ±\pm standard deviation across three runs. Shaded cells indicate differences from the corresponding Base score within each model column: gray denotes improvements, red denotes decreases, and darker shades indicate larger absolute differences. The best score for each target across all models and methods is shown in bold.

Few-Shot Prompting Analysis

We further evaluate whether retrieved demonstrations improve the final I+R+E prompts. We compare I+R+E without in-context demonstrations at inference (zero-shot) with few-shot variants using k=1k = 1 and k=3k = 3 retrieved demonstrations per stance class across all four datasets and five backbone models.

As shown in Figure S4, the effect of few-shot prompting varies across models and datasets. Retrieved demonstrations improve Macro-F1 in several settings, particularly on GunStance and VaccineStance, but provide smaller gains or decreases in others. Increasing kk from 1 to 3 also does not consistently improve performance, indicating that additional demonstrations are not uniformly beneficial after I+R+E optimization.

Macro-F1 comparison of zero-shot and few-shot prompting with the final I+R+E prompts across four benchmark datasets

Figure S4. Macro-F1 comparison of zero-shot and few-shot prompting with the final I+R+E prompts across four benchmark datasets. Zero-shot uses no in-context demonstrations at inference; few-shot uses k=1k = 1 or k=3k = 3 retrieved demonstrations per stance class. Bars show means over three runs; error bars denote standard deviation.

External Reasoner Results

Table T6 reports the full results of the external-reasoner experiment summarized in Table 3 of the main paper. We compare I+R+EI+R+E using the classifier itself as the reasoner (Same) with GPT-5 as an external reasoner (GPT-5) across all four datasets and five backbone models.

Validation Macro-F1 trajectories over 10 optimization iterations across the four datasets using the I strategy

Figure S2. Validation Macro-F1 trajectories over 10 optimization iterations across the four datasets using the I strategy. Curves show the mean across three independent runs, and shaded regions denote standard deviation. “Base” denotes the validation Macro-F1 of the original prompt before optimization.

Validation Macro-F1 trajectories over 10 optimization iterations across the four datasets using the I+R strategy

Figure S3. Validation Macro-F1 trajectories over 10 optimization iterations across the four datasets using the I+R strategy. Curves show the mean across three independent runs, and shaded regions denote standard deviation. “Base” denotes the validation Macro-F1 of the original prompt before optimization.

Additional Qualitative Examples

Qualitative Examples of Frozen-Module Ablation

To analyze the effect of freezing stance-definition modules during optimization, we examine cases where the full I+R+EI+R+E configuration predicts the correct stance label but the corresponding frozen-module variant fails. These examples illustrate cases in which freezing individual modules is associated with errors involving implicit stance cues and neutrality-related expressions. The following examples present prediction flips from the frozen-module ablation analysis using Mistral3.2 on SemEval-2016.

Case 1: Favor-Definition Freezing Failure

Dataset: SemEval-2016 Target: Legalization of Abortion Tweet: “Only one can have bodily autonomy #SemST” Gold: favor Full I+R+EI+R+E: favor Frozen: against

TargetMethodPhiGPT-OSSMistralGemmaLlama
AtheismBase37.88 ± 1.4142.71 ± 0.9620.15 ± 0.9860.48 ± 0.2263.74 ± 1.36
AtheismBase+CoT64.11 ± 0.5633.65 ± 1.5355.71 ± 0.5063.34 ± 0.7464.09 ± 0.34
AtheismBase+FS45.92 ± 2.8752.47 ± 1.9851.08 ± 0.9765.84 ± 0.0372.25 ± 0.23
AtheismBase+CoT+FS66.17 ± 0.5744.94 ± 1.6259.68 ± 1.6161.99 ± 0.0468.84 ± 0.56
AtheismBase+CoS51.23 ± 1.3455.08 ± 3.2256.77 ± 2.5758.10 ± 0.9364.56 ± 1.80
AtheismOPRO62.97 ± 3.3759.13 ± 1.7428.76 ± 10.8156.10 ± 5.8562.32 ± 1.87
AtheismCAPO47.49 ± 5.5961.00 ± 5.3433.23 ± 2.0564.18 ± 3.1069.33 ± 0.76
AtheismEvoPrompt(DE)59.11 ± 4.0758.20 ± 3.4651.13 ± 5.3363.80 ± 0.3766.20 ± 0.88
AtheismEvoPrompt(GA)60.68 ± 6.5356.82 ± 6.4247.79 ± 15.2665.91 ± 3.3961.76 ± 3.68
AtheismI42.63 ± 0.6841.06 ± 2.8040.34 ± 16.3661.01 ± 2.1560.34 ± 2.43
AtheismI+R63.09 ± 4.8666.31 ± 4.8060.31 ± 3.7764.94 ± 5.4771.67 ± 0.63
AtheismI+R+E60.77 ± 6.3070.64 ± 2.3467.46 ± 2.3567.56 ± 2.4266.92 ± 1.30
Climate change is a real concernBase45.44 ± 2.3063.98 ± 0.8658.42 ± 0.7155.43 ± 0.2676.53 ± 0.44
Climate change is a real concernBase+CoT66.55 ± 2.2060.91 ± 2.8167.07 ± 0.7665.10 ± 0.0878.18 ± 0.11
Climate change is a real concernBase+FS51.51 ± 2.4265.38 ± 3.3566.59 ± 1.0964.59 ± 0.1573.29 ± 0.48
Climate change is a real concernBase+CoT+FS53.94 ± 0.7662.50 ± 1.2064.12 ± 0.6464.91 ± 0.1077.35 ± 0.96
Climate change is a real concernBase+CoS61.03 ± 3.4967.51 ± 0.4169.03 ± 3.4968.91 ± 7.5270.48 ± 2.88
Climate change is a real concernOPRO59.22 ± 0.9770.61 ± 3.0259.61 ± 0.6654.97 ± 0.5376.72 ± 0.88
Climate change is a real concernCAPO62.13 ± 1.9068.65 ± 2.4065.01 ± 0.6364.67 ± 5.0378.49 ± 1.94
Climate change is a real concernEvoPrompt(DE)64.81 ± 1.5066.24 ± 4.1167.60 ± 14.3266.06 ± 2.9579.30 ± 5.44
Climate change is a real concernEvoPrompt(GA)63.67 ± 2.3166.42 ± 2.2862.98 ± 2.0766.49 ± 2.8675.87 ± 9.80
Climate change is a real concernI58.58 ± 1.8661.34 ± 3.0759.67 ± 9.4662.18 ± 4.0779.84 ± 0.26
Climate change is a real concernI+R75.43 ± 4.0655.90 ± 2.1568.46 ± 4.3273.08 ± 3.6477.56 ± 0.60
Climate change is a real concernI+R+E67.25 ± 3.6261.64 ± 5.8673.40 ± 1.7766.00 ± 3.9581.79 ± 0.67
Feminist movementBase59.82 ± 1.6861.78 ± 1.8658.37 ± 0.9867.69 ± 0.0272.94 ± 0.50
Feminist movementBase+CoT63.95 ± 1.7061.80 ± 0.4368.83 ± 0.9465.50 ± 0.3668.96 ± 0.97
Feminist movementBase+FS61.45 ± 2.4761.52 ± 1.6962.46 ± 0.4768.78 ± 0.2068.24 ± 0.68
Feminist movementBase+CoT+FS64.39 ± 2.2663.22 ± 1.8464.26 ± 0.3465.49 ± 0.1469.47 ± 0.26
Feminist movementBase+CoS50.08 ± 3.9453.26 ± 1.6160.45 ± 0.0656.20 ± 2.3855.91 ± 2.21
Feminist movementOPRO67.06 ± 3.9368.22 ± 2.3459.33 ± 4.3967.45 ± 0.1974.63 ± 1.16
Feminist movementCAPO64.67 ± 1.2668.99 ± 0.7964.53 ± 0.3665.80 ± 2.7274.14 ± 1.70
Feminist movementEvoPrompt(DE)68.96 ± 0.4966.26 ± 1.1967.66 ± 1.5167.32 ± 3.6375.00 ± 3.02
Feminist movementEvoPrompt(GA)67.48 ± 1.5365.59 ± 1.9460.59 ± 3.7764.54 ± 0.3173.11 ± 3.72
Feminist movementI63.84 ± 2.6862.27 ± 1.0164.38 ± 5.6470.59 ± 3.2774.81 ± 0.06
Feminist movementI+R63.15 ± 1.7160.44 ± 1.9762.29 ± 3.0167.13 ± 4.1673.64 ± 1.40
Feminist movementI+R+E67.11 ± 1.3064.69 ± 0.8868.20 ± 1.3667.86 ± 2.3673.43 ± 0.59
Hillary ClintonBase73.31 ± 0.3174.59 ± 1.5973.86 ± 0.5480.94 ± 0.2183.81 ± 0.51
Hillary ClintonBase+CoT74.42 ± 3.9774.35 ± 2.2181.25 ± 0.2078.66 ± 0.1882.27 ± 0.46
Hillary ClintonBase+FS66.52 ± 2.0075.34 ± 0.5881.07 ± 1.1180.25 ± 0.4982.46 ± 0.43
Hillary ClintonBase+CoT+FS78.68 ± 3.0276.05 ± 1.0081.59 ± 0.8677.14 ± 0.3078.96 ± 0.20
Hillary ClintonBase+CoS56.69 ± 0.4667.36 ± 1.6175.12 ± 0.7158.72 ± 0.7364.53 ± 3.34
Hillary ClintonOPRO81.56 ± 0.4275.50 ± 1.7875.91 ± 2.2880.78 ± 0.4184.05 ± 0.39
Hillary ClintonCAPO80.10 ± 2.2279.45 ± 0.8178.01 ± 0.3978.50 ± 4.6583.14 ± 1.46
Hillary ClintonEvoPrompt(DE)83.03 ± 0.1077.90 ± 2.0578.58 ± 2.2179.40 ± 0.4283.36 ± 0.61
Hillary ClintonEvoPrompt(GA)80.88 ± 0.6777.54 ± 2.6979.32 ± 2.3181.98 ± 2.0682.63 ± 2.38
Hillary ClintonI80.13 ± 2.2775.49 ± 0.5483.67 ± 2.4780.77 ± 0.6784.13 ± 0.41
Hillary ClintonI+R80.47 ± 1.6275.34 ± 0.7882.58 ± 1.9780.82 ± 1.0184.47 ± 0.72
Hillary ClintonI+R+E82.65 ± 1.7477.71 ± 1.8083.93 ± 1.2179.75 ± 1.7984.68 ± 0.55
Legalization of abortionBase60.39 ± 0.7457.05 ± 1.1958.71 ± 0.5764.55 ± 1.0070.58 ± 0.73
Legalization of abortionBase+CoT62.10 ± 1.3957.02 ± 1.1562.44 ± 0.6866.52 ± 1.3565.16 ± 0.94
Legalization of abortionBase+FS64.12 ± 2.1056.16 ± 1.3162.24 ± 0.8067.05 ± 0.3165.16 ± 0.87
Legalization of abortionBase+CoT+FS63.06 ± 4.1056.88 ± 1.2066.93 ± 0.1564.13 ± 0.3261.56 ± 0.54
Legalization of abortionBase+CoS48.00 ± 4.5057.71 ± 1.4858.31 ± 0.1857.66 ± 0.4759.33 ± 0.61
Legalization of abortionOPRO66.65 ± 0.5959.47 ± 2.3259.44 ± 0.7664.51 ± 1.5369.53 ± 0.16
Legalization of abortionCAPO64.15 ± 2.1458.51 ± 1.2060.83 ± 0.2165.84 ± 1.6569.23 ± 0.68
Legalization of abortionEvoPrompt(DE)64.18 ± 0.1359.36 ± 0.5761.78 ± 0.9163.23 ± 0.9970.28 ± 2.47
Legalization of abortionEvoPrompt(GA)63.71 ± 2.5357.86 ± 3.3760.93 ± 0.6266.63 ± 1.4069.16 ± 1.18
Legalization of abortionI62.94 ± 2.7457.92 ± 1.9361.59 ± 1.4066.77 ± 2.3367.99 ± 1.27
Legalization of abortionI+R66.11 ± 0.5156.81 ± 1.6765.61 ± 1.6162.22 ± 6.2366.89 ± 0.38
Legalization of abortionI+R+E65.36 ± 0.7557.84 ± 1.5362.62 ± 0.4767.20 ± 1.4467.10 ± 0.30

Table 3 (PDF p. 18). Table T3: Per-target results on SemEval-2016 using Macro-F1. I = instruction-only; I+R = instruction + reasoning; I+R+E = instruction + per-example reasoning. Base = original prompt; CoT = chain-of-thought prompting; FS = few-shot prompting; CoS = Chain-of-Stance prompting. Values are mean ± standard deviation across three runs. Shaded cells indicate differences from the corresponding Base score: gray denotes improvements, red denotes decreases, and darker shades indicate larger absolute differences. The best score for each target across all models and methods is shown in bold.

Case 2: Against-Definition Freezing Failure

Dataset: SemEval-2016 Target: Atheism Tweet: “Remember, #God has it all worked out. #SemST”

Gold: against

Full I+R+E: against

Frozen: neutral

Case 3: Neutral-Definition Freezing Failure

Dataset: SemEval-2016 Target: Legalization of Abortion Tweet: “Like how can you sit there and even go through with the process #SemST”

Gold: neutral

Full I+R+E: neutral

Frozen: against

Qualitative Case Studies

To illustrate how the optimized prompts affect individual stance predictions, we examine representative cases in which optimization corrects errors made by the Base prompt. The examples highlight cases involving implicit stance and neutrality disambiguation, where different levels of optimization lead to different predictions.

Case 1: Implicit Environmental Advocacy with I

Dataset: SemEval-2016

Target: Climate Change is a Real Concern

Tweet: “grow food not lawns Lawns are Ecocide in your yard. #Patriarchy is Ecocide of your own species #DominoEffect #SemST”

Gold: favor Base: against I: favor

I+R: favor I+R+E: favor

Why optimization succeeds: The tweet implicitly supports environmental concerns despite its negative tone. While the Base prompt relies on surface sentiment and predicts against, the optimized variants correctly identify the underlying supportive stance.

Case 2: Neutrality Disambiguation with I+R

Dataset: SemEval-2016

Target: Climate Change is a Real Concern

Tweet: “Boni ‘Future Sea level rise will not be uniform & different for coasts’ #CCFC15 #Journey2015 #SemST”

Gold: favor Base: neutral I: neutral

I+R: favor I+R+E: favor

Why optimization succeeds: The tweet presents scientific evidence about climate change without explicit advocacy. While Base and I predict neutral, the reasoning-enhanced variants correctly identify the implicit supportive stance.

References

  1. [1]Marah Abdin, Jyoti Aneja, Harkirat Behl, Sébastien Bubeck, Ronen Eldan, Suriya G​​unasekar, Michael Harrison, Russell J. Hewett, Mojan Javaheripi, Piero Kauffmann, and 1 others. 2024. Phi-4 technical report. Technical Report MSR-TR-2024-57, Microsoft Research.
  2. [2]Rachith Aiyappa, Shruthi Senthilmani, Jisun An, Haewoon Kwak, and Yong-Yeol Ahn. 2024. Benchmarking zero-shot stance detection with FlanT5-XXL: Insights from training data, prompting, and decoding strategies into its near-SoTA performance. arXiv preprint arXiv:2403.00236.arxiv.org/abs/2403.00236
  3. [3]Abeer ALDayel and Walid Magdy. 2021. Stance detection on social media: State of the art and trends. Information Processing & Management, 58(4):102597.
  4. [4]Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, and 12 others. 2020. Language models are few-shot learners. In Advances in Neural Information Processing Systems, volume 33, pages 1877–1901.arxiv.org/abs/2005.14165
  5. [6]Jingbo Zhu. 2024. Efficient prompting methods for large language models: A survey. arXiv preprint arXiv:2404.01077.arxiv.org/abs/2404.01077
  6. [7]Jiuhai Chen, Lichang Chen, Heng Huang, and Tianyi Zhou. 2023a. When do you need chain-of-thought prompting for ChatGPT? arXiv preprint arXiv:2304.03262.arxiv.org/abs/2304.03262
  7. [8]Yuyan Chen, Zhihao Wen, Ge Fan, Zhengyu Chen, Wei Wu, Dayiheng Liu, Zhixu Li, Bang Liu, and Yanghua Xiao. 2023b. MAPO: Boosting large language model performance with model-adaptive prompt optimization. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 3279–3304, Singapore. Association for Computational Linguistics.arxiv.org/abs/2407.04118
  8. [9]Mingkai Deng, Jianyu Wang, Cheng-Ping Hsieh, Yihan Wang, Han Guo, Tianmin Shu, Meng Song, Eric Xing, and Zhiting Hu. 2022. RLPrompt: Optimizing discrete text prompts with reinforcement learning. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 3369–3391.arxiv.org/abs/2205.12548
  9. [10]Gemma Team, Aishwarya Kamath, Johan Ferret, Shreya Pathak, Nino Vieillard, Ramona Merhej, Sarah Perrin, Tatiana Matejovicova, Alexandre Ramé, Morgane Rivière, and 1 others. 2025. Gemma 3 technical report. arXiv preprint arXiv:2503.19786.
  10. [11]Kyle Glandt, Sarthak Khanal, Yingjie Li, Doina Caragea, and Cornelia Caragea. 2021. Stance detection in COVID-19 tweets. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 1596–1611. Association for Computational Linguistics.
  11. [12]Montgomery Gole, Williams-Paul Nwadiugwu, and Andriy Miranskyy. 2024. On sarcasm detection with OpenAI GPT-based models. In 2024 34th International Conference on Collaborative Advances in Software and COmputing (CASCON), pages 1–6. IEEE.DOI
  12. [13]Ilker Gül, Rémi Lebret, and Karl Aberer. 2024. Stance detection on social media with fine-tuned large language models. arXiv preprint arXiv:2404.12171.arxiv.org/abs/2404.12171
  13. [14]Qingyan Guo, Rui Wang, Junliang Guo, Bei Li, Kaitao Song, Xu Tan, Guoqing Liu, Jiang Bian, and Yang Liu. 2024. Connecting large language models with evolutionary algorithms yields powerful prompt optimizers. In The Twelfth International Conference on Learning Representations.
  14. [15]Nikesh Gyawali, Doina Caragea, Cornelia Caragea, and Saif M. Mohammad. 2025. The shifting landscape of vaccine discourse: Insights from a decade of pre- to post-COVID-19 vaccine posts on social media. PLOS ONE, 20(12):e0337911. Nikesh Gyawali, Iustin Sirbu, Tiberiu Sosea, Sarthak Khanal, Doina Caragea, Traian Rebe-dea, and Cornelia Caragea. 2024. GunStance: Stance detection for gun control and gun regulation. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 12027–12044. Association for Computational Linguistics.
  15. [16]Gurusha Juneja, Gautam Jajoo, Hua Li, Jian Jiao, Nagarajan Natarajan, and Amit Sharma. 2025. Task facet learning: A structured approach to prompt optimization. In Findings of the Association for Computational Linguistics: ACL 2025, pages 23473–23496, Vienna, Austria. Association for Computational Linguistics.
  16. [17]Omar Khattab, Arnav Singhvi, Paridhi Maheshwari, Zhiyuan Zhang, Keshav Santhanam, Sri Vardhamanan, Saiful Haq, Ashutosh Sharma, Thomas T. Joshi, Hanna Moazam, and 1 others. 2024. DSPy: Compiling declarative language model calls into state-of-the-art pipelines. In The Twelfth International Conference on Learning Representations.
  17. [18]Tushar Khot, Harsh Trivedi, Matthew Finlayson, Yao Fu, Kyle Richardson, Peter Clark, and Ashish Sabharwal. 2023. Decomposed prompting: A modular approach for solving complex tasks. In The Eleventh International Conference on Learning Representations.arxiv.org/abs/2210.02406
  18. [19]Takeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo, and Yusuke Iwasawa. 2022. Large language models are zero-shot reasoners. In Advances in Neural Information Processing Systems, volume 35, pages 22199–22213.arxiv.org/abs/2205.11916
  19. [20]Weize Kong, Spourthi Hombaiah, Mingyang Zhang, Qiaozhuo Mei, and Michael Bendersky. 2024. PREwrite: Prompt rewriting with reinforcement learning. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 594–601.
  20. [21]Dilek Küçük and Fazli Can. 2020. Stance detection: A survey. ACM Computing Surveys, 53(1):1–37.
  21. [22]Shanu Kumar, Akhila Yesantarao Venkata, Shubhanshu Khandelwal, Bishal Santra, Parag Agrawal, and Manish Gupta. 2025. SCULPT: Systematic tuning of long prompts. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 14996–15029, Vienna, Austria. Association for Computational Linguistics.arxiv.org/abs/2410.20788
  22. [23]Woojin Lee, Jaewook Lee, and Harksoo Kim. 2024. LOGIC: LLM-originated guidance for internal cognitive improvement of small language models in stance detection. PeerJ Computer Science, 10:e2585.DOI
  23. [24]Qiuyu Li, Zuhe Li, Weihua Liu, Xiaojiang He, and Yushan Pan. 2025. Sarcasm-GPT: Advancing sarcasm detection with large language models. The Computer Journal, 68(10):1523–1534.DOI
  24. [25]Ollie Liu, Deqing Fu, Dani Yogatama, and Willie Neiswanger. 2025a. DeLLMa: Decision making under uncertainty with large language models. In The Thirteenth International Conference on Learning Representations.arxiv.org/abs/2402.02392
  25. [26]Yuanye Liu, Jiahang Xu, Li Lynna Zhang, Qi Chen, Xuan Feng, Yang Chen, Zhongxin Guo, Yuqing Yang, and Peng Cheng. 2025b. Beyond prompt content: Enhancing LLM performance via content-format integrated prompt optimization. arXiv preprint arXiv:2502.04295.arxiv.org/abs/2502.04295
  26. [27]Yao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel, and Pontus Stenetorp. 2022. Fantastically ordered prompts and where to find them: Overcoming few-shot prompt order sensitivity. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 8086–8098.arxiv.org/abs/2104.08786
  27. [28]Junxia Ma, Changjiang Wang, Hanwen Xing, Dongming Zhao, and Yazhou Zhang. 2024. Chain of stance: Stance detection with large language models. In Natural Language Processing and Chinese Computing, pages 82–94. Springer.arxiv.org/abs/2408.04649
  28. [29]Meta. 2024. Llama-3.3-70b-instruct. Hugging Face model card.
  29. [30]Mistral AI. 2025. Mistral-small-3.2-24b-instruct-2506. Hugging Face model card.
  30. [31]Saif Mohammad, Svetlana Kiritchenko, Parinaz Sobhani, Xiaodan Zhu, and Colin Cherry. 2016. SemEval-2016 task 6: Detecting stance in tweets. In Proceedings of the 10th International Workshop on Semantic Evaluation (SemEval-2016), pages 31–41.DOI
  31. [32]OpenAI. 2025a. GPT-5 system card. OpenAI.
  32. [33]OpenAI. 2025b. Introducing gpt-oss. OpenAI.
  33. [34]Jinlong Pang, Jiacheng Wei, Ankit Parag Shah, Zhaowei Zhu, Yaxuan Wang, Chen Qian, Yang Liu, Yujia Bao, and Wei Wei. 2025. Improving data efficiency via curating LLM-driven rating systems. In The Thirteenth International Conference on Learning Representations.arxiv.org/abs/2410.10877
  34. [35]Lata Pangtey, Anukriti Bhatnagar, Shubhi Bansal, Shahid Shafi Dar, and Nagendra Kumar. 2025. Large language models meet stance detection: A survey of tasks, methods, applications, challenges and future directions. arXiv preprint arXiv:2505.08464.arxiv.org/abs/2505.08464
  35. [36]Reid Pryzant, Dan Iter, Jerry Li, Yin Lee, Chengguang Zhu, and Michael Zeng. 2023. Automatic prompt optimization with “gradient descent” and beam search. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 7957–7968, Singapore. Association for Computational Linguistics.
  36. [37]Kiran Ramnath, Kang Zhou, Sheng Guan, Soumya Smruti Mishra, Xuan Qi, Zhengyuan Shen, Shuai Wang, Sangmin Woo, Sullam Jeouung, Yawei Wang, and 1 others. 2025. A systematic survey of automatic prompt optimization techniques. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, pages 33078–33110. Association for Computational Linguistics.DOI
  37. [38]Tobias Schnabel and Jennifer Neville. 2024. Symbolic prompt program search: A structure-aware approach to efficient compile-time prompt optimization. In Findings of the Association for Computational Linguistics: EMNLP 2024, pages 670–686, Miami, Florida, USA. Association for Computational Linguistics.
  38. [39]Prith Sharma and Austin Z. Henley. 2026. Modular prompt optimization: Optimizing structured prompts with section-local textual gradients. arXiv preprint arXiv:2601.04055.arxiv.org/abs/2601.04055
  39. [40]Zhenmei Shi, Junyi Wei, Zhuoyuan Xu, and Yingyu Liang. 2024. Why larger language models do in-context learning differently? In Proceedings of the 41st International Conference on Machine Learning, pages 44991–45013.arxiv.org/abs/2405.19592
  40. [41]SungUk Shin and Youngjoon Kim. 2025. Enhancing graph of thought: Enhancing prompts with LLM rationales and dynamic temperature control. In The Thirteenth International Conference on Learning Representations.
  41. [42]Xinyu Tang, Xiaolei Wang, Wayne Xin Zhao, Siyuan Lu, Yaliang Li, and Ji-Rong Wen. 2025. Unleashing the potential of large language models as prompt optimizers: Analogical analysis with gradient-based model optimizers. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 39, pages 25264–25272.arxiv.org/abs/2402.17564
  42. [43]Maksym Taranukhin, Vered Shwartz, and Evangelos Milios. 2024. Stance reasoner: Zero-shot stance detection on social media with explicit reasoning. In Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024), pages 15257–15272, Torino, Italia. ELRA and ICCL.arxiv.org/abs/2403.14895
  43. [44]Prashant Trivedi, Souradip Chakraborty, Avinash Reddy, Vaneet Aggarwal, Amrit Singh Bedi, and George K. Atia. 2025. Align-pro: A principled approach to prompt optimization for llm alignment. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 39, pages 27653–27661.arxiv.org/abs/2501.03486
  44. [45]Xingchen Wan, Han Zhou, Ruoxi Sun, Hootan Nakhost, Ke Jiang, and Sercan Ö. Arık. 2025. From few to many: Self-improving many-shot reasoners through iterative optimization and generation. In The Thirteenth International Conference on Learning Representations.arxiv.org/abs/2502.00330
  45. [46]Song Wang, Zihan Chen, Chengshuai Shi, Cong Shen, and Jundong Li. 2024a. Mixture of demonstrations for in-context learning. Advances in Neural Information Processing Systems, 37:88091–88116.DOI
  46. [47]Xinyuan Wang, Chenxi Li, Zhen Wang, Fan Bai, Haotian Luo, Jiayou Zhang, Nebojsa Jojic, Eric P. Xing, and Zhiting Hu. 2024b. PromptAgent: Strategic planning with language models enables expert-level prompt optimization. In The Twelfth International Conference on Learning Representations.arxiv.org/abs/2310.16427
  47. [48]Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed Chi, Quoc V. Le, and Denny Zhou. 2022. Chain-of-thought prompting elicits reasoning in large language models. In Advances in Neural Information Processing Systems, volume 35, pages 24824–24837.arxiv.org/abs/2201.11903
  48. [49]On Tai Wu, Frodo Kin Sun Chan, Zunhao Zhang, Yan Nei Law, Benny Drescher, and Edmond Shiao Bun Lai. 2024. Prompt selection and augmentation for few examples code generation in large language model and its application in robotics control. arXiv preprint arXiv:2403.12999.arxiv.org/abs/2403.12999
  49. [50]Hiromu Yakura. 2024. Evaluating large language models’ ability using a psychiatric screening tool based on metaphor and sarcasm scenarios. Journal of Intelligence, 12(7):70.DOI
  50. [51]Chengrun Yang, Xuezhi Wang, Yifeng Lu, Hanxiao Liu, Quoc V. Le, Denny Zhou, and Xinyun Chen. 2024. Large language models as optimizers. In The Twelfth International Conference on Learning Representations.arxiv.org/abs/2309.03409
  51. [52]Tom Zehle, Moritz Schlager, Timo Heiẞ, and Matthias Feurer. 2025. CAPO: Cost-aware prompt optimization. In Proceedings of the Fourth International Conference on Automated Machine Learning, volume 293 of Proceedings of Machine Learning Research, pages 18/1–45. PMLR.arxiv.org/abs/2504.16005
  52. [53]Weihao Zeng, Can Xu, Yingxiu Zhao, Jian-Guang Lou, and Weizhu Chen. 2024. Automatic instruction evolving for large language models. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 6998–7018. Association for Computational Linguistics.arxiv.org/abs/2406.00770

Paper details

vlnc:W_qsscusvy
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC0-1.0
Usage

views · 11

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents