Spaces:
Sleeping
Sleeping
Commit History
-
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
-
fix: Or_6 feedback — consent questions, unrecorded verdicts, feedback types
Findings from Alex's first reviewed test case (review/Or_6.txt). Fixed: - A question about the spiritual care team was scored as a refusal. "I don't know, who are they" contains "don't"/"not", so _check_consent's negative keyword scan matched first, _process_consent_declined closed the topic and moved the session back to GREEN while the patient was still in an unresolved RED. _is_consent_question now runs before _check_consent, explains what the chaplains do, re-asks for consent and stays in AWAITING_CONSENT. - Saving from the always-visible verification panel never set is_correct, so a fully reviewed session exported as "0 reviewed". Picking a classification is now the verdict itself (PROVIDER_SUMMARY step excluded, its radio is hidden). The panel also stays open after Save so a note left on an exchange whose classification was correct doesn't disappear. Added: - "Type of feedback" multi-select (wrong classification / tone / missing information / conversation flo…09c4875
-
feat: verification panel always-visible flow + docs for v2.3.3
- Conversation Verification: show the "Select Correct Classification" + comment panel by default for every exchange (hidden only once marked Correct), so reviewers can give feedback without first clicking Incorrect. Generate now also primes the panel for the first exchange. Fixes latent output-arity mismatches in the generate functions' early-return paths. - Docs: README -> v2.3.3, sdk_version 6.1.0, new "Latest Updates (v2.3.3)" section; CHANGELOG [2.3.3]; in-interface Help updated (verification flow, comment-only Provider Summary step, Clear Chat resets verification). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>e90d802 -
fix: Or feedback — Provider Summary flag error, stale verification on clear, latency timing
#1 Conversation Verification "Error" badge on every component when saving the final Provider Summary with text only: the handlers returned "" for the correct-classification Radio, which Gradio 6 rejects (value not in choices), failing the whole event response. Replace "" with None across all conv verification handlers (via new _classification_update helper) and hide the flag on the PROVIDER_SUMMARY final step, since the flag was already chosen earlier. Also fixes a latent arity mismatch in the empty-records early returns. #2 "Clear Chat" left the Conversation Verification tab showing the previous scenario. handle_clear_simplified now also resets conv_verify_state/records/index and the displayed components; clear_btn wiring updated (mirrored in gradio_app / chat_handlers for local parity). #3 Add lightweight per-stage [PERF] timing in the message path (PERF_TIMING env, default on) to diagnose >10s responses. No model changes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anth…251ab3e
-
edit help
9654147
-
Fix port configuration for Hugging Face Spaces
- Changed default port from 7861 to 7860 for HF Spaces compatibility - Port 7860 is the standard port used by Hugging Face Spaces42fb3a9 -
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
-
Update documentation for v2.3 provider summary improvements
Updated README.md and Help content to reflect: - Automatic provider summary generation (no manual intervention) - Enhanced summary content (all patient inputs, no phone numbers) - Improved user experience (instant display on consent) - Fixed HTML badge rendering issues - Version bump to 2.3 with latest improvements Documentation now accurately describes the streamlined provider summary workflow and enhanced spiritual care team integration.3512660 -
Implement provider summary improvements from Or_3.txt review
Tasks completed: 1. Remove phone number from provider summary (modified spiritual_care_message.txt prompt) 2. Include all patient inputs throughout interaction (updated prompt to capture all conversation) 3. Auto-generate provider summary when RED flag + consent given (modified chat_handlers.py) 4. Fix HTML badge rendering issue in provider summary status Changes: - src/config/prompts/spiritual_care_message.txt: Removed phone number requirement, added all patient inputs - src/interface/chat_handlers.py: Added automatic summary generation on consent, fixed HTML badge display - src/interface/stats_handlers.py: Updated coherent summary handling with proper Gradio updates - Enhanced debug logging for troubleshooting summary generation61eaa9c
-
docs: Finalize Medical Brain integration and update Help documentation
🔧 PROMPT OPTIMIZATION: - Remove redundant SPIRITUAL_CARE_MESSAGE format from spiritual_care_message.txt - Streamline to single MEDICAL_BRAIN_COMPATIBLE format only - Simplify prompt structure for Medical Brain integration 📖 HELP DOCUMENTATION UPDATE: - Update classification system description with enhanced logic - Add explicit RED indicators based on medical professional feedback - Document critical bug fixes (JSON parsing, classification accuracy) - Update version to 2.2 with recent improvements timeline - Add new section on Recent Classification Improvements - Remove references to deprecated dual-format functionality - Clarify Medical Brain Compatible Summary as primary format 📋 REVIEW DOCUMENTATION: - Add comprehensive README.md in review/ folder (Ukrainian) - Document medical professional recommendations from Or_2.txt - Analyze verified conversation examples with outcomes - Detail implemented improvements and validation results ✅ SYSTEM STATUS: - All classification test cases…09d251c -
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
-
refactor: Modularize core Gradio application logic into dedicated session, chat, model, profile, prompt, stats, and verification handler modules.
17f3ad3 -
feat: include spiritual care message in Gradio app outputs
0adfcbc -
feat: introduce configurable content options and privacy controls for spiritual care messages.
50012e7
-
feat: Add configurable content options for spiritual care messages in UI and backend, replacing a static prompt template.
31d7ffb -
feat: Add configurable content inclusion for spiritual care messages, allowing dynamic selection of patient profile, situation, distress, and conversation context.
ef61786 -
feat: Enhance predefined patient profile names with emojis and more descriptive text.
102fe82
-
feat: Add comprehensive manual tests for spiritual care message features
- Introduced a new changelog documenting notable changes and version history. - Created manual test scripts for validating patient profile flow, context integration, and spiritual care message generation. - Implemented tests for prompt editing functionality and model selection in the spiritual care message context. - Enhanced existing prompt templates and configurations for better clarity and usability. - Organized project structure for improved maintainability and documentation accessibility.1d0741a -
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 -
feat: Enhance provider summary display with detailed information and refresh instructions
e7c81a1 -
feat: Update refresh button text and enhance provider summary display in the simplified interface
8e09424 -
feat: Update example help button text for emotional crisis support
19cbdbf
-
feat: Enhance provider summary and consent process for spiritual care support
983e367 -
feat: Enhance spiritual state management and UI for provider summaries
- Added AWAITING_CONSENT state to SpiritualState enum for tracking consent responses. - Updated SessionSpiritualState to include pending referral data and methods for consent handling. - Implemented a provider summary panel in the Gradio interface, including download and clear functionality. - Enhanced conversation handling to check for provider summaries in RED flag cases, with detailed logging. - Created a simple test script for Gradio UI to simulate provider summary functionality. - Developed a prompt loader to manage spiritual and medical prompts from markdown files, ensuring backward compatibility. - Added comprehensive documentation for prompt structure and loading process. - Implemented triage evaluator and question prompts to improve emotional and spiritual distress assessment.f91e0d7 -
after comments from Or:
feat: Enhance spiritual care classification and consent messaging - Updated the YELLOW category definition in spiritual_monitor.py to clarify ambiguity in distress indicators. - Added follow-up purpose guidelines for YELLOW classifications. - Introduced consent-based messaging requirements for RED classifications, ensuring patient autonomy. - Created a new consent_message_generator.py to handle consent message generation and validation. - Developed a provider_summary_generator.py to generate structured summaries for RED flag cases, including patient information and distress indicators. - Modified the simplified_gradio_app.py to include patient phone number and correct classification options during conversation verification. - Enhanced UI elements to support new classification and consent features.32be239
-
Revise user guide and quick start instructions for clarity and accessibility in the simplified Gradio interface
118fcee -
Add per-session prompt override functionality across interfaces and AI client
2e0e95f -
Implement model overrides for AI clients and enhance interfaces for manual input and file upload
37184d4 -
Implement model override functionality for AI clients and enhance session management in the simplified medical app
ba5a70c -
Enhance CSV export functionality by extracting reasoning from notes and streamline file upload interface to support only CSV format
82ca3ff -
Add export buttons for batch results in the file upload interface
353a6ce -
Add progress tracking to batch classification process
798f2fe -
Implement batch classification for uploaded datasets and enhance export functionality with reasoning
fd0d61e -
Refactor export button implementation to use gr.DownloadButton and update click handlers for file downloads
65b972a -
Refactor session results retrieval to return a 2D list and update export button visibility logic
36ba4ed -
Add export options for session results in manual input interface
346aa2c -
Hide Standard Verification tile in enhanced mode selector
c5ffcf1 -
Hide dataset editor and standard verification tabs
bf4c476 -
Improve conversation verification UX
86dfd2e -
Add comments and CSV export to conversation verification
08ac559 -
Remove redundant chat verification buttons
d8cb3fd -
Fix conversation verification export record id
34caac9 -
Embed conversation verification in main UI and add download button
- Add Conversation Verification tab (no second Gradio server) - Add Download Verification JSON button in Chat tab - Add UI import smoke test - Restore VerificationDataStore import compatibilityded6460 -
Disable secondary Gradio server for verification in Spaces
HF Spaces doesn't reliably support launching a second Gradio app from within a running app, causing Button._id errors. This change exports the verification session to JSON instead of launching a separate verification UI.95da578 -
Fix Gradio 6.x Button '_id' attribute error in verification UI
- Changed gr.Blocks() pattern to 'with gr.Blocks() as interface' - Pre-compute initial values before Blocks context - Define event handlers before Blocks context - Pass initial values directly to component constructors - Add cancel_correction_btn handlerf181eed -
feat: Refactor correction section visibility handling in verification UI
d6c841d -
feat: Simplify conversation verification UI for HF Spaces compatibility
e66d90c -
feat: Set theme for conversation verification UI after interface creation
906c15d -
feat: Enhance conversation verification UI with new buttons and error handling
df84c2c -
feat: Add conversation verification feature with UI and backend support
- Implemented a new verification section in the Gradio interface to allow users to verify conversation exchanges. - Created core models and manager for handling verification sessions, including feedback and progress tracking. - Developed a CSV exporter for verification results, enabling users to export session data. - Built a comprehensive Gradio UI for reviewing and verifying AI classifier decisions, including navigation and statistics display. - Added functionality to mark exchanges as correct or incorrect, with options for providing feedback and reasons for corrections. - Ensured session data is saved and loaded correctly, maintaining state across user interactions.74541bd