AI chatbot for psychological support: what breaks in production
An AI chatbot for psychological support almost always passes the demo and almost always falls apart in production.
The model confidently responds to polite remarks, but to a phrase like "I no longer see the point" it outputs a breathing technique instead of a crisis response protocol.
Assistant response safety is not a polite tone but a separate layer: an input risk classifier, hard rules on output, a ban on diagnosis and promises, and verification of every reply before it is sent to the user.
The second point of failure is loss of dialogue context. The session closed on a phone, the person returns from a laptop, and the assistant introduces itself anew: history, triggers, and already completed exercises are lost.
Cross-session memory requires explicit state storage with access segregation, a lifetime, and the right to deletion — otherwise a conversational support assistant either forgets everything or remembers too much.
Third is the lack of escalation to a live specialist. The assistant does not recognize the moment when the conversation should be handed over to a human and continues to keep the user in the dialogue.
As a result, the queue on the on-call line grows, on-call staff receive vague requests without chat history, and some people leave silently.
We examine how this is closed: rule-based routing by risk level, context transfer together with escalation, versioning of system instructions with the ability to roll back assistant behavior, and log review on every release.
What changes after implementation: measurable effects
The effect of implementing the assistant is measured not by the feeling that "it has become more convenient" but by values captured from the same flow of requests before and after launch. Below are verifiable indicators that we report on at acceptance.
- Share of automated requests — 60–70% of typical dialogues (initial stabilization, breathing and behavioral exercises, mood diary, session reminders) the assistant closes on its own, without involving a psychologist.
- Time to first response — seconds instead of minutes waiting in queue: the share of dialogues abandoned on the first message drops severalfold, because the person receives a meaningful answer immediately, not a referral to a schedule.
- Missed crisis signals — zero on the control sample: direct and indirect markers are recognized in every message, and according to a protocol aligned with NICE recommendations, the dialogue immediately goes to the on-call specialist together with emergency service contacts.
- Load on the on-call line — during peak hours the queue does not grow: specialists handle complex cases instead of processing repetitive complaints and clarifications.
- Resilience during peak hours — evening and nighttime spikes in requests are sustained without expanding the shift, and response speed does not degrade.
- Context preservation — when handing over to a human, the specialist sees the dialogue history and the already collected case history, so repeated questioning is not needed.
The goal is not to reduce escalations to zero but to ensure that no crisis signal is left without a response. That is why we capture metrics on a labeled sample of dialogues, not on aggregates, and compare them with the assessment of the psychologists themselves.
Assistant operating modes and comparison of approaches
The assistant's operating mode is not a tone setting but the boundaries of what the model is allowed to say.
In psychological support, a mistake costs more than in an information chat: an unfortunate wording in a crisis dialogue reads as invalidation, so generation freedom is limited in advance, not after an incident.
From an engineering standpoint, the choice comes down to four schemes, and they are not mutually exclusive: the router decides where the request goes — to a script, to a generative answer based on a verified knowledge base, or to a hybrid with verification.
| Mode | When it fits | Limitations |
|---|---|---|
| Rule-based scripts | Predictable routes: crisis protocol, appointment booking with a specialist, typical questions | Live wording breaks the branch, and a nonstandard request hits a dead end |
| Generative answers based on the knowledge base | A detailed conversation based on verified material is needed: CBT techniques, mood diary, exercises | The model may invent a detail; a filter and source grounding are needed |
| Hybrid scheme with verification | Topics requiring both empathy and control: self-help, condition review | The response is more time-expensive; a verification layer and decision log are needed |
| Assistant navigator | The task is narrow: suggest a service, specialist, or format of work | There is no depth of conversation; for an emotional request, a transition to another mode is needed |
In practice, modes are combined: crisis messages follow a hard route, neutral ones go to the generative layer with response verification, and questionable ones are handed over by the assistant to a live specialist.
The share of dialogues requiring manual review drops, and rollback to the script remains available if the generative layer fails.
Implementation stages: from dialogue audit to handover
The order of work in such a project is fixed: first we analyze what already happens in dialogues, then we design routes and rules, and only after that do we train the model and the people.
The reason is simple — the cost of an error here is not an "ugly answer" but a missed crisis signal, so every decision is tested on real requests, not on demo scenarios.
- Request audit. We export the dialogue history and label it: topics, share of crisis messages, places where the person broke off the conversation, cases requiring a live specialist. The output is a risk map and scenario frequency, which we use to set priorities.
- Dialogue route schema. We assemble transitions between states: greeting, condition clarification, CBT exercises, refusal of a topic, return to the conversation, handover to a human. Separately, we fix boundaries — what the bot does not discuss or comment on.
- Response and escalation rules. We define markers of crisis wording, mandatory bridge phrases, the procedure for handing over to the on-call specialist, and the time within which a response must be received.
- Scenario stress testing. We run crisis branches, attempts to derail the conversation, provocations, and interruptions. We verify that the bot does not make diagnoses, does not prescribe medications, and does not leave the person at a dead end without an option to continue.
- Privacy and access. We determine what we store, what we anonymize, how long we store it, and who sees transcripts. This affects the route schema, so it is decided before launch, not after.
- Team training. We hand over to operators the on-call regulations, escalation review, and rules for handling complex dialogues.
- Handover to operation. We deliver documentation on routes, access, and metrics: escalation share, response time, share of dialogues completed to the end — and the procedure for updating scenarios.
What we hand over to the client: configurations, schemas, regulations
The tangible result is not access to a control panel but a set of artifacts that your team uses to operate and develop the chatbot without us. Everything resides in your environment and is handed over together with rights and audit logs.
- Configured scenarios and response rules: dialogue branches, thresholds at which the bot clarifies or hands over to a human, and templates for typical states.
- Escalation route map: which signals (direct statement of risk, abrupt change in tone, prolonged silence) transfer the dialogue to the on-call specialist and what happens if that person does not respond within the window.
- Access policies for dialogue history: roles, who can see the transcript, what is stored anonymized, and how every opening of the record is logged.
- On-call line regulations: on-call windows, shift handover, response time, and procedures for a spike in requests.
- Instructions for specialists: how to read the dialogue summary, what must not be promised, and where to refer cases outside their competence.
- Chatbot documentation: service diagram, description of models and their limitations, and the procedure for updating and rolling back to the previous version.
- Testing report: test dialogues, including crisis ones, share of passed paths, and the result of a repeated run after changes.
Case study: a psychological support line under load
Psychological support line started as a group of operators and an on-call psychologist.
During peak hours — in the evening and after public news events — the queue of requests reached several dozen people, the average time to first response was 8-12 minutes, and about a quarter of dialogues closed without any response at all.
At night the line did not work, and a person in an acute state remained without a response until morning — this class of failure had to be eliminated.
What was changed in routes and response rules
At the front end we placed a chatbot that conducts the initial dialogue: clarifies the condition, recognizes crisis markers, and immediately transfers the request to the on-call specialist together with context.
Typical requests — anxiety, insomnia, burnout — the bot handles on its own using CBT exercise techniques: breathing, thought diary, trigger analysis.
Escalation rules were described as code, not as an instruction: a set of formulations, an abrupt change in tone, mentions of self-harm — any signal raises the dialogue into the priority queue within seconds.
Metrics before and after
| Indicator | Before | After |
|---|---|---|
| Time to first response | 8-12 min | up to 40 s |
| Requests without a response | ~25% | less than 2% |
| Nighttime coverage | none | 24/7 |
| Crisis dialogues without a response | isolated, but occurred | zero |
The failure class "a person in an acute state remained without a response" has been completely eliminated: the route no longer depends on whether an operator is free.
Up to 70% of typical requests are closed by the bot, and a specialist connects where a human is truly needed.
What to do if the chatbot is already deployed on a ready-made platform?
A deployed assistant is almost never useless — the problem is unevenness: on some topics it responds appropriately, on others it drifts into generic advice or cuts off the dialogue.
We start with an audit of the current assistant: we run a corpus of real requests through it and label where it loses context, where it gives an unsafe recommendation, and where it fails to recognize a crisis reply. Without this labeling, refinement turns into guesswork.
More can be built on top of a working platform than it seems. The system instructions layer sets the frame: the assistant holds the role, does not make diagnoses, and returns the conversation to the experience rather than to advice.
Crisis triggers form a separate layer — based on key formulations, the dialogue is immediately transferred to the safety protocol.
The escalation add-on connects to the current channel: the assistant collects the chat context and passes it to the specialist so that the person does not start from scratch.
We move scenarios into a new layer rather than rewriting the core: the working logic remains, and the structure of a therapeutic session is layered on top — clarification, checking an automatic thought, agreeing on a step before the next conversation.
A full rebuild is justified when the platform does not allow control over system instructions and dialogue history or does not allow sensitive data to be stored as the client requires.
In that case, we replace the core but migrate the collected scenarios and labeling — they remain an asset and shorten the launch timeline.
Technical concerns: safety, empathy, response boundaries
The concerns of engineers and department leaders are usually the same: correctness in crisis topics, personal data in dialogues, predictability of responses, and responsibility for an error. We answer substantively, without promising a "fully safe model."
The basic principle: where the cost of an error is high, the assistant does not invent but selects from a pre-verified set of formulations.
Free generation remains in supportive replies, while response boundaries are set by the system instruction and filters, not by wishes in the description.
How does the assistant behave in crisis topics?
Risk markers — mentions of self-harm, hopelessness, threats — are recognized before the response is formed. The dialogue goes into a separate scenario with fixed formulations, emergency contacts, and an offer of a live specialist.
Free generation is disabled in this mode: a predictable dry reply is better than a beautiful and incorrect one.
What happens to personal data in dialogues?
Data is minimized at input: names, phone numbers, and addresses are stripped before processing, and correspondence is stored anonymized with a limited lifetime. Access to raw logs is role-based and logged; by default, an engineer sees only an anonymized sample. Deletion at the user's request is processed across the entire history, including backups.
How are responses verified before sending?
Two barriers: rules filter out prohibited topics and medical prescriptions, and a classifier assesses tone and risk. When confidence is low, a soft branch is activated — a clarifying question or an offer of specialist help. We count the share of responses accepted without rewriting — that is measurable predictability.
Who is responsible for an error in a response?
The product boundary is fixed: the assistant does not make diagnoses and does not prescribe medications. Our area is control mechanisms: filters, logging, scenario rollback, and incident review within an agreed timeframe.
Every reviewed case goes into a set of regression checks so that the same formulation does not pass again.
Let's discuss the task: where the work begins
To come back with an estimate and work plan rather than generalities, we need to understand how your support line is structured today.
Tell us where requests come from, who processes them and by what rules, which topics are considered sensitive, and where a transition to a live specialist is mandatory.
What is worth discussing in the first conversation:
- The topics of requests and their shares: anxiety, burnout, relationships, crisis states — what the assistant takes on itself and what it immediately hands over to a human.
- Requirements for the assistant: tone, response boundaries, acceptable empathy, and reliance on cognitive behavioral therapy protocols in the dialogue.
- Safety rules: how self-harm risk is recognized, what the assistant does at that moment, to whom it hands over the dialogue, and how quickly.
- Channels and systems: website chat, messengers, request tracking, on-call specialist schedule — where the assistant is integrated and where it takes context from.
- Regulations and limitations: prohibited topics and formulations, personal data handling, dialogue log, and retention periods.
- Acceptance criteria: which scenarios we consider worked out and who on the service side confirms the quality of responses.
In response, we come back with a work plan: stages, roles, implementation timelines, control points, and written requirements for the assistant.
We make the first launch a pilot on part of the requests — one topic or one shift, with daily dialogue review and edits before expansion. Describe the task — we will come back with an estimate and plan.







