""" Clinician Feedback LoRA Fine-Tuning Pipeline (Phase 3) Collects clinician corrections to AI-generated SOAP notes, formats them into training pairs, and fine-tunes MedGemma using LoRA (Low-Rank Adaptation) for domain-specific improvement. Pipeline stages: 1. **Feedback Collection**: Store clinician edits as (original, corrected) pairs 2. **Dataset Preparation**: Format pairs into instruction-tuning format 3. **LoRA Training**: Fine-tune with PEFT/LoRA (rank 16, alpha 32) 4. **Evaluation**: Compare base vs fine-tuned on held-out correction set 5. **Deployment**: Merge or swap adapter weights """