SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2601.09402 · 2026

SEEK: Steering LLM Reasoning for RAG via Internal Reasoning Sketches

Shuo Wang, Maosong Sun, Zhenghao Liu, Yukun Yan, Xinze Li, Zheni Zeng, Sen Mei, Haidong Xin, Yuqing Lan

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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 2 no recorded run), measured 2026-11-22; 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/2601.09402.json · badge: /api/ran/2601.09402.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
OpenBMB/PAGER canonical (classifier label)
classifier basis: census
7 ran · 2 no recorded run
FunctionStatusWhere it lives
build_prompt Ran
ran; our contract draft was wrong, not the code
OpenBMB/PAGER/src/infer_page.py
code served (permissive licence) · get_code("508d2df531171de9")
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 numpy as np

torch.manual_seed(0)

ARGS = {
    'item': {
        'question': 'What is the capital of France?',
        'page_list': [
            'France is a country in Western Europe.',
            'Paris is the capital and largest city of France. It is located in the north-central part of the country.'
        ]
    }
}
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 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_after_outline Ran
ran; our contract draft was wrong, not the code
OpenBMB/PAGER/src/extract_outline.py
code served (permissive licence) · get_code("af25d4ae731f2fb7")
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 substr_from_first_lonely_hash(s: str) -> str:
    m = re.search('(?<!#)#(?!#)', s)
    if not m:
        print('error #')
        return "No single '#' found whose neighbors are not '#'"
    return s[m.start():]

def extract_after_outline(input_string):
    input_string = input_string[5:]
    outline_index = input_string.find('<OUTLINE>')
    if outline_index != -1:
        outline_index = outline_index + len('<OUTLINE>')
    if outline_index == -1:
        outline_index = input_string.find('# OUTLINE')
        if outline_index != -1:
            outline_index = outline_index + len('# OUTLINE')
    if outline_index == -1:
        new_string = substr_from_first_lonely_hash(input_string)
        return new_string
    after_outline = input_string[outline_index:]
    first_hash_index = after_outline.find('#')
    if first_hash_index == -1:
        return 'No # found after <OUTLINE>'
    return after_outline[first_hash_index:]

ARGS = {
    'input_string': 'START<OUTLINE>some text# hash content here'
}
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
f1_score Ran
ran, honoured the contract we drafted
OpenBMB/PAGER/src/evaluate_infer.py
code served (permissive licence) · get_code("53d9c134452ad7d1")
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
import string
from collections import Counter

# Define the functions from the problem
def normalize_answer(s):
    def remove_articles(text):
        return re.sub('\\b(a|an|the)\\b', ' ', text)

    def white_space_fix(text):
        return ' '.join(text.split())

    def remove_punc(text):
        exclude = set(string.punctuation + ''.join([''', ''', '´', '`']))
        return ''.join((ch if ch not in exclude else ' ' for ch in text))

    def lower(text):
        return text.lower()

    def replace_underscore(text):
        return text.replace('_', ' ')
    return white_space_fix(remove_articles(remove_punc(lower(replace_underscore(s)))))

def bool_mapping(s):
    if s == 'True':
        return 'yes'
    elif s == 'False':
        return 'no'
    else:
        return s

def f1_score(prediction, ground_truth):
    normalized_prediction = normalize_answer(bool_mapping(prediction))
    normalized_ground_truth = normalize_answer(bool_mapping(ground_truth))
    ZERO_METRIC = (0, 0, 0)
    if normalized_prediction in ['yes', 'no', 'noanswer'] and normalized_prediction != normalized_ground_truth:
        return ZERO_METRIC
    if normalized_ground_truth in ['yes', 'no', 'noanswer'] and normalized_prediction != normalized_ground_truth:
        return ZERO_METRIC
    prediction_tokens = normalized_prediction.split()
    ground_truth_tokens = normalized_ground_truth.split()
    common = Counter(prediction_tokens) & Counter(ground_truth_tokens)
    num_same = sum(common.values())
    if num_same == 0:
        return ZERO_METRIC
    precision = 1.0 * num_same / len(prediction_tokens)
    recall = 1.0 * num_same / len(ground_truth_tokens)
    f1 = 2 * precision * recall / (precision + recall)
    return (f1, precision, recall)

# Setup valid arguments
ARGS = {
    'prediction': 'The quick brown fox',
    'ground_truth': 'A quick brown fox'
}
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
load_questions_from_file Ran
ran; our contract draft was wrong, not the code
OpenBMB/PAGER/src/infer_page.py
code served (permissive licence) · get_code("258a7722bdd963d6")
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 json
import tempfile
import os

# Create a temporary file with JSONL data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.jsonl', encoding='utf-8')
temp_filename = temp_file.name

try:
    # Write some sample JSONL data
    temp_file.write(json.dumps({"question": "What is 2+2?", "answer": 4}) + '\n')
    temp_file.write(json.dumps({"question": "What is the capital of France?", "answer": "Paris"}) + '\n')
    temp_file.write(json.dumps({"question": "What is 3*5?", "answer": 15}) + '\n')
    temp_file.close()
    
    # Define ARGS
    ARGS = {
        "input_file": temp_filename
    }
finally:
    pass
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 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
normalize_answer Ran
ran; our contract draft was wrong, not the code
OpenBMB/PAGER/src/evaluate_infer.py
code served (permissive licence) · get_code("d22718d531542ab7")
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) 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
import string

def normalize_answer(s):

    def remove_articles(text):
        return re.sub('\\b(a|an|the)\\b', ' ', text)

    def white_space_fix(text):
        return ' '.join(text.split())

    def remove_punc(text):
        exclude = set(string.punctuation + ''.join([''', ''', '´', '`']))
        return ''.join((ch if ch not in exclude else ' ' for ch in text))

    def lower(text):
        return text.lower()

    def replace_underscore(text):
        return text.replace('_', ' ')
    return white_space_fix(remove_articles(remove_punc(lower(replace_underscore(s)))))


ARGS = {
    's': "The quick brown fox jumps over a lazy dog's tail_with_underscores!"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
remove_after_last_to_be_filled Ran
ran; our contract draft was wrong, not the code
OpenBMB/PAGER/src/extract_outline.py
code served (permissive licence) · get_code("10ee5cec75290461")
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

ARGS = {
    'input_string': 'Hello world <TO BE FILLED> this is some text <TO BE FILLED> and more content after'
}
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
substr_from_first_lonely_hash Ran
ran; our contract draft was wrong, not the code
OpenBMB/PAGER/src/extract_outline.py
code served (permissive licence) · get_code("31b75bebcdf7328b")
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 substr_from_first_lonely_hash(s: str) -> str:
    m = re.search('(?<!#)#(?!#)', s)
    if not m:
        print('error #')
        return "No single '#' found whose neighbors are not '#'"
    return s[m.start():]

# The function takes a string parameter and searches for the first occurrence
# of a single '#' that is not preceded or followed by another '#'
# Then it returns the substring from that position onwards

ARGS = {
    's': 'hello #world ##test'
}
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
bool_mapping Not yet run
unverified (harvested, no recorded run)
OpenBMB/PAGER/src/evaluate_infer.py
code served (permissive licence) · get_code("60508530d397bd36")
How it ran

no invocation recorded.

load_questions_from_file Not yet run
unverified (harvested, no recorded run)
OpenBMB/PAGER/src/construct_outline.py
code served (permissive licence) · get_code("9453b050edad977b")
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, 3 are also present in other papers whose code we hold (3 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.

FunctionAlso present inEarliest-datedOthers named
normalize_answer 2 other papers
2 dated earlier
2505.17005 (2025-05)
R1-Searcher++: Incentivizing the Dynamic Knowledge Acquisition of LLMs via Reinforcement Learning
2505.24630 (2025-05)
Reasoning Models Hallucinate More: Factuality-Aware Reinforcement Learning for Large Reasoning Models
bool_mapping 1 other paper
1 dated earlier
2505.17005 (2025-05)
R1-Searcher++: Incentivizing the Dynamic Knowledge Acquisition of LLMs via Reinforcement Learning
f1_score 1 other paper
1 dated earlier
2505.17005 (2025-05)
R1-Searcher++: Incentivizing the Dynamic Knowledge Acquisition of LLMs via Reinforcement Learning

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

Retrieval-Augmented Generation (RAG) enhances Large Language Models (LLMs) by incorporating external knowledge into the generation process. Benefiting from the reasoning capabilities of LLMs, existing methods have leveraged such capabilities to enable iterative knowledge acquisition and accumulation, thereby better supporting answer generation. However, as the reasoning trajectory grows, the accumulated knowledge and previously generated queries may interfere with subsequent retrieval decisions, resulting in sub-queries with repetitive intents and redundant knowledge acquisition. To address this issue, we propose SEEK, a sketch-guided knowledge acquisition framework for RAG. SEEK first prompts the LLM to construct a structured steering sketch for the given question. It consists of multiple groups of steering gists, with each gist followed by a slot for knowledge filling. Guided by these steering gists, SEEK iteratively retrieves and refines knowledge, and fills the corresponding slots to complete the sketch. The completed sketch is then used as contextual input for final answer generation. Experimental results show that SEEK achieves better performance than baseline models across multiple tasks. Further analyses demonstrate that SEEK can generate more diverse sub-queries, reduce redundant retrieval, and achieve a better balance between external knowledge utilization and internal knowledge conflict mitigation. All codes are available at https://github.com/OpenBMB/PAGER.

For agents

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

get_harvested_code_for_paper("2601.09402")
get_code_for_paper("2601.09402")
have("2601.09402")

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

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

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

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

Connect an agent — have() is free.