Personal Companion AI with Customized Large Language Model

指导老师:Jigang Wu创建者:黄今

青少年面临的压力和心理咨询资源匮乏的问题是一个全球性的挑战。无论是来自考试和升学的学业压力,来自父母家庭的家庭压力,还是来自自我认同的探索和生理变化带来的困惑都使得当下青少年面临沉重的压力。在我国大多数地区的专业心理咨询师的数量远远不足,无法满足青少年的心理咨询需求,对于某些家庭,心理咨询的费用也是一个沉重的负担。此外,在传统文化中,心理问题在一定程度上仍然是一个禁忌话题,这也导致青少年很难得到心理帮助。

然而,随着以ChatGPT为首的大语言模型的发展,青少年的心理压力和心理咨询资源匮乏的矛盾有望得到解决。目前的通用大预言模型在青少年心理咨询问题上表现不尽如人意。首先,现有的模型很难衡量用户的性格和情绪,并根据用户性格进行回答,其次通用大模型表达方式相对客观理性,很难和心理咨询师一样引导用户回答,提供感性的安慰。

为解决上述问题,我们首先在基于开源数据集和心理学知识提炼出二十个青少年的典型人格和一百个青少年经常遇到的压力场景,基于这些人格和场景,我们利用ChatGPT-4o模拟性格不同的青少年在不同场景下和心理咨询师的对话数据,ChatGPT-3.5的评估结果说明,我们生成的数据和现实中心理咨询对话数据具有同等水平的质量。之后我们对包括Qwen,DeepSeek和GLM在内的开源模型进行提示工程和评估,基于余弦相似度、BLEU、ROUGE-1、BERTScore的评价矩阵说明:在不同提示方法下,三个模型的最优表现基本相同。因此我们选择使用参数最少的GLM进行后续的微调工作。基于LoRA的微调方法进一步提高了模型在青少年心理咨询对话场景下的表现。同时,我们应用阿里开发的语音识别和生成模型实现了用户和心理咨询模型的实时对话。泰迪熊作为模型的实体也能给予青少年安慰和帮助。

该项目旨在开发一个搭建一个大语言模型在青少年心理咨询场景下的工作框架。在流程中综合运用不同的人工智能模型和改进优化方法,使得开源的通用大语言模型在青少年心理咨询领域的表现有了显著提高。在未来,该框架有望被进一步完善为商业化模型,我们希望我们的产品有朝一日可以真正缓解青少年的心理压力问题。

The stress faced by adolescents and the lack of counselling resources is a global challenge. Whether it is the academic pressure from exams and higher education, the family pressure from parents and families, or the confusion brought by self-identity exploration and physiological changes, today’s teenagers are facing heavy pressure. In most areas of our country, the number of professional psychological counsellors is far from enough to meet the needs of young people's psychological counselling, and the cost of psychological counselling is also a heavy burden for some families. In addition, in traditional culture, psychological problems are still a taboo topic to some extent, which also makes it difficult for teenagers to get psychological help.

However, with the development of large language models led by ChatGPT, it is expected that the contradiction between the psychological pressure of adolescents and the lack of psychological counselling resources will be resolved. At present, general large language models are not satisfactory in adolescent psychological counselling. Firstly, it is difficult for existing models to measure the user's personality and emotions and give responses according to the user's personality. Secondly, the expression of general large models is relatively objective and rational, making it difficult to guide users and provide emotional comfort like psychological counsellors do.

To solve the above problems, we first extracted 20 typical adolescent personalities and 100 stressful scenarios frequently encountered by adolescents based on open-source data sets and psychological knowledge. Based on these personalities and scenarios, we used ChatGPT-4o to simulate conversation data between adolescents with different personalities and psychological counsellors in different scenarios. The results of ChatGPT-3.5 indicate that the data we generated are of the same level of quality as the data from real-life counselling conversations. After that, we carried out prompt engineering and evaluation on open-source models including Qwen, DeepSeek, and GLM. The evaluation matrix based on cosine similarity, BLEU, ROUGE-1, and BERTScore showed that the optimal performance of the three models was basically the same under different prompt methods. Therefore, we chose to use GLM with the fewest parameters for subsequent fine-tuning. The fine-tuning method based on LoRA further improves the performance of the model in the dialogue scene of adolescent psychological counselling. At the same time, we applied the speech recognition and generation model developed by Ali to realize real-time dialogue between the user and the psychological counselling model. Teddy bears as model entities can also offer comfort and help to teenagers.

This project aims to develop a working framework for building a large language model in the context of adolescent psychological counselling. The comprehensive application of different artificial intelligence models and improvement and optimization methods in the process has significantly improved the performance of open-source general large language models in the field of adolescent psychological counselling. In the future, this framework is expected to be further refined into a commercial model, and we hope that our product can one day truly alleviate the problem of psychological stress in teenagers.