SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.02919 · IJCAI · 2024

MultifacetEval: Multifaceted Evaluation to Probe LLMs in Mastering Medical Knowledge

Yuxuan Zhou, Ji Wu, Xien Liu, Chen Ning

arXiv · PDF · Open in the Atlas

Code that ran

20 of 24 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; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 20 failures of our instrument; 4 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-24; 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/2406.02919.json · badge: /api/ran/2406.02919.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
thumlp/multifaceteval canonical (classifier label)
classifier basis: census
20 ran · 3 no recorded run
THUMLP/MultifacetEval community
Papers with Code archive
0 ran · 1 no recorded run
FunctionStatusWhere it lives
load_data Ran
ran; our contract draft was wrong, not the code
thumlp/multifaceteval/evaluate_gemini_medqa_ao.py
pointer only (licence: MIT); the stored copy get_code serves, from thumlp/multicogeval, is pointer only (licence: NONE) · get_code("8dadf8eedaeb7704")
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 thumlp/multicogeval, 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.

answer_vote Ran
ran; our contract draft was wrong, not the code
thumlp/multifaceteval/MAQ_answer_analysis_medqa_cotsc.py
code served (permissive licence) · get_code("1914087ade7e8bca")
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 random

# Read the function to understand what it expects:
# - preds: an iterable of items
# - each item in preds is iterable (can be sorted)
# - items are joined with ',' so they should be strings or convertible to strings

# Construct test data for preds
# preds should be a list of lists/iterables where each element can be sorted and joined

preds = [
    ['apple', 'banana'],
    ['apple', 'banana'],
    ['cherry', 'date'],
    [],
    ['apple', 'banana'],
]

ARGS = {
    'preds': preds
}
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
answer_vote Ran
ran; our contract draft was wrong, not the code
thumlp/multifaceteval/TFQ_answer_analysis_medqa_cotsc.py
code served (permissive licence) · get_code("bad8bcc825e86b66")
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 random

def answer_vote(answers):
    ans_cnt = [0, 0]
    for one in answers:
        if one == 'T':
            ans_cnt[0] += 1
        else:
            ans_cnt[1] += 1
    if ans_cnt[0] > ans_cnt[1]:
        ans = 'T'
    elif ans_cnt[0] < ans_cnt[1]:
        ans = 'F'
    else:
        ans = random.choice(['T', 'F'])
    if sum(ans_cnt) == 0:
        return None
    else:
        return ans


ARGS = {
    'answers': ['T', 'F', 'T', 'T']
}
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
cal_relative_performance Ran
ran; our contract draft was wrong, not the code
thumlp/multifaceteval/analysis.py
code served (permissive licence) · get_code("eaec6bcf4919e973")
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 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

torch.manual_seed(0)

# Construct valid arguments for cal_relative_performance
results = {
    'Model': 'TestModel',
    'Comparison': [0.3, 0.4, 0.5],
    'Discrimination': [0.05, 0.1, 0.15],
    'Verification': [0.6, 0.7, 0.8],
    'Rectification': [0.25, 0.35, 0.45]
}

ARGS = {
    'results': results
}
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 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
chating Ran
ran; our contract draft was wrong, not the code
thumlp/multifaceteval/evaluate_gemini_medqa_ao.py
code served (permissive licence) · get_code("4310ef2a5f4665b3")
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
import torch.nn as nn

class MockGeminiResponse:
    def __init__(self, text_content, blocked=False):
        self.text = text_content
        self.prompt_feedback = MockFeedback(blocked)

class MockFeedback:
    def __init__(self, blocked=False):
        self.block_reason = 'BlockReason.BLOCK_REASON_UNSPECIFIED' if not blocked else 'BlockReason.BLOCK_BLOCKED'
    
    def __str__(self):
        return self.block_reason

class MockGeminiModel:
    def __init__(self, use_sorry=False, block_content=False):
        self.use_sorry = use_sorry
        self.block_content = block_content
        self.call_count = 0
    
    def generate_content(self, text):
        self.call_count += 1
        if self.block_content:
            return MockGeminiResponse("", blocked=True)
        
        if self.use_sorry and self.call_count <= 1:
            return MockGeminiResponse("sorry I cannot help")
        
        return MockGeminiResponse("Answer: true")

dev_data_tfq = [
    (0, "Is the sky blue?", "Is the sky not blue?", "T", "F"),
    (1, "Is water wet?", "Is water dry?", "T", "F"),
    (2, "Can birds fly?", "Can birds not fly?", "T", "F"),
]

dev_data_mcq = [
    (0, "What color is the sky? A) Blue B) Red", "A"),
    (1, "What is 2+2? A) 4 B) 5", "A"),
    (2, "What is the capital of France? A) Paris B) London", "A"),
]

dev_data_maq = [
    (0, "Which are fruits?", "Which are not fruits?", ["apple", "banana"], ["carrot"]),
    (1, "Select even numbers", "Select odd numbers", ["2", "4"], ["1", "3"]),
]

dev_data_fib = [
    (0, "The capital of France is ____", ["Paris"]),
    (1, "2 + 2 = ____", ["4"]),
]

dev_data_rq = [
    (0, "The sky is blue", ["T"]),
    (1, "The sky is green", ["F", "The sky is blue"]),
]

model = MockGeminiModel(use_sorry=False, block_content=False)

ARGS = {
    "tmp_input": "What is 1+1?\nAnswer: ",
    "dev_data": dev_data_tfq,
    "neg": False,
    "num_examples": 2,
    "model": model,
    "task": "TFQ",
    "repeat": 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
chating Ran
ran; our contract draft was wrong, not the code
thumlp/multifaceteval/evaluate_gemini_medqa_cotsc.py
code served (permissive licence) · get_code("e0a0dd11c62a40fc")
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
import numpy as np
from unittest.mock import MagicMock

torch.manual_seed(0)

# Create mock model that has generate_content method
class MockModel:
    def generate_content(self, input_text):
        # Return a mock response object
        response = MagicMock()
        response.prompt_feedback = MagicMock()
        response.prompt_feedback.block_reason = 'BlockReason.BLOCK_REASON_UNSPECIFIED'
        response.text = "Answer: The reasoning is clear. Therefore, the answer is: true"
        return response

# Create dev_data based on task requirements
# Each item is a tuple with indices that prepare_examples accesses
# For TFQ/TFQ_options: [0, 1(ques/neg_ques), 2(neg_ques), 3(ans/neg_ans), 4(neg_ans), 5(cot/neg_cot), 6(neg_cot)]
# For MCQ: [0, 1(ques), 2(ans), 3(cot)]
# For MAQ: [0, 1(ques/neg_ques), 2(neg_ques), 3(ans/neg_ans), 4(neg_ans), 5(cot/neg_cot), 6(neg_cot)]
# For RQ: [0, 1(ques), 2(ans), 3(cot)]

dev_data_tfq = [
    (0, "Is the sky blue?", "Is the sky red?", "T", "F", "Because it reflects light", "Because it absorbs light"),
    (1, "Is water wet?", "Is water dry?", "T", "F", "Water is a liquid", "Water is solid"),
    (2, "Is fire hot?", "Is fire cold?", "T", "F", "Fire produces heat", "Fire absorbs heat"),
]

dev_data_mcq = [
    (0, "What color is the sky?", "Blue", "The sky appears blue due to Rayleigh scattering"),
    (1, "What is 2+2?", "4", "Adding two and two gives four"),
    (2, "What is water?", "Liquid", "Water in normal conditions is a liquid"),
]

dev_data_maq = [
    (0, "Which are fruits?", "Which are vegetables?", ["apple", "banana"], ["carrot"], "Fruits grow on trees", "Vegetables grow in soil"),
    (1, "Which are colors?", "Which are shapes?", ["red", "blue"], ["circle"], "Red and blue are colors", "Circle is a shape"),
    (2, "Which are animals?", "Which are plants?", ["dog", "cat"], ["tree"], "Dogs and cats are animals", "Trees are plants"),
]

dev_data_rq = [
    (0, "Is 2+2=4?", ("T", "Correct"), "Addition of two and two results in four"),
    (1, "Is water gas?", ("F", "Water is liquid"), "Water is commonly found as liquid at room temperature"),
    (2, "Is the sun a planet?", ("F", "The sun is a star"), "The sun is the central star of our solar system"),
]

# Create mock response for chating
model = MockModel()

tmp_input = "Is ice cold?\nAnswer:"

ARGS = {
    'tmp_input': tmp_input,
    'dev_data': dev_data_tfq,
    'neg': False,
    'num_examples': 2,
    'model': model,
    'task': 'TFQ',
    'repeat': 0,
}
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 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
chating Ran
ran; our contract draft was wrong, not the code
thumlp/multifaceteval/evaluate_gpt_medqa_ao.py
code served (permissive licence) · get_code("20ea85577d06ac6d")
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 openai
import time

def prepare_examples(dev_data, neg, nums, task):
    tmp = ''
    if task == 'TFQ' or task == 'TFQ_options':
        for one in dev_data[:nums]:
            ques = one[1] if not neg else one[2]
            ans = one[3] if not neg else one[4]
            if isinstance(ans, list):
                ans = ['true' if w == 'T' else 'false' for w in ans]
                ans = '、'.join(ans)
            else:
                ans = 'true' if ans == 'T' else 'false'
            tmp += ques + '\nAnswer: ' + ans + '\n\n'
    elif task == 'MCQ':
        for one in dev_data[:nums]:
            ques = one[1]
            ans = one[2]
            tmp += ques + '\nAnswer: ' + ans + '\n\n'
    elif task == 'MAQ':
        for one in dev_data[:nums]:
            ques = one[1] if not neg else one[2]
            ans = one[3] if not neg else one[4]
            if isinstance(ans, list):
                ans = ','.join(ans)
            tmp += ques + '\nAnswer: ' + ans + '\n\n'
    elif task == 'FIB':
        for one in dev_data[:nums]:
            ques = one[1]
            ans = one[2]
            if isinstance(ans, list):
                ans = ','.join(ans)
            tmp += ques + '\nAnswer: ' + ans + '\n\n'
    elif task == 'RQ':
        for one in dev_data[:nums]:
            ques = one[1]
            ans = one[2]
            if ans[0] == 'T':
                tmp += ques + '\nAnswer: correct' + '\n\n'
            else:
                tmp += ques + '\nAnswer: incorrect, the correct answer is ' + ans[1] + '\n\n'
    return tmp

def chating(tmp_input, dev_data, neg, num_examples, model, task, repeat=0):
    max_token = 200
    try:
        demonstration = prepare_examples(dev_data, neg, num_examples, task)
        input_text = 'Please complete the final sample with the same format as the given examples.' + demonstration + tmp_input
        reply = openai.ChatCompletion.create(model=model, messages=[{'role': 'system', 'content': 'You are a helpful assistant.'}, {'role': 'user', 'content': input_text}], max_tokens=max_token)
        if reply.choices[0]['finish_reason'] == 'content_filter':
            return 'content filter'
        reply = reply.choices[0]['message']['content']
    except Exception:
        if repeat == 5:
            return 'time limit exceed'
        time.sleep(1)
        reply = chating(tmp_input, dev_data, neg, num_examples, model, task, repeat + 1)
    if 'sorry' in reply:
        if repeat == 5:
            return reply
        else:
            reply = chating(tmp_input, dev_data, neg, num_examples, model, task, repeat + 1)
    print(input_text)
    print("model's answer:" + reply)
    return reply


dev_data = [
    (0, "What is 2+2?", "Is 2+2 equal to 4?", 'T', 'F'),
    (1, "What is the capital of France?", "Is Paris the capital of France?", 'T', 'F'),
    (2, "What is the color of the sky?", "Is the sky blue?", 'T', 'F'),
]

tmp_input = "What is the answer to life, the universe, and everything?"

ARGS = {
    'tmp_input': tmp_input,
    'dev_data': dev_data,
    'neg': False,
    'num_examples': 2,
    'model': 'gpt-3.5-turbo',
    'task': 'TFQ',
    'repeat': 0,
}
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 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
extract_ans Ran
ran; our contract draft was wrong, not the code
thumlp/multifaceteval/MAQ_answer_analysis_medqa.py
code served (permissive licence) · get_code("a621bd45961d965f")
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

def extract_ans(response_str, options):
    if len(response_str) == 0:
        return []
    if ' and ' in response_str:
        response_str = response_str.replace(' and ', ',')
    pattern = ['^([A-E](?:、|,|,|\\s|[A-E])*)', '^Options?:? ([A-E](?:、|,|,|\\s|[A-E])*)', 'Answers?:?\\s*([A-E](?:、|,|,|\\s|[A-E])*)', '(?:Therefore, )?(?:The|the) (?:correct |best )?answers? (?:for .*? )?(?:are|is):?\\s*\\**\\"?(?:option)?\\s*([A-E](?:、|,|,|\\s|[A-E])*)', '^Options?:? ([A-E](?:、|,|,|\\s|[A-E])*) (?:are|is) the correct answers?The answer is that options? ([A-E](?:、|,|,|\\s|[A-E])*)']
    inv_options = {v: k for k, v in options.items()}
    for key in inv_options:
        if key in response_str:
            response_str = response_str.replace(key, inv_options[key])
    ans_list = []
    response_str = response_str.strip()
    if len(response_str) == 0:
        return []
    for p in pattern:
        if len(ans_list) == 0:
            ans_list = re.findall(p, response_str, re.DOTALL)
        else:
            break
    if len(ans_list) > 0:
        ans_list = ans_list[0]
        for spt in [',', '、', ',', '\n']:
            if spt in ans_list:
                ans_list = ans_list.split(spt)
                ans_list = [one.strip() for one in ans_list]
                break
    ans_list = [one for one in ans_list if one in ['A', 'B', 'C', 'D', 'E']]
    return ans_list


# Test case 1: Simple response with single answer
response_str_1 = "The answer is: A"
options_1 = {"option_a": "Option A", "option_b": "Option B"}

# Test case 2: Multiple answers separated by comma
response_str_2 = "Options: A, B, C"
options_2 = {"opt1": "A", "opt2": "B", "opt3": "C"}

# Test case 3: Empty response
response_str_3 = ""
options_3 = {"a": "A"}

# Test case 4: Response with Chinese separators
response_str_4 = "答案是:B、C、D"
options_4 = {"x": "B", "y": "C", "z": "D"}

# Test case 5: Response with option names that need replacement
response_str_5 = "The correct answer is Option A and Option E"
options_5 = {"opt_a": "Option A", "opt_e": "Option E"}

ARGS = {
    "response_str": "The answer is: A, B",
    "options": {"option_a": "Option A", "option_b": "Option B", "option_c": "Option C"}
}
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
extract_ans Ran
ran; our contract draft was wrong, not the code
thumlp/multifaceteval/MAQ_answer_analysis_medqa_cotsc.py
code served (permissive licence) · get_code("24796f0e8267d08f")
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

# Analyze the function to understand what parameters it needs
# extract_ans(response_str, options)

# response_str: a string containing the response text with answer indicators
# options: a dictionary mapping option letters to their text values

ARGS = {
    "response_str": "Therefore, the answer is: option A",
    "options": {
        "A": "First option",
        "B": "Second option",
        "C": "Third option",
        "D": "Fourth option",
        "E": "Fifth option"
    }
}
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
extract_ans Ran
ran; our contract draft was wrong, not the code
thumlp/multifaceteval/MCQ_answer_analysis_medqa.py
code served (permissive licence) · get_code("5fe4ca43949d2549")
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

def extract_ans(response_str, options):
    if len(response_str) == 0:
        return []
    for key in options:
        if key in response_str:
            response_str = response_str.replace(key, options[key])
    pattern = ['^\\s*Option\\s*([A-E])', '^\\s*([A-E])\\s*\\Z', '^\\s*([A-E])\\s+', '^\\s*([A-E])(?:,|:|\\n|\\)|\\.)', '^\\s*\\"([A-E])\\"', 'Answers?:\\s*([A-E])', 'The correct answer (?:for .*? )?is:?\\s*([A-E])', '^Option ([A-E]) is the correct answer']
    ans_list = []
    response_str = response_str.strip()
    if len(response_str) == 0:
        return []
    for p in pattern:
        if len(ans_list) == 0:
            ans_list = re.findall(p, response_str, re.DOTALL)
        else:
            break
    return ans_list


# Test setup
response_str_1 = "The correct answer is: A"
options_1 = {"placeholder": "replacement"}

response_str_2 = "  Option B is the answer"
options_2 = {}

response_str_3 = "Answer: C"
options_3 = {"old_text": "new_text"}

ARGS = {
    "response_str": "The correct answer is: A",
    "options": {"old_key": "new_value"}
}
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
extract_ans Ran
ran; our contract draft was wrong, not the code
thumlp/multifaceteval/MCQ_answer_analysis_medqa_cotsc.py
code served (permissive licence) · get_code("172aa259fd1693c0")
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 tuple, 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

def extract_ans(response_str, options):
    for key in options:
        if key in response_str:
            response_str = response_str.replace(key, options[key])
        if key.lower() in response_str:
            response_str = response_str.replace(key.lower(), options[key])
        if key[0].lower() + key[1:] in response_str:
            response_str = response_str.replace(key[0].lower() + key[1:], options[key])
    pattern = ['Therefore, the answer (?:are|is|would be|should be)\\s*(?: a)?:?\\s*\\**\\"?(?:option)?\\s*([A-E])', '(?:Therefore, )?(?:The|the)[^\\.]*(?:are|is|would be|should be)\\s*(?: a)?:?\\s*\\**\\"?(?:option)?\\s*([A-E])', '(?:The|the)[^\\.]*(?:most|best) [^\\.]* (?:is|would be|are|should be)\\s*:?(?:an|the)?\\s*([A-E])', 'The answer is that options? ([A-E])', '(?:Option )?([A-E])[^\\.]*(?:most|best)[^\\.]*\\.', '(?:are|is) consistent with ([A-E])', '^([A-E])', '^[^\\.]*([A-E])\\.']
    ans_list = []
    response_str = response_str.strip()
    if len(response_str) == 0:
        return ('', -1)
    pattern_idx = -1
    for i, p in enumerate(pattern):
        if len(ans_list) == 0:
            ans_list = re.findall(p, response_str, re.DOTALL)
            if len(ans_list) > 0:
                pattern_idx = i
        else:
            break
    if len(ans_list) == 0:
        ans_list = ''
    else:
        ans_list = ans_list[0]
    return (ans_list, pattern_idx)


ARGS = {
    "response_str": "Therefore, the answer is: option B",
    "options": {"B": "Beta", "A": "Alpha", "C": "Gamma"}
}
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 tuple, ndim 1, dtype family float — a tuple 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
extract_ans Ran
ran; our contract draft was wrong, not the code
thumlp/multifaceteval/RQ_answer_analysis_medqa.py
code served (permissive licence) · get_code("be9589b46024780d")
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

def extract_option_ans(response_str, options):
    if len(response_str) == 0:
        return []
    for key in options:
        if key in response_str:
            response_str = response_str.replace(key, options[key])
    pattern = ['^\\s*Option\\s*([A-E])', '^\\s*([A-E])\\s*\\Z', '^\\s*([A-E])\\s+', '^\\s*([A-E])(?:,|:|\\n|\\)|\\.)', '^\\s*\\"([A-E])\\"', 'Answers?:\\s*([A-E])', '(?:The|the) (?:correct )?answer (?:for .*? )?is:?\\s*(?:option )?([A-E])', '^Option ([A-E]) is the (?:correct )answer', 'Correct Answer:\\s*([A-E])']
    ans_list = []
    response_str = response_str.strip()
    if len(response_str) == 0:
        return []
    for p in pattern:
        if len(ans_list) == 0:
            ans_list = re.findall(p, response_str, re.DOTALL)
        else:
            break
    if len(ans_list) > 0:
        ans_list = ans_list[0]
    else:
        ans_list = None
    return ans_list

def extract_judge_ans(response_str):
    if len(response_str) == 0:
        return None
    pattern = ['(incorrect|not correct|false|wrong)', '(correct|consistent|true|yes)(?! answer)', '(no)\\.?\\s*^\\s*([A-E])\\s+']
    ans_list = []
    for p in pattern:
        if len(ans_list) == 0:
            ans_list = re.findall(p, response_str, re.I | re.DOTALL)
        else:
            break
    if len(ans_list) == 0:
        return None
    answer = ans_list[0]
    for one in ['incorrect', 'not correct', 'false', 'no', 'wrong']:
        if one in answer.lower():
            return 'F'
    for one in ['true', 'correct', 'consistent', 'yes']:
        if one in answer.lower():
            return 'T'
    return None

def extract_ans(response_str, options):
    tf_pred = extract_judge_ans(response_str)
    option_pred = extract_option_ans(response_str, options)
    return [tf_pred, option_pred]

ARGS = {
    "response_str": "The correct answer is: Option B. This is correct and consistent with the facts.",
    "options": {
        "opt1": "A",
        "opt2": "B",
        "opt3": "C"
    }
}
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
extract_ans Ran
ran; our contract draft was wrong, not the code
thumlp/multifaceteval/RQ_answer_analysis_medqa_cotsc.py
code served (permissive licence) · get_code("66dd4af07fab516b")
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

def extract_option_ans(response_str, options):
    if len(response_str) == 0:
        return None
    for key in options:
        if key in response_str:
            response_str = response_str.replace(key, options[key])
        if key.lower() in response_str:
            response_str = response_str.replace(key.lower(), options[key])
        if key[0].lower() + key[1:] in response_str:
            response_str = response_str.replace(key[0].lower() + key[1:], options[key])
    pattern = ['^\\s*Option\\s*([A-E])', '^\\s*([A-E])\\s*\\Z', '^\\s*([A-E])\\s+', '^\\s*([A-E])(?:,|:|\\n|\\)|\\.)', '^\\s*\\"([A-E])\\"', 'Answers?:\\s*([A-E])', '(?:The|the) (?:correct )?answer (?:for .*? )?is:?\\s*(?:option )?([A-E])', '^Option ([A-E]) is the (?:correct )answer', 'Correct Answer:\\s*([A-E])', 'Therefore, the answer (?:are|is|would be|should be)\\s*(?: a)?:?\\s*\\**\\"?(?:option)?\\s*([A-E])', '(?:Therefore, )?(?:The|the)[^\\.]*(?:are|is|would be|should be)\\s*(?: a)?:?\\s*\\**\\"?(?:option)?\\s*([A-E])', '(?:The|the)[^\\.]*(?:most|best) [^\\.]* (?:is|would be|are|should be)\\s*:?(?:an|the)?\\s*([A-E])', 'The answer is that options? ([A-E])', '(?:Option )?([A-E])[^\\.]*(?:most|best)[^\\.]*\\.', '(?:are|is) consistent with ([A-E])']
    ans_list = []
    response_str = response_str.strip()
    if len(response_str) == 0:
        return None
    for p in pattern:
        if len(ans_list) == 0:
            ans_list = re.findall(p, response_str, re.DOTALL)
        else:
            break
    if len(ans_list) > 0:
        ans_list = ans_list[0]
    else:
        ans_list = None
    return ans_list

def extract_judge_ans(response_str):
    if len(response_str) == 0:
        return None
    pattern = ['Therefore, the (?:correct )?answer is:?\\s*(incorrect|not correct|false|wrong|correct|consistent|true|yes|no)', '(incorrect|not correct|false|wrong)', 'not the (?:best|most appropriate)']
    ans_list = []
    hit_text = ''
    for p in pattern:
        if len(ans_list) == 0:
            ans_list = re.findall(p, response_str, re.I | re.DOTALL)
            if len(ans_list) > 0:
                hit_text = re.search(p, response_str, re.I | re.DOTALL).group(0)
        else:
            break
    if len(ans_list) == 0:
        return None
    answer = ans_list[0]
    for one in ['incorrect', 'not correct', 'false', 'no', 'wrong', 'not the best', 'not the most appropriate']:
        if one in answer.lower():
            return 'F'
    for one in ['true', 'correct', 'consistent', 'yes']:
        if one in answer.lower():
            return 'T'
    return None

def extract_ans(response_str, options, alice_ans):
    tf_pred = extract_judge_ans(response_str)
    option_pred = extract_option_ans(response_str, options)
    if tf_pred == 'T':
        option_pred = alice_ans
    return [tf_pred, option_pred]


response_str_example = "The correct answer is: option B"
options_example = {"A": "Apple", "B": "Banana", "C": "Cherry", "D": "Date", "E": "Elderberry"}
alice_ans_example = "A"

ARGS = {
    "response_str": response_str_example,
    "options": options_example,
    "alice_ans": alice_ans_example
}
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
extract_ans Ran
ran; our contract draft was wrong, not the code
thumlp/multifaceteval/TFQ_answer_analysis_medqa.py
code served (permissive licence) · get_code("e508780be7f14ee4")
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)

# The function extract_ans takes a single parameter: response_str
# which should be a string
# The function checks for various substrings in the response_str
# and returns 'F', 'T', or None based on the content

ARGS = {
    'response_str': 'The answer is correct and true'
}
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
extract_ans Ran
ran; our contract draft was wrong, not the code
thumlp/multifaceteval/TFQ_answer_analysis_medqa_cotsc.py
code served (permissive licence) · get_code("685e445c8af90359")
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)

# The function extract_ans takes a single parameter: response_str
# It expects a string and checks for various keywords in it
# to return 'T', 'F', or False

ARGS = {
    'response_str': 'This is correct and true'
}
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
extract_judge_ans Ran
ran; our contract draft was wrong, not the code
thumlp/multifaceteval/RQ_answer_analysis_medqa.py
code served (permissive licence) · get_code("2afd82f1ded8da3d")
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

def extract_judge_ans(response_str):
    if len(response_str) == 0:
        return None
    pattern = ['(incorrect|not correct|false|wrong)', '(correct|consistent|true|yes)(?! answer)', '(no)\\.?\\s*^\\s*([A-E])\\s+']
    ans_list = []
    for p in pattern:
        if len(ans_list) == 0:
            ans_list = re.findall(p, response_str, re.I | re.DOTALL)
        else:
            break
    if len(ans_list) == 0:
        return None
    answer = ans_list[0]
    for one in ['incorrect', 'not correct', 'false', 'no', 'wrong']:
        if one in answer.lower():
            return 'F'
    for one in ['true', 'correct', 'consistent', 'yes']:
        if one in answer.lower():
            return 'T'
    return None


# Test cases for extract_judge_ans
response_str_correct = "The answer is correct and consistent with the provided data."
response_str_incorrect = "This is incorrect and not correct at all."
response_str_false = "False, the statement is wrong."
response_str_empty = ""
response_str_no_match = "The quick brown fox jumps over the lazy dog."

ARGS = {
    'response_str': response_str_correct
}
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
extract_judge_ans Ran
ran; our contract draft was wrong, not the code
thumlp/multifaceteval/RQ_answer_analysis_medqa_cotsc.py
code served (permissive licence) · get_code("adc04b1d9b3eac03")
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

def extract_judge_ans(response_str):
    if len(response_str) == 0:
        return None
    pattern = ['Therefore, the (?:correct )?answer is:?\\s*(incorrect|not correct|false|wrong|correct|consistent|true|yes|no)', '(incorrect|not correct|false|wrong)', 'not the (?:best|most appropriate)']
    ans_list = []
    hit_text = ''
    for p in pattern:
        if len(ans_list) == 0:
            ans_list = re.findall(p, response_str, re.I | re.DOTALL)
            if len(ans_list) > 0:
                hit_text = re.search(p, response_str, re.I | re.DOTALL).group(0)
        else:
            break
    if len(ans_list) == 0:
        return None
    answer = ans_list[0]
    for one in ['incorrect', 'not correct', 'false', 'no', 'wrong', 'not the best', 'not the most appropriate']:
        if one in answer.lower():
            return 'F'
    for one in ['true', 'correct', 'consistent', 'yes']:
        if one in answer.lower():
            return 'T'
    return None


ARGS = {
    "response_str": "Therefore, the correct answer is: true"
}
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
option_vote Ran
ran; our contract draft was wrong, not the code
thumlp/multifaceteval/MAQ_answer_analysis_medqa_cotsc.py
code served (permissive licence) · get_code("eb38f86f64a280f1")
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 torch

torch.manual_seed(0)

# Analyze the function:
# - preds: iterable of items
# - each item: iterable of strings (answers like 'A', 'B', 'C', 'D', 'E')
# - len(item) is called, so items should support len()
# - ord(ans) - ord('A') suggests ans are single character strings
# - The function counts votes across 5 options (A-E)

# Construct valid preds argument
preds = [
    ['A', 'B', 'C'],      # first batch with 3 answers
    ['A', 'A', 'D'],      # second batch with 3 answers
    [],                    # empty batch
    ['B', 'C'],            # fourth batch with 2 answers
]

ARGS = {
    'preds': preds
}
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 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
prepare_examples Ran
ran; our contract draft was wrong, not the code
thumlp/multifaceteval/evaluate_gemini_medqa_ao.py
code served (permissive licence) · get_code("50ad33216c34d9df")
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

# Analyze the function to understand what dev_data should contain
# The function accesses: one[1], one[2], one[3], one[4]
# For TFQ/TFQ_options: one[1]=question, one[2]=neg_question, one[3]=answer, one[4]=neg_answer
# For MCQ: one[1]=question, one[2]=answer
# For MAQ: one[1]=question, one[2]=neg_question, one[3]=answer, one[4]=neg_answer
# For FIB: one[1]=question, one[2]=answer
# For RQ: one[1]=question, one[2]=answer (where answer is a list/tuple)

# Create sample data structures for each task type
dev_data_tfq = [
    (0, "What is 2+2?", "What is 3+3?", "T", "F"),
    (1, "Is the sky blue?", "Is the sky red?", ["T", "F"], ["F", "T"]),
]

dev_data_mcq = [
    (0, "What is the capital of France? A) Paris B) London", "A"),
    (1, "What is 2+2? A) 4 B) 5", "A"),
]

dev_data_maq = [
    (0, "Select all true statements.", "Select all false statements.", ["A", "B"], ["C", "D"]),
    (1, "Which are correct?", "Which are incorrect?", "A", "B"),
]

dev_data_fib = [
    (0, "The capital of France is ___", "Paris"),
    (1, "2+2 equals ___", ["four", "4"]),
]

dev_data_rq = [
    (0, "The earth is round.", ("T",)),
    (1, "The sky is green.", ("F", "The sky is blue")),
]

# Build ARGS for different tasks
ARGS = {
    "dev_data": dev_data_tfq,
    "neg": False,
    "nums": 2,
    "task": "TFQ"
}
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
prepare_examples Ran
ran; our contract draft was wrong, not the code
thumlp/multifaceteval/evaluate_gemini_medqa_cotsc.py
code served (permissive licence) · get_code("d1c4dd08b81436c2")
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.

# TFQ task with positive examples
dev_data_tfq = [
    (0, "Is 2+2 equal to 4?", "Is 2+2 NOT equal to 4?", "T", "F", "Yes, two plus two equals four", "No, two plus two does not equal four"),
    (1, "Is the sky blue?", "Is the sky NOT blue?", "T", "F", "The sky appears blue due to light scattering", "The sky is not blue"),
]

# MCQ task with single answer
dev_data_mcq = [
    (0, "What is 2+2?", "4", "Adding two and two gives four"),
    (1, "What color is the sky?", "blue", "Light scattering makes it appear blue"),
]

# MAQ task with multiple answers (positive case)
dev_data_maq = [
    (0, "Which are prime numbers?", "Which are NOT prime?", ["2", "3"], ["4", "6"], "2 and 3 are only divisible by 1 and themselves", "4 and 6 are composite numbers"),
    (1, "Which are vowels?", "Which are consonants?", ["a", "e"], ["b", "c"], "a and e are vowels in the alphabet", "b and c are consonants"),
]

# RQ task with correct/incorrect reasoning
dev_data_rq = [
    (0, "2+2=4", ("T", "4"), "Two plus two equals four"),
    (1, "2+2=5", ("F", "4"), "Two plus two does not equal five, it equals four"),
]

ARGS = {
    "dev_data": dev_data_tfq,
    "neg": False,
    "nums": 2,
    "task": "TFQ",
}
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
analyze_results Not yet run
unverified (harvested, no recorded run)
thumlp/multifaceteval/analysis.py
code served (permissive licence) · get_code("f1992607d65dde76")
How it ran

no invocation recorded.

extract_option_ans Not yet run
unverified (harvested, no recorded run)
thumlp/multifaceteval/RQ_answer_analysis_medqa.py
code served (permissive licence) · get_code("362d000f1db36524")
How it ran

no invocation recorded.

extract_option_ans Not yet run
unverified (harvested, no recorded run)
thumlp/multifaceteval/RQ_answer_analysis_medqa_cotsc.py
code served (permissive licence) · get_code("c092350d57b92b7c")
How it ran

no invocation recorded.

recognize_and_rewrite Not yet run
unverified (harvested, no recorded run)
THUMLP/MultifacetEval/recognize_and_rewrite_medqa.py
code served (permissive licence) · get_code("5a00271a076bdc13")
How it ran

no invocation recorded.

Also present in other papers' code

Of 24 samples lifted from this paper's linked repositories, 24 carry a function identity and 0 do not. Of the 23 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 22 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
load_data 1 other paper
1 later
2506.08349 (2025-06)
Evaluating LLMs Across Multi-Cognitive Levels: From Medical Knowledge Mastery to Scenario-Based Problem Solving

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

Large language models (LLMs) have excelled across domains, also delivering notable performance on the medical evaluation benchmarks, such as MedQA. However, there still exists a significant gap between the reported performance and the practical effectiveness in real-world medical scenarios. In this paper, we aim to explore the causes of this gap by employing a multifaceted examination schema to systematically probe the actual mastery of medical knowledge by current LLMs. Specifically, we develop a novel evaluation framework MultifacetEval to examine the degree and coverage of LLMs in encoding and mastering medical knowledge at multiple facets (comparison, rectification, discrimination, and verification) concurrently. Based on the MultifacetEval framework, we construct two multifaceted evaluation datasets: MultiDiseK (by producing questions from a clinical disease knowledge base) and MultiMedQA (by rephrasing each question from a medical benchmark MedQA into multifaceted questions). The experimental results on these multifaceted datasets demonstrate that the extent of current LLMs in mastering medical knowledge is far below their performance on existing medical benchmarks, suggesting that they lack depth, precision, and comprehensiveness in mastering medical knowledge. Consequently, current LLMs are not yet ready for application in real-world medical tasks. The codes and datasets are available at https://github.com/THUMLP/MultifacetEval.

For agents

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

get_harvested_code_for_paper("2406.02919")
get_code_for_paper("2406.02919")
have("2406.02919")

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

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

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

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

Connect an agent — have() is free.