AI Psychiatrist Assistant: An LLM-based Multi-Agent System for Depression Assessment from Clinical Interviews
- Clone the repository:
git clone https://github.com/trendscenter/ai-psychiatrist.git- Navigate to the cloned directory and create a new conda environment using the provided
env_reqs.ymlfile:
cd ai-psychiatrist
conda env create --name aipsy --file ./env_reqs.yml- Activate the conda environment:
conda activate aipsy- Create a new git branch for your changes:
git checkout -b dev_<your_last_name>Replace <your_last_name> with your last name.
- Start Ollama by submitting the SLURM job script
job_ollama.sh:
cd slurm
sbatch job_ollama.sh-
Check the status of the job using the command
squeue -u <username>, where<username>is your username. Check the node that Ollama is running on in the output of the command. The node name is in the formatarctrdagnXXX, whereXXXis a number. -
Once the job is running, you can access Ollama on the node. See the Python script
ollama_example.pyfor an example of how to use Ollama. UpdateOLLAMA_NODEto the node where Ollama is running. Submit the SLURM job scriptjob_assess.shto run the Python code:
sbatch job_assess.sh- If you stop using Ollama, you can stop the job using the command
scancel <job_id>, where<job_id>is the job ID of the Ollama job. You can find the job ID in the output of the commandsqueue -u <username>.
-
qualitative_assessment contains the scripts for identifying social and biological risk factors.
-
quantitative_assessment contains the scripts for predicting PHQ-8 scores.
-
meta_review contains the code for integrating information and predicting severity.
-
agents contains the code for the multi-agent system.
-
analysis_output contains the outputs from the quantitative assessment.
-
visualization contains the scripts for generating the figures.
