Elamur Research⌕
☰
home / papers / 2025 / TxAgent: An AI Agent for Therapeutic Reasoning Across a Universe of Tools

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.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

 Fields, topics and concepts

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.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.2503.10970 · 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

24 references, 13 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. 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).
  2. 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
  3. 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).
  4. Singhal, K. et al. Large language models encode clinical knowledge. Nature 620, 172–180 (2023).
  5. Singhal, K. et al. Toward expert-level medical question answering with large language models. Nature Medicine 1–8 (2025). find
  6. Chen, Z. et al. Meditron-70b: Scaling medical pretraining for large language models. arXiv preprint arXiv:2311.16079 (2023).
  7. Alber, D. A. et al. Medical large language models are vulnerable to data-poisoning attacks. Nature Medicine 1–9 (2025). find
  8. Yan, F. et al. Berkeley function calling leaderboard. https://gorilla.cs.berkeley.edu/blogs/8 b erkeley function calling leaderboard.html (2024). ↗
  9. 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). ↗
  10. Liu, W. et al. Toolace: Winning the points of llm function calling. arXiv:2409.00920 (2024). arXiv preprint
  11. Gao, Y. et al. Retrieval-augmented generation for large language models: A survey. arXiv preprint arXiv:2312.10997 (2023).
  12. Gao, S. et al. Empowering biomedical discovery with ai agents. Cell 187, 6125–6151 (2024).
  13. Boiko, D. A., MacKnight, R., Kline, B. & Gomes, G. Autonomous chemical research with large language models. Nature 624, 570–578 (2023).
  14. Yao, S. et al. React: Synergizing reasoning and acting in language models. In International Conference on Learning Representations (ICLR) (2023).
  15. Bran, A. M. et al. Chemcrow: Augmenting large-language models with chemistry tools. arXiv preprint arXiv:2304.05376 (2023).
  16. 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
  17. 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
  18. Ochoa, D. et al. The next-generation open targets platform: reimagined, redesigned, rebuilt. Nucleic acids research 51, D1353–D1359 (2023). find
  19. 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
  20. Gallifant, J. et al. Language models are surprisingly fragile to drug names in biomedical benchmarks. arXiv preprint arXiv:2406.12066 (2024). find
  21. 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
  22. Guo, D. et al. Deepseek-r1: Incentivizing reasoning capability in llms via reinforcement learning. arXiv preprint arXiv:2501.12948 (2025).
  23. Lewis, P. et al. Retrieval-augmented generation for knowledge-intensive nlp tasks. Advances in Neural Information Processing Systems 33, 9459–9474 (2020).
  24. 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

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/gao-2025-txagent-ai-agent-therapeutic-reasoning/