**Voting**. Let \(A\) represent the final answer. In this phase, we employ majority voting to consolidate the response sample set \(S\) into the final answer \(A\). This involves calculating the cumulative similarity for each sample relative to the others, denoted as \(V(s_{i})=\sum_{j=1,j\neq i}^{N}sim(s_{i},s_{j})\). For open-ended generation tasks such as code generation, the BLEU score (Papineni et al., 2002) is utilized to quantify similarity. Conversely, for close-ended tasks like multiple-choice questions, similarity is measured by occurrence frequency. The sample that exhibits the highest cumulative similarity is then chosen as the final answer denoted as \(A=\operatorname*{arg\,max}_{s_{i}\in S}V(s_{i})\).