SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2401.06766 · 2024

Mind Your Format: Towards Consistent Evaluation of In-Context Learning Improvements

arXiv · PDF · Open in the Atlas

Code that ran

6 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; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 4 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/2401.06766.json · badge: /api/ran/2401.06766.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
yandex-research/mind-your-format canonical (classifier label)
classifier basis: census
6 ran · 4 no recorded run
FunctionStatusWhere it lives
find_current_run Ran
ran, honoured the contract we drafted
yandex-research/mind-your-format/utils.py
code served (permissive licence) · get_code("ac21fd94625fab06")
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 pandas as pd
import numpy as np

# Create a small configuration dictionary
config = {
    'learning_rate': 0.001,
    'batch_size': 32,
    'model_type': 'transformer'
}

# Create a results DataFrame with matching columns and some additional data
results_data = {
    'learning_rate': [0.001, 0.01, 0.001, 0.0001],
    'batch_size': [32, 16, 32, 32],
    'model_type': ['transformer', 'transformer', 'lstm', 'transformer'],
    'score': [0.85, 0.78, 0.82, 0.87]
}
results = pd.DataFrame(results_data)

ARGS = {
    'config': config,
    'results': results
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — 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_examples Ran
ran; our contract draft was wrong, not the code
yandex-research/mind-your-format/examples.py
code served (permissive licence) · get_code("39c1250cde8fa4e6")
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 pandas as pd
import random

# Create a minimal train dataset with the structure expected by get_examples
# The function calls train.iloc[idx]['input'] and train.iloc[idx]['target']
train_data = pd.DataFrame({
    'input': ['  input sample 1  ', '  input sample 2  ', '  input sample 3  ', '  input sample 4  '],
    'target': ['  target 1  ', '  target 2  ', '  target 3  ', '  target 4  ']
})

ARGS = {
    'dataset': 'test_dataset',
    'train': train_data,
    'selection_method': 'random',
    'seed': 42,
    'num_shots': 2,
    'example_ids': None,
    'examples_path': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — 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
get_loss Ran
ran, honoured the contract we drafted
yandex-research/mind-your-format/evaluate.py
code served (permissive licence) · get_code("8cde6f9b2356a263")
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 Tensor, ndim 1, dtype family float, shape (2,) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 torch.nn as nn
from torch.nn import CrossEntropyLoss

torch.manual_seed(0)

# Build a minimal model that satisfies the function's usage
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.device = torch.device('cpu')
        self.dtype = torch.float32
        # Linear layer: vocab_size=5, hidden_dim=4
        self.lm_head = nn.Linear(4, 5)
    
    def forward(self, input_ids, attention_mask):
        # Return an object with a logits attribute
        # logits shape: (batch_size, seq_len, vocab_size)
        batch_size = input_ids.size(0)
        seq_len = input_ids.size(1)
        logits = torch.randn(batch_size, seq_len, 5)
        
        class Output:
            pass
        
        output = Output()
        output.logits = logits
        return output

# Build a minimal generator wrapper
class MinimalGenerator:
    def __init__(self):
        self.model = MinimalModel()

# Create batch with required keys
batch_size = 2
seq_len = 4
vocab_size = 5

batch = {
    'input_ids': torch.randint(0, vocab_size, (batch_size, seq_len)),
    'attention_mask': torch.ones(batch_size, seq_len, dtype=torch.long),
    'token_type_ids': torch.randint(0, 2, (batch_size, seq_len), dtype=torch.float32),
}

# Create the generator
generator = MinimalGenerator()

# Define ARGS
ARGS = {
    'generator': generator,
    'batch': batch,
    'labels_loss': False,
}
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 Tensor, ndim 1, dtype family float, shape (2,) — shape (2,) 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
get_results_pd Ran
ran; our contract draft was wrong, not the code
yandex-research/mind-your-format/utils.py
code served (permissive licence) · get_code("88bc6dc454b35322")
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 DataFrame. 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 tempfile
from pathlib import Path
import pandas as pd

# Create a temporary directory for testing
temp_dir = tempfile.mkdtemp()

# Define arguments for get_results_pd
ARGS = {
    'save_dir': temp_dir,
    'name': 'results.csv'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_results_torch Ran
ran; our contract draft was wrong, not the code
yandex-research/mind-your-format/utils.py
code served (permissive licence) · get_code("4784a7ec29b42cc7")
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
from pathlib import Path
import tempfile

torch.manual_seed(0)

# Create a temporary directory for testing
temp_dir = tempfile.mkdtemp()

# Create a sample results file to test the load path
sample_results = {'loss': torch.tensor([1.0, 2.0, 3.0, 4.0]), 'accuracy': 0.95}
results_path = Path(temp_dir, 'results')
torch.save(sample_results, results_path)

# Define ARGS mapping all parameters
ARGS = {
    'save_dir': temp_dir,
    'name': '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
load_examples Ran
ran; our contract draft was wrong, not the code
yandex-research/mind-your-format/examples.py
code served (permissive licence) · get_code("6047b9a8b85a7ea6")
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 json
import tempfile
import os

# Create a temporary JSON file with the expected structure
temp_dir = tempfile.mkdtemp()
examples_file_path = os.path.join(temp_dir, "examples.json")

# Create test data with two cases: one with integer IDs and one with actual examples
test_data = {
    "42": {
        "1": [0, 1, 2],  # Example IDs (integers)
        "5": [
            {"text": "example 1", "label": "A"},
            {"text": "example 2", "label": "B"}
        ]  # Actual examples (dicts)
    },
    "123": {
        "1": [5, 10],
        "5": [
            {"text": "example 3", "label": "C"}
        ]
    }
}

with open(examples_file_path, 'w') as f:
    json.dump(test_data, f)

# Define ARGS with valid parameters
ARGS = {
    'path': examples_file_path,
    'seed': 42,
    'num_shots': 1
}
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 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
classify Not yet run
unverified (harvested, no recorded run)
yandex-research/mind-your-format/evaluate.py
code served (permissive licence) · get_code("aba3849d1ad68f1f")
How it ran

no invocation recorded.

load_generator Not yet run
unverified (harvested, no recorded run)
yandex-research/mind-your-format/models.py
code served (permissive licence) · get_code("a1f9ff8d28378db4")
How it ran

no invocation recorded.

load_split_dataset Not yet run
unverified (harvested, no recorded run)
yandex-research/mind-your-format/data.py
code served (permissive licence) · get_code("21c03a2d2acf838e")
How it ran

no invocation recorded.

predict Not yet run
unverified (harvested, no recorded run)
yandex-research/mind-your-format/evaluate.py
code served (permissive licence) · get_code("5b3e1a3d02d90a79")
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

Large language models demonstrate a remarkable capability for learning to solve new tasks from a few examples. The prompt template, or the way the input examples are formatted to obtain the prompt, is an important yet often overlooked aspect of in-context learning. In this work, we conduct a comprehensive study of the template format's influence on the in-context learning performance. We evaluate the impact of the prompt template across 21 models (from 770M to 70B parameters) and 4 standard classification datasets. We show that a poor choice of the template can reduce the performance of the strongest models and inference methods to a random guess level. More importantly, the best templates do not transfer between different setups and even between models of the same family. Our findings show that the currently prevalent approach to evaluation, which ignores template selection, may give misleading results due to different templates in different works. As a first step towards mitigating this issue, we propose Template Ensembles that aggregate model predictions across several templates. This simple test-time augmentation boosts average performance while being robust to the choice of random set of templates.

For agents

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

get_harvested_code_for_paper("2401.06766")
get_code_for_paper("2401.06766")
have("2401.06766")

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

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

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

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

Connect an agent — have() is free.