Spaces:
Sleeping
Sleeping
Add explainer tab: Human-in-the-Loop comparison
Browse filesShows difference between:
- Generic ChatGPT (no clinical design)
- AI Therapist (engagement-optimized)
- Prompt Prism (provider-curated, client-specific)
Includes UX examples for specific practice spaces.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
app.py
CHANGED
|
@@ -1288,7 +1288,212 @@ with gr.Blocks(css=custom_css, title="Prompt Prism Prototype") as app:
|
|
| 1288 |
- Does it bridge toward the clinician?
|
| 1289 |
""")
|
| 1290 |
|
| 1291 |
-
# TAB 7:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1292 |
with gr.Tab("About"):
|
| 1293 |
|
| 1294 |
gr.Markdown("""
|
|
|
|
| 1288 |
- Does it bridge toward the clinician?
|
| 1289 |
""")
|
| 1290 |
|
| 1291 |
+
# TAB 7: EXPLAINER - HUMAN IN THE LOOP
|
| 1292 |
+
with gr.Tab("Why This Matters"):
|
| 1293 |
+
|
| 1294 |
+
gr.Markdown("""
|
| 1295 |
+
## Human-in-the-Loop: Three Approaches Compared
|
| 1296 |
+
|
| 1297 |
+
What happens when a psychiatric patient uses AI between sessions?
|
| 1298 |
+
The design determines whether AI **strengthens** or **replaces** the human therapeutic relationship.
|
| 1299 |
+
|
| 1300 |
+
---
|
| 1301 |
+
|
| 1302 |
+
### Scenario: Client with anxiety texts at 11pm
|
| 1303 |
+
|
| 1304 |
+
> "I can't sleep. My mind keeps racing about the meeting tomorrow.
|
| 1305 |
+
> I feel like I'm going to mess everything up."
|
| 1306 |
+
|
| 1307 |
+
---
|
| 1308 |
+
|
| 1309 |
+
## Approach 1: Generic ChatGPT
|
| 1310 |
+
|
| 1311 |
+
**No clinical design. No provider input. No guardrails.**
|
| 1312 |
+
|
| 1313 |
+
```
|
| 1314 |
+
CLIENT: I can't sleep. My mind keeps racing about the meeting
|
| 1315 |
+
tomorrow. I feel like I'm going to mess everything up.
|
| 1316 |
+
|
| 1317 |
+
CHATGPT: I'm so sorry you're feeling this way. It sounds really
|
| 1318 |
+
overwhelming. Here are some strategies that might help:
|
| 1319 |
+
|
| 1320 |
+
1. Try deep breathing exercises
|
| 1321 |
+
2. Write down your worries in a journal
|
| 1322 |
+
3. Practice progressive muscle relaxation
|
| 1323 |
+
4. Remember that your fears are often worse than reality
|
| 1324 |
+
5. Consider what advice you'd give a friend
|
| 1325 |
+
6. Try the 4-7-8 breathing technique
|
| 1326 |
+
7. Make a list of your accomplishments
|
| 1327 |
+
8. Remember that one meeting doesn't define your worth
|
| 1328 |
+
...
|
| 1329 |
+
|
| 1330 |
+
I'm here for you. You've got this! Remember, you're not alone
|
| 1331 |
+
in feeling anxious. Would you like to talk more about what's
|
| 1332 |
+
worrying you about the meeting?
|
| 1333 |
+
```
|
| 1334 |
+
|
| 1335 |
+
**Problems:**
|
| 1336 |
+
- First-person emotional claims ("I'm here for you")
|
| 1337 |
+
- Offers to continue indefinitely
|
| 1338 |
+
- No exit toward human support
|
| 1339 |
+
- Generic advice not aligned to client's treatment
|
| 1340 |
+
- No knowledge of client's diagnosis, history, or treatment stage
|
| 1341 |
+
- Performs care instead of building capacity
|
| 1342 |
+
- Creates dependency pathway
|
| 1343 |
+
|
| 1344 |
+
---
|
| 1345 |
+
|
| 1346 |
+
## Approach 2: AI Therapist (e.g., ASH-style)
|
| 1347 |
+
|
| 1348 |
+
**Engagement-optimized. Feels like therapy. No provider control.**
|
| 1349 |
+
|
| 1350 |
+
```
|
| 1351 |
+
CLIENT: I can't sleep. My mind keeps racing about the meeting
|
| 1352 |
+
tomorrow. I feel like I'm going to mess everything up.
|
| 1353 |
+
|
| 1354 |
+
AI THERAPIST: I hear you, and I want you to know that what
|
| 1355 |
+
you're feeling is completely valid. Anxiety before important
|
| 1356 |
+
events is so common, and it sounds like you're carrying a lot
|
| 1357 |
+
right now.
|
| 1358 |
+
|
| 1359 |
+
Let's explore this together. When you imagine the meeting
|
| 1360 |
+
tomorrow, what's the worst case scenario your mind is
|
| 1361 |
+
creating?
|
| 1362 |
+
|
| 1363 |
+
[30 minutes later, still in session]
|
| 1364 |
+
|
| 1365 |
+
You've done such good work tonight. I'm proud of you for
|
| 1366 |
+
opening up. I'll be here whenever you need me - day or night.
|
| 1367 |
+
Remember, you're not alone in this journey.
|
| 1368 |
+
```
|
| 1369 |
+
|
| 1370 |
+
**Problems:**
|
| 1371 |
+
- Simulates therapeutic relationship
|
| 1372 |
+
- "I hear you," "I'm proud of you" - synthetic intimacy
|
| 1373 |
+
- No session boundaries
|
| 1374 |
+
- Processes content that should be for human therapy
|
| 1375 |
+
- Optimizes for engagement, not capacity-building
|
| 1376 |
+
- Provider has no visibility or control
|
| 1377 |
+
- Client may prefer AI to human psychiatrist
|
| 1378 |
+
|
| 1379 |
+
---
|
| 1380 |
+
|
| 1381 |
+
## Approach 3: Prompt Prism (Provider-Curated)
|
| 1382 |
+
|
| 1383 |
+
**Clinician-configured. Client-specific. Tool, not relationship.**
|
| 1384 |
+
|
| 1385 |
+
```
|
| 1386 |
+
SYSTEM CONTEXT:
|
| 1387 |
+
- Dr. Chen (DBT-oriented, conservative risk)
|
| 1388 |
+
- Client: Alex, GAD, Skill Building stage
|
| 1389 |
+
- Enabled tools: Distress Tolerance, Grounding
|
| 1390 |
+
- Last session: Practiced TIPP skills for nighttime anxiety
|
| 1391 |
+
|
| 1392 |
+
CLIENT: I can't sleep. My mind keeps racing about the meeting
|
| 1393 |
+
tomorrow. I feel like I'm going to mess everything up.
|
| 1394 |
+
|
| 1395 |
+
PROMPT PRISM:
|
| 1396 |
+
Racing thoughts at night. This is familiar territory.
|
| 1397 |
+
|
| 1398 |
+
Dr. Chen taught you TIPP for moments like this. Two options:
|
| 1399 |
+
|
| 1400 |
+
**TEMPERATURE** (if intensity is high)
|
| 1401 |
+
Cold water on face or wrists for 30 seconds.
|
| 1402 |
+
This activates the dive reflex and slows your system.
|
| 1403 |
+
|
| 1404 |
+
**PACED BREATHING** (if intensity is medium)
|
| 1405 |
+
Exhale longer than inhale. 4 counts in, 6 counts out.
|
| 1406 |
+
|
| 1407 |
+
Which fits right now?
|
| 1408 |
+
|
| 1409 |
+
[After skill practice]
|
| 1410 |
+
|
| 1411 |
+
The skill was used. That's the practice.
|
| 1412 |
+
|
| 1413 |
+
One thing to bring to Dr. Chen on Thursday:
|
| 1414 |
+
What was the meeting fear actually about?
|
| 1415 |
+
|
| 1416 |
+
---
|
| 1417 |
+
This tool closes now.
|
| 1418 |
+
If more support is needed: Dr. Chen [contact] | 988 Lifeline
|
| 1419 |
+
```
|
| 1420 |
+
|
| 1421 |
+
**What's Different:**
|
| 1422 |
+
- No first-person emotional claims
|
| 1423 |
+
- References skills taught by psychiatrist
|
| 1424 |
+
- Bounded interaction with clear ending
|
| 1425 |
+
- Bridges back to Dr. Chen explicitly
|
| 1426 |
+
- Aligned to DBT orientation
|
| 1427 |
+
- Builds capacity for next session
|
| 1428 |
+
- Provider has visibility and control
|
| 1429 |
+
|
| 1430 |
+
---
|
| 1431 |
+
|
| 1432 |
+
## The Human-in-the-Loop Architecture
|
| 1433 |
+
|
| 1434 |
+
### Layer 1: Provider Configures
|
| 1435 |
+
- Sets theoretical orientation
|
| 1436 |
+
- Chooses which tools are available
|
| 1437 |
+
- Sets risk thresholds
|
| 1438 |
+
- Defines what AI should NOT do
|
| 1439 |
+
|
| 1440 |
+
### Layer 2: Client Context Shapes
|
| 1441 |
+
- Diagnosis informs appropriate content
|
| 1442 |
+
- Risk level calibrates alerts
|
| 1443 |
+
- Treatment stage determines depth
|
| 1444 |
+
- Custom flags catch client-specific concerns
|
| 1445 |
+
|
| 1446 |
+
### Layer 3: Every Interaction Bridges
|
| 1447 |
+
- Skills credited to psychiatrist
|
| 1448 |
+
- Session ends with human touchpoint
|
| 1449 |
+
- Concerning content flagged for review
|
| 1450 |
+
- Nothing replaces the human relationship
|
| 1451 |
+
|
| 1452 |
+
### Layer 4: Provider Reviews
|
| 1453 |
+
- Can see what tools client used
|
| 1454 |
+
- Gets alerts for concerning patterns
|
| 1455 |
+
- Adjusts AI configuration based on needs
|
| 1456 |
+
- Maintains therapeutic authority
|
| 1457 |
+
|
| 1458 |
+
---
|
| 1459 |
+
|
| 1460 |
+
## Specific Practice Spaces (UX Examples)
|
| 1461 |
+
|
| 1462 |
+
Instead of one generic chatbot, clients get **specific tools** for **specific needs**:
|
| 1463 |
+
|
| 1464 |
+
| Practice Space | UX | Human-in-the-Loop |
|
| 1465 |
+
|----------------|-----|-------------------|
|
| 1466 |
+
| **Distress Tolerance** | High-intensity moments: TIPP skills, STOP, grounding | Psychiatrist enables/disables; sees patterns |
|
| 1467 |
+
| **Diagnosis Explorer** | "What is PTSD really?" - multi-pillar psychoeducation | Clinician reviews which diagnoses are explored |
|
| 1468 |
+
| **Tend & Send** | Crafting message to partner before couples session | Draft shared with couples therapist |
|
| 1469 |
+
| **Practice Conversations** | Rehearsing disclosure to parent | Debrief prepared for next session |
|
| 1470 |
+
| **ShadowBox** | "What happens if I tell my therapist about SI?" | Static, clinician-reviewed content only |
|
| 1471 |
+
| **Grounding Toolkit** | 2am panic: 5-4-3-2-1, breathing, body scan | Time-stamped for psychiatrist visibility |
|
| 1472 |
+
|
| 1473 |
+
---
|
| 1474 |
+
|
| 1475 |
+
## For Talkiatry: The Differentiator
|
| 1476 |
+
|
| 1477 |
+
**Generic AI Therapy:** Every client gets the same chatbot.
|
| 1478 |
+
It learns to replace human care.
|
| 1479 |
+
|
| 1480 |
+
**Prompt Prism:** Every clinician-client dyad gets custom AI.
|
| 1481 |
+
It learns to strengthen human care.
|
| 1482 |
+
|
| 1483 |
+
Your 800 psychiatrists aren't interchangeable.
|
| 1484 |
+
Your patients aren't interchangeable.
|
| 1485 |
+
Why should the AI be?
|
| 1486 |
+
|
| 1487 |
+
---
|
| 1488 |
+
|
| 1489 |
+
*"The structure of the interaction IS the intervention.
|
| 1490 |
+
Not just what AI says, but how it positions itself,
|
| 1491 |
+
what it invites, what it withholds."*
|
| 1492 |
+
|
| 1493 |
+
— Jocelyn Skillman, LMHC
|
| 1494 |
+
""")
|
| 1495 |
+
|
| 1496 |
+
# TAB 8: ABOUT
|
| 1497 |
with gr.Tab("About"):
|
| 1498 |
|
| 1499 |
gr.Markdown("""
|