SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2025.findings-acl.744 · ACL Findings · 2025

Ranked Voting based Self-Consistency of Large Language Models

Hui Huang, Yile Wang, Weiqin Wang

Open in the Atlas

Code that ran

8 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 3 failures of our instrument; 1 no recorded run), measured 2026-11-24; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2025.findings-acl.744.json · badge: /api/ran/2025.findings-acl.744.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
szu-tera/RankedVotingSC canonical (classifier label)
classifier basis: census
8 ran · 1 no recorded run
FunctionStatusWhere it lives
filter_keys Ran
ran on a synthesized input
szu-tera/RankedVotingSC/evaluate.py
code served (permissive licence) · get_code("e50d2bff2f781aab")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import tempfile
import os

# Create a temporary JSON file with test data
temp_dir = tempfile.mkdtemp()
input_file = os.path.join(temp_dir, 'test_data.json')

test_data = [
    {
        'doc_id': 'doc_001',
        'target': 'target_text_1',
        'resps': ['response_1', 'response_2'],
        'extra_field': 'should_be_filtered_out'
    },
    {
        'doc_id': 'doc_002',
        'target': 'target_text_2',
        'resps': ['response_3'],
    },
    {
        'doc_id': 'doc_003',
        'resps': ['response_4', 'response_5'],
    }
]

with open(input_file, 'w', encoding='utf-8') as f:
    json.dump(test_data, f)

ARGS = {
    'input_file': input_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
generate_answer_from_model Ran
ran on a synthesized input
szu-tera/RankedVotingSC/evaluate.py
code served (permissive licence) · get_code("ac6e1cf421d6809c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

# Construct arguments for generate_answer_from_model

# resps: list of strings containing model responses
resps = [
    "The answer is: (A) because of the reasoning",
    "The result is: (B) and here's why",
    "invalid response without pattern"
]

# index: integer index into resps list
index = 1

# reg: regex pattern to search for and extract answer
reg = r'is:\s*\((\w)\)'

ARGS = {
    'resps': resps,
    'index': index,
    'reg': reg
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_result Ran
ran, honoured the contract we drafted
szu-tera/RankedVotingSC/lm-evaluation-harness/lm_eval/models/gguf.py
pointer only (licence: MIT); the stored copy get_code serves, from MrGGLS/BlockPruner, is pointer only (licence: NONE) · get_code("53354f082d9addc6")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from MrGGLS/BlockPruner, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_sample_size Ran
ran, honoured the contract we drafted
szu-tera/RankedVotingSC/lm-evaluation-harness/lm_eval/evaluator_utils.py
code served (permissive licence) · get_code("00f5e7d9ee6636ba")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import math
from typing import List, Optional, Tuple, Union

class MockTask:
    def __init__(self):
        self.eval_docs = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

task = MockTask()

ARGS = {
    "task": task,
    "limit": 0.5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
hash_args Ran
ran; our contract draft was wrong, not the code
szu-tera/RankedVotingSC/lm-evaluation-harness/lm_eval/api/model.py
code served (permissive licence) · get_code("20a7cc804eb22661")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import hashlib
import json

# Construct valid arguments for hash_args function
# The function takes attr (attribute name) and args (tuple/list of arguments)
# and creates a JSON string to hash

attr = "test_attribute"
args = ("value1", 42, [1, 2, 3], {"key": "value"})

ARGS = {
    "attr": attr,
    "args": args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
match_letters Ran
ran on a synthesized input
szu-tera/RankedVotingSC/evaluate.py
code served (permissive licence) · get_code("1be987af1b75004a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

raw_text = """The most likely place where a revolving door would be used as a security measure is a bank. Banks often have revolving doors to control access and limit the number of people entering and exiting at any given time, enhancing security. While other options might have revolving doors, their primary purpose isn't necessarily security.

**So the answer is (A). The ranking of options by likelihood is: A > D > C > B > E.**"""

pattern = r'answer is \[*\]\((\w)\)'

ARGS = {
    'raw_text': raw_text,
    'pattern': pattern
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_eval_args Ran
ran; our contract draft was wrong, not the code
szu-tera/RankedVotingSC/lm-evaluation-harness/lm_eval/__main__.py
pointer only (licence: MIT); the stored copy get_code serves, from BatsResearch/crosslingual-test-time-scaling, is pointer only (licence: NONE) · get_code("400ea4f64ccce5ef")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from BatsResearch/crosslingual-test-time-scaling, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

request_caching_arg_to_dict Ran
ran; our contract draft was wrong, not the code
szu-tera/RankedVotingSC/lm-evaluation-harness/lm_eval/evaluator.py
code served (permissive licence) · get_code("c44830a7722ff5f7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

ARGS = {
    'cache_requests': 'true'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
try_parse_json Not yet run
unverified (harvested, no recorded run)
szu-tera/RankedVotingSC/lm-evaluation-harness/lm_eval/__main__.py
code served (permissive licence) · get_code("06b670bf334b8d88")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 6 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 5 later) and 3 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
hash_args 44 other papers
26 dated earlier, 7 later, 10 same year, order not determinable, 1 undated
2005.14165 (2020-05)
Language Models are Few-Shot Learners
2110.04374 (2021-10)
A Few More Examples May Be Worth Billions of Parameters
2303.17003 (2023-03)
Evaluating GPT-3.5 and GPT-4 Models on Brazilian University Admission Exams
and 41 more not named here
request_caching_arg_to_dict 17 other papers
5 dated earlier, 7 later, 5 same year, order not determinable
2005.14165 (2020-05)
Language Models are Few-Shot Learners
2405.07938 (2024-05)
EconLogicQA: A Question-Answering Benchmark for Evaluating Large Language Models in Economic Sequential Reasoning
2411.07176 (2024-11)
More Expressive Attention with Negative Weights
and 14 more not named here
parse_eval_args 15 other papers
7 dated earlier, 3 later, 4 same year, order not determinable, 1 undated
2005.14165 (2020-05)
Language Models are Few-Shot Learners
2024.findings-emnlp.86 (2024 (year only))
Tokenization Falling Short: On Subword Robustness in Large Language Models
2405.07938 (2024-05)
EconLogicQA: A Question-Answering Benchmark for Evaluating Large Language Models in Economic Sequential Reasoning
and 12 more not named here
get_sample_size 12 other papers
3 dated earlier, 7 later, 2 same year, order not determinable
2005.14165 (2020-05)
Language Models are Few-Shot Learners
2405.07938 (2024-05)
EconLogicQA: A Question-Answering Benchmark for Evaluating Large Language Models in Economic Sequential Reasoning
2412.14171 (2024-12)
Thinking in Space: How Multimodal Large Language Models See, Remember, and Recall Spaces
and 9 more not named here
get_result 4 other papers
4 dated earlier
2005.14165 (2020-05)
Language Models are Few-Shot Learners
2312.15838 (2023-12)
SecQA: A Concise Question-Answering Dataset for Evaluating Large Language Models in Computer Security
2405.07938 (2024-05)
EconLogicQA: A Question-Answering Benchmark for Evaluating Large Language Models in Economic Sequential Reasoning
and 1 more not named here
try_parse_json 4 other papers
2 later, 1 same year, order not determinable, 1 undated
2502.05171 (2025-02)
Scaling up Test-Time Compute with Latent Reasoning: A Recurrent Depth Approach
2601.02236 (2026-01)
CD 4 LM: Consistency Distillation and aDaptive Decoding for Diffusion Language Models
2601.22527 (2026-01)
ρ-EOS: Training-free Bidirectional Variable-Length Control for Masked Diffusion LLMs
and 1 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Majority voting is considered an effective method to enhance chain-of-thought reasoning, as it selects the answer with the highest "self-consistency" among different reasoning paths (Wang et al., 2023). However, previous chain-of-thought reasoning methods typically generate only a single answer in each trial, thereby ignoring the possibility of other potential answers. As a result, these alternative answers are often overlooked in subsequent voting processes. In this work, we propose to generate ranked answers in each reasoning process and conduct ranked voting among multiple ranked answers from different responses, thereby making the overall self-consistency more reliable. Specifically, we use three ranked voting methods: Instant-runoff voting, Borda count voting, and mean reciprocal rank voting. We validate our methods on six datasets, including three multiple-choice and three openended question-answering tasks, using both advanced open-source and closed-source large language models. Extensive experimental results indicate that our proposed method outperforms the baselines, showcasing the potential of leveraging the information of ranked answers and using ranked voting to improve reasoning performance. The code is available at https: //github.com/szu-tera/RankedVotingSC.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2025.findings-acl.744")
get_code_for_paper("2025.findings-acl.744")
have("2025.findings-acl.744")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2025.findings-acl.744.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2025.findings-acl.744.svg)](https://syntology.ai/paper/2025.findings-acl.744)

Connect an agent — have() is free.