Researchers at the University of Milano-Bicocca and the University of Udine have introduced LLMPatients, an open-source educational platform designed to simulate virtual psychotherapy patients across a comprehensive eleven-session training curriculum. Formally detailed in a study published in Frontiers in Digital Health on November 25, 2026, the computational platform combines large language models with structured psychiatric diagnostic models and persistent multi-level memory to provide psychotherapy trainees with repeatable, safe clinical practice. In standard psychological and psychiatric training, students frequently encounter live patients only during advanced stages of their education due to substantial ethical, institutional, and organizational constraints. While clinical role-play, case observation, and individual supervision remain traditional pedagogical cornerstones, these methods are notoriously difficult to standardize and replicate at scale across expanding educational cohorts. The newly developed system addresses this longstanding pedagogical bottleneck by creating an interactive, auditable simulation environment where students rehearse clinical interviewing, observe longitudinal case dynamics, and receive automated supervisory feedback on potential therapeutic missteps.
Although generative artificial intelligence has been increasingly applied to medical simulation, earlier virtual patient architectures have proven ill-suited to the demands of longitudinal psychotherapy education. Existing conversational systems are overwhelmingly designed for single-session encounters focused on acute history-taking or standardized medical examinations, lacking the persistent psychological continuity necessary for psychotherapeutic training. LLMPatients directly resolves these challenges by introducing an auditable platform architecture based on four explicit design pillars: a structured, interpretable clinical profile, a multi-level memory system independent of the local token context window, deterministic controls enforcing role integrity, and a post-hoc analytical module that identifies therapist missteps for academic discussion.
To establish psychological stability across extended interactions, the investigators grounded the virtual patient representation in the second edition of the Psychodynamic Diagnostic Manual and the Psychodiagnostic Chart. Rather than relying on unstructured narrative prompts, the platform structures patient definitions hierarchically across three foundational axes: Personality, Mental Functioning, and Symptoms. Axis P provides the overarching characterological frame, governing core personality organization, attachment patterns, and predominant defense mechanisms. Axis M parameterizes cognitive and emotional capacities, specifying the patient’s level of mentalization, affect regulation, impulse control, and ambiguity tolerance. Axis S regulates contingent, state-level variables, including acute symptom severity, emotional triggers, and avoidance behaviors. Stored in structured YAML Ain’t Markup Language files, these clinical dimensions are complemented by bio-psycho-social background variables and stylistic communication attributes such as speech latency, verbosity, and pauses. Crucially, this PDM-2 hierarchy operates as an input-organization rule for prompt assembly rather than a semantic constraint on model output, maintaining explicit boundaries without attempting to simulate authentic human consciousness.
Conversational turns within LLMPatients are managed through a deterministic state graph that orchestrates input sanitization, topic classification, dynamic emotional modeling, and prompt generation. To avoid erratic affective volatility driven solely by text generation, the platform implements a symbolic affective engine grounded in Jaak Panksepp’s primary emotional systems: Seeking, Fear, Rage, Lust, Care, Panic/Grief, and Play. At each conversational turn, an initial classifier identifies the discussion topic and infers a probable emotional label, which serves merely as a weak mathematical bias within the symbolic engine. The patient’s emotional vector is then computed through rule-based transitions combined with calibrated Gaussian noise, inertia, and homeostatic decay toward an individual baseline defined by the patient’s clinical profile. This mathematical formulation prevents sudden, unmotivated emotional swings while remaining responsive to therapist interventions, such as validation or relational boundary crossing. The resulting affective state is rendered into explicit prompt instructions and non-verbal conversational cues, including parenthetical pauses or hesitation markers, ensuring natural conversational rhythm even when patients exhibit avoidance.
Facilitating an eleven-session therapeutic pathway within strict token constraints required the development of a stratified, multi-level memory system. LLMPatients strictly separates the immediate conversational context from inter-session memory archives. The short-term memory window maintains a sliding buffer of recent dialogue, retaining up to ten conversational messages and five historical turns. In contrast, durable memory stores raw transcripts, episodic summaries automatically compiled every five turns, post-session clinician reflections, and consolidated long-term summaries. During context hydration, a summary retrieval mechanism ranks saved reflections and episodic summaries, applying a topic-matching bonus to select up to three pertinent records. Simultaneously, a factual retrieval module utilizing an all-MiniLM-L6-v2 sentence encoder identifies up to eight source-linked factual assertions through combined lexical and dense embedding similarity. Following each session, an automated consolidation routine extracts new factual items, quarantines unverified statements against the original transcript, and persists updated reflections to disk, enabling researchers and supervisors to audit memory retrieval and generation errors independently.
The underlying technical architecture separates the platform into two distinct software environments to optimize operational modularity, execution security, and institutional scalability. The primary web application, LLMPatients-App, is constructed using Next.js 15, React 19, Tailwind CSS, and Radix UI components, with TanStack Query handling client-side state synchronization. Backend procedures are executed via TypeScript Remote Procedure Call endpoints with Zod payload validation, utilizing Drizzle Object-Relational Mapping atop a PostgreSQL database storing accounts, clinical case libraries, pathways, session transcripts, and evaluation reports. The complementary agentic runtime, LLMPatients-Agent, coordinates conversational state graph execution, memory persistence, and scoring pipelines, supporting distributed deployments across local vLLM instances, Hugging Face models, Ollama, OpenRouter, and Vertex AI. Audio playback is supported via a modular speech synthesis pipeline incorporating Microsoft VibeVoice, Chatterbox, and ElevenLabs, configured so voice synthesis failures cannot disrupt textual chat. Dedicated instructor dashboards allow faculty members to supervise trainee pathways, inspect session transcripts, author customized clinical profiles, and review aggregate cohort analytics.
To evaluate system usability and workflow comprehension, the authors executed a formative usability study using a human-centered design approach across two iterative development cycles. A convenience sample of seventeen adult participants, comprising fifteen psychotherapy students and two university lecturers, interacted with the platform under a concurrent Think Aloud protocol without preliminary operational coaching. Initial feedback uncovered critical usability barriers, including low visibility for post-session export actions, ambiguous patient authoring controls, dense statistical visualizations, and confusing transitions between personal profiles and supervisory dashboards. In response, developers executed targeted interface modifications, introducing prominent session completion footers, standardized iconography across collapsible panels, restructured evaluation dashboards, and elevated onboarding disclaimers. Following these design interventions, participants completed assigned tasks on the updated interface and responded to the standardized System Usability Scale. Across the full sample, the platform achieved an outstanding mean usability score of 90 out of 100, demonstrating that the refined navigational architecture and clinical workflows were understandable to both learners and academic supervisors.
Profile adherence was systematically examined by administering an extensive battery of standardized psychological questionnaires across five virtual patient profiles. The testing battery encompassed the DSM-5-TR Level 1 Cross-Cutting Symptom Measure, the Level of Personality Functioning Scale–Brief Form 2.0, the Binge Eating Scale, the Personality Inventory for the DSM-5–Brief Form, and the Schedule for Nonadaptive and Adaptive Personality-2, administered via Gemini 2.5 Pro. To evaluate response stability, the Patient Health Questionnaire-9 was administered twenty times per profile across one hundred independent trials. The simulated patients produced highly stable scores that closely mirrored their diagnostic profiles.
Clinical authenticity was further scrutinized through blinded clinical interviews and an extensive factual continuity benchmark across thirty eleven-session trajectories comprising 330 sessions and 1,650 conversational exchanges. An independent specialist clinician administered the Structured Clinical Interview for DSM-5 Personality Disorders to three virtual profiles through live chat without knowledge of their diagnostic profiles. Alex Carter met no personality disorder criteria, Daniel Isherwood exhibited subclinical anxious-inhibited traits, and Juanita Delgado met diagnostic criteria for paranoid and borderline personality disorders, replicating the psychometric questionnaire patterns. Concurrently, the longitudinal continuity trial evaluated recall against a full-history baseline using six factual probes during sessions 10 and 11. LLMPatients successfully answered 85 of 90 continuity probes (94.44 percent), compared to 89 of 90 probes (98.89 percent) for the full-history comparator. All five errors in LLMPatients stemmed from an unconfirmed appointment proposed in session 6 that was stored in memory but omitted during context selection. Crucially, LLMPatients reduced patient-generation prompts by 22.5 percent, averaging 7,130 tokens versus 9,198 for the baseline.
To support educational debriefing, LLMPatients incorporates an automated supervisory detector that analyzes transcripts to flag potential therapist missteps across categories including empathy failures, boundary violations, and premature interpretations. Evaluated on a corpus of twenty transcript sets containing 300 therapist turns—half containing deliberately seeded errors—two independent clinicians exhibited 76.3 percent agreement, correctly identifying all 150 seeded missteps. The automated detector flagged 131 of 150 seeded errors, achieving 0.873 recall, while also flagging 62 of 150 clinically appropriate turns, demonstrating that automated feedback requires supervisory interpretation by human lecturers. Post-hoc textual analyses revealed that virtual patients generated shorter responses following therapist errors, though unvalidated surface lexical matching does not establish genuine clinical attunement. The investigators emphasize that text interaction lacks non-verbal cues and real-time conversational pressures, and that empirical transfer of skills to human clinical practice remains unproven. LLMPatients represents a technically feasible, open-source tool for supervised deliberate practice, providing an auditable foundation for future educational trials assessing student skill acquisition and clinical competence.
Subject of Research: Multi-session virtual patient simulation platform for psychotherapy training
Article Title: LLMPatients: an interpretable LLM-based virtual patient platform for multi-session psychotherapy training
Article References: Cremaschi, M., Fanti, E., Pisati, E., & La Barbera, D. (2026). LLMPatients: an interpretable LLM-based virtual patient platform for multi-session psychotherapy training. Frontiers in Digital Health, 8, Article 1920920. https://doi.org/10.3389/fdgth.2026.1920920
Image Credits: AI Generated
DOI: 10.3389/fdgth.2026.1920920
Keywords: LLMPatients, virtual patients, psychotherapy training, large language models, deliberate practice, clinical simulation, PDM-2, multi-session memory, affective computing, misstep detection, psychiatric assessment, conversational agents, factual continuity, digital mental health, system usability scale, medical education, clinical supervision, psychometrics
Cite Scienmag News
Glenn Wilkins. (November 26, 2026). Virtual Patient Platform Simulates Multi-Session Psychotherapy Training Using Large Language Models. Scienmag. https://scienmag.com/virtual-patient-platform-simulates-multi-session-psychotherapy-training-using-large-language-models/
Glenn Wilkins. "Virtual Patient Platform Simulates Multi-Session Psychotherapy Training Using Large Language Models." Scienmag, 26 November 2026, https://scienmag.com/virtual-patient-platform-simulates-multi-session-psychotherapy-training-using-large-language-models/. Accessed 26 November 2026.
Glenn Wilkins. "Virtual Patient Platform Simulates Multi-Session Psychotherapy Training Using Large Language Models." Scienmag. November 26, 2026. https://scienmag.com/virtual-patient-platform-simulates-multi-session-psychotherapy-training-using-large-language-models/








