SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.12353 · ICLR · 2023

Leveraging Large Language Models for Multiple Choice Question Answering

Joshua Robinson, David Wingate, Christopher Rytting

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 3 failures of our instrument; 1 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2210.12353.json · badge: /api/ran/2210.12353.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
byu-pccl/leveraging-llms-for-mcqa canonical (classifier label)
classifier basis: classifier_2025
6 ran · 1 no recorded run
FunctionStatusWhere it lives
div_dicts Ran
ran; our contract draft was wrong, not the code
byu-pccl/leveraging-llms-for-mcqa/analyze.py
code served (permissive licence) · get_code("67b75ad99c5cf1ea")
How it ran

Ran in Syntology's jail 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. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-05T00:12:56Z). 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
import numpy as np

torch.manual_seed(0)

# The function div_dicts takes two dictionaries and divides values from a by values from b
# where keys exist in both dictionaries

# Create two dictionaries with numeric values (tensors or scalars)
a = {
    'loss': torch.tensor(10.0),
    'accuracy': torch.tensor(8.0),
    'f1_score': torch.tensor(4.0),
    'shared_key': torch.tensor(6.0)
}

b = {
    'loss': torch.tensor(2.0),
    'accuracy': torch.tensor(4.0),
    'f1_score': torch.tensor(2.0),
    'other_key': torch.tensor(5.0)
}

ARGS = {
    'a': a,
    'b': b
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, 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
ModelResponseBrown Ran
ran on a synthesized input · constructed an object; no result was computed
byu-pccl/leveraging-llms-for-mcqa/models.py
code served (permissive licence) · get_code("71d3ab2ff4c490ef")
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 an instance of its own class, ModelResponseBrown: the run constructed the object and did not call it, so no result was computed. 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
import numpy as np
from dataclasses import dataclass

torch.manual_seed(0)

# Create sample logprobs dict with tensor values
logprobs = {
    "token_0": torch.randn(2, 4),
    "token_1": torch.randn(2, 4),
}

# Create sample unconditional_logprobs dict with tensor values
unconditional_logprobs = {
    "token_0": torch.randn(2, 4),
    "token_1": torch.randn(2, 4),
}

# Create sample lens dict with integer values
lens = {
    "sequence_0": 5,
    "sequence_1": 7,
}

# Create sample response_list with string responses
response_list = [
    "This is the first response.",
    "This is the second response.",
]

ARGS = {
    "logprobs": logprobs,
    "unconditional_logprobs": unconditional_logprobs,
    "lens": lens,
    "response_list": response_list,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ModelResponseBrown — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ModelResponseBrown 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
ModelResponseNatural Ran
ran on a synthesized input · constructed an object; no result was computed
byu-pccl/leveraging-llms-for-mcqa/models.py
code served (permissive licence) · get_code("2958e1515ddcc220")
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 an instance of its own class, ModelResponseNatural: the run constructed the object and did not call it, so no result was computed. 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
import numpy as np
from dataclasses import dataclass

torch.manual_seed(0)

@dataclass
class ModelResponseNatural:
    logprobs: dict
    response_list: list

# Construct logprobs dict with reasonable structure
logprobs_dict = {
    "tokens": torch.tensor([0.1, 0.2, 0.3, 0.4]),
    "scores": torch.tensor([[-1.2, -0.8, -0.5], [-0.9, -1.1, -0.7]]),
    "metadata": {"model": "test_model", "version": 1}
}

# Construct response_list with sample responses
response_list = [
    "This is the first response from the model.",
    "This is the second response.",
    "Another test response here."
]

ARGS = {
    "logprobs": logprobs_dict,
    "response_list": response_list
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ModelResponseNatural — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ModelResponseNatural 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
OpenAIModel Ran
ran on a synthesized input · constructed an object; no result was computed
byu-pccl/leveraging-llms-for-mcqa/models.py
code served (permissive licence) · get_code("c1b930477c5d6126")
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 an instance of its own class, OpenAIModel: the run constructed the object and did not call it, so no result was computed. 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 openai
from unittest.mock import Mock, MagicMock

# Create a mock API key
MOCK_API_KEY = "sk-test-1234567890"

# Create a mock question object with required methods
class MockQuestion:
    def __init__(self):
        self.choices = ["Option A", "Option B", "Option C", "Option D"]
    
    def get_natural_prompt(self):
        return "What is the answer to this question?"
    
    def get_brown_prompt(self):
        return "The correct answer is"

# Mock the OpenAI API response structure
def create_mock_response(token_logprobs=None, top_logprobs=None):
    if token_logprobs is None:
        token_logprobs = [-0.5, -0.3, -0.2, -0.1, -0.4, -0.6]
    if top_logprobs is None:
        top_logprobs = [{"A": -0.1, "B": -0.5, "C": -0.8}]
    
    response = {
        "id": "cmpl-test",
        "object": "text_completion",
        "created": 1234567890,
        "model": "text-davinci-003",
        "choices": [
            {
                "text": " A",
                "index": 0,
                "logprobs": {
                    "tokens": ["Answer", ":", "A"],
                    "token_logprobs": token_logprobs,
                    "top_logprobs": [top_logprobs[0] if i == 0 else {chr(65 + i): -1.0} for i in range(len(token_logprobs))]
                },
                "finish_reason": "length"
            }
        ]
    }
    return response

# Patch openai.Completion.create to return mock responses
def mock_completion_create(**kwargs):
    token_count = 6
    return create_mock_response(
        token_logprobs=[-0.5] * token_count,
        top_logprobs=[{"A": -0.1, "B": -0.5, "C": -0.8}]
    )

openai.Completion.create = Mock(side_effect=mock_completion_create)

ARGS = {
    "api_key": MOCK_API_KEY,
    "model_name": "text-davinci-003",
    "add_space": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type OpenAIModel — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a OpenAIModel 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
idx_to_ltr Ran
ran; our contract draft was wrong, not the code
byu-pccl/leveraging-llms-for-mcqa/models.py
code served (permissive licence) · get_code("f28d8d5956acb8c3")
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 torch

torch.manual_seed(0)

ARGS = {
    "idx": 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — 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
sub_dicts Ran
ran; our contract draft was wrong, not the code
byu-pccl/leveraging-llms-for-mcqa/analyze.py
code served (permissive licence) · get_code("d59587e584260e45")
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
import numpy as np

torch.manual_seed(0)

# The function sub_dicts takes two dictionaries and subtracts values from b from values in a
# for keys that exist in both dictionaries.

# Create two dictionaries with numeric values (tensors or scalars)
a = {
    'key1': torch.tensor([1.0, 2.0, 3.0, 4.0]),
    'key2': torch.tensor([5.0, 6.0, 7.0, 8.0]),
    'key3': 10.0,
}

b = {
    'key1': torch.tensor([0.5, 0.5, 0.5, 0.5]),
    'key2': torch.tensor([1.0, 1.0, 1.0, 1.0]),
    'key4': 100.0,  # This key is not in a, so it won't be included in result
}

ARGS = {
    'a': a,
    'b': b,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, 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
prep_openai_obj_for_save Not yet run
unverified (harvested, no recorded run)
byu-pccl/leveraging-llms-for-mcqa/models.py
code served (permissive licence) · get_code("c9e7770d2454f7d5")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 6 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
idx_to_ltr
brick of this paper's assembly: helper
2 other papers
2 later
2310.10195 (2023-10)
AdaLomo: Low-memory Optimization with Adaptive Learning Rate
2024.findings-acl.742 (2024 (year only))
AdaLomo: Low-memory Optimization with Adaptive Learning Rate

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-22.

Repositories linked to this paper

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

Abstract

While large language models (LLMs) like GPT-3 have achieved impressive results on multiple choice question answering (MCQA) tasks in the zero, one, and few-shot settings, they generally lag behind the MCQA state of the art (SOTA). MCQA tasks have traditionally been presented to LLMs like cloze tasks. An LLM is conditioned on a question (without the associated answer options) and its chosen option is the one assigned the highest probability after normalization (for length, etc.). A more natural prompting approach is to present the question and answer options to the LLM jointly and have it output the symbol (e.g., "A") associated with its chosen answer option. This approach allows the model to explicitly compare answer options, reduces computational costs, and mitigates the effects of tokenization scheme and answer option representations on answer selection. For the natural approach to be effective, the LLM it is used with must be able to associate answer options with the symbols that represent them. The LLM needs what we term multiple choice symbol binding (MCSB) ability. This ability varies greatly by model. We show that a model with high MCSB ability performs much better with the natural approach than with the traditional approach across 20 diverse datasets and largely closes the gap with the SOTA, suggesting that the MCQA ability of LLMs has been previously underestimated.

For agents

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

get_harvested_code_for_paper("2210.12353")
get_code_for_paper("2210.12353")
have("2210.12353")

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

curl https://syntology.ai/api/ran/2210.12353.json

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

[![Syntology run record](https://syntology.ai/api/ran/2210.12353.svg)](https://syntology.ai/paper/2210.12353)

Connect an agent — have() is free.