TxAgent: An AI Agent for Therapeutic Reasoning Across a Universe of Tools
Paper · 2025 · Shanghua Gao, Richard Zhu, Zhenglun Kong et al.
Summary
Picking the right drug for a particular patient means weighing comorbidities, co-medications, interactions and contraindications. General-purpose LLMs handle this poorly: they hallucinate, lack up-to-date knowledge, and struggle to combine many clinical variables. The authors present TxAgent, an agent built on a fine-tuned Llama-3.1-8B-Instruct. It interleaves explicit reasoning steps with calls to external biomedical resources and returns a transparent trace alongside its answer. Its tools come from ToolUniverse, a curated set drawing on openFDA (all FDA-approved drugs since 1939), Open Targets and the Human Phenotype Ontology. A ToolRAG model chooses relevant tools at each step. Training data was synthesized by multi-agent pipelines (ToolGen, QuestionGen, TraceGen). On five new benchmarks covering drug reasoning and personalized treatment, the compact agent beats much larger systems, including GPT-4o, Llama-3.1-70B-Instruct and DeepSeek-R1. Its accuracy stays stable whether a drug is named by brand, generic name or description. The work shows that grounding a small model in verified, updatable tools can matter more than scale for clinical decision support.
Key points
- ToolUniverse contains 211 tools. ToolGen, a multi-agent system, builds such tools automatically from API documentation.
- TxAgent-Instruct holds 378,027 instruction-tuning samples. These were derived from 85,340 multi-step traces, which include 177,626 reasoning steps and 281,695 function calls.
- Benchmarks: DrugPC, BrandPC, GenericPC, DescriptionPC and TreatmentPC together cover 3,168 drug-reasoning tasks and 456 patient treatment scenarios.
- Open-ended DrugPC accuracy: TxAgent scores 92.1%, versus 66.3% for GPT-4o and 52.8% for Llama-3.1-70B-Instruct. On TreatmentPC it leads GPT-4o by 13.6 points, and in open-ended queries it is 7.5 points more accurate than DeepSeek-R1 (671B).
- Robustness and ablations: accuracy variance across drug-name variants is <0.01, compared with 9.96 for GPT-4o, and TxAgent reaches 56.5% on DescriptionPC. Ablations show that three factors improve results: larger toolboxes, real tools rather than LLM-simulated ones, and explicit reasoning before each call. Code is available at github.com/mims-harvard/TxAgent.
Fields, topics and concepts
📚 Shelves 5The field of science this work belongs to (OpenAlex fields).Computer Science · 19,503 worksArtificial Intelligence · 18,805 worksComputational Theory and Mathematics · 496 worksMedicine · 288 worksHealth Informatics · 227 works
🧭 Topics 1Research subjects and languages the work is about.Reasoning · 1,948 works
Cite
Cite as Shanghua Gao, Richard Zhu, Zhenglun Kong, Ayush Noori, Xiaorui Su, Curtis Ginder, Theodoros Tsiligkaridis and Marinka Zitnik. 2025. TxAgent: An AI Agent for Therapeutic Reasoning Across a Universe of Tools. arXiv:2503.10970.
@misc{gao2025txagent,
title = {{TxAgent: An AI Agent for Therapeutic Reasoning Across a Universe of Tools}},
author = {Shanghua Gao, Richard Zhu, Zhenglun Kong, Ayush Noori, Xiaorui Su, Curtis Ginder, Theodoros Tsiligkaridis and Marinka Zitnik},
year = {2025},
doi = {10.48550/arxiv.2503.10970},
eprint = {2503.10970},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.2503.10970}
}References
- Huang, K. et al. A foundation model for clinician-centered drug repurposing. Nature Medicine 30, 3601–3613 (2024). \#\# 2. Dubey, A. et al. The llama 3 herd of models. arXiv preprint arXiv:2407.21783 (2024).
- Radford, A., Narasimhan, K., Salimans, T., Sutskever, I. et al. Improving language understanding by generative pre-training (2018). \#\# 4. Jiang, A. Q. et al. Mistral 7b. arXiv preprint arXiv:2310.06825 (2023). find
- Touvron, H. et al. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971 (2023). \#\# 6. Bai, J. et al. Qwen technical report. arXiv preprint arXiv:2309.16609 (2023).
- Singhal, K. et al. Large language models encode clinical knowledge. Nature 620, 172–180 (2023).
- Singhal, K. et al. Toward expert-level medical question answering with large language models. Nature Medicine 1–8 (2025). find
- Chen, Z. et al. Meditron-70b: Scaling medical pretraining for large language models. arXiv preprint arXiv:2311.16079 (2023).
- Alber, D. A. et al. Medical large language models are vulnerable to data-poisoning attacks. Nature Medicine 1–9 (2025). find
- Yan, F. et al. Berkeley function calling leaderboard. https://gorilla.cs.berkeley.edu/blogs/8 b erkeley function calling leaderboard.html (2024). ↗
- Dadao, I. watt-tool-8b: A fine-tuned language model for tool usage and multi-turn dialogue. https://huggingface.co/watt-ai/watt-tool-8B (2025). ↗
- Liu, W. et al. Toolace: Winning the points of llm function calling. arXiv:2409.00920 (2024). arXiv preprint
- Gao, Y. et al. Retrieval-augmented generation for large language models: A survey. arXiv preprint arXiv:2312.10997 (2023).
- Gao, S. et al. Empowering biomedical discovery with ai agents. Cell 187, 6125–6151 (2024).
- Boiko, D. A., MacKnight, R., Kline, B. & Gomes, G. Autonomous chemical research with large language models. Nature 624, 570–578 (2023).
- Yao, S. et al. React: Synergizing reasoning and acting in language models. In International Conference on Learning Representations (ICLR) (2023).
- Bran, A. M. et al. Chemcrow: Augmenting large-language models with chemistry tools. arXiv preprint arXiv:2304.05376 (2023).
- Swanson, K., Wu, W., Bulaong, N. L., Pak, J. E. & Zou, J. The virtual lab: Ai agents design new sars-cov-2 nanobodies with experimental validation. bioRxiv 2024–11 (2024). find
- Kass-Hout, T. A. et al. Openfda: an innovative platform providing access to a wealth of fda’s publicly available data. Journal of the American Medical Informatics Association 23, 596–600 (2016). find
- Ochoa, D. et al. The next-generation open targets platform: reimagined, redesigned, rebuilt. Nucleic acids research 51, D1353–D1359 (2023). find
- Castellanos, F. et al. The human phenotype ontology in 2024: phenotypes around the world. Nucleic Acids Research 52 (2024). \#\# 23. OpenAI. Gpt-4o (2024). find
- Gallifant, J. et al. Language models are surprisingly fragile to drug names in biomedical benchmarks. arXiv preprint arXiv:2406.12066 (2024). find
- Chen, C. et al. Clinicalbench: Can llms beat traditional ml models in clinical prediction? arXiv preprint arXiv:2411.06469 (2024). — [arXiv:2411.06469](https://arxiv.org/abs/2411.06469) find
- Guo, D. et al. Deepseek-r1: Incentivizing reasoning capability in llms via reinforcement learning. arXiv preprint arXiv:2501.12948 (2025).
- Lewis, P. et al. Retrieval-augmented generation for knowledge-intensive nlp tasks. Advances in Neural Information Processing Systems 33, 9459–9474 (2020).
- Chandak, P., Huang, K. & Zitnik, M. Building a knowledge graph to enable precision medicine. Nature Scientific Data (2023). \#\# 29. Ji, C. C.-J. et al. Gorilla openfunctions v2 (2024). \#\# 30. OpenAI. Introducing openai o1-preview (2024). 31. Gloss, D., Moxley, R. T. I., Ashwal, S. & Oskoui, M. Practi… — Attention Is All You Need
Updated
This page in Markdown → https://md.research.elamur.ai/free/en/papers/gao-2025-txagent-ai-agent-therapeutic-reasoning/