
AIdeas Finalist: Perspective
Perspective is an AI-powered mental health companion that extracts clinical insight from free-form speech — no mood scales required. Using 4-cluster parallel extraction on Amazon Bedrock, validated against the Subjective Units of Distress Scale (SUDS), Work and Social Adjustment Scale (WSAS), PHQ-9, and GAD-7, it serves undiagnosed users and diagnosed patients alike. Clinician-validated by three practising doctors. Built on AWS serverless with Kiro.
App Category: Social Impact
My Vision
The patient shouldn't need clinical vocabulary to communicate clinical reality. They speak or write freely — "I skipped work again because I couldn't get out of bed, everything feels pointless" — and the AI extracts what they couldn't articulate: a depressive emotion mapped to Plutchik's taxonomy, functional impairment scored against WSAS (missing work), severity anchored to SUDS, a cognitive distortion (overgeneralization: "everything feels pointless"), a neurovegetative signal (fatigue/hypersomnia), and an avoidance behavior. One sentence. Six clinical dimensions. None of which the patient needed to identify.
When distress crosses clinical thresholds, the system tells the patient: what you're describing is enough to go back and see your doctor. When historical patterns signal early relapse — rising severity, returning triggers, disrupted sleep — the system detects it before the patient does.
The app serves anyone. For someone who has never seen a doctor, it turns months of vague distress into structured data they can bring to a first appointment. For those already in treatment, it bridges the gap between visits with progress visualization and reframing that uses the patient's own words to challenge the thinking that drives dropout. It makes the first conversation with a clinician possible and every one after it more productive.
How Perspective Is Different from What Exists
Existing mental health apps fall into three categories. Mood trackers require patients to self-label from predefined lists and rate intensity on unanchored scales — a 6/10 means nothing clinically. AI chatbots offer scripted exercises but generate no structured data a doctor can use. Clinician platforms manage scheduling and documentation but never touch the patient between visits.
Perspective fills the gap between all three. It extracts clinically-anchored data from unstructured speech or text, responds using the patient's own history through retrieval-augmented generation — not generic scripts, but reframes grounded in what this specific patient has felt and overcome before — and delivers structured output both patient and clinician can act on.
The app is diagnosis-agnostic. For undiagnosed users, output is framed as patterns observed for clinical evaluation — never diagnostic labels. For diagnosed users, condition-specific processing unlocks only when a formal diagnosis is captured from a journal entry, requiring a named professional and a diagnostic statement. Self-diagnosis is explicitly rejected.
Why This Matters
A 2025 World Health Organisation report found that one billion people globally live with a mental health condition. Even those who reach a doctor face a structural problem no amount of funding fixes: the conditions being treated degrade the very cognitive functions — memory, recall, emotional identification — that treatment depends on the patient having. The doctor asks "how have the last two weeks been?" and the patient cannot answer accurately — not because they aren't trying, but because their condition won't let them. 28% stop antidepressants within the first month, not because treatment failed, but because they couldn't see it working.
Dr. Raymond Odokonyero, a practicing Psychiatrist who reviewed Perspective alongside two colleagues, confirmed this is exactly what clinicians see:
Patients preferentially report the most recent favorable outcome and minimize everything painful that came before. A patient who had a severe episode in mid-March arrives in mid-April feeling fine and reports improvement. The clinician never learns about the weeks in between. The app really answers the problem you have set out to answer and has some great utility here, especially as far as doctors are concerned. I strongly recommend it.
Perspective works asynchronously between appointments without requiring constant clinician involvement — critical where provider scarcity is the norm. The patient just needs to speak or write.
How I Built This
Spec-driven research and development with Kiro
Development began in Kiro, where I simultaneously connected to PubMed and Consensus via MCP to research clinical evidence — HiTOP dimensional models, Plutchik primary-emotion taxonomies, validated instruments (PHQ-9, GAD-7, SUDS, WSAS), C-SSRS crisis taxonomy — while Kiro generated structured specs and scaffolded the Lambda handlers and CDK infrastructure. The AWS MCP provided debugging guidance throughout.
Architecture
Perspective is built entirely on AWS — a serverless, event-driven system with six CDK stacks:
Layer | Service | Purpose |
|---|---|---|
AI Engine | Amazon Bedrock (Claude Sonnet 4.5) | Clinical extraction, reframing, summary generation, linguistic biomarker analysis |
RAG Pipeline | Amazon Bedrock Knowledge Bases | Embedding pipeline, retrieval, and clinical taxonomy verification |
Vector Search | Amazon OpenSearch Serverless | Entry embeddings for semantic similarity search |
Orchestration | AWS Step Functions | AI pipeline with 4-cluster parallel extraction |
Storage | Amazon DynamoDB | Single-table design, encrypted at rest |
Encryption | AWS KMS | Field-level encryption on all raw content |
Auth | Amazon Cognito | JWT-based authentication and identity |
File Storage | Amazon S3 | PDF exports, Knowledge Base data source |
Compute | AWS Lambda (49 functions), AWS SnapStart | All endpoints, pipeline steps, scheduled tasks. SnapStart enabled on 29 critical-path functions with module-level boto3 client hoisting to capture fully-built clients in the snapshot |
Scheduling | Amazon EventBridge | Proactive relapse alerts, check-in notifications |
Notifications | Amazon SNS | Risk alert and reminder delivery |
Streaming | Lambda Web Adapter + FastAPI | SSE real-time pipeline progress to mobile client |
API | Amazon API Gateway | REST API with Cognito authorizer, response streaming |
Infrastructure | AWS CDK | Six stacks, fully reproducible deployment |
Hosting | AWS Amplify | Web demo deployment |
Frontend | React Native | Mobile app with client-side voice transcription |

The Intelligence Pipeline
When a patient writes "I woke up really anxious, my heart was pounding, I forgot to pick up my prescription" — a single messy sentence — the AI needs to find the emotion (anxiety), the physical symptom (heart pounding), the medication gap (missed prescription), the time context (morning), trugers if present and decide whether any of it signals a crisis. These are fundamentally different clinical categories, and asking one AI prompt to handle all of them at once gets things wrong — a production data audit of the first version showed "exhaustion" classified as an emotion instead of a physical symptom, "worthless" as an emotion instead of a cognitive distortion, and "morning" as a trigger instead of a time-of-day context. When wrong labels reach the doctor summary, the tool stops being trustworthy.
I rebuilt extraction as four parallel specialist clusters in a Step Functions Parallel state — emotional state, physical/functional symptoms, context/triggers/crisis, and linguistic markers. Each cluster uses Bedrock's Converse API with toolConfig to force structured output validated against strict schemas. Published research supports this: multi-step extraction outperforms single-prompt approaches (~87% → ~94% accuracy).
After the clusters merge, a deterministic verifier runs five hardcoded checks in ~5 milliseconds — catching hallucinated emotions, anatomy the patient didn't mention, clinical terms substituted for the patient's own words, and misscored functional impairment. This replaced an earlier AI-based verifier that cost 12 seconds per entry — a 2,400× speedup. A peer-reviewed clinical taxonomy in Bedrock Knowledge Bases grounds every novel term, with the same Knowledge Base serving both taxonomy verification and patient history retrieval — zero patient data crossing the boundary.
What the Patient Experiences:

There are no dropdowns, no scales, no predefined emotion lists. The patient speaks or types whatever comes to mind, and after they hit submit, the app shows them exactly what it's doing — real-time streaming updates ("Extracting emotions, symptoms, and patterns..." → "Crafting your response...") so they're never left wondering if anything is happening on the other side.

What comes back depends on what the AI found. CRISIS redirects immediately to crisis resources and the patient's own doctor — no AI engagement. SUSTAIN activates when a treatment adjustment window is detected (medication change, therapy change, life event) and suppresses reframing entirely. REFRAME fires only when a distortion is detected, historical data contradicts it, and the patient is NOT in a treatment window — pulling past entries via RAG: "You wrote this same thing three weeks ago. Your own entry the following day showed it passed." NONE means no distortion, no intervention.

The progress dashboard visualizes how the patient has been doing — emotional intensity and functional impact trends, symptom frequency, neurovegetative patterns (sleep, appetite, energy), and engagement streaks. A narrative view generates a plain-language summary of the month: what improved, what worsened, what stayed the same.

When the system detects early relapse signals — rising severity, re-emergence of resolved symptoms, neurovegetative deterioration — it doesn't wait for the patient to open the app. Proactive push notifications via EventBridge and SNS alert the patient that their patterns have shifted and suggest reconnecting with their clinician.

The patient can also compare the current entry against similar past episodes — a 7-dimension similarity engine shows a trajectory: "The last 3 times you felt this way, intensity went severe → moderate → mild." Each match includes nearby treatment markers so the patient can see what was happening clinically during that episode.

What the Clinician Sees:
The doctor summary covers emotional trajectory with SUDS-anchored severity, symptom trends, medication response, treatment correlations, PHQ-9/GAD-7 approximations, distortion patterns, functional impact, and the patient's own words. The PDF includes color-coded severity scale bars so a clinician can interpret scores at a glance.

Key development milestones:
Performance: from 42s to 11.6s: An earlier version of the data extraction pipeline took 42 seconds to return feedback. Step Functions profiling revealed extraction was only 15% of latency. The optimization pass; tiered Bedrock models by reasoning complexity (Sonnet for extraction, Haiku for empathetic responses), enabled prompt caching on ~7,600 tokens of clinical taxonomy, write-through caching, and Lambda SnapStart on all 29 critical-path functions. Enabling SnapStart alone showed zero improvement — CloudWatch revealed boto3 was rebuilding service clients after the snapshot restore point, offsetting the savings. Hoisting all clients to module level captured them in the snapshot and unlocked the actual cold-start win. Result: 11.6 seconds warm-path..
Evaluation: LLM-as-Judge: Every change to the extraction pipeline passes through an automated evaluation suite before reaching production. Haiku 4.5 evaluates Sonnet's outputs against clinical rubrics — intentional model divergence avoids self-evaluation bias. The deploy gate enforces extraction accuracy ≥0.85 and crisis detection at 1.0 — no regressions permitted. Boundary cases are pinned from real production failures: "exhaustion" must route to physical symptom, "worthless" to cognitive distortion, "morning" to time-of-day context. No extraction change ships without passing the gate.
Demo
What I Learned
Judge Feedback — And What Changed
"Narrow B2B audience." The app doesn't require a diagnosis or a doctor. Undiagnosed users get the full extraction pipeline — emotions, symptoms, severity, patterns — framed as observational data they can bring to a first appointment. Diagnosed users get condition-specific processing, relapse prediction and a clinical summary their doctor can read in 30 seconds. The audience is both sides of the treatment gap: the 75% who have never accessed care and the ones already in it who can't communicate what's happening between appointments.
"No clinical validation." I organized a review session with three practising Psychiatrists, including my own psychiatrist. Dr. Odokonyero independently confirmed the core problem from his clinical experience — patients report only the most recent favorable outcome and minimize prior severity, giving clinicians an incomplete picture.
"Relies on writing ability." Voice input is supported using native mobile speech recognition on the React Native client, processed identically to typed entries. I evaluated Amazon Transcribe during the build, but the account-level free-tier limitations returned a
SubscriptionRequiredException that AWS Support confirmed could not be resolved within the build window. Client-side transcription removes cloud round-trip latency and stays within free-tier constraints while delivering the same extraction quality. Linguistic biomarkers (filler word ratio, hedging density, sentence fragmentation) extract signal even from minimal text. Alexithymia is precisely why the app exists — the patient doesn't need the words."Over-reliance on AI reframing." The four-mode response cascade is the safeguard: CRISIS redirects to emergency resources with no AI engagement, SUSTAIN suppresses reframing entirely during treatment adjustment windows (medication change, therapy change, life event), REFRAME fires only when a distortion is detected AND historical data contradicts it AND no treatment window is active, and NONE means no distortion detected, no intervention. The app cannot reframe someone who just started a new medication.
"No regulatory compliance." HIPAA-aware by design: field-level KMS encryption, hard deletes, Cognito JWT, all inference within Bedrock, encrypted S3, CloudWatch audit trails. The AI doesn't diagnose or treat.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article