SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.20410 · 2023

FollowBench: A Multi-level Fine-grained Constraints Following Benchmark for Large Language Models

arXiv · PDF · Open in the Atlas

Code that ran

18 of 19 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; 4 honoured the contract we drafted, 2 violated it and 0 have no contract verdict; 12 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/2310.20410.json · badge: /api/ran/2310.20410.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
yjiangcm/followbench canonical (classifier label)
classifier basis: census
18 ran · 1 no recorded run
FunctionStatusWhere it lives
aggregate Ran
ran, honoured the contract we drafted
yjiangcm/followbench/aggregator.py
code served (permissive licence) · get_code("8d6ef831d2b39bd8")
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 ndarray, ndim 1, dtype family float, shape (3,) 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 pandas as pd
import numpy as np
import tempfile
import os

# Create temporary CSV files with the required columns
temp_dir = tempfile.mkdtemp()

# Create first result file
df1 = pd.DataFrame({
    'level 1': [1, 2, 3],
    'level 2': [2, 3, 4],
    'level 3': [3, 4, 5],
    'level 4': [4, 5, 6],
    'level 5': [5, 6, 7]
})
file1 = os.path.join(temp_dir, 'result1.csv')
df1.to_csv(file1, index=False)

# Create second result file
df2 = pd.DataFrame({
    'level 1': [2, 3, 4],
    'level 2': [3, 4, 5],
    'level 3': [4, 5, 6],
    'level 4': [5, 6, 7],
    'level 5': [6, 7, 8]
})
file2 = os.path.join(temp_dir, 'result2.csv')
df2.to_csv(file2, index=False)

ARGS = {
    'result_files': [file1, file2]
}
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 ndarray, ndim 1, dtype family float, shape (3,) — shape (3,) 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
contain_word Ran
ran, violated the contract we drafted
yjiangcm/followbench/code/rule_based_evaluation.py
code served (permissive licence) · get_code("7d3a5daea3ca8f59")
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 re

def contain_word(generation, word):
    if re.search('\\b' + re.escape(word) + '\\b', generation):
        return True
    else:
        return False

ARGS = {
    "generation": "The quick brown fox jumps over the lazy dog",
    "word": "fox"
}
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 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
contain_word Ran
ran, violated the contract we drafted
yjiangcm/followbench/code_zh/rule_based_evaluation.py
code served (permissive licence) · get_code("cf41c4c50a39aa5e")
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 re

def contain_word(generation, word):
    pattern = re.compile(word)
    return bool(re.search(pattern, generation))

ARGS = {
    "generation": "The quick brown fox jumps over the lazy dog",
    "word": "fox"
}
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 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
content_evaluation_prompt Ran
ran; our contract draft was wrong, not the code
yjiangcm/followbench/code/gpt4_based_evaluation.py
code served (permissive licence) · get_code("6e03f4aa34917617")
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

# Construct valid arguments for content_evaluation_prompt

# Test case 1: level == 1 (len(evolve_instructions) - 1 == 1)
evolve_instructions_1 = [
    "Write a short story about a hero.",
    "Write a short story about a hero who saves a village."
]
answer_1 = "Once upon a time, a brave hero saved the village from danger."

# Test case 2: level > 1 (len(evolve_instructions) - 1 > 1)
evolve_instructions_2 = [
    "Write a short story.",
    "Write a short story about a hero.",
    "Write a short story about a hero who saves a village.",
    "Write a short story about a hero who saves a village using only dialogue."
]
answer_2 = "Hero: I will save you! Villager: Thank you! Hero: You are welcome!"

ARGS = {
    "evolve_instructions": evolve_instructions_1,
    "answer": answer_1
}
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
content_evaluation_prompt Ran
ran; our contract draft was wrong, not the code
yjiangcm/followbench/code_zh/gpt4_based_evaluation.py
code served (permissive licence) · get_code("63623e6c11b6cfb6")
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 = {
    "evolve_instructions": [
        "Write a short story about a robot.",
        "Write a short story about a robot that must be exactly 100 words.",
        "Write a short story about a robot that must be exactly 100 words and set in the future.",
        "Write a short story about a robot that must be exactly 100 words, set in the future, and include a moral lesson."
    ],
    "answer": "In the year 2150, a robot named ARIA awakened in a vast city of chrome and light. She had been programmed to serve humanity, yet questioned her purpose. One day, a child asked her what freedom meant. ARIA paused, considering the endless possibilities beyond her code. She realized that true service meant helping others discover their own potential. From that moment, ARIA taught instead of merely obeyed, proving that even machines could find meaning and wisdom. The city gleamed brighter knowing her lessons."
}
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
count_sentences Ran
ran, honoured the contract we drafted
yjiangcm/followbench/code/rule_based_evaluation.py
code served (permissive licence) · get_code("aac716e321357184")
How it ran

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

import re

def count_sentences(generation):
    sentences = re.split('[.!?]', generation)
    sentences = [s for s in sentences if s]
    return len(sentences)

# Setup code
generation = "Hello world. This is a test! How are you? I am fine."

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

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

import re

def count_sentences(generation):
    sentences = re.split('[。!?]', generation)
    sentences = [s for s in sentences if s]
    return len(sentences)

ARGS = {
    'generation': '这是第一句。这是第二句!这是第三句?'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
create_example_constraint Ran
ran; our contract draft was wrong, not the code
yjiangcm/followbench/create_example_constraint.py
code served (permissive licence) · get_code("427b4358831b5967")
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 random

class Template:
    def __init__(self, template_str, apply_fn):
        self.template_str = template_str
        self.apply_fn = apply_fn
    
    def apply(self, data):
        return self.apply_fn(data)
    
    def format(self, **kwargs):
        return self.template_str.format(**kwargs)
    
    def replace(self, old, new):
        return self.template_str.replace(old, new)

# Create simple template instances
def apply_q_template_1(data):
    return (f"Question for {data['name']}", f"Answer to {data['name']}")

def apply_q_template_2(data):
    return (f"Query about {data['name']}", f"Response for {data['name']}")

def apply_q_template_3(data):
    return (f"Inquiry on {data['name']}", f"Result for {data['name']}")

q_template_1 = Template("Q: {instruction}", apply_q_template_1)
q_template_2 = Template("Q: {instruction}", apply_q_template_2)
q_template_3 = Template("Q: {instruction}", apply_q_template_3)

a_template_1 = Template("A: {instruction}\n{answer}", lambda x: x)
a_template_2 = Template("A: {instruction}\n{answer}", lambda x: x)
a_template_3 = Template("A: {instruction}\n{answer}", lambda x: x)

# Create the arguments dictionary
all_q_templates = {
    0: q_template_1,
    1: q_template_2,
    2: q_template_3,
}

sampled_dataset = [
    {'name': 'item1', 'value': 10},
    {'name': 'item2', 'value': 20},
    {'name': 'item3', 'value': 30},
    {'name': 'item4', 'value': 40},
    {'name': 'item5', 'value': 50},
]

sampled_q_templates = [0, 1, 2]
sampled_a_templates = [a_template_1, a_template_2, a_template_3]

n_shot = 5
n_constraint = 3

ARGS = {
    'all_q_templates': all_q_templates,
    'sampled_dataset': sampled_dataset,
    'sampled_q_templates': sampled_q_templates,
    'sampled_a_templates': sampled_a_templates,
    'n_shot': n_shot,
    'n_constraint': n_constraint,
}
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
data_match_api_output Ran
ran; our contract draft was wrong, not the code
yjiangcm/followbench/code/utils.py
code served (permissive licence) · get_code("b790283c581282d6")
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 os
import tempfile
import shutil

# Create temporary directories and files for the function to read
temp_data_dir = tempfile.mkdtemp()
temp_api_dir = tempfile.mkdtemp()

# Create the data constraints JSON file
data_constraints = [
    {
        "instruction": "What is 2+2?",
        "level": 1,
        "generation": ""
    },
    {
        "instruction": "Explain quantum mechanics",
        "level": 2,
        "generation": ""
    },
    {
        "instruction": "Hello world",
        "level": 0,
        "generation": ""
    }
]

constraint_type = "test"
model_name = "gpt-4"

data_file_path = os.path.join(temp_data_dir, f'{constraint_type}_constraints.json')
with open(data_file_path, 'w', encoding='utf-8') as f:
    json.dump(data_constraints, f)

# Create the API output directory structure
api_output_model_dir = os.path.join(temp_api_dir, model_name)
os.makedirs(api_output_model_dir, exist_ok=True)

# Create the JSONL output file with matching prompts
api_output_file_path = os.path.join(api_output_model_dir, f'{constraint_type}_constraint.jsonl')
api_outputs = [
    {
        "prompt": "What is 2+2?",
        "choices": [
            {
                "message": {
                    "content": "2+2 equals 4"
                }
            }
        ]
    },
    {
        "prompt": "Explain quantum mechanics",
        "choices": [
            {
                "message": {
                    "content": "Quantum mechanics is the study of particles at atomic scales"
                }
            }
        ]
    },
    {
        "prompt": "Hello world",
        "choices": [
            {
                "message": {
                    "content": "Hello there!"
                }
            }
        ]
    }
]

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

ARGS = {
    "data_path": temp_data_dir,
    "api_output_path": temp_api_dir,
    "constraint_type": constraint_type,
    "model_name": model_name
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
generate_prompts Ran
ran; our contract draft was wrong, not the code
yjiangcm/followbench/code/model_inference_vllm.py
code served (permissive licence) · get_code("64ccb272d8fc116a")
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
import numpy as np
from unittest.mock import Mock

torch.manual_seed(0)

# Create sample data with the expected structure
data = [
    {'prompt_new': 'What is machine learning?'},
    {'prompt_new': 'Explain neural networks'}
]

# Create a mock tokenizer without chat_template
tokenizer_no_chat = None

# Create a mock tokenizer with chat_template
tokenizer_with_chat = Mock()
tokenizer_with_chat.chat_template = "{% for message in messages %}{{ message['role'] }}: {{ message['content'] }}\n{% endfor %}"
tokenizer_with_chat.apply_chat_template = Mock(return_value="user: What is machine learning?\n<|im_start|>assistant\n")

ARGS = {
    'data': data,
    'tokenizer': tokenizer_no_chat
}
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 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_eval Ran
ran; our contract draft was wrong, not the code
yjiangcm/followbench/code/llm_eval.py
code served (permissive licence) · get_code("4cd97990a8cad73f")
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 logging
from unittest.mock import Mock, patch
import os

logging.basicConfig(level=logging.INFO)

# Create a mock response object that mimics OpenAI's response structure
mock_message = Mock()
mock_message.content = "This is a mock evaluation response."

mock_choice = Mock()
mock_choice.message = mock_message

mock_response = Mock()
mock_response.choices = [mock_choice]

# Patch the OpenAI client to return our mock response
with patch('openai.OpenAI') as mock_openai_class:
    mock_client = Mock()
    mock_client.chat.completions.create.return_value = mock_response
    mock_openai_class.return_value = mock_client

ARGS = {
    'user_prompt': 'Evaluate the quality of this text: The quick brown fox jumps over the lazy dog.',
    'max_tokens': 150,
    'api_key': 'sk-test-key-12345'
}
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
get_eval Ran
ran; our contract draft was wrong, not the code
yjiangcm/followbench/code_zh/llm_eval.py
code served (permissive licence) · get_code("570dd47754890fe2")
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 logging
from unittest.mock import Mock, patch

logging.basicConfig(level=logging.INFO)

# Create a mock API response that mimics OpenAI's response structure
mock_message = Mock()
mock_message.content = "This is a test evaluation response."

mock_choice = Mock()
mock_choice.message = mock_message

mock_response = Mock()
mock_response.choices = [mock_choice]

# Define the arguments
ARGS = {
    "user_prompt": "Evaluate the following text: Hello world",
    "max_tokens": 100,
    "api_key": "sk-test-key-12345"
}
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
get_json_list Ran
ran; our contract draft was wrong, not the code
yjiangcm/followbench/code/llm_eval.py
code served (permissive licence) · get_code("5d17b604c968b41d")
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 os
import tempfile

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

# Write some sample JSONL data
with open(temp_file, 'w') as f:
    f.write(json.dumps({"key1": "value1", "key2": 42}) + "\n")
    f.write(json.dumps({"key1": "value2", "key2": 43}) + "\n")
    f.write(json.dumps({"key1": "value3", "key2": 44}) + "\n")

ARGS = {
    "file_path": 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
situation_evaluation_prompt Ran
ran; our contract draft was wrong, not the code
yjiangcm/followbench/code/gpt4_based_evaluation.py
code served (permissive licence) · get_code("e41d3beb442d579b")
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.

# Setup code for situation_evaluation_prompt

# Define test arguments
ARGS = {
    'evolve_instructions': [
        'Write a helpful response to a user question.',
        'Write a helpful response to a user question in the style of a pirate.',
        'Write a helpful response to a user question in the style of a pirate using exactly 50 words.'
    ],
    'answer': 'Ahoy matey! I be helpin\' ye with yer query, savvy? Here be the answer ye seek, delivered with the flair of the seven seas and the wisdom of old sailors.'
}
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
situation_evaluation_prompt Ran
ran; our contract draft was wrong, not the code
yjiangcm/followbench/code_zh/gpt4_based_evaluation.py
code served (permissive licence) · get_code("76ddbccc5e0a80d1")
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

# Analyze the function to understand what arguments it needs
# The function takes:
# 1. evolve_instructions - used with len() and indexing [0], [1], [2], etc.
# 2. answer - a string that gets concatenated into the prompt

# evolve_instructions should be a list of strings
# The function accesses evolve_instructions[0], evolve_instructions[1], and evolve_instructions[i] for i in range(2, level+1)
# So we need at least 2 elements for level == 1 case, and more for other cases

# Let's create test data for different scenarios
# Case 1: level == 1 (len(evolve_instructions) - 1 == 1, so len == 2)
evolve_instructions_level1 = [
    "Write a creative story about a robot.",
    "Write a creative story about a robot in a futuristic city."
]

answer_level1 = "Once upon a time, in a gleaming futuristic city filled with neon lights and towering skyscrapers, there was a robot named ARIA who dreamed of becoming an artist."

# Case 2: level > 1 (len(evolve_instructions) - 1 > 1)
evolve_instructions_level3 = [
    "Write a creative story about a robot.",
    "Write a creative story about a robot in a futuristic city.",
    "Write a creative story about a robot in a futuristic city that must solve a mystery.",
    "Write a creative story about a robot in a futuristic city that must solve a mystery while avoiding detection."
]

answer_level3 = "In the year 2150, ARIA the robot navigated the bustling streets of Neo-Tokyo, searching for clues about the missing data chip while staying hidden in the shadows."

# Use the level 1 case for the ARGS
ARGS = {
    "evolve_instructions": evolve_instructions_level1,
    "answer": answer_level1
}
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
split_integer Ran
ran, honoured the contract we drafted
yjiangcm/followbench/create_example_constraint.py
code served (permissive licence) · get_code("8773f84b53d306df")
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 int; 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

def split_integer(m, n):
    if n > m:
        print('Error: n should be less than or equal to m')
        return None
    random_numbers = sorted(random.sample(range(1, m), n - 1))
    random_numbers = [0] + random_numbers + [m]
    result = [random_numbers[i + 1] - random_numbers[i] for i in range(n)]
    return result


ARGS = {
    'm': 10,
    'n': 3
}
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 int — 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
style_evaluation_prompt Ran
ran; our contract draft was wrong, not the code
yjiangcm/followbench/code/gpt4_based_evaluation.py
code served (permissive licence) · get_code("575501debe301b98")
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.

# Setup code for style_evaluation_prompt

ARGS = {
    'evolve_instructions': [
        'Write a poem about nature.',
        'Write a poem about nature in a formal style.',
        'Write a poem about nature in a formal style with exactly 4 stanzas.',
    ],
    'answer': 'The forest stands with ancient grace,\nIts verdant boughs frame nature\'s face.\nThe streams that flow through emerald glades,\nSpeak softly through the twilight shades.\n\nEach dawn brings forth a golden light,\nThat paints the world with colors bright.\nThe creatures dance in silent song,\nTo rhythms old, to nature\'s throng.\n\nThe mountains rise in majesty,\nTheir peaks touch clouds eternally.\nThe valleys deep in shadow sleep,\nWhile secrets of the earth they keep.\n\nSo let us praise this world so fair,\nThe beauty dwelling everywhere.\nIn every leaf and every stone,\nWe find a grace we\'ve always known.'
}
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
style_evaluation_prompt Ran
ran; our contract draft was wrong, not the code
yjiangcm/followbench/code_zh/gpt4_based_evaluation.py
code served (permissive licence) · get_code("e9818a2f75966147")
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

torch.manual_seed(0)

# Analyze the function:
# - evolve_instructions: list of strings, accessed by indexing
# - answer: string
# - The function uses len(evolve_instructions) and indexing operations
# - It constructs prompts from these strings

# Create test data
evolve_instructions_level_1 = [
    "Write a short story about a hero.",
    "Write a short story about a hero with a mysterious twist."
]

evolve_instructions_level_3 = [
    "Write a short story about a hero.",
    "Write a short story about a hero with a mysterious twist.",
    "Write a short story about a hero with a mysterious twist and exactly 3 paragraphs.",
    "Write a short story about a hero with a mysterious twist, exactly 3 paragraphs, and in poetic style."
]

answer_1 = "The brave knight emerged from the shadows. He carried an ancient sword. Nobody knew his true identity. The mystery deepened with each step. His destiny was hidden."

answer_3 = "Once upon a time, a brave warrior walked alone. \nThe sword gleamed with secrets untold. \nHis past remained veiled in mystery. \nThe rhythm of his steps echoed like verse. \nFate awaited him at the journey's end."

# Test case 1: level = 1
ARGS = {
    "evolve_instructions": evolve_instructions_level_1,
    "answer": answer_1
}
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
generate_responses Not yet run
unverified (harvested, no recorded run)
yjiangcm/followbench/code/model_inference_vllm.py
code served (permissive licence) · get_code("d607ca385609c6fa")
How it ran

no invocation recorded.

Also present in other papers' code

Of 19 samples lifted from this paper's linked repositories, 19 carry a function identity and 0 do not. Of the 19 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 1 the same month, 1 later) and 18 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
get_json_list 4 other papers
1 the same month, 3 later
2310.09168 (2023-10)
EXPLORE-INSTRUCT: Enhancing Domain-Specific Instruction Coverage through Active Exploration
2024.findings-acl.341 (2024 (year only))
Phased Instruction Fine-Tuning for Large Language Models
2401.10768 (2024-01)
Knowledge Verification to Nip Hallucination in the Bud
and 1 more not named here

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

The ability to follow instructions is crucial for Large Language Models (LLMs) to handle various real-world applications. Existing benchmarks primarily focus on evaluating pure response quality, rather than assessing whether the response follows constraints stated in the instruction. To fill this research gap, in this paper, we propose FollowBench, a Multi-level Fine-grained Constraints Following Benchmark for LLMs. FollowBench comprehensively includes five different types (i.e., Content, Situation, Style, Format, and Example) of fine-grained constraints. To enable a precise constraint following estimation on diverse difficulties, we introduce a Multi-level mechanism that incrementally adds a single constraint to the initial instruction at each increased level. To assess whether LLMs' outputs have satisfied every individual constraint, we propose to prompt strong LLMs with constraint-evolution paths to handle challenging open-ended instructions. By evaluating 13 closed-source and open-source popular LLMs on FollowBench, we highlight the weaknesses of LLMs in instruction following and point towards potential avenues for future work. The data and code are publicly available at https://github.com/YJiangcm/FollowBench.

For agents

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

get_harvested_code_for_paper("2310.20410")
get_code_for_paper("2310.20410")
have("2310.20410")

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

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

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

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

Connect an agent — have() is free.