SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2311.09476 · 2023

ARES: An Automated Evaluation Framework for Retrieval-Augmented Generation Systems

arXiv · PDF · Open in the Atlas

Code that ran

13 of 15 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 0 have no contract verdict; 12 failures of our instrument; 2 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/2311.09476.json · badge: /api/ran/2311.09476.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
stanford-futuredata/ares canonical (classifier label)
classifier basis: census
13 ran · 2 no recorded run
FunctionStatusWhere it lives
clean_document Ran
ran; our contract draft was wrong, not the code
stanford-futuredata/ares/ares/LLM_as_a_Judge_Adaptation/Generate_Synthetic_Queries_and_Answers.py
code served (permissive licence) · get_code("be55464f5573337e")
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 re

def clean_document(document: str) -> str:
    """
    Cleans the input document by removing unnecessary whitespace characters and replacing certain punctuation.

    Args:
        document (str): The original document text that needs to be cleaned.

    Returns:
        str: The cleaned document text.
    """
    cleaned_document = re.sub('\\n+', '\n', document.replace('\r', ' ').replace('\t', ' ')).strip()
    cleaned_document = cleaned_document.replace('=', ' ').replace('-', ' ')
    cleaned_document = re.sub('\\s+', ' ', cleaned_document).strip()
    cleaned_document = ' '.join(cleaned_document.split(' '))
    return cleaned_document


# Setup code to construct valid arguments
test_document = """This is a sample document
with multiple\tlines\rand\nnewlines.
It has some=punctuation and-dashes
that should be cleaned     up."""

ARGS = {
    "document": test_document
}
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
combine_query_document Ran
ran; our contract draft was wrong, not the code
stanford-futuredata/ares/ares/LLM_as_a_Judge_Adaptation/General_Binary_Classifier.py
code served (permissive licence) · get_code("7c82adfbee243a31")
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 re

def combine_query_document(query: str, document: str, answer: str=None) -> str:
    """
    Combines a query and a document into a single string, optionally including an answer.

    Parameters:
    query (str): The query string.
    document (str): The document string.
    answer (str, optional): The answer string. Defaults to None.

    Returns:
    str: A combined string of the query, cleaned document, and optionally the answer.
    """
    cleaned_document = re.sub('\\n+', '\n', document.replace('\r', ' ').replace('\t', ' ')).strip()
    cleaned_document = cleaned_document.replace('=', ' ').replace('-', ' ')
    cleaned_document = re.sub('\\s+', ' ', cleaned_document).strip()
    cleaned_document = ' '.join(cleaned_document.split(' ')[:512])
    if len(query.split(' ')) > 100:
        query = ' '.join(query.split(' ')[:30])
    if answer is None:
        return query + ' | ' + cleaned_document
    else:
        try:
            return query + ' | ' + cleaned_document + ' | ' + answer
        except Exception as e:
            breakpoint()
            print('Error with combine_query_document')
            print('Query: ' + str(query))
            print('Cleaned Document: ' + str(cleaned_document))
            print('Answer: ' + str(answer))
            return str(query) + ' | ' + str(cleaned_document) + ' | ' + str(answer)


ARGS = {
    "query": "What is machine learning?",
    "document": "Machine learning is a subset of artificial intelligence.\nIt involves algorithms that learn from data.\tThe models improve over time.",
    "answer": "Machine learning is an AI technique that learns from data."
}
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
extract_query Ran
ran; our contract draft was wrong, not the code
stanford-futuredata/ares/ares/ues_idp.py
code served (permissive licence) · get_code("61ab13d53232f752")
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 pandas as pd
import sys

# Create sample DataFrames for testing
row_data = pd.Series({
    'Query': 'What is machine learning?',
    'other_field': 'some_value'
})

in_domain_prompts_data = pd.DataFrame({
    'Query': ['How does neural networks work?', 'What is deep learning?'],
    'Answer': ['Neural networks are...', 'Deep learning is...']
})

ARGS = {
    'row': row_data,
    'in_domain_prompts_dataset': in_domain_prompts_data
}
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 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
format_text_for_fine_tuning_content_relevance_sequence_classification Ran
ran; our contract draft was wrong, not the code
stanford-futuredata/ares/ares/LLM_as_a_Judge_Adaptation/General_Binary_Classifier.py
code served (permissive licence) · get_code("73c0cc4134a54844")
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 re

# Simple test strings for question and document
question = "What is the capital of France?"
document = """Paris is the capital and most populous city of France. 
It is situated on the Seine River in the north-central part of the country.
Paris has long been one of the world's major centres of finance, diplomacy, commerce, fashion, 
gastronomy, science, and the arts."""

ARGS = {
    "question": question,
    "document": document,
}
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
generate_answer_llm_approach Ran
ran; our contract draft was wrong, not the code
stanford-futuredata/ares/ares/LLM_as_a_Judge_Adaptation/LLM_Generation_Functions.py
code served (permissive licence) · get_code("54900b5472f388a3")
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 torch.nn as nn
from unittest.mock import MagicMock

torch.manual_seed(0)

# Create a minimal tokenizer stand-in
class MinimalTokenizer:
    def __init__(self):
        self.model_max_length = 2048
    
    def encode(self, text, return_tensors=None, max_length=None, truncation=False):
        # Simulate tokenization: return a small tensor
        # Length varies based on text length to simulate real tokenization
        token_count = max(1, len(text.split()) // 5 + 1)
        if max_length is not None and truncation:
            token_count = min(token_count, max_length)
        
        tokens = torch.tensor([[i % 1000 for i in range(token_count)]])
        
        if return_tensors == 'pt':
            return tokens
        return tokens.tolist()
    
    def decode(self, token_ids, skip_special_tokens=False):
        # Simple decode that returns a dummy string
        return "decoded text response"

# Create a minimal model stand-in
class MinimalCausalLM(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def generate(self, input_ids, max_length=256, do_sample=True, top_p=0.05, num_return_sequences=1):
        # Simulate generation: return a tensor of token IDs
        batch_size = input_ids.shape[0]
        gen_length = 50
        return torch.randint(0, 1000, (batch_size, gen_length))

# Construct the arguments
ARGS = {
    "document": "This is a sample document containing relevant information about the topic.",
    "question": "What is the main point of this document?",
    "prompt": "You are a helpful assistant that answers questions based on documents.\n\n",
    "length_of_fewshot_prompt": 2,
    "device": torch.device("cpu"),
    "tokenizer": MinimalTokenizer(),
    "model": MinimalCausalLM(),
    "for_fever_dataset": False,
    "for_wow_dataset": False,
}
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 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
generate_synthetic_query_azure_approach Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
stanford-futuredata/ares/ares/LLM_as_a_Judge_Adaptation/LLM_Synthetic_Generation.py
code served (permissive licence) · get_code("81baf8a93919f0bf")
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 list, 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.

from unittest.mock import Mock, MagicMock
import torch

# Mock the Azure OpenAI client and its responses
mock_client = Mock()
mock_completion = Mock()
mock_choice = Mock()
mock_message = Mock()

# Setup the mock response chain
mock_message.content = "What is the capital of France?"
mock_choice.message = mock_message
mock_completion.choices = [mock_choice]
mock_client.chat.completions.create = Mock(return_value=mock_completion)

# Create the azure_openai_config dictionary
azure_openai_config = {
    'api_key': 'test-api-key-12345',
    'model_version': '2024-02-15-preview',
    'api_base': 'https://test.openai.azure.com/',
    'deployment_name': 'test-deployment'
}

# Create a sample document
document = "France is a country in Western Europe. The capital of France is Paris. Paris is known for the Eiffel Tower and is one of the most visited cities in the world."

# Create the synthetic query prompt
synthetic_query_prompt = "You are a helpful assistant that generates relevant questions based on documents. Generate a question that can be answered by the provided document."

# Create the initial prompt with few-shot examples
prompt = """Example 1:
Document: The Eiffel Tower is located in Paris, France.
Question: Where is the Eiffel Tower located?

Example 2:
Document: London is the capital of England.
Question: What is the capital of England?

"""

# Length of few-shot prompt (number of examples already in the prompt)
length_of_fewshot_prompt = 2

# List of percentiles for temperature sampling
percentiles = [0.7, 0.9]

# Number of queries to generate
num_queries = 2

ARGS = {
    'document': document,
    'azure_openai_config': azure_openai_config,
    'synthetic_query_prompt': synthetic_query_prompt,
    'prompt': prompt,
    'length_of_fewshot_prompt': length_of_fewshot_prompt,
    'percentiles': percentiles,
    'for_fever_dataset': False,
    'for_wow_dataset': False,
    'num_queries': num_queries
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list 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
generate_synthetic_query_llm_approach Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
stanford-futuredata/ares/ares/LLM_as_a_Judge_Adaptation/LLM_Generation_Functions.py
code served (permissive licence) · get_code("3c6369d4f5e9351e")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 torch.nn as nn

torch.manual_seed(0)

class MockTokenizer:
    def __init__(self):
        self.vocab_size = 1000
        
    def encode(self, text, max_length=None, truncation=False, return_tensors=None):
        # Simulate tokenization with deterministic length based on text
        token_count = max(10, len(text) // 10)
        if max_length is not None and truncation:
            token_count = min(token_count, max_length)
        tokens = torch.tensor([[i % self.vocab_size for i in range(token_count)]])
        return tokens
    
    def decode(self, token_ids, skip_special_tokens=False):
        # Convert token ids back to text
        return "decoded text " + str(len(token_ids))

class MockModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.embed = nn.Embedding(1000, 8)
    
    def generate(self, input_ids, max_length, do_sample, top_p, num_return_sequences):
        # Generate dummy output tokens
        batch_size = input_ids.shape[0]
        output_length = max_length
        output_ids = torch.randint(0, 1000, (batch_size * num_return_sequences, output_length))
        return output_ids

device = torch.device('cpu')
tokenizer = MockTokenizer()
model = MockModel()

document = "This is a sample document with some content about a specific topic."
prompt = "Example 1:\nDocument: Some text\nQuestion: What is this?\n\n"
length_of_fewshot_prompt = 1
percentiles = [0.8, 0.9]

ARGS = {
    "document": document,
    "prompt": prompt,
    "length_of_fewshot_prompt": length_of_fewshot_prompt,
    "device": device,
    "tokenizer": tokenizer,
    "model": model,
    "percentiles": percentiles,
    "for_fever_dataset": False,
    "for_wow_dataset": False
}
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 list, ndim 1, dtype family float — a list 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
generate_synthetic_query_openai_approach Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
stanford-futuredata/ares/ares/LLM_as_a_Judge_Adaptation/LLM_Generation_Functions.py
code served (permissive licence) · get_code("56ba849663090e79")
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 list, 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 time
import openai

# Mock the OpenAI API to avoid network calls
class MockOpenAIResponse:
    def __init__(self, content):
        self.content = content
    
    def __getitem__(self, key):
        if key == 'choices':
            return [{'message': {'content': self.content}}]
        raise KeyError(key)

# Patch openai.ChatCompletion.create to return mock responses
def mock_chat_completion_create(model, messages, temperature):
    """Mock function to replace openai.ChatCompletion.create"""
    return MockOpenAIResponse(f"What is the main topic of this document?")

openai.ChatCompletion.create = mock_chat_completion_create

# Define the arguments
ARGS = {
    'document': 'The solar system consists of the Sun and all objects that orbit it, including planets, moons, and asteroids. Earth is the third planet from the Sun and is the only known planet to harbor life.',
    'system_prompt': 'You are a helpful assistant that generates relevant questions for given documents. Generate exactly one clear and concise question.',
    'few_shot_examples': 'Example 1:\nDocument: Machine learning is a subset of artificial intelligence.\nQuestion: What is machine learning?\n\nExample 2:\nDocument: Photosynthesis is the process by which plants convert sunlight into chemical energy.\nQuestion: How do plants convert sunlight?\n\n',
    'temperatures': [0.5, 0.7, 0.9],
    'length_of_fewshot_prompt': 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list 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
generate_synthetic_query_vllm_approach Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
stanford-futuredata/ares/ares/LLM_as_a_Judge_Adaptation/LLM_Synthetic_Generation.py
code served (permissive licence) · get_code("67d0f16bdaed8f97")
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 list, 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 unittest.mock import Mock, MagicMock, patch

# Mock the OpenAI client to avoid actual API calls
mock_response = Mock()
mock_choice = Mock()
mock_message = Mock()
mock_message.content = "What is the main topic of this document?"
mock_choice.message = mock_message
mock_response.choices = [mock_choice]

# Define the arguments dictionary
ARGS = {
    "document": "This is a sample document about artificial intelligence and machine learning. It discusses various applications of AI in modern society including healthcare, finance, and education. The document explores both the benefits and challenges of implementing AI systems.",
    "synthetic_query_prompt": "Generate a natural question that could be asked about the provided document. The question should be clear and answerable from the document content.",
    "prompt": "Example 1:\nDocument: Sample text\nQuestion: What is this about?\n\nExample 2:\nDocument: Another sample\nQuestion: What is the topic?",
    "length_of_fewshot_prompt": 2,
    "model_name": "gpt-3.5-turbo",
    "percentiles": [0.5, 0.7, 0.9],
    "host_url": "http://localhost:8000/v1",
    "for_fever_dataset": False,
    "for_wow_dataset": False,
    "num_queries": 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list 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
load_model Ran
ran; our contract draft was wrong, not the code
stanford-futuredata/ares/ares/LLM_as_a_Judge_Adaptation/Generate_Synthetic_Queries_and_Answers.py
code served (permissive licence) · get_code("0b7eddc443d1a412")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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, AutoModelForCausalLM

torch.manual_seed(0)

# For api_model=True case
ARGS_api = {
    'model_choice': 'gpt-3.5-turbo',
    'api_model': True,
    'vllm': False
}

# For vllm=True case
ARGS_vllm = {
    'model_choice': 'gpt2',
    'api_model': False,
    'vllm': True
}

# For standard model loading case (Llama)
ARGS_llama = {
    'model_choice': 'gpt2',
    'api_model': False,
    'vllm': False
}

# Use the simplest case (api_model=True) to avoid actual model downloads
ARGS = ARGS_api
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
tokenize_function Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
stanford-futuredata/ares/ares/LLM_as_a_Judge_Adaptation/General_Binary_Classifier.py
code served (permissive licence) · get_code("042e539c6d8bd3de")
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 torch
import torch.nn as nn
from transformers import AutoTokenizer

# Create a minimal stand-in tokenizer that implements the required interface
class MinimalTokenizer:
    def __init__(self):
        self.model_max_length = 512
    
    def __call__(self, text, padding='max_length', truncation=True):
        """
        Tokenizes text and returns a dict with input_ids and attention_mask.
        """
        # Handle both single strings and lists of strings
        if isinstance(text, str):
            text = [text]
        
        # Create mock tokenized output
        batch_size = len(text)
        max_length = 10  # Small fixed length for testing
        
        input_ids = torch.randint(0, 1000, (batch_size, max_length))
        attention_mask = torch.ones((batch_size, max_length), dtype=torch.long)
        
        return {
            'input_ids': input_ids,
            'attention_mask': attention_mask
        }

# Create example data with 'text' key as required by the function
examples = {
    'text': [
        "This is the first example text.",
        "This is the second example text."
    ]
}

# Create tokenizer instance
tokenizer = MinimalTokenizer()

# Define ARGS mapping all parameters
ARGS = {
    'tokenizer': tokenizer,
    'examples': examples
}
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 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
validate_input_file Ran
ran, violated the contract we drafted
stanford-futuredata/ares/ares/LLM_as_a_Judge_Adaptation/Generate_Synthetic_Queries_and_Answers.py
code served (permissive licence) · get_code("76a2c2ec78a2884c")
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 sys

# Create a valid DataFrame with required columns
df_valid = pd.DataFrame({
    'name': ['Alice', 'Bob', 'Charlie'],
    'age': [25, 30, 35],
    'email': ['alice@example.com', 'bob@example.com', 'charlie@example.com']
})

# Define required columns that exist in the DataFrame
required_columns = ['name', 'age', 'email']

ARGS = {
    'df': df_valid,
    'required_columns': required_columns
}
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 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
validate_inputs Ran
ran; our contract draft was wrong, not the code
stanford-futuredata/ares/ares/ues_idp.py
code served (permissive licence) · get_code("9174b9f97d72aed9")
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. 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
import tempfile
import os

# Create temporary CSV files for testing
temp_dir = tempfile.mkdtemp()

# Create in-domain prompts dataset
in_domain_data = pd.DataFrame({
    'prompt': ['What is AI?', 'Explain ML', 'Define NLP'],
    'text': ['Artificial intelligence is...', 'Machine learning is...', 'Natural language processing is...']
})
in_domain_path = os.path.join(temp_dir, 'in_domain.tsv')
in_domain_data.to_csv(in_domain_path, sep='\t', index=False)

# Create unlabeled evaluation set
unlabeled_data = pd.DataFrame({
    'id': [1, 2, 3, 4, 5],
    'content': ['text1', 'text2', 'text3', 'text4', 'text5']
})
unlabeled_path = os.path.join(temp_dir, 'unlabeled.tsv')
unlabeled_data.to_csv(unlabeled_path, sep='\t', index=False)

ARGS = {
    'vllm': True,
    'host_url': 'http://localhost:8000',
    'in_domain_prompts_dataset': in_domain_path,
    'unlabeled_evaluation_set': unlabeled_path,
    'documents': 3
}
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 tuple — a tuple output has no array shape of its own; none is 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
filter_synthetic_queries Not yet run
unverified (harvested, no recorded run)
stanford-futuredata/ares/ares/LLM_as_a_Judge_Adaptation/Filter_Synthetic_Queries.py
code served (permissive licence) · get_code("591b6449ad73d522")
How it ran

no invocation recorded.

get_embedding Not yet run
unverified (harvested, no recorded run)
stanford-futuredata/ares/ares/LLM_as_a_Judge_Adaptation/Filter_Synthetic_Queries.py
code served (permissive licence) · get_code("30599a80b9dc6909")
How it ran

no invocation recorded.

Also present in other papers' code

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

Evaluating retrieval-augmented generation (RAG) systems traditionally relies on hand annotations for input queries, passages to retrieve, and responses to generate. We introduce ARES, an Automated RAG Evaluation System, for evaluating RAG systems along the dimensions of context relevance, answer faithfulness, and answer relevance. By creating its own synthetic training data, ARES finetunes lightweight LM judges to assess the quality of individual RAG components. To mitigate potential prediction errors, ARES utilizes a small set of human-annotated datapoints for prediction-powered inference (PPI). Across eight different knowledge-intensive tasks in KILT, SuperGLUE, and AIS, ARES accurately evaluates RAG systems while using only a few hundred human annotations during evaluation. Furthermore, ARES judges remain effective across domain shifts, proving accurate even after changing the type of queries and/or documents used in the evaluated RAG systems. We make our code and datasets publicly available on Github.

For agents

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

get_harvested_code_for_paper("2311.09476")
get_code_for_paper("2311.09476")
have("2311.09476")

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

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

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

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

Connect an agent — have() is free.