SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2607.18603 · 2026

AutoIndex: Learning Representation Programs for Retrieval

Shreyas Chaudhari, Andrew Drozdov, Sam O'nuallain, Nithya Rajkumar, Ramya Narayanasamy, Hanna Jiang

arXiv · PDF · Open in the Atlas

Code that ran

8 of 11 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (4 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 4 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/2607.18603.json · badge: /api/ran/2607.18603.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
auto-index/autoindex community
Papers with Code archive
8 ran · 3 no recorded run
FunctionStatusWhere it lives
Hypothesis Ran
ran on a synthesized input · constructed an object; no result was computed
auto-index/autoindex/src/agents/analysis_code_agent/code_agent.py
code served (permissive licence) · get_code("c6a20ef7f9b42f90")
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 an instance of its own class, Hypothesis: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn
from dataclasses import dataclass, field

torch.manual_seed(0)

ARGS = {
    'id': 'hyp_001',
    'description': 'Test hypothesis for model behavior',
    'rationale': 'This hypothesis tests whether the model produces expected outputs',
    'code': 'def test_fn(x):\n    return x * 2',
    'query_ids_to_test': ['q1', 'q2', 'q3'],
    'falsifying_condition': 'output > 100'
}
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 Hypothesis — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Hypothesis 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
_Choice Ran
ran on a synthesized input · constructed an object; no result was computed
auto-index/autoindex/src/agents/analysis_code_agent/code_agent.py
code served (permissive licence) · get_code("f406220751c5b51b")
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 an instance of its own class, _Choice: the run constructed the object and did not call it, so no result was computed. 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
from dataclasses import dataclass, field

@dataclass
class _Message:
    content: str = ''

@dataclass
class _Choice:
    message: _Message = field(default_factory=_Message)

torch.manual_seed(0)

# Create a _Message instance with some content
message_instance = _Message(content="Hello, this is a test message.")

# Create the ARGS dict mapping the _Choice parameter to its value
ARGS = {
    'message': message_instance
}
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 _Choice — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a _Choice 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
_Message Ran
ran on a synthesized input · constructed an object; no result was computed
auto-index/autoindex/src/agents/analysis_code_agent/code_agent.py
code served (permissive licence) · get_code("7e3f2959dc03518b")
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 an instance of its own class, _Message: the run constructed the object and did not call it, so no result was computed. 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
from dataclasses import dataclass, field

torch.manual_seed(0)

@dataclass
class _Message:
    content: str = ''

ARGS = {
    'content': 'Hello, world!'
}
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 _Message — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a _Message 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
_Usage Ran
ran on a synthesized input · constructed an object; no result was computed
auto-index/autoindex/src/agents/analysis_code_agent/code_agent.py
code served (permissive licence) · get_code("21196f7236799cfd")
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 an instance of its own class, _Usage: the run constructed the object and did not call it, so no result was computed. 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
from dataclasses import dataclass, field

torch.manual_seed(0)

@dataclass
class _Usage:
    prompt_tokens: int = 0
    completion_tokens: int = 0

ARGS = {
    "prompt_tokens": 150,
    "completion_tokens": 50,
}
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 _Usage — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a _Usage 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
_acall_litellm Ran
ran; our contract draft was wrong, not the code
auto-index/autoindex/src/agents/analysis_code_agent/code_agent.py
code served (permissive licence) · get_code("81e5088bdb5e0e20")
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 dataclasses import dataclass, field
from typing import Any

@dataclass
class _Message:
    content: str = ''

@dataclass
class _Usage:
    prompt_tokens: int = 0
    completion_tokens: int = 0

@dataclass
class _Choice:
    message: _Message = field(default_factory=_Message)

@dataclass
class _Response:
    choices: list[_Choice] = field(default_factory=list)
    usage: _Usage = field(default_factory=_Usage)

ARGS = {
    'model': 'gpt-3.5-turbo',
    'messages': [
        {'role': 'user', 'content': 'Hello, how are you?'},
        {'role': 'assistant', 'content': 'I am doing well, thank you for asking.'}
    ],
    'temperature': 0.7,
    'api_key': 'test-api-key-12345',
    'api_base': 'https://api.openai.com/v1',
    'timeout': 30.0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
litellm — 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
_call_litellm Ran
ran; our contract draft was wrong, not the code
auto-index/autoindex/src/agents/analysis_code_agent/code_agent.py
code served (permissive licence) · get_code("74a8b0c833bfe34c")
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 _Response. 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 dataclasses import dataclass, field
from typing import Any

# Define the dataclasses as they appear in the function
@dataclass
class _Message:
    content: str = ''

@dataclass
class _Usage:
    prompt_tokens: int = 0
    completion_tokens: int = 0

@dataclass
class _Choice:
    message: _Message = field(default_factory=_Message)

@dataclass
class _Response:
    choices: list[_Choice] = field(default_factory=list)
    usage: _Usage = field(default_factory=_Usage)

# Create mock litellm module to avoid network calls
class MockLiteLLM:
    drop_params = False
    
    @staticmethod
    def completion(**kwargs):
        # Return a mock _Response object
        msg = _Message(content="Mock response from LiteLLM")
        choice = _Choice(message=msg)
        usage = _Usage(prompt_tokens=10, completion_tokens=20)
        response = _Response(choices=[choice], usage=usage)
        return response

# Inject mock litellm into sys.modules to prevent actual network calls
import sys
sys.modules['litellm'] = MockLiteLLM()

# Now construct valid arguments for _call_litellm
ARGS = {
    'model': 'gpt-3.5-turbo',
    'messages': [
        {'role': 'user', 'content': 'Hello, how are you?'},
        {'role': 'assistant', 'content': 'I am doing well.'}
    ],
    'temperature': 0.7,
    'api_key': 'test-api-key-12345',
    'api_base': 'https://api.openai.com/v1',
    'timeout': 30.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
litellm, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type _Response — a _Response output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a _Response 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
async_completion Ran
ran; our contract draft was wrong, not the code
auto-index/autoindex/src/agents/analysis_code_agent/code_agent.py
code served (permissive licence) · get_code("a1f88d71a830a816")
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 os
from dataclasses import dataclass, field
from typing import Any

@dataclass
class _Message:
    content: str = ''

@dataclass
class _Usage:
    prompt_tokens: int = 0
    completion_tokens: int = 0

@dataclass
class _Choice:
    message: _Message = field(default_factory=_Message)

@dataclass
class _Response:
    choices: list[_Choice] = field(default_factory=list)
    usage: _Usage = field(default_factory=_Usage)

# Set up environment variables
os.environ['GEMINI_API_KEY'] = 'test_gemini_key_12345'
os.environ['GOOGLE_API_KEY'] = 'test_google_key_12345'

# Define valid arguments for async_completion
ARGS = {
    'model': 'gpt-3.5-turbo',
    'messages': [
        {'role': 'user', 'content': 'Hello, how are you?'},
        {'role': 'assistant', 'content': 'I am doing well.'}
    ],
    'temperature': 0.7,
    'api_key': 'test_api_key_value',
    'api_base': 'https://api.openai.com/v1',
    'timeout': 30.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
litellm — 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
completion Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
auto-index/autoindex/src/agents/analysis_code_agent/code_agent.py
code served (permissive licence) · get_code("4c672d8bf8427550")
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 _Response. 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 os
from dataclasses import dataclass, field
from typing import Any

@dataclass
class _Message:
    content: str = ''

@dataclass
class _Usage:
    prompt_tokens: int = 0
    completion_tokens: int = 0

@dataclass
class _Choice:
    message: _Message = field(default_factory=_Message)

@dataclass
class _Response:
    choices: list[_Choice] = field(default_factory=list)
    usage: _Usage = field(default_factory=_Usage)

def _call_litellm(model: str, messages: list[dict], temperature: float, api_key: str | None, api_base: str | None, timeout: float | None=None, **kwargs: Any) -> _Response:
    """Call LiteLLM (handles OpenAI-compatible proxies and other providers)."""
    import litellm
    litellm.drop_params = True
    call_kwargs = dict(model=model, messages=messages, temperature=temperature, api_key=api_key, api_base=api_base, num_retries=3, **kwargs)
    if timeout is not None:
        call_kwargs['timeout'] = timeout
    resp = litellm.completion(**call_kwargs)
    return resp

def completion(model: str, messages: list[dict], temperature: float=0.7, api_key: str | None=None, api_base: str | None=None, timeout: float | None=None, **kwargs: Any) -> _Response:
    """Route all models through LiteLLM for unified tool-call support."""
    if model.startswith('gemini/'):
        api_key = os.environ.get('GEMINI_API_KEY') or os.environ.get('GOOGLE_API_KEY')
        api_base = None
    return _call_litellm(model, messages, temperature, api_key, api_base, timeout=timeout, **kwargs)

ARGS = {
    'model': 'gpt-3.5-turbo',
    'messages': [
        {'role': 'user', 'content': 'Hello'},
        {'role': 'assistant', 'content': 'Hi there'}
    ],
    'temperature': 0.7,
    'api_key': 'test-key-123',
    'api_base': None,
    'timeout': 30.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
litellm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type _Response — a _Response output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a _Response 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
CodeAgent Not yet run
unverified (harvested, no recorded run)
auto-index/autoindex/src/agents/analysis_code_agent/code_agent.py
code served (permissive licence) · get_code("c88c318aca921ea6")
How it ran

no invocation recorded.

HypothesisResult Not yet run
unverified (harvested, no recorded run)
auto-index/autoindex/src/agents/analysis_code_agent/code_agent.py
code served (permissive licence) · get_code("73b5fe680a95cce8")
How it ran

no invocation recorded.

_Response Not yet run
unverified (harvested, no recorded run)
auto-index/autoindex/src/agents/analysis_code_agent/code_agent.py
code served (permissive licence) · get_code("8ae6d71349d2cd3f")
How it ran

no invocation recorded.

Also present in other papers' code

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

We present AutoIndex, a framework for learning representation programs: executable transformations that map raw documents into the representations exposed to a retrieval system. Rather than tuning retrievers, rerankers, or a small set of preprocessing hyperparameters, AutoIndex searches over programs that slice, enrich, normalize, reweight, or reorganize documents before indexing. At each iteration, AutoIndex performs validation-guided program search, in which agents diagnose failures of the current program and synthesize candidate updates, retaining only updates that improve retrieval quality under the resulting index. We evaluate AutoIndex on CRUMB, a benchmark of heterogeneous retrieval tasks, with BM25 held fixed across all experiments. The learned programs improve recall over a static full-document BM25 baseline on all 8 tasks, with average gains of +8.4% in Recall@100 and +8.3% in nDCG@10, and largest gains of +30.5% in Recall@100 and +43.6% in nDCG@10. These results suggest that document representation should not be treated as a fixed preprocessing choice made before retrieval begins, but as an explicit optimization target. Code to reproduce our results is available at https://github.com/auto-index/autoindex.

For agents

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

get_harvested_code_for_paper("2607.18603")
get_code_for_paper("2607.18603")
have("2607.18603")

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

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

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

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

Connect an agent — have() is free.