SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.18959 · ICML · 2025

Context is Key: A Benchmark for Forecasting with Essential Textual Information

Irina Rish, James Requeima, Alexandre Lacoste, Alexandre Drouin, Valentina Zantedeschi, Étienne Marcotte, Nicolas Chapados, Jithendaraa Subramanian, Arjun Ashok, Andrew Williams, Roland Riachi

arXiv · PDF · Open in the Atlas

Code that ran

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

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2410.18959.json · badge: /api/ran/2410.18959.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
ServiceNow/context-is-key-forecasting canonical (classifier label)
classifier basis: census
7 ran · 3 no recorded run
FunctionStatusWhere it lives
get_pivot_table Ran
ran; our contract draft was wrong, not the code
ServiceNow/context-is-key-forecasting/compile_roi_results.py
code served (permissive licence) · get_code("cb657e5c38c661ff")
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 3, 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 sample DataFrame with the required columns
np.random.seed(0)

data = {
    'Task': ['TaskA', 'TaskA', 'TaskA', 'TaskB', 'TaskB', 'TaskB', 'TaskC', 'TaskC'],
    'model_family': ['ModelX', 'ModelY', 'ModelX', 'ModelY', 'ModelX', 'ModelY', 'ModelX', 'ModelY'],
    'metric_value': [1.2, 3.5, 2.1, 4.8, 1.9, 3.2, 2.5, 5.5]
}

df = pd.DataFrame(data)

# Add some NaN values to test the handling
df.loc[1, 'metric_value'] = np.nan

ARGS = {
    'df': df,
    'metric': 'metric_value'
}
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 tuple, ndim 3, 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
get_task_context_info Ran
ran, violated the contract we drafted
ServiceNow/context-is-key-forecasting/task_report.py
code served (permissive licence) · get_code("08076ff8c65f75ee")
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 torch
import pandas as pd


# Create minimal task classes that have _context_sources attribute
class TaskA:
    __name__ = 'TaskA'
    _context_sources = {'c_h', 'c_f'}


class TaskB:
    __name__ = 'TaskB'
    _context_sources = {'c_h', 'c_i', 'c_cov'}


class TaskC:
    __name__ = 'TaskC'
    _context_sources = {'c_causal', 'c_f'}


# Define ARGS
ARGS = {
    'tasks': [TaskA, TaskB, TaskC]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas, torch — 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
intersection_over_union_is_low Ran
ran, violated the contract we drafted
ServiceNow/context-is-key-forecasting/cik_benchmark/window_selection.py
code served (permissive licence) · get_code("56f4e8fbc7611dd5")
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 pandas as pd
import numpy as np

# Create small pandas Series for history and future
np.random.seed(0)

# History series with some values in range [10, 20]
history_data = np.random.uniform(10, 20, 50)
history_series = pd.Series(history_data)

# Future series with some values in range [15, 25]
# This creates a scenario where there's partial overlap
future_data = np.random.uniform(15, 25, 50)
future_series = pd.Series(future_data)

# Define the threshold parameter
threshold = 0.33

ARGS = {
    "history_series": history_series,
    "future_series": future_series,
    "threshold": threshold,
}
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 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
list_tasks_per_column Ran
ran; our contract draft was wrong, not the code
ServiceNow/context-is-key-forecasting/task_report.py
code served (permissive licence) · get_code("7b4c6a300727bc5f")
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 pandas as pd

# Analyze the function:
# - It takes task_info which must be a pandas DataFrame
# - It accesses task_info.columns to iterate over column names
# - It uses task_info[task_info[col]] to filter rows where column col is True
# - It accesses .index on the filtered result to get task names
# - It iterates over tasks and uses them as strings in HTML

# Create a small DataFrame with boolean columns and task names as index
task_info = pd.DataFrame(
    {
        'feature_a': [True, False, True],
        'feature_b': [True, True, False],
        'feature_c': [False, True, True]
    },
    index=['task_1', 'task_2', 'task_3']
)

ARGS = {
    'task_info': task_info
}
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 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
log_transform Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ServiceNow/context-is-key-forecasting/cik_benchmark/memorization_mitigation.py
code served (permissive licence) · get_code("2b233630527d15be")
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 Series. 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 numpy as np
import pandas as pd

# Create a valid pandas Series with positive values
series = pd.Series([1.0, 2.5, 3.7, 0.0, 5.2, 10.0])

ARGS = {
    'series': series
}
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 Series — a Series output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Series output the recorded ndim 1 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
median_absolute_deviation_intersection_is_low Ran
ran; our contract draft was wrong, not the code
ServiceNow/context-is-key-forecasting/cik_benchmark/window_selection.py
code served (permissive licence) · get_code("bcae5878c804fc11")
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 pandas as pd
import numpy as np

# Create small pandas Series for history and future
np.random.seed(0)

# History series: 10 data points with some variation
history_data = np.random.normal(loc=10, scale=2, size=10)
history_series = pd.Series(history_data)

# Future series: 10 data points with different distribution (shifted)
future_data = np.random.normal(loc=12, scale=2, size=10)
future_series = pd.Series(future_data)

# Define threshold parameter
threshold = 0.33

ARGS = {
    "history_series": history_series,
    "future_series": future_series,
    "threshold": threshold,
}
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 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
quartile_intersection_over_union_is_low Ran
ran; our contract draft was wrong, not the code
ServiceNow/context-is-key-forecasting/cik_benchmark/window_selection.py
code served (permissive licence) · get_code("81ce6e95bf87bb4e")
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 pandas as pd
import numpy as np

# Create sample historical series with some variance
np.random.seed(0)
history_data = np.random.normal(loc=100, scale=15, size=50)
history_series = pd.Series(history_data)

# Create sample future series with some overlap but shifted distribution
future_data = np.random.normal(loc=110, scale=15, size=50)
future_series = pd.Series(future_data)

# Define threshold parameter
threshold = 0.33

ARGS = {
    "history_series": history_series,
    "future_series": future_series,
    "threshold": threshold,
}
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 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
add_realistic_noise Not yet run
unverified (harvested, no recorded run)
ServiceNow/context-is-key-forecasting/cik_benchmark/memorization_mitigation.py
code served (permissive licence) · get_code("c92e1fec0d73e3bc")
How it ran

no invocation recorded.

evaluate_task Not yet run
unverified (harvested, no recorded run)
ServiceNow/context-is-key-forecasting/cik_benchmark/evaluation.py
code served (permissive licence) · get_code("0c1246559bdc7189")
How it ran

no invocation recorded.

plot_forecast_univariate Not yet run
unverified (harvested, no recorded run)
ServiceNow/context-is-key-forecasting/cik_benchmark/evaluation.py
code served (permissive licence) · get_code("c4b0077289068ab5")
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-24.

Repositories linked to this paper

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

Abstract

Forecasting is a critical task in decision-making across numerous domains. While historical numerical data provide a start, they fail to convey the complete context for reliable and accurate predictions. Human forecasters frequently rely on additional information, such as background knowledge and constraints, which can efficiently be communicated through natural language. However, in spite of recent progress with LLM-based forecasters, their ability to effectively integrate this textual information remains an open question. To address this, we introduce "Context is Key" (CiK), a time series forecasting benchmark that pairs numerical data with diverse types of carefully crafted textual context, requiring models to integrate both modalities; crucially, every task in CiK requires understanding textual context to be solved successfully. We evaluate a range of approaches, including statistical models, time series foundation models, and LLM-based forecasters, and propose a simple yet effective LLM prompting method that outperforms all other tested methods on our benchmark. Our experiments highlight the importance of incorporating contextual information, demonstrate surprising performance when using LLM-based forecasting models, and also reveal some of their critical shortcomings. This benchmark aims to advance multimodal forecasting by promoting models that are both accurate and accessible to decision-makers with varied technical expertise. The benchmark can be visualized at https://servicenow.github.io/conte xt-is-key-forecasting/v0/.

For agents

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

get_harvested_code_for_paper("2410.18959")
get_code_for_paper("2410.18959")
have("2410.18959")

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

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

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

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

Connect an agent — have() is free.