Giter Site home page Giter Site logo

qingzhong1 / ai_hospital Goto Github PK

View Code? Open in Web Editor NEW

This project forked from libertfan/ai_hospital

0.0 0.0 0.0 22.76 MB

AI Hospital: Interactive Evaluation and Collaboration of LLMs as Intern Doctors for Clinical Diagnosis

License: MIT License

Shell 3.10% Python 96.90%

ai_hospital's Introduction

AI Hospital: Interactive Evaluation and Collaboration of Large Language Models as Intern Doctors for Clinical Diagnosis [Paper]

Demonstration of AI Hospital

Welcome to the repository for our research paper, "AI Hospital: Interactive Evaluation and Collaboration of Large Language Models as Intern Doctors for Clinical Diagnosis." This repository hosts our primary simulation module tailored for various medical roles involved in the study.

Environment Setup

To set up your environment, run the following command:

pip install -r requirements.txt

Multi-View Medical Evaluation (MVME) Benchmark

Our study introduces the MVME Benchmark for evaluating Large Language Models (LLMs) in the role of intern doctors for clinical diagnosis. We have developed our medical record dataset, available for review at our medical record dataset, sourced from iiyi.

Review Existing LLMs

You can find the dialog history documents of LLMs featured in our study at Dialog_History. Additionally, the one-step diagnostic reports are located in One-Step.

Replication Instructions

Navigate to the source directory:

cd ./src

Before running the script, open scripts/run.sh and enter your API keys for the required services. For instance:

  • For OpenAI Models (e.g., GPT-4): OPENAI_API_KEY="", OPENAI_API_BASE=""
  • For Alibaba Models (e.g., Qwen-Max): DASHSCOPE_API_KEY=""
  • For Wenxin Models (e.g., Wenxin-4.0): WENXIN_API_KEY="", WENXIN_SECRET_KEY=""

Execute the script with:

bash scripts/run.sh

Evaluating Quantitative Performance

To assess the performance, navigate to the source directory and execute:

cd ./src
bash scripts/eval.sh

Creating Your Intern Doctor Agent

Step 1: Implementation

To develop your intern doctor agent, base your implementation on the Doctor class. Refer to GPTDoctor for agents requiring online API calls or HuatuoGPTDoctor for GPU-dependent agents.

Step 2: Registration

Register your model in the initialization file within the agents directory.

Collaborative Diagnosis with LLMs: Focus on Dispute Resolution

Collaboration Framework

Replication Instructions

Navigate to the source directory:

cd ./src

Open scripts/run_md.sh and input your API keys for the necessary services as described above.

Execute the script with:

bash scripts/run_md.sh

Authors and Citation

This study was authored by Zhihao Fan, Jialong Tang, Wei Chen, Siyuan Wang, Zhongyu Wei, Jun Xie, Fei Huang, and Jingren Zhou. We encourage the use of our code and data in your research and kindly request citation of our paper as follows:

@article{fan2024ai,
  title={AI Hospital: Interactive Evaluation and Collaboration of LLMs as Intern Doctors for Clinical Diagnosis},
  author={Fan, Zhihao and Tang, Jialong and Chen, Wei and Wang, Siyuan and Wei, Zhongyu and Xi, Jun and Huang, Fei and Zhou, Jingren},
  journal={arXiv preprint arXiv:2402.09742},
  year={2024}
}

ai_hospital's People

Contributors

libertfan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.