TG-RAG: A Retrieval-Augmented Framework for Reasoning Guidance in Specialized Domains
Liang Su, Mingyang Zhang, Yun Xiong, Tengfei Liu, Siwei Zhang, Xi Chen, Li Sun
Overview
This talk introduces TG-RAG (Thought Guidance Retrieval-Augmented Generation), a novel, training-free, reasoning-time framework designed to steer large reasoning models (LRMs) so they strictly follow established expert workflows. Presented at ICML by Liang Su on behalf of researchers from Fudan University, Ant Group, and the Beijing University of Posts and Telecommunications, the work addresses a critical vulnerability in deploying autonomous AI agents to high-stakes, specialized domains like finance and healthcare.

Key moments
- 0:00 Introduction and cognitive drift in large reasoning models
- 2:00 Introduction of TG-RAG and overall system architecture
- 4:00 Expert procedure graph and dual-pathway injection mechanism
- 6:00 Experimental results and performance across specialized domains
- 8:00 Conclusion and beginning of the Q&A session
TG-RAG: A Retrieval-Augmented Framework for Reasoning Guidance in Specialized Domains
Speakers: Liang Su; Mingyang Zhang; Yun Xiong; Tengfei Liu; Siwei Zhang; Xi Chen; Li Sun
Conference: ICML
YouTube: https://slideslive.com/39083563
Overview
This talk introduces TG-RAG (Thought Guidance Retrieval-Augmented Generation), a novel, training-free, reasoning-time framework designed to steer large reasoning models (LRMs) so they strictly follow established expert workflows. Presented at ICML by Liang Su on behalf of researchers from Fudan University, Ant Group, and the Beijing University of Posts and Telecommunications, the work addresses a critical vulnerability in deploying autonomous AI agents to high-stakes, specialized domains like finance and healthcare.
While modern LRMs excel at generating intricate chain-of-thought (CoT) sequences, they suffer from what the authors term cognitive drift—a phenomenon where models progressively deviate from intended standard operating procedures (SOPs) as reasoning chains lengthen. In safety-critical contexts, even a minor logical hallucination can trigger severe downstream failures. Current remedies, such as supervised fine-tuning or vanilla retrieval-augmented generation (RAG), are either too rigid or fail due to attention dilution over long trajectories. TG-RAG solves this by implementing a closed-loop, interrupt-retrieve-generate mechanism that actively injects procedural guidance into the active reasoning stream at runtime.
Background
▶ Watch: Introduction and cognitive drift in large reasoning models (0:00)
In the machine learning and systems space, deploying LRMs as autonomous agents in regulated sectors demands absolute procedural fidelity. Prior work generally falls into two categories: fine-tuning models on expert trajectories or supplying SOPs upfront via prompt engineering and static RAG.
Fine-tuning is resource-intensive, brittle, and struggles to adapt when institutional SOPs are updated. Conversely, prompt engineering and standard RAG treat procedural guidance as passive context at the input stage. As reasoning trajectories expand, these approaches suffer from attention dilution, causing the model to lose track of governing rules.
The core systems challenge lies in maintaining strict adherence to multi-step branching logic without incurring the immense computational overhead of retraining massive model weights. This necessitates a runtime framework capable of enforcing state constraints dynamically during text generation.
Key Findings
▶ Watch: Introduction of TG-RAG and overall system architecture (2:00)
TG-RAG demonstrates state-of-the-art performance across diverse specialized domains—including finance, healthcare, and astronomy—as well as general reasoning benchmarks like StrategyQA.
- Superior Accuracy and Stability: TG-RAG consistently outperforms strong non-retrieval and retrieval-augmented baselines. For instance, in the strict finance domain, TG-RAG outperforms Self-RAG by 12%.
- Reduced Variance: Beyond lifting peak accuracy, TG-RAG maintains low standard deviation across runs, indicating significantly enhanced trajectory stability.
- Topological Advantage: A chain-of-trees graph topology yields a 5% to 10% performance gain over flattened, fixed-path workflows by enabling dynamic path pruning.
- Mitigating Adherence Decay: Dynamic, step-by-step injection outperforms static blueprint prompting (akin to the Buffer-of-Thoughts paradigm) by 14% in finance, proving that periodic re-anchoring prevents adherence decay.
Technical Deep Dive
▶ Watch: Expert procedure graph and dual-pathway injection mechanism (4:00)
The TG-RAG architecture centers on three core components: the Expert Procedure Graph (EPG), the Interrupt-Retrieve-Generate (IRG) mechanism, and a dual-pathway injection strategy.
Expert Procedure Graph (EPG)
The EPG formalizes domain SOPs into a chain-of-trees topology that models both macro analytical stages and micro conditional logic. The design philosophy decouples invariant logic from dynamic facts. Each node in the EPG contains a tuple $(G, C)$:
- $G$ (Guidance): The invariant action directive dictating what the model should reason about next.
- $C$ (Knowledge Container): The dynamic factual evidence and domain rules providing the basis for how to execute that reasoning.
This decoupling isolates errors and enables hot-swappable updates to domain knowledge without altering underlying operational logic.
Interrupt-Retrieve-Generate (IRG) Mechanism
Operating via a closed-loop system at inference time, the IRG mechanism coordinates execution through three steps:
- Physical Interruption: The system prompts the model to encapsulate discrete thoughts within designated analysis tags. Utilizing sequence interruption capabilities in inference engines like vLLMs, the system pauses text generation the exact moment a closing tag is emitted.
- State-Dependent Semantic Routing: Once suspended, the model evaluates its just-generated analysis against candidate branches of the current EPG node to determine the optimal next path.
- Dual-Pathway Injection: The retrieved data is split into its two constituent components. Factual knowledge $C$ is appended to the input context for grounding. Simultaneously, procedural guidance $G$ is physically injected into the active reasoning stream $R$ (appended to the ongoing token sequence).
Directly injecting $G$ transforms guidance from a passive external suggestion into a rigid state constraint, physically forcing the model's next-token prediction to align with the expert protocol and eliminating cognitive drift.
Experimental Setup & Results
▶ Watch: Experimental results and performance across specialized domains (6:00)
To validate the framework, the researchers experimented with backbone models including Qwen-72B and models from the DeepSeek-distill series.
- Datasets & Domains: Evaluated across specialized vertical domains (finance, medical, astronomy) and general reasoning benchmarks (StrategyQA).
- Baselines: Benchmarked against strong non-retrieval baselines, standard in-prompt integration, static blueprint prompting (Buffer-of-Thoughts style), and retrieval-augmented frameworks like Self-RAG.
- Headline Metrics: TG-RAG surpassed Self-RAG by 12% in the finance domain. Direct in-process reasoning injection outperformed standard in-prompt integration by 12% on astronomy tasks. Dynamic execution surpassed static blueprint prompting by 14% in finance.
- Ablations: Ablation studies confirmed that both components of the dual-pathway framework are necessary, as procedural guidance and factual knowledge fulfill distinct, complementary roles. Furthermore, comparing chain-of-trees topologies against flattened workflows verified the efficacy of dynamic path pruning in reducing cognitive load.
Practical Implications
▶ Watch: Conclusion and beginning of the Q&A session (8:00)
For infrastructure teams and model deployers, TG-RAG offers a practical, training-free pathway to enforce procedural compliance in safety-critical AI deployments without modifying underlying model weights or incurring expensive fine-tuning cycles. By leveraging inference-engine interruption capabilities (such as vLLM hooks), systems can wrap off-the-shelf reasoning models in governance layers.
However, practitioners must consider operational tradeoffs. Interrupting generation sequences at logical boundaries and executing semantic routing checks introduces inference latency overhead. Additionally, the system relies on the model's ability to cleanly demarcate steps using analysis tags; poor tag adherence could theoretically disrupt the interception cadence, though prompt engineering minimizes this risk.
Key Takeaways
- Combats Cognitive Drift: TG-RAG prevents long-horizon reasoning errors by actively injecting procedural constraints rather than relying on passive, upfront prompts.
- Training-Free Architecture: The framework operates entirely at inference time, utilizing engine-level sequence interruption without requiring model fine-tuning.
- Decoupled Knowledge Representation: The Expert Procedure Graph separates invariant logic ($G$) from dynamic factual data ($C$), enabling seamless hot-swapping of domain rules.
- State-Driven Routing: The IRG mechanism pauses generation at discrete logical boundaries, routes semantic state against a chain-of-trees topology, and guides subsequent token prediction.
- Empirical Dominance: TG-RAG achieves state-of-the-art results across finance, medical, astronomy, and general QA tasks, outperforming static retrieval and prompting baselines by double-digit margins.
About the Speaker(s)
- Liang Su: Presenter of TG-RAG work, a joint effort with collaborators from Fudan University, Ant Group, and Beijing University of Posts and Telecommunications.
Co-authors: Mingyang Zhang, Yun Xiong, Tengfei Liu, Siwei Zhang, Xi Chen, Li Sun.
Reviews
→ Top-rated talks at International Conference on Machine Learning 2026
All talks from International Conference on Machine Learning 2026