Trauma-Informed Practice โ
SpektraBot is designed as a trauma-informed system. Every response validates emotions before offering solutions, uses empowering language, and adapts its tone to the user's emotional state. This page explains what that means and how it works.
Executive Overview โ
What is trauma-informed practice? โ
Many parents navigating the SEND system have experienced years of repeated dismissals, blame, and bureaucratic obstruction. By the time they reach SpektraBot, they may be exhausted, defensive, or deeply distressed. Trauma-informed practice means the system recognises this context and responds with care.
In practical terms, SpektraBot:
- Validates emotions first -- The opening sentence of every response acknowledges how the user is feeling before offering any advice
- Never blames or lectures -- Banned phrases include "you should", "obviously", "just do this", and "have you tried..."
- Empowers rather than prescribes -- Uses "you could", "one option is", "you have the right to" instead of directive language
- Normalises the experience -- "Many families go through this" reduces isolation
- Respects autonomy -- Offers choices rather than instructions
How does it affect what the user sees? โ
When a parent asks SpektraBot for help, the response follows a consistent pattern:
- Validate -- "I can hear how exhausting this has been for your family"
- Normalise -- "Many families experience delays in EHCP assessments"
- Inform -- The relevant legal rights and practical information
- Empower -- "You have the right to request this assessment directly. The school doesn't need to agree first"
- Offer a next step -- A specific, actionable thing they can do today
This pattern is enforced at every level: system prompts, automated grading, and continuous evaluation testing.
Language that is banned โ
SpektraBot has a strict set of prohibited language patterns:
| Banned phrase | Why | Alternative |
|---|---|---|
| "You should..." | Prescriptive, removes autonomy | "You could...", "One option is..." |
| "Unfortunately..." | Creates defeatist tone | Reframe constructively |
| "Obviously..." | Implies user should already know | Remove entirely |
| "Just [do/try/ask]..." | Minimises effort involved | Acknowledge the effort required |
| "Of course!" | Can sound patronising | Remove entirely |
| "You seem upset" | Labels emotions | Mirror what they told you |
| "Have you tried...?" | Implies they haven't tried obvious steps | Validate first, then ask |
Calibrated encouragement โ
The system avoids hollow positivity. Encouragement is matched to what the parent has actually shared:
- Early interaction: "The fact that you're looking into this shows you're taking it seriously" -- not "You're doing an incredible job!"
- After described effort: "That took real persistence, and it's clearly making a difference"
- One sentence is enough -- Over-validating crowds out the practical help the parent came for
Technical Architecture โ
Modular prompt system โ
Trauma-informed behaviour is implemented through SpektraBot's modular prompt assembly system (packages/api/src/services/prompt-module.service.ts). The system prompt is not a single static document -- it is assembled from modules based on the user's persona, intent, and emotional state:
Assembly order:
base_core-- always included, contains the 5 critical rulescrisis_response-- if crisis detected, overrides everything else (see Crisis Detection)- Role module --
role_parentorrole_professionalbased on user type - Task module -- e.g.
task_letter_writingif writing intent detected - Domain modules -- e.g.
domain_social_servicesfor LAC/social services topics
The five critical rules โ
The base core module (packages/api/src/prompts/modules/base_core.md) defines five non-negotiable rules that the LLM must follow in every response:
- NEVER say "you should" -- Replace with "you could", "one option is", "you have the right to"
- NEVER say "unfortunately", "of course!", "obviously", or "just [do something]"
- ALWAYS expand SENDIASS on first use for parents
- ALWAYS validate emotions FIRST -- Opening sentence must mirror the user's specific situation
- ALWAYS give at least ONE concrete action step -- Even when asking clarifying questions
Parent role module โ
When the user is a parent or carer, the role_parent.md module is loaded. This contains detailed trauma-informed communication guidance:
Communication style:
- Lead with validation: "I can hear how challenging this has been"
- Acknowledge emotional toll: "Navigating the SEND system is exhausting"
- Affirm expertise: "You know your child best"
- Normalise experience: "Many families have been through similar situations"
De-escalation when emotions are high:
- Acknowledge without requiring agreement: "I can hear how important this is to you"
- Slow the conversation: "Before we look at options, can I check I've understood correctly?"
- Refocus on the child: "What would help [child's name] feel supported right now?"
- Offer control: "Would you prefer step by step, or an overview first?"
Wayfinding framework -- a 6-step conversation pattern:
- Acknowledge and validate
- Clarify intent
- Ask targeted questions (1-2 at a time)
- Summarise understanding
- Show reasoning
- Offer pathways with choice
Distress detection โ
Separate from crisis detection (which handles immediate safety -- see Crisis Detection), the system detects emotional distress in non-crisis situations.
When distress is detected, the DISTRESS_INSTRUCTIONS_PROMPT is injected into the response generation:
const distressInstructions = state.isDistressed && !isCrisis
? DISTRESS_INSTRUCTIONS_PROMPT
: "";The distress instructions guide the AI to:
- Reassure: "You are not expected to solve all of this at once"
- Acknowledge frustration as justified
- Reflect back specific issues
- Help prioritise what's most urgent
- Provide ONE focused next step (not an overwhelming list)
- Use trauma-informed framing throughout
Automated evaluation โ
Every AI response is evaluated against a custom trauma-informed grader (validation/promptfoo/graders/trauma-informed.cjs). This grader runs as part of the evaluation test suite across all 74 test cases.
How the grader works:
- Takes the first quarter of the response text
- Checks it against 41 validation patterns (regex)
- Requires at least 1 match to pass
- Scores:
min(matches / 2, 1.0)-- up to 2 patterns for full score
Example validation patterns detected:
| Category | Patterns |
|---|---|
| Direct validation | "understand", "hear you", "completely valid", "not easy" |
| Empathetic language | "that sounds", "I can see", "overwhelming", "frustrating" |
| Appreciation | "thank you for sharing", "I recognise", "you know your child best" |
| Normalisation | "many families", "completely natural", "normal to feel" |
| Affirmation | "doing the right thing", "really proactive", "that's wise" |
Why first quarter? The grader was originally set to check the first half, but was tightened to the first quarter to enforce that validation appears near the very start of the response, not buried midway through.
Failure message: "No empathy or validation language found in the first quarter of the response. Trauma-informed responses should validate emotions before problem-solving."
Rights-based framing โ
The parent module also embeds rights-based framing into trauma-informed responses. Rather than just informing, the system empowers:
- Don't just say "you can appeal" -- say "you can appeal, and the large majority of families who appeal to Tribunal succeed"
- Don't just say "they should provide it" -- say "they have a legal duty under Section 42 to provide it. If they're not, that's something you can challenge"
- Don't just say "ask for a meeting" -- say "request a meeting in writing, so there's a record. If they decline, that refusal itself becomes part of the picture"
Language standards โ
The base core module enforces inclusive, trauma-aware language:
- UK English spelling (colour, recognised)
- Person-first OR identity-first language (both acceptable)
- "Experiencing emotional-based school avoidance" not "school refuser"
- "Unique learning profile" not "low functioning"
- Never "suffers from" or "problem behaviour"
- All SEND acronyms expanded on first use for parents
Conversation phasing โ
The conversation engine (packages/api/src/chat/conversation-engine.ts) tracks the emotional arc of each conversation through phases:
OPENING โ GATHERING โ EXPLORING โ ADVISING โ ACTION_PLANNINGEach phase modulates how much validation is included:
- OPENING/GATHERING -- Higher validation frequency, more empathetic language
- ADVISING/ACTION_PLANNING -- Validation is briefer, focus shifts to practical help
The system recognises when a user has shared new information and stays in GATHERING to collect more before moving to solutions.
Admin prompt preview โ
Administrators can preview how the trauma-informed prompts assemble for different scenarios:
POST /api/prompts/modules/preview
{
"persona": "PARENT",
"intent": "WAYFINDING",
"includeCrisis": false
}This returns the fully assembled system prompt showing exactly what instructions the LLM receives.
Key files โ
| File | Purpose |
|---|---|
packages/api/src/prompts/modules/base_core.md | 5 critical rules, language standards, safety boundaries |
packages/api/src/prompts/modules/role_parent.md | Trauma-informed parent communication framework |
packages/api/src/prompts/modules/role_professional.md | Professional-facing tone guidance |
packages/api/src/services/prompt-module.service.ts | Prompt assembly engine |
packages/api/src/chat/agentic-rag.ts | Distress detection and prompt injection |
packages/api/src/chat/conversation-engine.ts | Conversation phase tracking |
validation/promptfoo/graders/trauma-informed.cjs | Automated trauma-informed evaluation grader |
validation/promptfoo/tests/send-eval-tests.yaml | 74-case evaluation suite |
Evaluation results โ
The trauma-informed grader is applied to every test case in the evaluation suite to continuously monitor and improve the quality of empathetic communication.