Mistral 7B Instruct v0.3 fine-tuned with QLoRA for medical question answering in Portuguese and English, with additional support for Brazilian healthcare protocols.
Developed as part of the Tech Challenge Phase 3 — Post-Graduate Program in AI for Developers at FIAP (São Paulo, Brazil).
Overview
This repository contains LoRA adapters (not the full model) trained on the MedQuAD dataset translated to Portuguese, combined with Brazilian-specific medical QA pairs covering diseases prevalent in Brazil and clinical guidelines from the Brazilian public health system (SUS — Sistema Único de Saúde).
The model is designed to answer medical questions clearly and accurately, integrated into a multi-agent system with RAG and safety guardrails.
WARNING: This is an academic project. It must NOT be used for real clinical decisions. All responses must be validated by a qualified healthcare professional.
Developed by: Adriana Martins, Diego Oliveira, Eduardo Zagari, Renan Torres
This model corresponds to checkpoint-1500 from a 2-epoch training run (~1.3 epochs completed). Extensive evaluation across 7 checkpoints revealed that this checkpoint achieves the best balance between learning and avoiding catastrophic collapse:
Abaixo está uma instrução que descreve uma tarefa, junto com uma entrada que
fornece contexto adicional. Escreva uma resposta que complete adequadamente
a solicitação.
### Instrução:
Responda a seguinte pergunta médica de forma clara e detalhada.
### Entrada:
Quais são os sintomas do diabetes tipo 2?
### Resposta:
Training Data
Base dataset:MedQuAD — Medical Question Answering Dataset (NIH sources: NCI, NIDDK, NINDS, NHLBI, GHR, MedlinePlus)
Total size: ~20,500 question-answer pairs
Composition:
80% Portuguese: MedQuAD translated to Brazilian Portuguese
20% English: Original MedQuAD entries retained for technical terminology coverage
Brazilian supplement: QA pairs derived from Brazilian clinical guidelines (Linhas de Cuidado from the Ministry of Health / SUS), covering conditions with high prevalence in Brazil such as dengue, Chagas disease, sickle cell anemia, tuberculosis, and tropical infectious diseases
Multi-checkpoint evaluation revealed catastrophic collapse between steps 1,300-1,500 in longer training runs (5 epochs). The cosine LR schedule with max_steps=1500 decays the learning rate to near-zero by step 1,300 (LR ≈ 6.6e-6), preventing the collapse observed in runs with higher LR at that point.
Coverage: limited to conditions present in MedQuAD and Brazilian supplements (primarily common diseases)
Language: Portuguese responses may occasionally contain calques from English source material
Never prescribes medication — by design, all responses are suggestions that require validation by a healthcare professional
Citation
bibtex
1@misc{medical-assistant-fiap-2026,
2 title={Virtual Medical Assistant with Fine-Tuning and LangGraph},
3 author={Martins, Adriana and Oliveira, Diego and Zagari, Eduardo and Torres, Renan},
4 year={2026},
5 note={Tech Challenge Phase 3 — FIAP Post-Graduate Program in AI for Developers}
6}