Skip to content

BrikHMP18/ChatGPC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ChatGPC

Chat with Clinical Practice Guidelines - Intelligent chat system that uses RAG (Retrieval-Augmented Generation) to query public clinical practice guidelines from EsSalud.

Description

ChatGPC is a learning project that implements an intelligent chat system using RAG (Retrieval-Augmented Generation) to query information from official clinical practice guidelines from EsSalud. The project allows healthcare professionals and students to interactively consult verified medical documents through a modern conversational interface.

The system uses LangChain and LangGraph to orchestrate conversational agents that can retrieve relevant information from a vector store and generate contextualized responses based on official documents. The application includes two clinical practice guidelines: management of asthmatic crisis in children and adolescents, and diagnosis of pulmonary arterial hypertension.

Features

  • RAG with LangChain/LangGraph: Implementation of retrieval and augmented generation
  • Intelligent Chat: Modern conversational interface with light/dark mode
  • Semantic Search: Vector embeddings to find relevant information
  • Verified Sources: All responses include references to official documents
  • Responsive Design: Optimized for mobile and desktop devices

Tech Stack

Backend:

  • LangChain + LangGraph for conversational agent orchestration
  • OpenAI GPT-4 for response generation
  • Express.js + Vector Store for REST API and semantic search
  • PostgreSQL for data persistence

Frontend:

  • React 19 + TypeScript + Vite
  • Modern CSS with variable system and themes
  • Responsive interface with sidebar and chat container

Deployment:

  • Genezio (serverless platform for full-stack deployment)

Included Guidelines

  1. Clinical Practice Guideline for the Management of Asthmatic Crisis in Children and Adolescents (EsSalud 2023)

    • Initial evaluation protocols and treatment by severity
    • Recommendations for inhaler and nebulizer use
    • Hospital discharge criteria and outpatient follow-up
  2. Clinical Practice Guideline for the Diagnosis and Follow-up of Pulmonary Arterial Hypertension (EsSalud 2024)

    • Echocardiographic screening criteria
    • Mortality risk stratification scales
    • Follow-up and treatment evaluation parameters

Installation

# Backend
cd server && npm install
# Configure OPENAI_API_KEY in .env file

# Frontend  
cd client && npm install

# Local development
npm run dev # run in both folders

Usage

The system allows natural language queries about the included clinical guidelines:

  • "What is the treatment for severe asthmatic crisis in children?"
  • "What echocardiographic criteria are used to screen for pulmonary hypertension?"
  • "When should magnesium sulfate be used in asthmatic crisis?"
  • "What are the follow-up parameters in PAH?"

Development

This project was built as a learning exercise about RAG (Retrieval-Augmented Generation) following the tutorial from notJust․dev. Significant modifications were made to the frontend and functionalities were adapted for the medical domain, implementing a chat system specialized in clinical practice guidelines.

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit and push your changes
  4. Open a Pull Request

Contact


Note: This is an educational project developed to learn about RAG and is based on public guidelines from EsSalud. For real medical decisions, always consult with healthcare professionals.

About

RAG-based chat system for querying EsSalud public clinical practice guidelines

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published