Inspiration

  • 23% of patients wait more than 12 weeks to start treatment, due to lack of consultant psychiatrists
  • There is currently just one consultant psychiatrist per 12,567 people in England
  • More than three quarters of those waiting for treatment reported that they were forced to resort to emergency services

source

What it does

  • the DSM Chatbot allows health professionals to aid in diagnoses of patients by allowing them to chat with a safety-first bot that gets context from DSM-5 - the gold standard manual for mental health diagnosis worldwide.

How we built it

  • chunked the PDF by converting to HTML and adding this to ChromaDB
  • then, using langchain, created a chain that takes incoming messages, retrieves relevant context from the vector DB, formats a template to ensure the response is on task, and engages with Claude to generate an appropriate response.

Challenges we ran into

  • correctly structuring the PDF in HTML so that it could be chunked by langchain
  • general data cleaning so that the Claude was not confused by unnecessary context
  • sometimes Claude was quite slow and often gives very wordy answers

Accomplishments that we're proud of

  • creating a chunkable HTML parser for our PDF
  • additional prompting to ensure that Claude was focused on task and not hallucinating as much as possible

What's next for DSM Bot

  • Clean up the UI and UX (right now, it looks bad and some text gets cut off)
  • Add ICD-11 as context - the WHO global standard for health information
  • Suggest treatment plans using additional context - right now it is only focused on diagnosis
  • Potentially use patient data to finetune individual models so that as patients symptoms and response to treatment evolves, as does the advice the chatbot can give

Built With

  • chromadb
  • claude
  • fastapi
  • langchain
  • python
Share this project:

Updates