Spaces:
Running
Running
Commit History
27 days ago
-
fix: Or_7 feedback — Spiritual Health team wording, coping follow-up, summary trigger
- Consent question now asks "Would you be open to having someone from the team reach out to you?" instead of asking to share the patient's information; confirmation and all consent templates renamed to the Spiritual Health team - Service explanation rewritten from Alex's program description: ambulatory, not hospital/bedside, phone or video, free, and visits are NOT private; the description is also added to the classifier and medical assistant prompts - Triage evaluator: a practical/treatment-related cause alone no longer resolves to GREEN; ongoing burden prompts a question about coping - Drop the canned "I'm glad you have support" on GREEN resolution - Provider summary context keeps only patient lines, most recent 2000 chars, so the triggering distress statement is not truncated; prompt requires naming the reported feeling in the patient's words - CSV export now includes provider_summary on the PROVIDER_SUMMARY row - Medical assistant must not invent appointment times or …948058d
-
Implement Or_4.txt feedback: Provider Summary as final exchange, simplified interface improvements
- Provider Summary now appears as final exchange in Conversation Verification - Added 'To patient:' and 'To spiritual care team:' addressee labels - Provider Summary uses narrative format from LLM (format_coherent_paragraph) - Created simplified_chat_handlers.py for simplified interface logic - Added simplified_help_content.py with detailed instructions - Removed Download JSON button, kept only CSV export - Added Model Settings, Edit Prompts, and Patient Profiles tabs back - Updated verification_handlers.py to use coherent narrative format - Created response documents (Or_4_Response.txt, Or_4_Response_EN.md, Or_4_Response_UA.md) - All changes based on customer feedback from review/Or_4.txte8c7fad
-
feat: Fix classification logic and remove redundant spiritual care message functionality
## Major Changes ### 🔧 Classification Logic Fixes (review/Or_2.txt recommendations) - Fix JSON parsing bug: LLM returns 'classification' but parser expected 'state' - Update RED flag definition: broader than crisis-only, includes active spiritual distress - Add explicit RED indicators: complex grief, loss of loved one, doubt about meaning of life/suffering/dignity - Fix 'I am fine' classification: now correctly GREEN (was incorrectly YELLOW) - Fix 'feeling sad' classification: now correctly YELLOW without spiritual context (was incorrectly RED) - Loss of meaning/purpose now correctly RED with high confidence ### 🗑️ Remove Redundant Spiritual Care Message UI - Remove redundant '💬 Care Team Message' tab from Provider Summary panel - Remove related UI controls and event handlers - Fix undefined 'spiritual_care_msg' variable in return statements - Preserve prompt editing and model settings (now used for Medical Brain Summary) - Medical Brain Summary now first tab by default in '�� Che…be1b5d2
-
feat: Complete prompt optimization system implementation
🎉 MAJOR FEATURE: Comprehensive prompt optimization system ## Core Architecture - ✅ Centralized PromptController with shared component architecture - ✅ Session-level prompt override system with isolation and cleanup - ✅ Enhanced Edit Prompts UI with validation and promotion workflows - ✅ Complete integration with existing Gradio interface ## Key Features Implemented - 🔧 Real-time prompt editing with session isolation - �� Visual indicators for prompt sources (session vs centralized) - ✅ Live validation with syntax and structure checking - 🔄 Promote to File workflow for permanent adoption - 🛡️ Automatic backup and rollback capabilities ## Shared Component System - 📋 Centralized indicators catalog (68 indicators) - 📏 Unified rules catalog (7 classification rules) - 📝 Template catalog (5 reusable patterns) - �� Consistent terminology across all AI agents ## Testing & Quality Assurance - ✅ 65+ comprehensive tests - all passing - 🧪 Property-based tests validating 9 correctness pr…24214fc