TARSE: Test-Time Adaptation via Retrieval of Skills and Experience for Reasoning Agents

Junda Wang, Zonghai Tao, Hansi Zeng, Zhichao Yang, Hamed Zamani, Hong Yu

Abstract

Complex clinical decision making often fails not because a model lacks facts, but because it cannot reliably select and apply the right procedural knowledge and the right prior example at the right reasoning step. We frame clinical question answering as an agent problem with two explicit, retrievable resources: skills, reusable clinical procedures such as guidelines, protocols, and pharmacologic mechanisms; and experience, verified reasoning trajectories from previously solved cases (e.g., chain-of-thought solutions and their step-level decompositions). At test time, the agent retrieves both relevant skills and experiences from curated libraries and performs lightweight test-time adaptation to align the language model's intermediate reasoning with clinically valid logic. Concretely, we build (i) a skills library from guideline-style documents organized as executable decision rules, (ii) an experience library of exemplar clinical reasoning chains indexed by step-level transitions, and (iii) a step-aware retriever that selects the most useful skill and experience items for the current case. We then adapt the model on the retrieved items to reduce instance-step misalignment and to prevent reasoning from drifting toward unsupported shortcuts. Experiments on medical question-answering benchmarks show consistent gains over strong medical RAG baselines and prompting-only reasoning methods. Our results suggest that explicitly separating and retrieving clinical skills and experience, and then aligning the model at test time, is a practical approach to more reliable medical agents.

Introduction

Large Language Models (LLMs) have shown promise in medical knowledge retrieval, yet they frequently falter in complex clinical decision-making. This failure is often attributed to "instance-step misalignment," where a model possesses the necessary facts but fails to apply the correct procedural logic at critical branching points. For instance, while a model might know a standard treatment for a condition, it may overlook a specific contraindication mentioned in a patient's history because it follows a heuristic association rather than a rigorous clinical rule. Traditional Retrieval-Augmented Generation (RAG) systems exacerbate this by retrieving unstructured text "chunks" that may contain the right facts but lack the logical alignment required for multi-step reasoning.

The TARSE Framework

To address these challenges, we introduce TARSE (Test-Time Adaptation via Retrieval of Skills and Experience). TARSE treats clinical reasoning as an agent-based problem, utilizing two distinct, curated libraries to guide the model's internal logic:

  1. Skills Library: A collection of reusable clinical procedures, such as guidelines and pharmacologic mechanisms, organized as executable decision rules (e.g., "If condition X and Y, then do Z").
  2. Experience Library: A set of verified reasoning trajectories (Chain-of-Thought) from previously solved cases, indexed by step-level transitions.
Comparison of reasoning approaches for a clinical case involving Cisplatin, highlighting how TARSE aligns with human-like logical chains.

The TARSE workflow operates in two primary stages. First, in Experience Alignment, the agent retrieves similar solved cases and performs lightweight test-time adaptation (TTA). By taking a few gradient steps to align the model's parameters with the logic of past experiences, the model is "anchored" to a valid logical structure. Second, in Skills Verification, the model generates a provisional reasoning chain. For every transition in that chain, the agent retrieves specific "Skills" to verify or repair the logic, ensuring that sub-decisions (such as checking for drug contraindications) are locally aligned with clinical evidence.

Experimental Results

We evaluated TARSE on high-stakes medical benchmarks, including MedQA (USMLE style), MedMCQA, and MMLU-Medical. The framework was also tested on general multi-hop and mathematical reasoning datasets to assess its robustness beyond the medical domain. Our libraries were curated from authoritative sources such as the CDC, NICE, WHO, and StatPearls.

Accuracy vs. Inference Time (log scale) for TARSE compared to medical RAG and reasoning baselines.

As shown in the performance analysis, TARSE-14B (built on Qwen2.5) achieved a state-of-the-art 73.8% on MedQA, representing a significant improvement over standard medical RAG baselines like MedRAG (51.0%) and advanced reasoning methods like rStar (63.2%). While the test-time adaptation adds approximately 32 seconds of latency per question, it remains substantially more efficient than heavy test-time scaling methods like rStar, which can add nearly 500 seconds of latency for smaller performance gains. Human evaluations further confirmed that TARSE's reasoning traces are more logically coherent and domain-correct than those of vanilla LLMs.

Discussion and Conclusion

By explicitly separating "Skills" (the rules) from "Experience" (the application), TARSE avoids the common pitfalls of standard RAG, where models often conflate therapeutic mechanisms with side effects. The use of TTA acts as a "mental warm-up," ensuring the model's hidden states are aligned with valid clinical logic before generation begins.

Despite its success, TARSE is dependent on the quality and currency of its libraries; outdated guidelines could potentially lead to incorrect reasoning. Additionally, while the adaptation is "lightweight," the computational overhead of backpropagation at inference time may require further optimization for real-time clinical use. Nonetheless, TARSE demonstrates that retrieving and adapting to structured clinical knowledge is a highly effective strategy for building reliable medical reasoning agents.

Summary updated

BibTeX
@misc{wang2026tarse,
  author = {Junda Wang and Zonghai Tao and Hansi Zeng and Zhichao Yang and Hamed Zamani and Hong Yu},
  title = {{TARSE: Test-Time Adaptation via Retrieval of Skills and Experience for Reasoning Agents}},
  year = {2026},
  eprint = {2603.01241},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.01241},
}
Figure