Skip to main content

Psyche Generator

A Multi-faceted Patient Simulation Framework for Evaluation of Psychiatric Assessment Conversational Agents

Paper: arXiv

Generates comprehensive MFC (Multi-Faceted Case) psychiatric profiles for use with the Psyche client agent.

Overview

PropertyValue
Keypsyche
TypeLLM-based
OutputPsyche MFC character files

Key Features

  • MFC-Profile: Structured clinical intake — demographics, chief complaint, present illness, psychiatric/medical history, medication, family history, and risk assessment
  • MFC-History: First-person biography-style life narrative grounded in the profile
  • MFC-Behavior: Mental Status Examination — appearance, mood, affect, thought process, insight, and more

How It Works

generate_character() runs three sequential LLM calls:

  1. MFC-Profile — generates structured clinical data from a seed input_dir JSON (diagnosis, age, sex)
  2. MFC-History — generates a first-person life narrative grounded in the profile
  3. MFC-Behavior — generates a Mental Status Examination based on profile and history

The combined MFC object is saved to output_dir.

Usage

from patienthub.generators import get_generator

generator = get_generator(agent_name="psyche", lang="en")
generator.generate_character()

Configuration

ParameterTypeDefaultDescription
prompt_pathstringdata/prompts/generator/psyche.yamlPath to prompt file
input_dirstringdata/resources/psyche_character.jsonPath to seed JSON (diagnosis, age, sex)
output_dirstringdata/characters/Psyche MFC.jsonPath where the generated character is saved
model_typestring"OPENAI"Model provider key
model_namestring"gpt-4o"Model identifier
temperaturefloat0.7Sampling temperature
max_tokensint8192Max response tokens
max_retriesint3API retry attempts

Input Data Format

{
"diagnosis": "Major Depressive Disorder",
"age": "40",
"sex": "Female"
}

Output Format

{
"MFC-Profile": {
"Identifying data": {"Age": "40", "Sex": "Female", "Marital status": "Married", "Occupation": "Office worker"},
"Chief complaint": {"Description": "I feel overwhelmingly sad and have no energy."},
"Present illness": {"Symptom": {"Name": "Persistent sadness", "Length": 24, "Stressor": "work"}},
"Past psychiatric history": {"Presence": "No", "Description": null},
"Impulsivity": {"Suicidal ideation": "High", "Suicidal plan": "Presence", "Homicide risk": "Low"}
},
"MFC-History": "I grew up in a small town...",
"MFC-Behavior": {
"Mood": "Depressed",
"Affect": "Restricted, anxious, slightly tense",
"Verbal productivity": "Decreased",
"Thought process": "Normal"
}
}

Use Cases

  • Creating character files for Psyche client agent simulations
  • Psychiatric assessment training datasets
  • Evaluating clinical interview agents