Code Monkey home page Code Monkey logo

diagnosis-bot's Introduction

Diagnosis-Bot

Provides preliminary medical diagnoses based on user symptoms and history.

Proposed 3 Stage Prompt Architecture :

Prompt Architecture

Stage 1 :

  • We have a CompounderAgent and a CompounderProxyAgent.
  • The CompounderProxyAgent is representing the user.
  • The CompounderAgent asks the CompounderProxyAgent some of the most basic questions (to get primary symptoms) from a document titled 2_Questioning_Framework_Level_1.md
  • The information is compiled to a user_symptoms.json file.

Stage 2 :

  • There is an AI agent whose role is to assign relevant medical professionals to the user/patient.
  • It uses data from user_symptoms.json file.
  • It consists of a list of medical professionals in the file named 1_List_of_Medical_Professionals.md.
  • The medical professionals are selected by the AI agent based on user_symptoms.json file. To create a group, it is mandatory to have at least three agent in the group.
  • The selected medical professionals are compiled to selected_agents.json.

Stage 3 :

  • The selected agents are loaded from selected_agents.json file and are added to a group chat.
  • The user_symptoms.json file is loaded as well.
  • A ChatManagerAgent is created to manage the group chat.
  • Then the CompounderProxyAgent initiates the group chat.
  • It then forwards user_symptoms.json file to the group chat and asks to diagnose the user.
    • The agents try to diagnose the user by going through their symptoms.
    • They might ask detailed questions pertaining to the user's lifestyle and symptoms and health history.
    • These questions are asked strictly with reference to the the following documents:
3_Primary_Complaint_Symptom_Level_2.md
4_Health_History_Level_2.md
5_Lifestyle_Factors_Level_2.md
6_Environmental_Occupational_Factors_Level_2.md
  • There is a dialogue between the group of agents and the user (CompounderProxyAgent) until they arrive at a diagnosis.
  • They stick to the Occam's Razor principle while diagnosing the user.


Instructions to Run

  1. Clone this repository onto your system :
git clone "https://github.com/FreeGym/Diagnosis-Bot.git"
  1. Navigate to the cloned directory :
cd Diagnosis-Bot
  1. Create a conda environment from the environment.yml file :
conda create -f environment.yml
  1. Activate the conda environment :
conda activate diagnosis_bot
  1. Run the application using the following command:
python src/main.py

diagnosis-bot's People

Contributors

freegym avatar pranavjoy18 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.