SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2411.07037 · 2024

LIFBench: Evaluating the Instruction Following Performance and Stability of Large Language Models in Long-Context Scenarios

arXiv · PDF · Open in the Atlas

Code that ran

5 of 6 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 1 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2411.07037.json · badge: /api/ran/2411.07037.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
sheldonwu0327/lif-bench-2024 canonical (classifier label)
classifier basis: census
5 ran · 1 no recorded run
FunctionStatusWhere it lives
get_max_seq_len Ran
ran, honoured the contract we drafted
sheldonwu0327/lif-bench-2024/evaluation/Inference.py
code served (permissive licence) · get_code("8939d1dfa46c845d")
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 torch
from transformers import AutoTokenizer, AutoConfig

torch.manual_seed(0)

# The function takes a model_name string and uses AutoConfig.from_pretrained
# Since we can't do network calls, we need to mock the config loading
# We'll create a minimal stand-in that satisfies the function's needs

class MockConfig:
    def __init__(self, has_model_max_length=False, has_max_sequence_length=False, 
                 has_seq_length=False, has_max_position_embeddings=True):
        if has_model_max_length:
            self.model_max_length = 2048
        elif has_max_sequence_length:
            self.max_sequence_length = 4096
        elif has_seq_length:
            self.seq_length = 8192
        else:
            self.max_position_embeddings = 16384
    
    @staticmethod
    def from_pretrained(model_name, trust_remote_code=True):
        # Return a config with max_position_embeddings as fallback
        return MockConfig(has_max_position_embeddings=True)

# Monkey patch AutoConfig for testing
original_AutoConfig = AutoConfig
AutoConfig.from_pretrained = MockConfig.from_pretrained

ARGS = {
    "model_name": "bert-base-uncased"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — 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
judge_multidoc_batch_label Ran
ran; our contract draft was wrong, not the code
sheldonwu0327/lif-bench-2024/evaluation/EvaluateFunc.py
code served (permissive licence) · get_code("64454c76ea7521f6")
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 re
import json

# Construct a minimal valid output_dict for judge_multidoc_batch_label

output_dict = {
    'param': {
        'candidates': ['A', 'B', 'C', 'D'],
        'rule_key': 'ABCD',
        'doc_keys': [
            {'title': 'Doc 1', 'source': 'Source 1'},
            {'title': 'Doc 2', 'source': 'Source 2'},
            {'source': 'Source 3'},  # Missing title - should get flag += 2
            {}  # Missing both - should get flag = 3
        ]
    },
    'output': '{"doc1": "A", "doc2": "B", "doc3": "C", "doc4": "D"}',
    'label': 4
}

ARGS = {
    'output_dict': output_dict
}
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
judge_multidoc_find_dup_text Ran
ran; our contract draft was wrong, not the code
sheldonwu0327/lif-bench-2024/evaluation/EvaluateFunc.py
code served (permissive licence) · get_code("a1b55214da36caf9")
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 re

ARGS = {
    'output_dict': {
        'output': '[[["John", "Smith"], ["Jane", "Doe"]], [["Alice", "Johnson"]]]',
        'prompt': '\n\n Documents:\nJohn Smith is a developer. Jane Doe works in marketing. Alice Johnson is a designer.\n\n Instructions:\nFind duplicate entries.',
        'param': {
            'info_keys': 'first_name last_name',
            'dup_infos': [
                [
                    {'first_name': 'John', 'last_name': 'Smith'},
                    {'first_name': 'Jane', 'last_name': 'Doe'}
                ],
                [
                    {'first_name': 'Alice', 'last_name': 'Johnson'}
                ]
            ]
        }
    }
}
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
op_answer2map Ran
ran; our contract draft was wrong, not the code
sheldonwu0327/lif-bench-2024/evaluation/EvaluateFunc.py
code served (permissive licence) · get_code("50d1fbd5bc2ffa41")
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 torch
import numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - answer: list of items, each item is iterable (list/array of dicts or strings)
# - need: list of keys to extract from dicts in answer
# - flag: int (0 or 1), controls branching logic
# - t: value used when flag != 0
# - prompt: something that can be checked with "in" operator (string or list)

# Case 1: flag == 0
# - answer items are lists of dicts
# - need contains keys to extract from those dicts
answer_flag0 = [
    [
        {"name": "Alice", "age": "30"},
        {"name": "Bob", "age": "25"}
    ],
    [
        {"name": "Charlie", "age": "35"},
        {"name": "Diana", "age": "28"}
    ]
]

need_flag0 = ["name", "age"]

# Case 2: flag == 1
# - answer items are lists of strings
# - t is used as the value in the map
# - prompt is checked as a substring/membership test
answer_flag1 = [
    ["hello", "world"],
    ["test", "data"]
]

t_value = 42
prompt_value = "hello world test"

ARGS = {
    "answer": answer_flag0,
    "need": need_flag0,
    "flag": 0,
    "t": t_value,
    "prompt": prompt_value
}
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 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
truncate_prompt Ran
ran; our contract draft was wrong, not the code
sheldonwu0327/lif-bench-2024/evaluation/Inference.py
code served (permissive licence) · get_code("d7c8ce8de070ca84")
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 torch
from transformers import AutoTokenizer

class StandInTokenizer:
    def __init__(self):
        self.vocab = {str(i): i for i in range(1000)}
    
    def encode(self, text):
        # Simple mock encoding: split by spaces and convert to token ids
        words = text.split()
        return [hash(word) % 1000 for word in words]
    
    def decode(self, token_ids):
        # Simple mock decoding: convert token ids back to words
        return " ".join([f"word_{tid}" for tid in token_ids])

# Create a mock tokenizer
tokenizer = StandInTokenizer()

# Create valid test data
d = {
    'length': 120,
    'prompt': 'This is the first part of the prompt.\n\n Instructions: This is the instruction part that follows.'
}

ARGS = {
    'd': d,
    'tokenizer': tokenizer,
    'target_len': 120 * 1024
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — 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
api_get Not yet run
unverified (harvested, no recorded run)
sheldonwu0327/lif-bench-2024/evaluation/LLMApi.py
code served (permissive licence) · get_code("b8d8f9fbd7559038")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 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 6 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

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

Repositories linked to this paper

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

Abstract

As Large Language Models (LLMs) evolve in natural language processing (NLP), their ability to stably follow instructions in long-context inputs has become critical for real-world applications. However, existing benchmarks seldom focus on instruction-following in long-context scenarios or stability on different inputs. To bridge this gap, we introduce LIFBench, a scalable dataset designed to evaluate LLMs' instruction-following capabilities and stability across long contexts. LIFBench comprises three long-context scenarios and eleven diverse tasks, featuring 2,766 instructions generated through an automated expansion method across three dimensions: length, expression, and variables. For evaluation, we propose LIFEval, a rubric-based assessment method that enables precise, automated scoring of complex LLM responses without reliance on LLM-assisted assessments or human judgment. This method allows for a comprehensive analysis of model performance and stability from multiple perspectives. We conduct detailed experiments on 20 prominent LLMs across six length intervals. Our work contributes LIFBench and LIFEval as robust tools for assessing LLM performance in complex and long-context settings, offering valuable insights to guide future advancements in LLM development.

For agents

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

get_harvested_code_for_paper("2411.07037")
get_code_for_paper("2411.07037")
have("2411.07037")

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

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

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

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

Connect an agent — have() is free.