SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2507.02962 · 2025

RAG-R1: Incentivizing the Search and Reasoning Capabilities of LLMs through Multi-query Parallelism

arXiv · PDF · Open in the Atlas

Code that ran

3 of 4 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, 0 violated it and 3 have no contract verdict; 0 failures of our instrument; 1 no recorded run), measured 2026-11-24; 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/2507.02962.json · badge: /api/ran/2507.02962.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
inclusionai/aworld community (classifier label)
classifier basis not recorded on the link
3 ran · 1 no recorded run
FunctionStatusWhere it lives
canonical_trajectory_bytes Ran
ran on a synthesized input
inclusionai/aworld/aworld/core/trajectory.py
code served (permissive licence) · get_code("844930e5368cd60b")
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 bytes. 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 math
from collections.abc import Mapping, Sequence
from dataclasses import dataclass, fields, is_dataclass
from datetime import datetime, timezone
from enum import Enum
from typing import Any, ClassVar

@dataclass
class SampleDataclass:
    name: str
    value: int
    timestamp: datetime

class SampleEnum(Enum):
    OPTION_A = "option_a"
    OPTION_B = "option_b"

class SampleWithModelDump:
    def model_dump(self, mode='json'):
        return {'field1': 'value1', 'field2': 42}

class SampleWithToDict:
    def to_dict(self):
        return {'key1': 'val1', 'key2': 3.14}

# Construct valid trajectory sequence with various supported types
trajectory = [
    'simple_string',
    42,
    3.14,
    True,
    None,
    SampleEnum.OPTION_A,
    {'nested_key': 'nested_value', 'number': 7},
    [1, 2, 3],
    SampleDataclass(
        name='test_obj',
        value=99,
        timestamp=datetime(2024, 1, 15, 10, 30, 0, tzinfo=timezone.utc)
    ),
    SampleWithModelDump(),
    SampleWithToDict(),
    (4, 5, 6),  # tuple as sequence
]

ARGS = {
    'trajectory': trajectory
}
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 bytes — a bytes output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a bytes 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
compute_trajectory_checksum Ran
ran on a synthesized input
inclusionai/aworld/aworld/core/trajectory.py
code served (permissive licence) · get_code("f0385a1fa56e347f")
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.

from datetime import datetime, timezone
from dataclasses import dataclass
from enum import Enum

@dataclass
class SampleItem:
    name: str
    value: int
    flag: bool

class SampleEnum(Enum):
    OPTION_A = "option_a"
    OPTION_B = "option_b"

# Create a trajectory with various supported types
trajectory = [
    {"key1": "value1", "key2": 42, "nested": {"inner": 3.14}},
    [1, 2, 3, "four"],
    SampleEnum.OPTION_A,
    SampleItem(name="test", value=100, flag=True),
    "simple string",
    42,
    3.14,
    True,
    None,
    datetime(2024, 1, 15, 10, 30, 45, tzinfo=timezone.utc),
    (5, 6, 7),
]

ARGS = {
    "trajectory": trajectory,
}
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
read_tool_action_journal Ran
ran on a synthesized input
inclusionai/aworld/aworld/core/tool_action_journal.py
code served (permissive licence) · get_code("73016172ac459cf2")
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 ToolActionJournalRecovery. 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 tempfile
from pathlib import Path
import json
import hashlib

def _canonical_bytes(payload):
    return json.dumps(payload, ensure_ascii=False, sort_keys=True, separators=(',', ':')).encode('utf-8')

def _checksum(payload):
    return 'sha256:' + hashlib.sha256(_canonical_bytes(payload)).hexdigest()

# Create a temporary journal file with valid records
with tempfile.TemporaryDirectory() as tmpdir:
    journal_path = Path(tmpdir) / "test_journal.jsonl"
    
    # Create some valid records
    records = []
    
    # First stream, first record
    record1 = {
        'schema_version': 'aworld.tool-action-journal.v1',
        'record_type': 'tool_action_journal_record',
        'stream_id': 'stream_001',
        'stream_sequence': 0,
        'previous_record_checksum': None,
        'recorded_at_epoch_ns': 1000000000,
        'actions': [{'type': 'action_a', 'data': 'value1'}]
    }
    record1['record_checksum'] = _checksum(record1)
    records.append(record1)
    
    # First stream, second record
    record2 = {
        'schema_version': 'aworld.tool-action-journal.v1',
        'record_type': 'tool_action_journal_record',
        'stream_id': 'stream_001',
        'stream_sequence': 1,
        'previous_record_checksum': record1['record_checksum'],
        'recorded_at_epoch_ns': 2000000000,
        'actions': [{'type': 'action_b', 'data': 'value2'}]
    }
    record2['record_checksum'] = _checksum(record2)
    records.append(record2)
    
    # Second stream, first record
    record3 = {
        'schema_version': 'aworld.tool-action-journal.v1',
        'record_type': 'tool_action_journal_record',
        'stream_id': 'stream_002',
        'stream_sequence': 0,
        'previous_record_checksum': None,
        'recorded_at_epoch_ns': 1500000000,
        'actions': [{'type': 'action_c', 'data': 'value3'}]
    }
    record3['record_checksum'] = _checksum(record3)
    records.append(record3)
    
    # Write all records to the journal file
    with open(journal_path, 'w') as f:
        for record in records:
            f.write(json.dumps(record) + '\n')
    
    ARGS = {
        'path': journal_path
    }
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 ToolActionJournalRecovery — a ToolActionJournalRecovery output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ToolActionJournalRecovery 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
read_llm_call_journal Not yet run
unverified (harvested, no recorded run)
inclusionai/aworld/aworld/core/llm_call_journal.py
code served (permissive licence) · get_code("9541447b554e9658")
How it ran

no invocation recorded.

Also present in other papers' code

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

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Large Language Models (LLMs), despite their remarkable capabilities, are prone to generating hallucinated or outdated content due to their static internal knowledge. While Retrieval-Augmented Generation (RAG) integrated with Reinforcement Learning (RL) offers a solution, these methods are fundamentally constrained by a single-query mode, leading to prohibitive latency and inherent brittleness. To overcome these limitations, we introduce RAG-R1, a novel two-stage training framework centered around multi-query parallelism. Our framework enables LLMs to adaptively leverage internal and external knowledge during the reasoning process while transitioning from the single-query mode to multi-query parallelism. This architectural shift bolsters reasoning robustness while significantly reducing inference latency. Extensive experiments on seven question-answering benchmarks confirm the superiority of our method, which outperforms the strongest baseline by up to 13.7% and decreases inference time by 11.1%.

For agents

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

get_harvested_code_for_paper("2507.02962")
get_code_for_paper("2507.02962")
have("2507.02962")

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

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

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

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

Connect an agent — have() is free.