SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2609.00384 · September 2026

RestoreBench: Can AI Agents Restore Power Flow Convergence?

Qian Zhang, Robert Jakob, Kevin O'sullivan, Riccardo Mansutti, Andrea Pomarico, Alberto Berizzi, Kevin O'Sullivan

arXiv · PDF · Open in the Atlas

Code that ran

3 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; 2 failures of our instrument; 3 no recorded run), measured 2026-11-23; 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/2609.00384.json · badge: /api/ran/2609.00384.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
Mansutti081/RestoreBench canonical (classifier label)
classifier basis: census
3 ran · 3 no recorded run
FunctionStatusWhere it lives
coerce_nested_json Ran
ran; our contract draft was wrong, not the code
Mansutti081/RestoreBench/restorebench/agents/structured_output.py
code served (permissive licence) · get_code("e1eb016fe9bf8c5c")
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 types
import typing
from typing import Any
from pydantic import BaseModel, Field


class NestedModel(BaseModel):
    """A simple nested model."""
    value: int
    name: str


class ComplexModel(BaseModel):
    """A model with various field types."""
    id: int
    text: str
    nested: NestedModel
    items: list[NestedModel]
    optional_nested: NestedModel | None = None


class SimpleModel(BaseModel):
    """A minimal model for testing."""
    count: int


# Test case 1: payload with JSON-encoded nested model
payload_with_json_nested = {
    "id": 42,
    "text": "hello",
    "nested": '{"value": 10, "name": "nested_obj"}',
    "items": '[{"value": 20, "name": "item1"}, {"value": 30, "name": "item2"}]',
    "optional_nested": None
}

# Test case 2: payload that is not a dict
payload_non_dict = "not a dict"

# Test case 3: payload with invalid JSON strings
payload_with_invalid_json = {
    "id": 1,
    "text": "world",
    "nested": "{ invalid json",
    "items": "not json",
    "optional_nested": None
}

# Test case 4: payload with properly formatted nested objects (not strings)
payload_already_decoded = {
    "id": 99,
    "text": "decoded",
    "nested": {"value": 5, "name": "already_dict"},
    "items": [{"value": 15, "name": "item_a"}],
    "optional_nested": None
}

# Test case 5: payload with string fields that look like JSON but shouldn't be parsed
payload_string_field = {
    "id": 7,
    "text": '{"this": "looks like json but is a text field"}',
    "nested": '{"value": 100, "name": "should_decode"}',
    "items": [],
    "optional_nested": None
}

ARGS = {
    "payload": payload_with_json_nested,
    "model": ComplexModel,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic — 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
meaningful_change Ran
ran, honoured the contract we drafted
Mansutti081/RestoreBench/restorebench/agents/progress.py
code served (permissive licence) · get_code("2373abcfa91ea4e7")
How it ran

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

import torch
import numpy as np

OVERSTRESS_QUANTUM = 0.5 / 2 ** 22
MIN_ABSOLUTE_CHANGE = 10 * OVERSTRESS_QUANTUM
MIN_RELATIVE_CHANGE = 0.001

ARGS = {
    "before": 1.5,
    "after": 1.501,
}
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 float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
overstress_verdict Ran
ran; our contract draft was wrong, not the code
Mansutti081/RestoreBench/restorebench/agents/progress.py
code served (permissive licence) · get_code("09edc86f69d36d91")
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
from typing import Literal

# Set seed for reproducibility
torch.manual_seed(0)

# Define the ARGS dictionary with test cases for overstress_verdict
ARGS = {
    "before": 0.03,
    "after": 0.01,
}
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
model_slug Not yet run
unverified (harvested, no recorded run)
Mansutti081/RestoreBench/restorebench/llm/models.py
code served (permissive licence) · get_code("0981bb0a4e9ed4a7")
How it ran

no invocation recorded.

provider_for Not yet run
unverified (harvested, no recorded run)
Mansutti081/RestoreBench/restorebench/llm/models.py
code served (permissive licence) · get_code("690df58b6bf9313d")
How it ran

no invocation recorded.

token_cost_usd Not yet run
unverified (harvested, no recorded run)
Mansutti081/RestoreBench/restorebench/llm/models.py
code served (permissive licence) · get_code("5a00891649f98cec")
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-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 Model (LLM) agents increasingly automate multi-step engineering workflows through tool use, interpretation of intermediate results, and iterative planning. Diagnosing and resolving non-convergent power flow cases is a promising yet largely unexplored application, as it requires engineering judgment, experimentation, and decision-making within constrained action spaces. We introduce a benchmark that evaluates these capabilities across multiple LLMs and three architectures: \emph{chatbot}, \emph{single agent}, and \emph{multi-agent} systems. The evaluation covers two power grids and 46 cases per grid, each requiring one or more corrective actions to restore convergence. The benchmark defines the simulation environment, observation and action spaces, and evaluation metrics, providing a reproducible foundation for developing agentic AI systems for power system planning and operation. The code is available at https://github.com/Mansutti081/RestoreBench

For agents

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

get_harvested_code_for_paper("2609.00384")
get_code_for_paper("2609.00384")
have("2609.00384")

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

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

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

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

Connect an agent — have() is free.