SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2412.21154 · 2024

Aviary: training language agents on challenging scientific tasks

arXiv · PDF · Open in the Atlas

Code that ran

7 of 7 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, 1 violated it and 6 have no contract verdict; 0 failures of our instrument; 0 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/2412.21154.json · badge: /api/ran/2412.21154.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
Future-House/aviary canonical (classifier label)
classifier basis not recorded on the link
6 ran · 0 no recorded run
Future-House/ldp canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
clean_str Ran
ran on a synthesized input
Future-House/aviary/packages/hotpotqa/src/aviary/envs/hotpotqa/env.py
code served (permissive licence) · get_code("55531063786b8630")
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

logger = logging.getLogger(__name__)

def clean_str(p: str) -> str:
    """Clean and normalize a given string by encoding and decoding it.

    Args:
        p: The input string to be cleaned and normalized.

    Returns:
        The cleaned and normalized UTF-8 encoded string.

    Examples:
        >>> clean_str("This is a test string with unicode escape: \\\\u00e9")
        'This is a test string with unicode escape: é'
        >>> clean_str(r"SBN IT\\ICCU\\UBO\\2771748.")  # SEE: https://en.wikipedia.org/wiki/Tricolour_Day
        'SBN IT\\\\ICCU\\\\UBO\\\\2771748.'
    """
    try:
        return p.encode('latin1').decode('unicode-escape').encode('utf-8').decode('utf-8')
    except (UnicodeEncodeError, UnicodeDecodeError):
        logger.debug(f'Replacing bad characters in input string {p!r}.')
        return p.encode(errors='replace').decode('utf-8', errors='replace')


ARGS = {
    'p': "This is a test string with unicode escape: \\u00e9"
}
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
encode_image_to_base64 Ran
ran on a synthesized input
Future-House/aviary/src/aviary/utils.py
code served (permissive licence) · get_code("a01f894e20b35ba3")
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 numpy as np
from PIL import Image
import io

# Create a small test image as numpy array
# Using RGB format: 4 rows, 3 columns, 3 channels
img_array = np.random.randint(0, 256, (4, 3, 3), dtype=np.uint8)

# Also create a PIL Image object as alternative
pil_image = Image.fromarray(img_array, mode='RGB')

# Create image as bytes
buffer = io.BytesIO()
pil_image.save(buffer, format='PNG')
img_bytes = buffer.getvalue()

ARGS = {
    'img': img_array,
    'format': 'PNG'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — 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
fetch_with_retry Ran
ran on a synthesized input
Future-House/aviary/packages/hotpotqa/src/aviary/envs/hotpotqa/env.py
code served (permissive licence) · get_code("580da04192374581")
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 coroutine. 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 httpx
import asyncio
from unittest.mock import AsyncMock, MagicMock

# Create a mock AsyncClient
client = AsyncMock(spec=httpx.AsyncClient)

# Create a mock response object
mock_response = MagicMock(spec=httpx.Response)
mock_response.status_code = 200

# Set up the client.get method to return the mock response
async def mock_get(*args, **kwargs):
    return mock_response

client.get = mock_get

# Define the URL parameter
url = "https://example.com/api/endpoint"

# Define any additional kwargs
kwargs = {
    "timeout": 10,
    "headers": {"User-Agent": "test-agent"}
}

# Construct ARGS dict with all parameters
ARGS = {
    "client": client,
    "url": url,
    "kwargs": kwargs
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
httpx, tenacity — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type coroutine — a coroutine output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a coroutine 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
maybe_wait_for Ran
ran on a synthesized input
Future-House/aviary/src/aviary/env.py
code served (permissive licence) · get_code("4910db1a89176c6d")
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 coroutine. 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 asyncio
from collections.abc import Awaitable
from typing import TypeVar

_T = TypeVar('_T')

async def maybe_wait_for(future: Awaitable[_T], timeout: float | None) -> _T:
    """Apply a timeout to an awaitable if one is provided, otherwise await indefinitely."""
    if timeout is None:
        return await future
    return await asyncio.wait_for(future, timeout)


# Create a simple async function that returns a value
async def sample_async_function():
    await asyncio.sleep(0.01)
    return 42


# Create the awaitable (coroutine)
future = sample_async_function()

# Define timeout - using None to avoid timeout, or a float value
timeout = 5.0

ARGS = {
    'future': future,
    'timeout': timeout,
}
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 coroutine — a coroutine output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a coroutine 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
measure_consensus_proportion Ran
ran, violated the contract we drafted
Future-House/ldp/src/ldp/alg/algorithms.py
code served (permissive licence) · get_code("ed4b4f0080141346")
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) 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 numpy as np

# The function takes two integer parameters: consensus_size and sample_size
# consensus_size represents the number of items in consensus
# sample_size represents the total sample size
# Both are used in simple arithmetic operations

ARGS = {
    "consensus_size": 8,
    "sample_size": 10,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — 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
partial_format Ran
ran on a synthesized input
Future-House/aviary/src/aviary/utils.py
code served (permissive licence) · get_code("42be47bbb1a2ba5a")
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

def partial_format(value: str, **formats) -> str:
    """Partially format a string given a variable amount of formats."""

    class PartialDict:
        def __init__(self, data):
            self.data = data
        
        def __getitem__(self, key: str) -> str:
            if key in self.data:
                return self.data[key]
            return f'{{{key}}}'

    return value.format_map(PartialDict(formats))

ARGS = {
    'value': 'Hello {name}, you have {count} messages and {unknown} items',
    'formats': {
        'name': 'Alice',
        'count': '5'
    }
}
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
validate_base64_image Ran
ran on a synthesized input
Future-House/aviary/src/aviary/utils.py
code served (permissive licence) · get_code("cb9e73e07be980af")
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 base64

# Create a valid base64 encoded image string
# Using a simple valid base64 string that represents image data
image_data = b'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x01'
valid_base64 = base64.b64encode(image_data).decode('utf-8')

# Test with data URI format
image_with_prefix = f'data:image/png;base64,{valid_base64}'

ARGS = {
    'image': image_with_prefix
}
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

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 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 7 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

Solving complex real-world tasks requires cycles of actions and observations. This is particularly true in science, where tasks require many cycles of analysis, tool use, and experimentation. Language agents are promising for automating intellectual tasks in science because they can interact with tools via natural language or code. Yet their flexibility creates conceptual and practical challenges for software implementations, since agents may comprise non-standard components such as internal reasoning, planning, tool usage, as well as the inherent stochasticity of temperature-sampled language models. Here, we introduce Aviary, an extensible gymnasium for language agents. We formalize agents as policies solving language-grounded partially observable Markov decision processes, which we term language decision processes. We then implement five environments, including three challenging scientific environments: (1) manipulating DNA constructs for molecular cloning, (2) answering research questions by accessing scientific literature, and (3) engineering protein stability. These environments were selected for their focus on multi-step reasoning and their relevance to contemporary biology research. Finally, with online training and scaling inference-time compute, we show that language agents backed by open-source, non-frontier LLMs can match and exceed both frontier LLM agents and human experts on multiple tasks at up to 100x lower inference cost.

For agents

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

get_harvested_code_for_paper("2412.21154")
get_code_for_paper("2412.21154")
have("2412.21154")

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

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

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

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

Connect an agent — have() is free.