Spaces:
Sleeping
Sleeping
Update simple_casl_app.py
Browse files- simple_casl_app.py +28 -3
simple_casl_app.py
CHANGED
@@ -919,6 +919,15 @@ def analyze_transcript_content(transcript_content, age, gender, slp_notes):
|
|
919 |
- Focus on clinical relevance
|
920 |
- COMPLETE ALL 12 SECTIONS
|
921 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
922 |
SECTION CHECKLIST - COMPLETE ALL:
|
923 |
□ 1. SPEECH FACTORS (A, B, C)
|
924 |
□ 2. LANGUAGE SKILLS ASSESSMENT (A, B, C)
|
@@ -933,7 +942,14 @@ def analyze_transcript_content(transcript_content, age, gender, slp_notes):
|
|
933 |
□ 11. CLINICAL IMPLICATIONS (A, B, C)
|
934 |
□ 12. PROGNOSIS AND SUMMARY
|
935 |
|
936 |
-
CRITICAL:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
937 |
"""
|
938 |
|
939 |
# Get analysis from Claude API
|
@@ -992,9 +1008,12 @@ def targeted_analysis(transcript, custom_question, age, gender, slp_notes):
|
|
992 |
ANALYSIS REQUIREMENTS:
|
993 |
|
994 |
1. QUANTIFICATION:
|
995 |
-
- Count every relevant occurrence
|
996 |
-
- Calculate percentages and ratios
|
997 |
- Provide specific numbers for all observations
|
|
|
|
|
|
|
998 |
|
999 |
2. EVIDENCE:
|
1000 |
- Cite exact quotes from the transcript
|
@@ -1432,6 +1451,12 @@ with gr.Blocks(title="Enhanced Speech Sample Analysis", theme=gr.themes.Soft())
|
|
1432 |
- Do NOT include intervention suggestions
|
1433 |
- Do NOT include overall assessments
|
1434 |
- Keep analysis focused and concise
|
|
|
|
|
|
|
|
|
|
|
|
|
1435 |
"""
|
1436 |
|
1437 |
result = call_claude_api_quick_analysis(prompt)
|
|
|
919 |
- Focus on clinical relevance
|
920 |
- COMPLETE ALL 12 SECTIONS
|
921 |
|
922 |
+
MATHEMATICAL ACCURACY REQUIREMENTS:
|
923 |
+
- ALL COUNTS MUST MATCH: If you claim "X total", individual counts must sum to X
|
924 |
+
- Verify your math before reporting any totals
|
925 |
+
- Example: If you find 3 types of errors with counts 5, 7, 2, say "14 total errors" not "12 total errors"
|
926 |
+
- Double-check that individual counts sum to your claimed total
|
927 |
+
- If counts don't match, correct them before reporting
|
928 |
+
- Use precise language: "approximately X" if uncertain, "at least X" for minimum counts
|
929 |
+
- This analysis is for students and must be mathematically accurate
|
930 |
+
|
931 |
SECTION CHECKLIST - COMPLETE ALL:
|
932 |
□ 1. SPEECH FACTORS (A, B, C)
|
933 |
□ 2. LANGUAGE SKILLS ASSESSMENT (A, B, C)
|
|
|
942 |
□ 11. CLINICAL IMPLICATIONS (A, B, C)
|
943 |
□ 12. PROGNOSIS AND SUMMARY
|
944 |
|
945 |
+
CRITICAL REQUIREMENTS:
|
946 |
+
- If you cannot complete all 12 sections in one response, end with <CONTINUE> and continue with the remaining sections
|
947 |
+
- Do not skip any sections. Use the checklist to ensure all sections are completed
|
948 |
+
- ACCURACY IS PARAMOUNT: This analysis is for students and must be mathematically correct
|
949 |
+
- Before reporting any totals, verify that individual counts sum correctly
|
950 |
+
- If you find inconsistencies in your counts, resolve them before continuing
|
951 |
+
- Use precise language and avoid making claims you cannot support with evidence
|
952 |
+
- When in doubt about a count, say "at least X" or "approximately X" rather than claiming certainty
|
953 |
"""
|
954 |
|
955 |
# Get analysis from Claude API
|
|
|
1008 |
ANALYSIS REQUIREMENTS:
|
1009 |
|
1010 |
1. QUANTIFICATION:
|
1011 |
+
- Count every relevant occurrence with absolute accuracy
|
1012 |
+
- Calculate percentages and ratios correctly
|
1013 |
- Provide specific numbers for all observations
|
1014 |
+
- VERIFY MATH: Ensure individual counts sum to claimed totals
|
1015 |
+
- Example: If counting 3 types of errors (5, 7, 2), report "14 total errors"
|
1016 |
+
- Use precise language: "at least X" for minimum counts, "approximately X" if uncertain
|
1017 |
|
1018 |
2. EVIDENCE:
|
1019 |
- Cite exact quotes from the transcript
|
|
|
1451 |
- Do NOT include intervention suggestions
|
1452 |
- Do NOT include overall assessments
|
1453 |
- Keep analysis focused and concise
|
1454 |
+
|
1455 |
+
MATHEMATICAL ACCURACY REQUIREMENTS:
|
1456 |
+
- ALL COUNTS MUST MATCH: Individual counts must sum to claimed totals
|
1457 |
+
- Verify your math before reporting any numbers
|
1458 |
+
- Use precise language: "at least X" for minimum counts, "approximately X" if uncertain
|
1459 |
+
- This analysis is for students and must be mathematically correct
|
1460 |
"""
|
1461 |
|
1462 |
result = call_claude_api_quick_analysis(prompt)
|