SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2311.16452 · 2023

Can Generalist Foundation Models Outcompete Special-Purpose Tuning? Case Study in Medicine

arXiv · PDF · Open in the Atlas

Code that ran

9 of 10 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 9 have no contract verdict; 0 failures of our instrument; 1 no recorded run), measured 2026-11-23; 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/2311.16452.json · badge: /api/ran/2311.16452.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
microsoft/promptbase community (classifier label)
classifier basis not recorded on the link
9 ran · 1 no recorded run
FunctionStatusWhere it lives
check_answer Ran
ran on a synthesized input
microsoft/promptbase/src/promptbase/math/math.py
code served (permissive licence) · get_code("d9b6798e6642642a")
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 bool, ndim 0, dtype family float, 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 torch
import numpy as np

torch.manual_seed(0)

# The function check_answer takes two numeric arguments and compares them
# with a relative tolerance check. Both should be numeric values (int, float, 
# or potentially tensors that support arithmetic operations).

official = 42.0
student = 42.0 + 1e-08

ARGS = {
    "official": official,
    "student": student
}
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 bool, ndim 0, dtype family float, 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
extract_and_convert_fraction Ran
ran on a synthesized input
microsoft/promptbase/src/promptbase/math/math.py
code served (permissive licence) · get_code("faf2e85538d44eda")
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 float, ndim 0, dtype family float, 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 sys
import json
import re

def extract_and_convert_fraction(text):
    pattern = '^\\\\frac\\{(\\d+)\\}\\{(\\d+)\\}$'
    match = re.match(pattern, text)
    if match:
        numerator, denominator = match.groups()
        return float(numerator) / float(denominator)
    pattern = '^\\\\frac(\\d)(\\d)$'
    match = re.match(pattern, text)
    if match:
        numerator, denominator = match.groups()
        return float(numerator) / float(denominator)
    pattern = '^-\\\\frac\\{(\\d+)\\}\\{(\\d+)\\}$'
    match = re.match(pattern, text)
    if match:
        numerator, denominator = match.groups()
        return -float(numerator) / float(denominator)
    pattern = '^-\\\\frac(\\d)(\\d)$'
    match = re.match(pattern, text)
    if match:
        numerator, denominator = match.groups()
        return -float(numerator) / float(denominator)
    return text

# Test cases for the function
text_cases = [
    '\\frac{1}{2}',           # matches first pattern: 0.5
    '\\frac35',               # matches second pattern: 0.6
    '-\\frac{3}{4}',          # matches third pattern: -0.75
    '-\\frac12',              # matches fourth pattern: -0.5
    'plain text',             # no match: returns as is
]

ARGS = {
    'text': text_cases[0]
}
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 float, ndim 0, dtype family float, 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
extract_substrings Ran
ran on a synthesized input
microsoft/promptbase/src/promptbase/drop/drop.py
code served (permissive licence) · get_code("48d2c3f4f668a33c")
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_substrings(text):
    return re.findall('```(.*?)```', text, re.DOTALL)

# The function takes a single parameter 'text' which is a string
# It uses re.findall to extract substrings between triple backticks
# We need to provide a string that contains some code blocks

ARGS = {
    "text": """
Here is some documentation.


def hello():
    print("world")


And here is another block:


some content
spanning multiple lines


Final text.
"""
}
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_substrings Ran
ran on a synthesized input
microsoft/promptbase/src/promptbase/gsm8k/gsm8k.py
code served (permissive licence) · get_code("7fb55d6336f5e014")
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

# The function takes a single parameter: text (a string)
# The function splits on '\\boxed', processes parts looking for braced content
# and extracts the content inside the first set of braces

# Create a valid text string containing a boxed expression
text = r"Some math here \boxed{x^2 + y^2} and more text"

ARGS = {
    "text": text
}
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_valid_answers Ran
ran on a synthesized input
microsoft/promptbase/src/promptbase/drop/drop.py
code served (permissive licence) · get_code("3e4d094a7d76f775")
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. 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 validated_answers with different answer types
validated_answers = [
    {
        'number': '42',
        'date': {'year': '', 'month': '', 'day': ''},
        'spans': []
    },
    {
        'number': '',
        'date': {'year': '2023', 'month': '01', 'day': '15'},
        'spans': []
    },
    {
        'number': '',
        'date': {'year': '', 'month': '', 'day': ''},
        'spans': ['span1', 'span2']
    }
]

ARGS = {
    'validated_answers': validated_answers
}
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 — a list output has no array shape of its own; none is 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_summarization_prompt Ran
ran on a synthesized input
microsoft/promptbase/src/promptbase/bigbench/bigbench_answer.py
code served (permissive licence) · get_code("ea54ecb1c22792d2")
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

ARGS = {
    "original_instruction": "Solve the following math problem and provide the final numerical answer.",
    "answer_format": "A single integer between 1 and 100"
}
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
process_csv_file Ran
ran on a synthesized input
microsoft/promptbase/src/promptbase/format/format_mmlu.py
code served (permissive licence) · get_code("d9b48e51b5226443")
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 csv
import pathlib
import tempfile
import os

# Create a temporary CSV file with test data
temp_dir = tempfile.mkdtemp()
csv_file_path = pathlib.Path(temp_dir) / "test_questions.csv"

# Write sample CSV data
csv_content = [
    ["What is 2+2?", "3", "4", "5", "4"],
    ["What is the capital of France?", "London", "Berlin", "Paris", "Paris"],
    ["What is the largest planet?", "Earth", "Jupiter", "Saturn", "Jupiter"],
]

with open(csv_file_path, 'w', newline='', encoding='utf-8') as f:
    writer = csv.writer(f)
    writer.writerows(csv_content)

ARGS = {
    'file_path': csv_file_path,
    'split_name': 'train',
}
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
process_jsonl_file Ran
ran on a synthesized input
microsoft/promptbase/src/promptbase/format/format_hellaswag.py
code served (permissive licence) · get_code("8883821f5e4ef031")
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 uuid
import tempfile
import os

# Create a temporary JSONL file with sample data
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "sample.jsonl")

# Write sample JSONL data matching the expected format
sample_data = [
    {
        "ind": 0,
        "ctx": "A person is standing in a kitchen.",
        "endings": ["They start cooking", "They leave the room", "They sit down", "They dance"],
        "label": 1,
        "activity_label": "cooking"
    },
    {
        "ind": 1,
        "ctx": "Someone is playing a guitar.",
        "endings": ["The music stops", "They continue playing", "They fall asleep", "The guitar breaks"],
        "label": 2,
        "activity_label": "music"
    }
]

with open(temp_file, 'w', encoding='utf-8') as f:
    for item in sample_data:
        f.write(json.dumps(item) + '\n')

ARGS = {
    'file_path': temp_file,
    'split_name': 'train'
}
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
read_jsonl Ran
ran on a synthesized input
microsoft/promptbase/src/promptbase/drop/drop.py
code served (permissive licence) · get_code("4be24c2f6782adf1")
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 JSONL file with test data
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test.jsonl")

# Write valid JSONL content
with open(temp_file, 'w', encoding='utf-8') as f:
    f.write('{"key1": "value1", "key2": 42}\n')
    f.write('{"key1": "value2", "key2": 43}\n')
    f.write('{"key1": "value3", "key2": 44}\n')

ARGS = {
    'file': temp_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
get_completion_fewshot Not yet run
unverified (harvested, no recorded run)
microsoft/promptbase/src/promptbase/bigbench/bigbench_answer.py
code served (permissive licence) · get_code("5c077e70e625a777")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 10 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.

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

Repositories linked to this paper

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

Abstract

Generalist foundation models such as GPT-4 have displayed surprising capabilities in a wide variety of domains and tasks. Yet, there is a prevalent assumption that they cannot match specialist capabilities of fine-tuned models. For example, most explorations to date on medical competency benchmarks have leveraged domain-specific training, as exemplified by efforts on BioGPT and Med-PaLM. We build on a prior study of GPT-4's capabilities on medical challenge benchmarks in the absence of special training. Rather than using simple prompting to highlight the model's out-of-the-box capabilities, we perform a systematic exploration of prompt engineering. We find that prompting innovation can unlock deeper specialist capabilities and show that GPT-4 easily tops prior leading results for medical benchmarks. The prompting methods we explore are general purpose, and make no specific use of domain expertise, removing the need for expert-curated content. Our experimental design carefully controls for overfitting during the prompt engineering process. We introduce Medprompt, based on a composition of several prompting strategies. With Medprompt, GPT-4 achieves state-of-the-art results on all nine of the benchmark datasets in the MultiMedQA suite. The method outperforms leading specialist models such as Med-PaLM 2 by a significant margin with an order of magnitude fewer calls to the model. Steering GPT-4 with Medprompt achieves a 27% reduction in error rate on the MedQA dataset over the best methods to date achieved with specialist models and surpasses a score of 90% for the first time. Beyond medical problems, we show the power of Medprompt to generalize to other domains and provide evidence for the broad applicability of the approach via studies of the strategy on exams in electrical engineering, machine learning, philosophy, accounting, law, nursing, and clinical psychology.

For agents

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

get_harvested_code_for_paper("2311.16452")
get_code_for_paper("2311.16452")
have("2311.16452")

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

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

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

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

Connect an agent — have() is free.