ClusterFewshot: Improving Few-shot Optimization for LLMs workflow
Abstract
The performance of large language model (LLM) workflows often depends on selecting a small set of in-context demonstrations to guide model behavior on new tasks. Recent methods improve this process by augmenting prompts with successful reasoning paths. However, their demonstration selection relies on random sampling or metric-based rankings, overlooking the semantic structure of the task. We propose ClusterFewshot, a strategy that combines semantic structuring with utility-aware scoring to construct representative and effective few-shot demonstration sets. Evaluated within DSPy-based pipelines, ClusterFewshot substantially reduces optimization cost across multiple benchmarks, while consistently improving accuracy relative to prior bootstrap-based methods in both standalone prompt tuning and hybrid prompt-weight optimization.
Create a lesson
Related papers
Assessing Readability with LLMs: The Role of Reasoning and Few-Shot Prompting
Shared title terminologycs.CLRaphaël Thieffry, Matej Martinc
Complementary Roles of Activation and Parametric Memory in Few-Shot Learning
Shared title terminologycs.CLMiaohe Niu, Runsong Zhao, Xinyu Liu et al.
What Changes When Fact-Verification Scores Improve? Evidence and Answer Accounting Across Trained Verifiers and LLMs
Shared title terminologycs.CLHan Chen, Yingrui Li
ToneCL: Contrastive Learning for Few-Shot Syllable-Level Tone Classification
Shared title terminologycs.CLQisheng Liao, Youngah Do
How resampling method can help us: Improving the Delta model
Shared title terminologycs.CLJacques Savoy
Reliable User Simulation in Complex Multi-Step Workflows
Shared title terminologycs.CLPusala Pavan Teja, Jayasimha Talur, Saab Mansour et al.