Course contentsShow
← Machine Learning and Deep Learning
Lesson 1881 of 3,53840. Advanced Prompting TechniquesFree lesson

Weighted Voting Strategies

Assigning confidence scores or weights to different reasoning paths before aggregating votes for final prediction.

Weighted Voting Strategies

You'll learn how to improve self-consistency by assigning confidence scores to different reasoning paths before combining their predictions.

The Core Idea

In majority voting (our previous lesson), every reasoning path gets an equal say in the final answer—like a simple democracy where each vote counts the same. But what if some reasoning paths are more trustworthy than others? Weighted voting assigns confidence scores or weights to each path, so better-quality reasoning contributes more to the final decision.

Think of it like polling experts: you might count a renowned specialist's opinion more heavily than a novice's, even though both get to vote.

How It Works

After generating multiple reasoning paths (with temperature sampling), instead of counting votes equally, you:

  1. Assign weights to each path based on quality signals
  2. Aggregate weighted votes rather than simple counts
  3. Select the answer with the highest weighted support

Common Weighting Strategies

  • Log probability scores: Use the model's own confidence (sum of token log-probs for the entire response)
  • Reasoning length: Longer, more detailed explanations might indicate more careful thinking
  • Self-evaluation: Ask the model to rate its own confidence (0-10 scale)
  • Verifier models: Train a separate classifier to score reasoning quality
  • Consistency checks: Paths that align with verified facts get higher weights

Why It Matters

Weighted voting prevents low-quality reasoning paths from diluting strong ones. If 3 high-confidence paths say "42" and 4 low-confidence, rambling paths say "17," weighted voting will correctly favor "42" while simple majority voting would choose "17."

Key Takeaway: Weighted voting amplifies high-quality reasoning paths by assigning confidence scores before aggregation, leading to more reliable final predictions than treating all paths equally.