Vote-K is an advanced prompt engineering technique that uses graph-based analysis to select the most effective examples for few-shot learning. Unlike random selection, Vote-K identifies representative, diverse, and challenging examples to boost large language model (LLM) accuracy while reducing labeling costs.
How Vote-K Works
- Embed all unlabeled examples into a vector space using a language model.
- Build a graph where nodes are examples, edges connect similar pairs (measured by cosine similarity).
- Cluster the graph to find groups of similar examples.
- Score examples based on centrality and cluster diversity.
- Select the top K examples that best represent the dataset and are most informative for the model.
Why It Matters
- Improves LLM performance with fewer, better examples.
- Reduces manual labeling costs.
- Outperforms random shot selection and KNN prompting.
Ideal for
AI engineers, prompt engineers, data scientists, NLP specialists, and researchers looking to optimize LLM outputs.