SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2604.24594 · 2026

Skill Retrieval Augmentation for Agentic AI

Qingyao Ai, Yiqun Liu, Yingbo Wang, Qiaozhi He, Jianming Long, Weihang Su, Changyue Wang, Yichen Tang, Yiteng Tu

arXiv · PDF · Open in the Atlas

Code that ran

7 of 9 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; 7 failures of our instrument; 2 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/2604.24594.json · badge: /api/ran/2604.24594.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
oneal2000/SR-Agents canonical (classifier label)
classifier basis: census
7 ran · 2 no recorded run
FunctionStatusWhere it lives
get_extra_body Ran
ran; our contract draft was wrong, not the code
oneal2000/SR-Agents/src/sragents/llm.py
code served (permissive licence) · get_code("44374d4475cf3603")
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 numpy as np

# Analyze the function: it takes a model string and a thinking bool
# The function processes the model name and returns a dict or None
# No complex objects needed - just strings and bools

ARGS = {
    'model': 'qwen3-72b',
    'thinking': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — 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
model_short_name Ran
ran; our contract draft was wrong, not the code
oneal2000/SR-Agents/src/sragents/config.py
code served (permissive licence) · get_code("670a17988a65b567")
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
from pathlib import Path

ARGS = {
    "model": "/path/to/some/model_v1.pt"
}
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
parse_kv_list Ran
ran; our contract draft was wrong, not the code
oneal2000/SR-Agents/src/sragents/cli/_common.py
code served (permissive licence) · get_code("6a9c8dba900d7923")
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 sys

# The function parse_kv_list takes a list of strings formatted as "key=value" pairs
# and parses them into a dictionary, attempting to parse values as JSON.

# Looking at the function:
# - It iterates over items in the list
# - It splits each item on '=' to get key and value
# - It tries to parse the value as JSON, falling back to string if that fails
# - It returns a dictionary

# Valid test cases:
# 1. Simple string values (not valid JSON)
# 2. JSON-parseable values (numbers, booleans, null, objects, arrays)
# 3. Mix of both types

ARGS = {
    "items": [
        "name=alice",
        "age=30",
        "active=true",
        "score=3.14",
        "count=42",
        "data=null",
        "config={\"nested\": \"value\"}",
        "tags=[\"tag1\", \"tag2\"]"
    ]
}
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 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
register_prompt_builder Ran
ran; our contract draft was wrong, not the code
oneal2000/SR-Agents/src/sragents/prompts.py
code served (permissive licence) · get_code("d8a5014f185c57d7")
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 torch
import torch.nn as nn

# The function register_prompt_builder is a decorator factory
# It takes a dataset name (string) and returns a decorator function
# The decorator registers a prompt builder function in a _BUILDERS dict

# Since this is a decorator, we need to:
# 1. Call register_prompt_builder with a dataset string
# 2. It returns a decorator function
# 3. The decorator wraps a function and registers it

# Let's create a simple prompt builder function to use as test
def simple_prompt_builder(example):
    """A simple prompt builder function."""
    return f"Example: {example}"

# The dataset parameter should be a string identifying the dataset
ARGS = {
    "dataset": "wikitext"
}
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 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
require_exists Ran
ran; our contract draft was wrong, not the code
oneal2000/SR-Agents/src/sragents/cli/_common.py
code served (permissive licence) · get_code("32185e61b3483664")
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 PosixPath. 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 sys
from pathlib import Path
import tempfile

# Create a temporary directory with a test file
temp_dir = tempfile.TemporaryDirectory()
temp_path = Path(temp_dir.name)
test_file = temp_path / "test_file.txt"
test_file.write_text("test content")

ARGS = {
    "path": test_file,
    "what": "config"
}
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 PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath 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
skill_text Ran
ran; our contract draft was wrong, not the code
oneal2000/SR-Agents/src/sragents/corpus.py
code served (permissive licence) · get_code("26d709a22e295aea")
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)

# Construct a skill dictionary with name, description, and content
skill = {
    'name': 'Python Programming',
    'description': 'Learn the fundamentals of Python programming language',
    'content': 'Variables, loops, functions, and object-oriented programming'
}

ARGS = {
    'skill': skill
}
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
strip_think_tags Ran
ran; our contract draft was wrong, not the code
oneal2000/SR-Agents/src/sragents/llm.py
code served (permissive licence) · get_code("9fbd40b14b2e5c37")
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

_THINK_CLOSED_RE = re.compile('<think>.*?</think>\\s*', re.DOTALL)

_THINK_OPEN_RE = re.compile('<think>.*', re.DOTALL)

def strip_think_tags(text: str) -> str:
    """Remove <think>...</think> blocks from an LLM response.

    Handles both well-formed `<think>...</think>answer` and truncation
    cases where generation is cut mid-thinking (unclosed tag).
    """
    if '<think>' not in text:
        return text
    text = _THINK_CLOSED_RE.sub('', text)
    text = _THINK_OPEN_RE.sub('', text)
    return text.lstrip()


# Test case 1: text with well-formed think tags
text_with_closed_think = "<think>This is my thinking process</think> Here is my answer."

# Test case 2: text with unclosed think tag (truncation case)
text_with_open_think = "<think>This is incomplete thinking"

# Test case 3: text without think tags
text_without_think = "Just a regular response with no thinking tags."

ARGS = {
    "text": text_with_closed_think
}
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
build_prompt Not yet run
unverified (harvested, no recorded run)
oneal2000/SR-Agents/src/sragents/prompts.py
code served (permissive licence) · get_code("87fb084b0ab65529")
How it ran

no invocation recorded.

get_builder Not yet run
unverified (harvested, no recorded run)
oneal2000/SR-Agents/src/sragents/prompts.py
code served (permissive licence) · get_code("648c8fd2e6a0911f")
How it ran

no invocation recorded.

Also present in other papers' code

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

As large language models (LLMs) evolve into agentic problem solvers, they increasingly rely on external, reusable skills to handle tasks beyond their native parametric capabilities. In existing agent systems, the dominant strategy for incorporating skills is to explicitly enumerate available skills within the context window. However, this strategy fails to scale: as skill corpora expand, context budgets are consumed rapidly, and the agent becomes markedly less accurate in identifying the right skill. To this end, this paper formulates Skill Retrieval Augmentation (SRA), a new paradigm in which agents dynamically retrieve, incorporate, and apply relevant skills from large external skill corpora on demand. To make this problem measurable, we construct a large-scale skill corpus and introduce SRA-Bench, the first benchmark for decomposed evaluation of the full SRA pipeline, covering skill retrieval, skill incorporation, and end-task execution. SRA-Bench contains 5,400 capability-intensive test instances and 636 manually constructed gold skills, which are mixed with web-collected distractor skills to form a large-scale corpus of 26,262 skills. Extensive experiments show that retrieval-based skill augmentation can substantially improve agent performance, validating the promise of the paradigm. At the same time, we uncover a fundamental gap in skill incorporation: current LLM agents tend to load skills at similar rates, regardless of whether a gold skill is retrieved or whether the task actually requires external capabilities. This shows that the bottleneck in skill augmentation lies not only in retrieval but also in the base model's ability to determine which skill to load and when external loading is actually needed. These findings position SRA as a distinct research problem and establish a foundation for the scalable augmentation of capabilities in future agent systems. All the code and data are released at the following GitHub link: https://github.com/oneal2000/SR-Agents.

For agents

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

get_harvested_code_for_paper("2604.24594")
get_code_for_paper("2604.24594")
have("2604.24594")

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

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

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

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

Connect an agent — have() is free.