COCOA: CBT-based Conversational Counseling Agent using Memory Specialized in Cognitive Distortions and Dynamic Prompt
Suyeon Lee, Jieun Kang, Harim Kim, Kyoung-Mee Chung, Dongha Lee, Jinyoung Yeo
TL;DR
This work tackles the limited access to mental-health care by presenting CoCoA, a CBT-based conversational counselor that uses a dual-memory system to track cognitive distortions and high-level client insights, together with a dynamic prompting pipeline to flexibly apply CBT techniques. Memory comprises Basic Memory for general insights and Cognitive Distortion Memory for distortions, with a scoring mechanism $S(cd)$ that blends recency, frequency, and severity to identify a prioritized distortion $cd^*$ via $cd^* = \underset{cd \in CD}{\text{argmax}} \, S(cd)$ and $S(cd) = \alpha_{recency} \times recency + \alpha_{frequency} \times frequency + \alpha_{severity} \times severity$. A dynamic prompt integrates retrieved memories to determine an appropriate CBT technique $t^*$ and a CBT stage, using a retrieval step with Contriever and a stage selection guided by a conversation log, then generates responses conditioned on Static and Dynamic prompts with $Dynamic \sim t^* + Stage + ExampleResponse \sim f_{LLM}(\cdot|Static, Dynamic)$. Experiments with eight Character.ai simulacra clients and GPT-3.5-turbo-based evaluation show that CoCoA achieves statistically significant improvements in CBT Validity and CBT Accuracy over baselines, demonstrating the potential of memory-guided, CBT-driven dialogue agents for scalable mental-health support.
Abstract
The demand for conversational agents that provide mental health care is consistently increasing. In this work, we develop a psychological counseling agent, referred to as CoCoA, that applies Cognitive Behavioral Therapy (CBT) techniques to identify and address cognitive distortions inherent in the client's statements. Specifically, we construct a memory system to efficiently manage information necessary for counseling while extracting high-level insights about the client from their utterances. Additionally, to ensure that the counseling agent generates appropriate responses, we introduce dynamic prompting to flexibly apply CBT techniques and facilitate the appropriate retrieval of information. We conducted dialogues between CoCoA and characters from Character.ai, creating a dataset for evaluation. Then, we asked GPT to evaluate the constructed counseling dataset, and our model demonstrated a statistically significant difference from other models.
