SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.29796 · 2026

SAAS: Self-Aware Reinforcement Learning for Over-Search Mitigation in Agentic Search

Qinggang Zhang, Jinsong Su, Shiyu Liu, Chengyi Yang, Zerui Chen, Zhishang Xiang, Yunbo Tang

arXiv · PDF · Open in the Atlas

Code that ran

9 of 23 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 0 have no contract verdict; 9 failures of our instrument; 14 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/2605.29796.json · badge: /api/ran/2605.29796.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
XMUDeepLIT/SAAS community
Papers with Code archive
9 ran · 14 no recorded run
FunctionStatusWhere it lives
_passages2string Ran
ran; our contract draft was wrong, not the code
XMUDeepLIT/SAAS/search/generate_with_search.py
code served (permissive licence) · get_code("492eff273709322a")
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 defaultdict

ARGS = {
    'retrieval_result': [
        {
            'document': {
                'contents': 'First Document Title\nThis is the content of the first document.',
                'id': 'doc_1'
            }
        },
        {
            'document': {
                'contents': 'Second Document Title\nThis is the content of the second document.',
                'id': 'doc_2'
            }
        },
        {
            'document': {
                'contents': 'Third Document Title\nMore content here for the third document.',
                'id': 'doc_3'
            }
        }
    ]
}
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
_post Ran
ran; our contract draft was wrong, not the code
XMUDeepLIT/SAAS/search/generate_with_search.py
code served (permissive licence) · get_code("a110cfd0b1824023")
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
import logging
import json
import httpx
from unittest.mock import AsyncMock, MagicMock

logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

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

# Create a mock response that simulates a successful JSON response
mock_response = AsyncMock(spec=httpx.Response)
mock_response.json = AsyncMock(return_value={"status": "success", "data": "test"})
mock_response.aread = AsyncMock(return_value=b'{"status": "success", "data": "test"}')
mock_response.aclose = AsyncMock()
mock_response.raise_for_status = MagicMock()

# Configure the client to return the mock response
mock_client.post = AsyncMock(return_value=mock_response)

# Create test arguments
test_url = "https://example.com/api/endpoint"
test_payload = {"key": "value", "number": 42}
test_headers = {"Content-Type": "application/json", "Authorization": "Bearer token"}

ARGS = {
    "client": mock_client,
    "url": test_url,
    "payload": test_payload,
    "max_retries": 60,
    "headers": test_headers
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
httpx — 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
execute_predictions Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
XMUDeepLIT/SAAS/search/generate_with_search.py
code served (permissive licence) · get_code("18bb8eabb68c7581")
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
import re
from collections import defaultdict

# Setup for execute_predictions function
ARGS = {
    'prediction': '<search>what is machine learning</search>',
    'no_retrieval': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
search — 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
get Ran
ran; our contract draft was wrong, not the code
XMUDeepLIT/SAAS/search/generate_with_search.py
code served (permissive licence) · get_code("4269342bd0c429b8")
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 unittest.mock import AsyncMock, MagicMock
import json

# Create a mock HTTP client that returns a valid JSON response
mock_response = AsyncMock()
mock_response.aread = AsyncMock(return_value=json.dumps({"key": "value", "number": 42}).encode('utf-8'))
mock_response.raise_for_status = MagicMock()

# Create a mock HTTP client
mock_http_client = AsyncMock()
mock_http_client.get = AsyncMock(return_value=mock_response)

# Patch the _http_client in the module scope
import sys
from types import ModuleType
test_module = ModuleType('test_module')
test_module._http_client = mock_http_client
sys.modules['test_module'] = test_module

# Define the arguments for the get function
ARGS = {
    "url": "https://example.com/api/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 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
load_function Ran
ran; our contract draft was wrong, not the code
XMUDeepLIT/SAAS/search/generate_with_search.py
code served (permissive licence) · get_code("5d7f01a5fcdb798b")
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 function. 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 importlib

# The function load_function takes a path string and uses importlib to load a function
# We need to provide a valid path to a function that exists in the standard library or
# a module we can construct.

# Let's use a function from a standard library module that's guaranteed to exist
# For example: "os.path.join" or "math.sqrt"

ARGS = {
    "path": "os.path.join"
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
post Ran
ran; our contract draft was wrong, not the code
XMUDeepLIT/SAAS/search/generate_with_search.py
code served (permissive licence) · get_code("c3a6e395cde1e5bd")
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
import logging
import json
import httpx
from unittest.mock import AsyncMock, MagicMock

logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

# Setup global state needed by the post function
_distributed_post_enabled = False
_post_actors = []
_post_actor_idx = 0
_http_client = AsyncMock(spec=httpx.AsyncClient)

# Mock the HTTP client to return valid responses
async def mock_post(*args, **kwargs):
    mock_response = AsyncMock()
    mock_response.aread = AsyncMock(return_value=json.dumps({"status": "ok"}).encode())
    mock_response.raise_for_status = MagicMock()
    mock_response.aclose = AsyncMock()
    return mock_response

_http_client.post = mock_post

# Define function arguments
ARGS = {
    "url": "http://example.com/api/endpoint",
    "payload": {"data": "test", "value": 42},
    "max_retries": 3,
    "headers": {"Content-Type": "application/json"}
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
httpx, ray — 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
postprocess_predictions Ran
ran; our contract draft was wrong, not the code
XMUDeepLIT/SAAS/search/generate_with_search.py
code served (permissive licence) · get_code("275c53a8510f1e73")
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 re

def postprocess_predictions(prediction: str):
    pattern = '<(search|answer)>(.*?)</\\1>'
    match = re.search(pattern, prediction, re.DOTALL)
    if match:
        content = match.group(2).strip()
        action = match.group(1)
    else:
        content = ''
        action = None
    return (action, content)

# Test case 1: Valid search tag
test_prediction_1 = '<search>query text here</search>'

# Test case 2: Valid answer tag
test_prediction_2 = '<answer>the final answer</answer>'

# Test case 3: No matching tags
test_prediction_3 = 'just plain text without tags'

# Test case 4: Multiline content
test_prediction_4 = '<search>line 1\nline 2\nline 3</search>'

# Test case 5: Whitespace handling
test_prediction_5 = '<answer>   padded content   </answer>'

ARGS = {
    'prediction': test_prediction_1
}
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
postprocess_responses Ran
ran; our contract draft was wrong, not the code
XMUDeepLIT/SAAS/search/generate_with_search.py
code served (permissive licence) · get_code("e35523b4278c80c0")
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)

# The function takes a single string parameter 'resp' and post-processes it
# by ensuring tag completeness. It checks for '</search>' or '</answer>' tags.

# Test case 1: response with </search> tag
resp_with_search = "Some content here </search> extra text"

# Test case 2: response with </answer> tag
resp_with_answer = "Some content here </answer> extra text"

# Test case 3: response with neither tag
resp_no_tags = "Just some plain text"

# For the function execution, we need to pick one of these
# Let's use the one with </search> tag
ARGS = {
    "resp": resp_with_search
}
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
search Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
XMUDeepLIT/SAAS/search/generate_with_search.py
code served (permissive licence) · get_code("e28d00233351c9b2")
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 import defaultdict

# Mock the retrieval result structure that _passages2string expects
# The function expects a list of dicts with 'document' key containing 'contents' and 'id'
retrieval_result = [
    {
        'document': {
            'contents': 'Title 1\nThis is the content of document 1.',
            'id': 'doc_1'
        }
    },
    {
        'document': {
            'contents': 'Title 2\nThis is the content of document 2.',
            'id': 'doc_2'
        }
    }
]

# Define ARGS for the search function
# The search function takes a query string as parameter
ARGS = {
    'query': 'What is machine learning?'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
search — 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
GenerateState Not yet run
unverified (harvested, no recorded run)
XMUDeepLIT/SAAS/search/generate_with_search.py
code served (permissive licence) · get_code("b1e2f987e08a3e61")
How it ran

no invocation recorded.

Sample Not yet run
unverified (harvested, no recorded run)
XMUDeepLIT/SAAS/search/generate_with_search.py
code served (permissive licence) · get_code("53fae9c234b0bc79")
How it ran

no invocation recorded.

SingletonMeta Not yet run
unverified (harvested, no recorded run)
XMUDeepLIT/SAAS/search/generate_with_search.py
code served (permissive licence) · get_code("c171efa27a3ab914")
How it ran

no invocation recorded.

_get_shared_session Not yet run
unverified (harvested, no recorded run)
XMUDeepLIT/SAAS/search/generate_with_search.py
code served (permissive licence) · get_code("896ec3c354b24dc3")
How it ran

no invocation recorded.

_next_actor Not yet run
unverified (harvested, no recorded run)
XMUDeepLIT/SAAS/search/generate_with_search.py
code served (permissive licence) · get_code("d54439672fe10666")
How it ran

no invocation recorded.

async_rm Not yet run
unverified (harvested, no recorded run)
XMUDeepLIT/SAAS/search/generate_with_search.py
code served (permissive licence) · get_code("f0b5b37e8f31ad90")
How it ran

no invocation recorded.

batched_async_rm Not yet run
unverified (harvested, no recorded run)
XMUDeepLIT/SAAS/search/generate_with_search.py
code served (permissive licence) · get_code("e8218e5bf6119025")
How it ran

no invocation recorded.

generate Not yet run
unverified (harvested, no recorded run)
XMUDeepLIT/SAAS/search/generate_with_search.py
code served (permissive licence) · get_code("12cd7a99f12351a7")
How it ran

no invocation recorded.

generate_and_rm Not yet run
unverified (harvested, no recorded run)
XMUDeepLIT/SAAS/search/generate_with_search.py
code served (permissive licence) · get_code("7139798a68eba73f")
How it ran

no invocation recorded.

generate_and_rm_group Not yet run
unverified (harvested, no recorded run)
XMUDeepLIT/SAAS/search/generate_with_search.py
code served (permissive licence) · get_code("65092fc0a8248c92")
How it ran

no invocation recorded.

get_deepscaler_rule_based_reward Not yet run
unverified (harvested, no recorded run)
XMUDeepLIT/SAAS/search/generate_with_search.py
code served (permissive licence) · get_code("9f067ccfb9cf692d")
How it ran

no invocation recorded.

load_processor Not yet run
unverified (harvested, no recorded run)
XMUDeepLIT/SAAS/search/generate_with_search.py
code served (permissive licence) · get_code("25c82c087e1fc990")
How it ran

no invocation recorded.

load_tokenizer Not yet run
unverified (harvested, no recorded run)
XMUDeepLIT/SAAS/search/generate_with_search.py
code served (permissive licence) · get_code("39d6a0aa1eaffc16")
How it ran

no invocation recorded.

remote_rm Not yet run
unverified (harvested, no recorded run)
XMUDeepLIT/SAAS/search/generate_with_search.py
code served (permissive licence) · get_code("59b8e09278597982")
How it ran

no invocation recorded.

Also present in other papers' code

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

Agentic search enables LLMs to solve complex multi-hop questions through iterative reasoning and external search. Despite the effectiveness, these systems often suffer from a critical limitation in practice: agents fail to recognize their own knowledge boundaries, blindly triggering searches when internal knowledge suffices and failing to terminate search even when adequate evidence has been collected. The lack of self-awareness leads to severe oversearch, incurring substantial inference latency and prohibitive computational cost. To this end, we propose SAAS, a novel RL framework designed to cultivate dynamic self-awareness that precisely regulates search behavior without compromising accuracy. SAAS introduces three key components: (i) a search boundary modeling mechanism, which identifies the search boundary under the evolving policy by contrasting search-disabled and search-enabled rollouts; (ii) a boundary-aware reward module, which translates this boundary awareness into trajectory-level penalties, suppressing unnecessary and redundant searches; and (iii) a stagewise optimization strategy, which leverages a sequential curriculum to prioritize reasoning over search regularization, thereby avoiding reward hacking. Extensive experiments demonstrate that SAAS substantially reduces over-search, while maintaining accuracy. Our code and implementation details are released at https://github.com/XMUDeepLIT/SAAS.

For agents

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

get_harvested_code_for_paper("2605.29796")
get_code_for_paper("2605.29796")
have("2605.29796")

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

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

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

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

Connect an agent — have() is free.