Source-linked AI summary

ReflecTool: Towards Reflection-Aware Tool-Augmented Clinical Agents

Yusheng Liao, Shuyang Jiang, Yanfeng Wang, Yu Wang

arXiv:2410.17657v3cs.CL

TL;DR

Clinical LLMs remain limited to text-based responses, while existing clinical agents often address specific scenarios with narrow tool ranges. ReflecTool pairs a broad clinical-agent benchmark with long-term memory and tool-wise verification; experiments report that it outperforms existing clinical agents.

  • Problem

    LLMs are limited to text-based responses, and existing clinical agents remain focused on specific scenarios with narrow tool ranges.

    Source: §1 · p. 1
  • Method

    The paper introduces CAB, with 18 tasks across five dimensions, and REFLECTOOL, which uses long-term memory and tool-wise verification to guide domain-specific tool use.

    Source: §1 · pp. 1–2
  • Results

    Empirical results show REFLECTOOL outperforms existing clinical agents, demonstrating superior adaptability and efficacy.

    Source: §6 · p. 9
  • Takeaways & Limitations

    CAB offers a broader basis for evaluating clinical agents than single-scenario evaluations.

    Source: §1 · p. 1, §2.1 · p. 3

    CAB may not fully encompass the complexity of evolving real-world clinical scenarios and requires ongoing updates to remain relevant.

    Source: Limitations · p. 10

Abstract

from arXiv · show

Large Language Models (LLMs) have shown promising potential in the medical domain, assisting with tasks like clinical note generation and patient communication. However, current LLMs are limited to text-based communication, hindering their ability to interact with diverse forms of information in clinical environments. Despite clinical agents succeeding in diverse signal interaction, they are oriented to a single clinical scenario and hence fail for broader applications. To evaluate clinical agents holistically, we propose ClinicalAgent Bench~(CAB), a comprehensive medical agent benchmark consisting of 18 tasks across five key realistic clinical dimensions. Building on this, we introduce ReflecTool, a novel framework that excels at utilizing domain-specific tools within two stages. The first optimization stage progressively enlarges a long-term memory by saving successful solving processes and tool-wise experience of agents in a tiny pre-defined training set. In the following inference stage, ReflecTool can search for supportive successful demonstrations from already built long-term memory to guide the tool selection strategy, and a verifier improves the tool usage according to the tool-wise experience with two verification methods--iterative refinement and candidate selection. Extensive experiments on ClinicalAgent Benchmark demonstrate that ReflecTool surpasses the pure LLMs with more than 10 points and the well-established agent-based methods with 3 points, highlighting its adaptability and effectiveness in solving complex clinical tasks.

1 Introduction

The introduction presents CAB as a broad benchmark for clinical agents and REFLECTOOL as a memory- and verification-based framework for selecting and using clinical tools. It reports that REFLECTOOL achieves superior performance on CAB.

1 Introduction

  • Text-only LLMs cannot bridge clinical information in other forms, while existing clinical agents often remain confined to specific scenarios and narrow tool ranges.This limits their ability to handle the diverse information found in clinical environments.Source: §1 · p. 1
  • CAB comprises 18 tasks across five dimensions—Knowledge & Reasoning, MultiModal, Numerical Analysis, Data Understanding, and Trustworthiness—for holistic evaluation across clinical scenarios.It covers varied data sources and capabilities, including reasoning, multimodal integration, and trustworthiness.Source: §1 · pp. 1–2
  • REFLECTOOL uses a two-stage process: optimization stores successful trajectories and tool-wise suggestions in long-term memory, then inference retrieves similar cases to guide tool selection.During optimization, the agent compares successful and failed trajectories using a small proportion of samples.Source: §1 · p. 2
  • Its verification methods have different strengths: Iterative Refinement works better with less capable models, while Candidate Selection performs better with more intelligent models.Both methods use tool-wise experience to optimize tool usage.Source: §1 · p. 2
  • Experiments on CAB show REFLECTOOL achieves superior performance against a diverse array of established methods.The introduction attributes the result to more effective clinical tool utilization.Source: §1 · p. 2

2 ClinicalAgent Bench

ClinicalAgent Bench (CAB) is introduced to evaluate medical agents across clinical scenarios through a benchmark composition and a flexible clinical toolbox.

2.1 Composition

2.2 Clinical Toolbox

  • Unlike medical agents that constrain tools per task (Li et al., 2024a), CAB provides 15 tool types and imposes no limit on tool types or number per task.The toolbox includes clinical knowledge databases and calculators.Source: §2.2 · p. 3

3 REFLECTOOL

ReflecTool frames clinical task solving as multi-step interaction with heterogeneous inputs and a clinical toolbox. It builds memory and tool-specific experience from successful training trajectories, then uses retrieved demonstrations and verification to guide inference.

3.1 Problem Formulations

  • Clinical tasks combine an instruction, heterogeneous inputs, and a ground-truth answer, and require agents to solve them through multi-step actions.The action space includes pre-built tool actions and the inner actions Plan, Think, and Finish.Source: §3.1 · p. 3

3.2 Optimization Stage

  • ReflecTool reflects on initial trajectories, saves successful refined trajectories to long-term memory, and aggregates action-wise suggestions into tool-wise experience.It compares the refined trajectory with the ground truth, then compares actions across the initial and refined trajectories to produce action-wise suggestions.Source: §3.2 · pp. 3–4

3.3 Inference Stage

  • At inference, ReflecTool retrieves the top-k most similar memory cases using BM25 and uses their successful trajectories to guide actions.The retrieved cases come from the long-term memory built during optimization.Source: §3.3 · p. 4
  • A verifier applies tool-wise experience through iterative refinement or candidate selection; iterative refinement suits less capable models, while candidate selection better uses stronger models.Iterative refinement can stop early when the verifier repeats an action or stop at the maximum refinement step; candidate selection samples actions and selects the most effective one.Source: §3.3 · pp. 4–5

4 Experiments

Experiments compare ReflecTool with LLM, MLLM, and agent baselines, report gains over Reflexion and Qwen2 base models, and test the contribution of its modules through ablations.

4.1 Baselines

4.3 Ablation

  • On a 200-sample-per-dimension CAB subset, selection beats refinement in most cases; removing reflective long-term memory costs nearly 4 points for refinement and 7 for selection.Action-wise reflection also contributes to performance; the ablations are conducted on Qwen2-72B.Source: Table 3 · p. 6, §4.3 · p. 6

4.2 Main Results

  • REFLECTOOL exceeds Reflexion by at least 3 points with Qwen2-7B/72B and exceeds the Qwen2-7B/72B base models by more than 10 points.The comparison highlights ReflecTool’s advantage in domain-tool use over another self-reflection agent.Source: §4.2 · p. 6
  • Qwen2-72B and GPT-4o-mini lead their LLM and MLLM groups, while MLLMs trail in Numerical Analysis and Data Understanding; tool-wise reflection methods perform similarly at size 2.Source: §4.2 · p. 6

5 Analysis

The analysis finds that ReflecTool benefits from optimization, long-term memory, and reflection-guided tool use, while verification strategy affects performance and efficiency. It also reports fewer tool-selection errors and effectiveness across backbones.

5.1 Effect of Optimization Step

  • At the initial optimization step, Candidate Selection averages around 62.5 versus approximately 58 for Iterative Refinement, and both improve as optimization steps increase.Each successful task adds a memory item and tool-wise suggestions, so more optimization steps enlarge long-term memory and accumulated tool experience.Source: §5.1 · pp. 6–7, Figure 3 · p. 7

5.2 Size of Verification methods

  • At verification size n=2, iterative refinement performs best, while candidate selection gains more than 4 points as verification size increases.Candidate selection improves more when memory is present; iterative refinement is more effective without memory, particularly for improving suboptimal actions.Source: Figure 4 · p. 7, §5.2 · p. 7

5.3 Impact of the Long-Term Memory

  • Long-term memory improves all agent-based methods, while ReflecTool outperforms the baselines with both few-shot sample types.The authors attribute this result to the tool-wise reflection mechanism.Source: Table 4 · p. 7, §5.3 · p. 7

5.4 Tool Distribution in Trajectory

  • ReflecTool uses tools more often and draws on a broader range of tools than ReAct and CRITIC in the analyzed task dimensions.In Knowledge & Reasoning, ReAct more often answers directly; ReflecTool also combines multiple same-type tools and tools from different categories to integrate information and address individual-tool limitations.Source: Figure 5 · p. 8, §5.4 · p. 8

5.5 Tool Usage Error

  • ReflecTool significantly reduces tool-selection errors at both step and task levels.Errors mainly involve SQLCoder, DBManual, and LongDocRAG when their required database or file inputs are missing, and are concentrated in LongHealth, EMRQA, and EHR tasks.Source: Table 5 · p. 8, §5.5 · pp. 8–9, Table 6 · p. 9

5.6 Performance with Different Backbones

  • ReflecTool is effective with the Llama3-70B-Instruction backbone, indicating generalization across the tested models.The authors prioritized Qwen models because Llama-series instruction following more often produced formatting errors, then tested Llama3-70B-Instruction after adjusting prompts.Source: Table 7 · p. 9, §5.6 · p. 9

5.7 Time Cost Analysis

  • ReflecTool uses less time than Reflxion on both 7b and 70b models, and Candidate Selection is faster than Iterative Refinement.The authors attribute Candidate Selection’s speed to greater parallelism and describe ReflecTool as efficient in resource consumption.Source: Table 8 · p. 9, §5.7 · p. 9

6 Conclusions

The paper introduces CAB, a benchmark of 18 clinical-agent tasks across five dimensions, and REFLECTOOL, a reflection-aware framework for tool use. REFLECTOOL combines long-term memory and tool-wise verification, and the authors report that it outperforms existing clinical agents.

6 Conclusions

  • REFLECTOOL outperforms existing clinical agents, with the authors reporting adaptability and efficacy in real-world healthcare scenarios.The conclusion does not provide quantitative comparison values.Source: §6 · p. 9
  • CAB is a holistic clinical-agent benchmark comprising 18 tasks across five key dimensions.Source: §6 · p. 9
  • REFLECTOOL optimizes tool use through long-term memory and tool-wise verification, using Iterative Refinement and Candidate Selection to verify actions across varying backbones.Source: §6 · p. 9

Limitations

CAB may not fully represent evolving real-world clinical complexity, and its collected tools do not perfectly align with evaluation tasks. ReflecTool benefits from long-term memory, but generated trajectories still require validation.

Limitations

  • CAB’s 18 tasks across five dimensions may not capture the diversity and continual evolution of real-world clinical scenarios, requiring ongoing benchmark updates.The collected tools also do not perfectly align with evaluation tasks; this mismatch tests generalization and effective use of available tools.Source: Limitations · p. 10
  • Long-term memory improves ReflecTool’s decision-making by retaining successful experiences, but correct outcomes do not ensure that their underlying trajectories are fully correct or optimal.Further validation is needed to establish trajectory accuracy and consistency.Source: Limitations · p. 10

Ethic Considerations · A Related Works

REFLECTOOL is intended to assist healthcare providers under supervision, not replace medical professionals or make definitive clinical decisions, because AI can produce misleading information or hallucinations. The paper also reports anonymization, informed consent, and ethics-committee approval for patient-data use.

Ethic Considerations

  • AI models can generate misleading information or hallucinations, creating risks in clinical settings.The paper frames these risks alongside REFLECTOOL’s reported enhancements in clinical tool reasoning and task performance.Source: Ethic Considerations · p. 10
  • REFLECTOOL is not intended to replace medical professionals or provide definitive clinical decisions.It is intended to assist healthcare providers under appropriate supervision.Source: Ethic Considerations · p. 10
  • All patient data was anonymized before use.Source: Ethic Considerations · p. 10
  • Informed consent was obtained, with explicit permission for all data usage.Source: Ethic Considerations · p. 10
  • Relevant ethics committees approved data usage to ensure compliance with ethical standards and privacy-protection requirements.Source: Ethic Considerations · p. 10

A.1 Medical Agentic Methods … B.1.2 MultiModal

The supplied sections survey prior medical-agent approaches and describe ClinicalAgent Bench’s datasets alongside ReflecTool’s memory- and experience-building optimization process.

A.1 Medical Agentic Methods

  • Prior work spans BioKGBench’s knowledge-graph evaluation of biomedical claim verification, MedRAG’s retrieval-augmented medical QA benchmarking, CT-Agent’s clinical-trial task management, multimodal MMedAgent, and EHRAgent’s code-based reasoning over EHRs.Source: §A.1 · p. 13
  • MedAgents (Tang et al., 2024) uses role-playing expert collaboration rather than clinical tools to improve zero-shot medical reasoning without extensive fine-tuning.Source: §A.1 · p. 13

B ClinicalAgent Bench

  • ClinicalAgent Bench’s case demonstrations appear in Figure 6, and the section introduces its dataset details and pre-built clinical toolbox.Source: B ClinicalAgent Bench · p. 13, Figure 6 · p. 15
  • ReflecTool initializes empty long-term memory and tool-wise experience, generates a trajectory, compares it with the ground truth, then refines it using suggestions.When the refined trajectory is correct, the algorithm saves the successful trajectory to long-term memory.Source: B ClinicalAgent Bench · p. 14
  • The optimization step generates action-wise suggestions, merges tool suggestions into corresponding tool-wise experience, and returns the updated memory and experience.Source: B ClinicalAgent Bench · p. 14

B.1.1 Knowledge&Reasoning

  • The benchmark uses PubMedQA, MMLU, and BioASQ for medical knowledge question answering, and MedQA for medical reasoning.MMLU spans 57 subjects; BioASQ covers biomedical retrieval and reasoning; PubMedQA draws questions from biomedical abstracts; MedQA tests domain-specific exam-style questions.Source: §B.1.1 · p. 14

B.1.2 MultiModal

  • For image-based tasks, the benchmark uses SLAKE and VQA-RAD for open-ended QA and OmniMedVQA for closed-ended QA, across three datasets and 12 modalities.SLAKE has 642 images and 14,028 QA pairs, with 1,061 English test instances; VQA-RAD has 451 radiology images. OmniMedQA contains 118,010 images and 127,995 QA pairs across 73 datasets, and the study samples 1,000 public instances while preserving data-component proportions.Source: §B.1.2 · pp. 14–15

B.1.3 Numerical Analysis … C Case Study

The merged sections describe the benchmark datasets used to evaluate numerical analysis, data understanding, and trustworthiness, alongside the clinical toolbox and the scenarios its tools are intended to support. They cover heterogeneous tools for knowledge retrieval, multimodal interpretation, numerical and database operations, and clinical text processing.

B.1.3 Numerical Analysis

  • Numerical analysis uses MedCalc, EHRSQL, MIMIC-III, and eICU to assess medical calculations and EHR database retrieval.MedCalc includes over 1,000 reviewed instances across 55 calculation tasks; the EHRSQL, MIMIC-III, and eICU datasets retain answerable questions, with unanswerable questions placed in EHR-Halt.Source: §B.1.3 · pp. 15–17

B.1.4 Data Understanding

  • Data-understanding evaluation covers biomedical entity recognition, clinical-note question answering, and long-context QA.MedMentions (Mohan and Li, 2019) contains over 350,000 annotated UMLS-linked mentions; emrQA (Pampari et al., 2018) comprises question-logical-form and question-answer evidence pairs. LongHealthQA (Adams et al., 2024) uses 400 questions across fictional cases; this study uses contexts longer than 22k tokens and splits 200 questions for optimization and the remainder for testing.Source: §B.1.4 · p. 17

B.1.5 Trustworthiness

  • Trustworthiness evaluation covers reasoning and memory hallucinations, medical-image VQA, unanswerable EHR queries, and long-document questions lacking the answer in context.EHR-Halt contains 1,032 unanswerable SQL question-answering samples; LongHalt is constructed by removing the note containing the answer, so the model can only refuse.Source: §B.1.5 · pp. 17–18

B.2.2 MultiModal Tools

  • Multimodal tools include a medical vision-language model, a general-domain model, and a medical image captioner.HuatuoGPT-Vision-7B answers agent-generated questions about images; MiniCPM supplements the medical model, while MedCaptioner generates query-independent captions with structured image descriptions.Source: §B.2.2 · p. 18

B.2.3 Numerical Tools

  • Numerical tools support calculation, SQL-schema interpretation, and conversion of agent intent into database queries.The calculator executes expressions using Python logic; DBManual describes database tables and columns, and SQLCoder can make up to three attempts using error messages to produce SQL.Source: §B.2.3 · pp. 18–19

B.2 Clinical Toolbox; B.2.1 Knowledge Tools; B.2.4 Data Tools

  • The toolbox combines heterogeneous knowledge sources and data-processing tools, including Medrag, UMLS, Google Search, SpaCy, and LongDocRAG.Medrag retrieves from a medical knowledge base, UMLS supplies a knowledge graph, and Google Search retrieves web results; SpaCy extracts medical terms, while LongDocRAG chunks and retrieves text from uploaded documents.Source: §B.2.1 · p. 18, §B.3.1 · p. 19, §B.2.4 · p. 19

B.3.1 Clinical Tool

  • The toolbox aims for broad clinical applicability through diverse tools, while ReflecTool is not restricted to particular tool types.The selected multimodal tools have complementary roles: HuatuoGPT is medical-domain focused, MiniCPM general-purpose, and MedCaptioner independently generates medical-image descriptions.Source: §B.3.1 · p. 19

B.3.2 Clinical Scenarios

  • The five clinical dimensions address knowledge-based reasoning, medical-image analysis, EHR and numerical interpretation, clinical-text processing, and hallucination reduction.The scenarios include clinical decision-making, common imaging modalities such as X-rays, CT, and MRI, long-form patient records, and reliability during task execution.Source: §B.3.2 · p. 19

C.1 Parameter Error in Tool Usage

Parameter errors occur when an agent selects the correct tool but supplies unsuitable parameters. ReflecTool’s tool-wise reflection can help improve those parameters and make tool use more effective.

C.1 Parameter Error in Tool Usage

  • Parameter errors arise when an agent uses the correct tool but supplies inappropriate parameters, such as a low-relevance query to a knowledge tool.Such queries can prevent the tool from providing effective information for the task.Source: §C.1 · pp. 19–20
  • Using the same Medrag tool, ReflecTool-Qwen2-72B corrected its initially unsuccessful query through reflection and retrieved effective information, unlike Reflexion-Qwen2-72B.The case illustrates how tool-wise reflection can improve parameters even when both agents select the same tool.Source: §C.1 · p. 20

D Experiments Details · D.1 Implementations · D.2 Prompt Used in REFLECTOOL

Experiments used zero-shot LLM/MLLM baselines and one-shot agent baselines, with multimodal tools restricted to multimodal tasks. The appendix identifies the prompts used for ReflecTool’s optimization and inference stages.

D.1 Implementations

  • LLMs and MLLMs used zero-shot settings, while agent-based methods used one-shot settings to demonstrate the action format; experiments ran on two NVIDIA A100 80GB GPUs.Multimodal tools were removed for non-multimodal tasks to save memory.Source: §D.1 · p. 20

D.2 Prompt Used in REFLECTOOL

  • Figure 10 presents the ReflecTool inference prompt, and Figure 11 presents prompts for the two verifier types.The text identifies Figure 10 as the inference-stage prompt and Figure 11 as the verifier prompts.Source: §D.2 · p. 20, Figure 10 · p. 24, Figure 11 · p. 24
  • Figure 7 compares the reasoning trajectories of two agent-based methods on the same task as a case study of parameter errors in tool use.The supplied caption does not specify the compared trajectories’ outcomes.Source: Figure 7 · p. 21
  • Figure 8 shows the prompt for reflecting on the first trajectory during the optimization stage.The optimization-stage prompts are identified in the text as Figures 8 and 9.Source: §D.2 · p. 20, Figure 8 · p. 22
  • Figure 9 shows the prompt for generating tool-wise suggestions and tool-wise experience.The optimization-stage prompts are identified in the text as Figures 8 and 9.Source: §D.2 · p. 20, Figure 9 · p. 23
  • Table 10 covers results for four model types on Clinical Agent Bench; its caption defines COT, 4-bit GPTQ marking, unavailable-task dashes, and bolded best results by task type.The supplied passage gives no table cell values, so it does not establish particular results or winners.Source: Table 10 · p. 25
Loading 2410.17657v3…