SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2407.13998 · EMNLP · 2024

RAG-QA Arena: Evaluating Domain Robustness for Long-Form Retrieval-Augmented Question Answering

Yuhao Zhang, William Wang, Vittorio Castelli, Samaya Ai, Rujun Han, Peng Qi, Yumo Xu, Bonan Min, Lan Liu, Jenyuan Wang, Orby Ai

arXiv · PDF · Open in the Atlas

Code that ran

6 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; 5 failures of our instrument; 0 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/2407.13998.json · badge: /api/ran/2407.13998.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
awslabs/rag-qa-arena canonical (classifier label)
classifier basis: census
6 ran · 0 no recorded run
FunctionStatusWhere it lives
aggregate_evaluators Ran
ran; our contract draft was wrong, not the code
awslabs/rag-qa-arena/code/compute_correlation.py
code served (permissive licence) · get_code("aa19139fac3fef82")
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 tempfile
import os

# Create temporary directory for test files
temp_dir = tempfile.mkdtemp()

# Create sample evaluation JSON files
eval_data_1 = [
    {
        'order': {'1': 'model_a', '2': 'model_b', '0': 'tie'},
        'prompt': '<answer 1>\nThis is a response from model one that is longer\n</answer 1>\n<answer 2>\nShort response\n</answer 2>',
        'pred': '<rating>1</rating>',
        'query': 'What is machine learning?',
        'pair_id': 'pair_001',
        'passages': ['passage 1', 'passage 2'],
        'reference': 'reference answer'
    },
    {
        'order': {'1': 'model_c', '2': 'model_d', '0': 'tie'},
        'prompt': '<answer 1>\nModel response\n</answer 1>\n<answer 2>\nAnother response\n</answer 2>',
        'pred': '<rating>2</rating>',
        'query': 'How does deep learning work?',
        'pair_id': 'pair_002',
        'passages': ['passage 3'],
        'reference': 'ref answer'
    },
    {
        'order': {'1': 'model_e', '2': 'model_f', '0': 'tie'},
        'prompt': '<answer 1>\nIdentical answer here\n</answer 1>\n<answer 2>\nIdentical answer here\n</answer 2>',
        'pred': '<rating>0</rating>',
        'query': 'What is AI?',
        'pair_id': 'pair_003',
        'passages': [],
    }
]

eval_data_2 = [
    {
        'order': {'1': 'model_a', '2': 'model_b', '0': 'tie'},
        'prompt': '<answer 1>\nResponse from model\n</answer 1>\n<answer 2>\nAlternative response\n</answer 2>',
        'pred': '<rating>2</rating>',
        'query': 'What is machine learning?',
        'pair_id': 'pair_001',
        'passages': ['passage 1', 'passage 2'],
    },
    {
        'order': {'1': 'model_c', '2': 'model_d', '0': 'tie'},
        'prompt': '<answer 1>\nResponse A\n</answer 1>\n<answer 2>\nResponse B\n</answer 2>',
        'pred': '<rating>1</rating>',
        'query': 'How does deep learning work?',
        'pair_id': 'pair_002',
        'passages': ['passage 3'],
    },
    {
        'order': {'1': 'model_e', '2': 'model_f', '0': 'tie'},
        'prompt': '<answer 1>\nSame text\n</answer 1>\n<answer 2>\nSame text\n</answer 2>',
        'pred': 'FAIL TO GENERATE ANS.',
        'query': 'What is AI?',
        'pair_id': 'pair_003',
        'passages': [],
    }
]

# Write evaluation files
file_path_1 = os.path.join(temp_dir, 'model_1_model_2_eval_by_evaluator_1.json')
file_path_2 = os.path.join(temp_dir, 'model_1_model_2_eval_by_evaluator_2.json')

with open(file_path_1, 'w') as f:
    json.dump(eval_data_1, f)

with open(file_path_2, 'w') as f:
    json.dump(eval_data_2, f)

ARGS = {
    'target_models': ['model_1', 'model_2'],
    'eval_models': ['evaluator_1', 'evaluator_2'],
    'root': temp_dir + '/',
    'domain': '',
    'print_individual': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
cal_score Ran
ran, honoured the contract we drafted
awslabs/rag-qa-arena/code/compute_correlation.py
code served (permissive licence) · get_code("f9c8fa3e82ecea98")
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 int, ndim 0, dtype family int, 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 torch.nn as nn

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 2)
    
    def forward(self, x):
        return self.linear(x)

# Create two distinct models for comparison
model1 = SimpleModel()
model2 = SimpleModel()

# Create a label that matches one of the models
label = model1

# Create models list with the two models
models = [model1, model2]

ARGS = {
    "label": label,
    "models": models
}
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 int, ndim 0, dtype family int, 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
chunk Ran
ran; our contract draft was wrong, not the code
awslabs/rag-qa-arena/code/utils.py
code served (permissive licence) · get_code("5ecb780bdf037ba8")
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 2, 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 datasets import Dataset

# Create a simple Dataset for testing
data_dict = {
    "text": ["hello world", "foo bar", "baz qux", "test data"],
    "label": [0, 1, 0, 1]
}
dataset = Dataset.from_dict(data_dict)

# Create test arguments
ARGS = {
    "iterable": dataset,
    "chunksize": 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
datasets — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, 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
extract_output Ran
ran; our contract draft was wrong, not the code
awslabs/rag-qa-arena/code/utils.py
code served (permissive licence) · get_code("eabbd5c3b7e2cce4")
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

torch.manual_seed(0)

ARGS = {
    'pred': 'The model output is: Here is the result',
    'trigger': 'output is: '
}
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
get_logger Ran
ran; our contract draft was wrong, not the code
awslabs/rag-qa-arena/code/utils.py
code served (permissive licence) · get_code("38650e18e50b9afd")
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 Logger. 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
import sys

ARGS = {
    'name': 'test_logger'
}
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 Logger — a Logger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Logger 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
get_majority_vote Ran
ran; our contract draft was wrong, not the code
awslabs/rag-qa-arena/code/compute_correlation.py
code served (permissive licence) · get_code("6f5b5abc87b5466a")
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.

from collections import Counter, defaultdict

# Analyze the function: get_majority_vote takes 'votes' parameter
# It checks:
# - len(set(votes)) == 1: all votes are the same
# - len(set(votes)) == len(votes): all votes are different
# - else: some votes repeat, find most common
# So votes should be a list/iterable of comparable elements (likely integers or strings)

# Test case 1: All same votes (returns strong consensus)
votes_strong = [5, 5, 5, 5]

# Test case 2: All different votes (returns empty result)
votes_all_different = [1, 2, 3, 4]

# Test case 3: Some repeated votes (returns weak consensus with most common)
votes_weak = [1, 2, 2, 3, 2, 1]

# We can use any of these as the argument
ARGS = {
    'votes': votes_weak
}
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 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

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

Question answering based on retrievalaugmented generation (RAG-QA) is an important research topic in NLP and has a wide range of real-world applications. However, most existing datasets for this task are either constructed using a single source corpus or consist of short extractive answers, which fall short of evaluating large language model (LLM) based RAG-QA systems on cross-domain generalization. To address these limitations, we create Long-form RobustQA (LFRQA), a new dataset comprising human-written long-form answers that integrate short extractive answers from multiple documents into a single, coherent narrative, covering 26K queries and large corpora across seven different domains. We further propose RAG-QA ARENA by directly comparing model-generated answers against LFRQA's answers using LLMs as evaluators. We show via extensive experiments that RAG-QA ARENA evaluation and human judgments on answer quality are highly correlated. Moreover, only 41.3% of the most competitive LLM's answers are preferred to LFRQA's answers, demonstrating RAG-QA ARENA as a challenging evaluation platform for future research. 1

For agents

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

get_harvested_code_for_paper("2407.13998")
get_code_for_paper("2407.13998")
have("2407.13998")

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

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

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

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

Connect an agent — have() is free.