title: MedAgentGym: Training LLM Agents for Code-Based Medical Reasoning at
    Scale
summary: We introduce MedAgentGYM, the first publicly available training environment
  designed to enhance coding-based medical reasoning capabilities in large
  language model (LLM) agents. MedAgentGYM comprises 72,413 task instances across
  129 categories derived from authentic real-world biomedical scenarios. Tasks
  are encapsulated within executable coding environments, each featuring detailed
  task descriptions, interactive feedback mechanisms, verifiable ground-truth
  annotations, and scalable training trajectory generation. Extensive
  benchmarking of over 30 LLMs reveals a notable performance disparity between
  commercial API-based models and open-source counterparts. Leveraging
  MedAgentGYM, Med-Copilot-7B achieves substantial performance gains through
  supervised fine-tuning (+36.44%) and continued reinforcement learning
  (+42.47%), emerging as an affordable and privacy-preserving alternative
  competitive with gpt-4o. By offering both a comprehensive benchmark and
  accessible, expandable training resources within unified execution
  environments, MedAgentGYM delivers an integrated platform to develop LLM-based
  coding assistants for advanced biomedical research and practice.
paper_authors._id: 6842454fbdc448822b2f1c03
paper_authors.name: Ran Xu
paper_authors._id: 6842454fbdc448822b2f1c04
paper_authors.name: Yuchen Zhuang
paper_authors._id: 6842454fbdc448822b2f1c05
paper_authors.name: Yishan Zhong
paper_authors._id: 6842454fbdc448822b2f1c06
paper_authors.name: Yue Yu
paper_authors._id: 6842454fbdc448822b2f1c07
paper_authors.name: Xiangru Tang
paper_authors._id: 6842454fbdc448822b2f1c08
paper_authors.name: Hang Wu
paper_authors._id: 6842454fbdc448822b2f1c09
paper_authors.name: May D. Wang
paper_authors._id: 6842454fbdc448822b2f1c0a
paper_authors.name: Peifeng Ruan
paper_authors._id: 6842454fbdc448822b2f1c0b
paper_authors.name: Donghan Yang
paper_authors._id: 6842454fbdc448822b2f1c0c
paper_authors.name: Tao Wang
paper_authors._id: 6842454fbdc448822b2f1c0d
paper_authors.name: Guanghua Xiao
paper_authors._id: 6842454fbdc448822b2f1c0e
paper_authors.name: Carl Yang
paper_authors._id: 6842454fbdc448822b2f1c0f
paper_authors.name: Yang Xie
paper_authors._id: 6842454fbdc448822b2f1c10
paper_authors.name: Wenqi Shi
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2025-06-06T07:41:39.845Z
paper_authors._id: 65cae89119683f9817c049ea
paper_authors.avatarUrl: https://cdn-avatars.huggingface.co/v1/production/uploads/65cae89119683f9817c049ea/A0XxjmaJldu28JhFvWmpP.jpeg
paper_authors.fullname: Wenqi Shi
paper_authors.type: user
paper_authors.user: wshi83
paper_title: MedAgentGym: Training LLM Agents for Code-Based Medical Reasoning at
    Scale
paper_summary: We introduce MedAgentGYM, the first publicly available training environment
  designed to enhance coding-based medical reasoning capabilities in large
  language model (LLM) agents. MedAgentGYM comprises 72,413 task instances across
  129 categories derived from authentic real-world biomedical scenarios. Tasks
  are encapsulated within executable coding environments, each featuring detailed
  task descriptions, interactive feedback mechanisms, verifiable ground-truth
  annotations, and scalable training trajectory generation. Extensive
  benchmarking of over 30 LLMs reveals a notable performance disparity between
  commercial API-based models and open-source counterparts. Leveraging
  MedAgentGYM, Med-Copilot-7B achieves substantial performance gains through
  supervised fine-tuning (+36.44%) and continued reinforcement learning
  (+42.47%), emerging as an affordable and privacy-preserving alternative
  competitive with gpt-4o. By offering both a comprehensive benchmark and
  accessible, expandable training resources within unified execution
  environments, MedAgentGYM delivers an integrated platform to develop LLM-based
  coding assistants for advanced biomedical research and practice.
paper_ai_summary: MedAgentGYM, a training environment for coding-based medical reasoning in LLMs, enhances performance through supervised fine-tuning and reinforcement learning, providing a benchmark and expandable resource.
paper_ai_keywords: large language model MedAgentGYM task instances biomedical scenarios coding environments task descriptions interactive feedback ground-truth annotations training trajectories LLMs supervised fine-tuning reinforcement learning Med-Copilot-7B gpt-4o coding assistants biomedical research