This project is a Vietnamese-language chatbot system designed for medical question answering. It uses a Retrieval-Augmented Generation (RAG) architecture with the following components:
- VietAI/vit5-base: Fine-tuned with LoRA for text generation.
- Sentence Transformers (vinai/phobert-base): For embedding titles, questions, context.
- Redis Stack with HNSW (Hierarchical Navigable Small World): Vector database for semantic search.
- FastAPI: Lightweight backend API.
- Docker: Deploy the entire system (Redis Stack + FastAPI backend) in containers using docker-compose.
- Data Source: Medical knowledge is derived from public content on YouMed.vn.
- Note:
- The raw crawled dataset is not provided due to data protection policies.
- The data collection and preprocessing pipeline is not included in this repository.
- Note:
- Trained Model: baduyne/vnt5-medical-gqa
- Evaluate Metric: BLEU = 41.4
- Retrieve relevant medical context from a structured knowledge base
- Answer natural language questions using a fine-tuned Vietnamese language model
- Real-time semantic search powered by Redis + HNSW
- Ready-to-deploy with Docker
git clone https://github.com/baduyne/Medical-Consultant.git
cd Medical-Consultantdocker-compose up --build
docker run --gpus all -p 8000:8000 your_image_name# Set up nvidia-container-toolkit:
sudo apt-get update
sudo apt-get install -y nvidia-container-toolkit
sudo systemctl restart docker