Chapter 141 / 4
Reasoning & Test-Time Compute
Implement self-consistency: sample CoTs, extract answers, return the majority vote
Easy
Target interface
self_consistency(prompt, sample_cot, extract_answer, n=16)Implement the function/class skeleton in the editor. Any correct approach is accepted.
Hints0 / 2
Reference solution
Your own code stays in the editor.