Psychological counseling dialogue generation method based on psychological theory driving large model
Through the goal-planning tree framework, psychological counseling knowledge is injected into the problem of insufficient knowledge theory and weak process control ability of large language models in psychological counseling, and efficient psychological counseling dialogue generation is achieved, improving the effectiveness and efficiency of psychological counseling.
Patent Information
- Application Number
- CN202411100142.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-12-03
AI Technical Summary
The existing large language models have insufficient knowledge theory, insufficient collection of consultation and dialogue data, weak process control ability, and insufficient ability to adapt to clients in psychological counseling, which makes it difficult to effectively support clients' psychological dilemma and affect application effect.
Using the method of injecting the goal-plan tree knowledge and guiding the behavior of the large language model, the goal-plan tree framework for psychological counseling is constructed to realize the knowledge injection and process control of the large language model by defining the action node, planning node and target node, and automatically Assess the client’s psychological state and generate professional, sophisticated counselor intervention conversations.
It improves the effectiveness of psychological counseling dialogue, solves the problem of dependence and inefficiency of dialogue data, improves the quality of application of large language models in psychological counseling, and quickly improves the efficiency of psychological counseling.
Smart Images

Figure CN119069080A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural language processing, and in particular to a method for generating psychological consultation dialogues based on theory-driven and large-scale language model zero-sample instruction generation. Background Art
[0002] Psychological counseling dialogue is a method of mental health service, which aims to help individuals solve psychological problems and improve their mental health. Usually, the counselor communicates with the client one-on-one, and understands the client's problems and needs through listening, asking questions, and giving feedback. The purpose of psychological counseling dialogue is to help the client discover and understand his or her inner emotions, thinking patterns, and behaviors, and promote self-awareness and personal growth. Through this dialogue, the client can obtain emotional support, cognitive clarification, and behavioral guidance, thereby improving his or her mental state and quality of life. Psychological counseling dialogue usually includes initial assessment, goal setting, intervention measures, and progress evaluation. In the initial assessment, the counselor will understand the client's background, problems, and expectations through detailed interviews. Subsequently, the counselor and the client jointly set specific counseling goals and formulate corresponding intervention measures. During the counseling process, the counselor will use various psychological techniques and methods, such as cognitive behavioral therapy, humanistic therapy, and psychoanalysis, to help the client explore his or her inner world and cope with problems. However, affected by the shortage of artificial psychological resources, psychological counseling services have been in a state of insufficient treatment and insufficient resources. This situation has changed with the birth of generative artificial intelligence technology, especially the emergence of large language models, which can provide human-like services related to psychological counseling with attractive generated content, thereby improving the efficiency of psychological counseling and filling the gap in human psychological counseling service labor force.
[0003] Although the current big language model has extensive world knowledge, contextual learning ability, and thought chain ability, and can output natural and fluent chat dialogues, when it is applied to psychological counseling scenarios, it can only provide general, non-knowledge-guided psychological counseling responses, and cannot effectively support the resolution of the client's psychological difficulties, which seriously affects the application and effectiveness of the big language model in psychological counseling.
[0004] The existing methods of driving large language models for psychological counseling have problems such as insufficient knowledge theory, insufficient collection of consultation dialogue data, weak process control capabilities, and insufficient ability to adapt to client cases. It is often difficult to effectively support clients' psychological dilemmas, affecting the quality of psychological counseling using large language models, or failing to actually solve the problem of shortage of human psychological counselors, and failing to tap the potential of artificial intelligence technology to improve clients' psychological state. Summary of the invention
[0005] The purpose of the present invention is to provide a psychological counseling dialogue generation method based on a large model driven by psychology theory in response to the deficiencies of the prior art. The method adopts the method of knowledge injection of the target-plan tree and guiding the behavior of the large language model to realize the knowledge injection and process control function of the large language model for psychological counseling, so as to stimulate the rich world knowledge accumulated in the training process of the large language model, thereby improving the effect of psychological counseling. The method utilizes the powerful command following, cognitive understanding, knowledge reserve and other capabilities of the large language model, based on professional psychological counseling knowledge, according to the psychological dilemma of the visitor, automatically selects an intervention plan suitable for the visitor, and conducts professional, detailed and reliable dialogue interaction with the visitor under the guidance of the intervention knowledge, which better solves the problems of relying on a large amount of dialogue data, hardware resources, and low efficiency in the process of psychological counseling, and quickly improves the dialogue effect of psychological counseling. The method is simple, practical and has good application prospects.
[0006] The specific technical solution to achieve the purpose of the present invention is: a method for generating psychological counseling dialogues based on a large model driven by psychological theory, which is characterized by establishing a target-plan tree instance and a running engine for real psychological counseling dialogue process control based on the knowledge of psychological counseling, realizing that the large language model automatically evaluates the psychological state of the psychological counseling visitor, infers and selects a suitable treatment plan, and generates a smooth and natural counselor intervention dialogue. The method specifically includes:
[0007] 1) A formal framework for guiding the behavior of large language models using goal-plan trees
[0008] The goal-plan tree framework suitable for simulating human psychological counselors is defined. The framework is a tree structure. Each node has a precondition and a postcondition, which can be empty or can be one or a group of key-value pairs, representing the value of the named attribute that has been satisfied before the node enters and the value of the named attribute generated after the node leaves. The nodes of the tree are composed of three types: ① Action nodes, that is, the interaction implemented by the counselor with the minimum realization purpose and the dialogue with the visitor, denoted as a, formalized as a 5-tuple (a inst ,a pred ,a post ,pre(a),post(a)), where a inst Indicates interactive instructions for psychological intervention, a pred ,a post Respectively represent the predecessor and successor of a, pre(a) and post(a) represent the pre- and post-conditions of a respectively; ② Planning node, that is, a series of steps set by the consultant to achieve a certain state, denoted as π, formalized as a 6-tuple (π desp ,π pred ,π succ ,pre(π),post(π),body(π)), where π desp Represents the description of the plan, πpred ,π succ is the predecessor and successor of the node, pre(π), post(π) are the pre- and post-conditions of the node, body(π) represents the components of π, body(π)=(π seq ,op),π seq =α1,…,α m , where α i It can be an action node or a target node or an iterative sub-plan node sequence β1,…,β k , op = {∧,∨} represents the logical relationship between {a} elements, ∧ represents the AND relationship, ∨ represents the OR relationship; ③ The target node, that is, a certain state that the consultant expects to achieve, is denoted as g, and is formalized as {π1,…,π n}, π i It is a planning node.
[0009] 2) The goal-plan tree formalizes the “goal, plan, action” psychological counseling theory knowledge dismantling
[0010] The present invention combines the framework proposed by the goal-plan tree proposed in 1) and the definitions of various nodes to decompose the intervention techniques, theories, and knowledge of counselors in psychological counseling into:
[0011] ①Goal (or sub-goal)
[0012] Definition: A goal is an intermediate or final outcome or state that is expected to be achieved during a counseling session. A sub-goal is a more detailed outcome or state that is intended to achieve a more complex goal. This includes specific goals that counselors hope clients will achieve in terms of mental health, emotional stability, behavioral change, or personal growth through counseling.
[0013] ②Plan
[0014] Definition: A plan is a series of steps, strategies and methods designed to achieve a set goal. The plan covers the structural planning and step arrangement of the consultation. The plan of the psychological counselor required to be disassembled in this invention has a name π and a brief description of the plan π desp , and the plan body body(π) containing the sequence steps.
[0015] ③ Action
[0016] Definition: Action is the smallest unit of specific behavior and measures actually implemented in the process of psychological counseling. Action is the implementation part of the plan, including the interaction, practice and intervention between the counselor and the client in each counseling session. The actions required to be disassembled in this invention include name a, knowledge required for action a inst .
[0017] 3) Target-plan tree instantiation to inject knowledge into large models
[0018] Based on the knowledge decomposed in 2), instantiated action nodes, plan nodes and target nodes are formed. In particular, the knowledge in the plan nodes and action nodes is injected into the large language model to complete the planning decision and action execution of psychological counseling.
[0019] Plan decision: refers to the process of selecting a most suitable plan from among multiple candidate plans according to the visitor's situation. The present invention guides the large language model to make a plan decision (plan node p) instruction S p It is defined as follows, S p =P P,I +E+pre(p)+{(π,π desc )}. Among them, P P,I is the language instruction that requires the big model to make a choice, E represents the summary information of the conversation history between the big model and the visitor, pre(p) represents the precondition of the current node, {(π,π desc )} represents multiple candidate plans and their description information, which is the space for the big model to choose from, that is, the big model selects the most suitable and unique π from them.
[0020] Action execution: refers to guiding the large language model to perform action execution and conduct psychological counseling intervention with human visitors. The present invention will guide the large language model to perform psychological intervention behavior (action node a) instruction S a It is defined as follows, S a =P A,I +a inst +pre(a)+post(a). Among them, P A,I is the language instruction that requires the large model to interact, a inst represents the psychological intervention interaction instruction with knowledge, pre(a) represents the assigned pre-condition of the action node being executed, and post(a) represents the unassigned post-condition of the action node being executed, that is, the set of values to be output after this node needs to be executed. a Interact with visitors in a language manner, satisfying a inst After the request, it actively stops the interaction and outputs the content of the value in post(a).
[0021] 4) Execution goal - plan tree instance drives the system engine for large language model to interact with humans
[0022] The target-plan tree instance constructed by 1) and 2) is knowledge-introduced and static, but in practical applications, it is necessary to apply the instance to a dynamic environment that interacts with visitors. For this reason, the present invention proposes a system engine for any target-plan instance, where the instance of the target-plan tree is T, the counselor played by the large model is A, and the visitor is C. The present invention defines the environment E as an action summary and uses a pointer p to locate nodes during operation. The pointer can move back and forth on T. Initially, we locate p at the highest target and then move the pointer to its successor node. In addition, the maximum number of rounds of interaction between A and C during the execution of an action is limited to t.
[0023] The system engine of the target-plan instance adopts the engine algorithm of Table 1 below:
[0024] Table 1 Engine algorithm
[0025]
[0026] Compared with the prior art, the present invention has a simple method and better solves the problems of lack of knowledge injection, weak process control ability, reliance on a large amount of sensitive dialogue data, single response generation, low intervention efficiency, etc. in the generation of psychological counseling dialogues with large language models. It can quickly improve the effect of psychological counseling dialogues, and stimulate the powerful language generation ability of large language models by introducing instructions that incorporate psychological counseling knowledge. The target-plan tree running engine manages the dialogue state, and quickly improves the adaptability of the method in the task of generating psychological counseling dialogues with minimal computational cost. It has strong practicality and good application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 This is an implementation diagram of the goal-planning tree for psychological counseling. DETAILED DESCRIPTION
[0028] The present invention adopts a method for injecting psychological counseling knowledge into a large language model and controlling the dialogue process by using the target-plan tree technology. The method utilizes the powerful cognitive evaluation ability, reasoning selection ability and language generation ability of the large language model, injects external psychological counseling knowledge and process control, and realizes the large language model to automatically evaluate the psychological state of the psychological counseling visitor and generate a smooth and natural counselor intervention dialogue. The method specifically includes:
[0029] 1) A formal framework for guiding the behavior of large language models using goal-plan trees
[0030] A goal-plan tree framework suitable for simulating human psychological counselors is defined. The framework is a tree structure. Each tree node has a precondition and a postcondition, which is empty or one or a group of key-value pairs, representing the value of the named attribute that has been satisfied before the node enters and the value of the named attribute generated after the node leaves. The tree nodes are composed of three types: action nodes, plan nodes, and goal nodes. The action node is an interaction implemented by the counselor with a minimum realization purpose and can be used for dialogue with the visitor, denoted as a, formalized as a 5-tuple (a inst ,a pred ,a post ,pre(a),post(a)). Among them, a inst Indicates interactive instructions for psychological intervention, a pred ,a post They represent the predecessor and successor of a respectively, and pre(a) and post(a) represent the pre- and post-conditions of a respectively.
[0031] The planning node is a series of steps set by the consultant to achieve a certain state, denoted as π, formalized as a 6-tuple (π desp ,π pred ,π succ ,pre(π),post(π),body(π)). Among them, π desp Represents the description of the plan, π pred ,π succ is the predecessor and successor of the node, pre(π), post(π) are the pre- and post-conditions of the node, body(π) represents the components of π, body(π)=(π seq ,op),π seq =α1,…,α m Among them, α i It can be an action node or a target node or an iterative sub-plan node sequence β1,…,β k , op={∧,∨} represents the logical relationship between {a} elements, ∧ represents the AND relationship, and ∨ represents the OR relationship.
[0032] The target node is a state that the consultant expects to achieve, denoted by g, and formalized as {π1,…,π n}, π i It is a planning node.
[0033] 2) Dismantling of theoretical knowledge of psychological counseling
[0034] The intervention techniques, theories and knowledge of counselors in psychological counseling are broken down into: goals or sub-goals, plans and actions. The goals or sub-goals are the intermediate or final results or states expected to be achieved in the psychological counseling process; the sub-goals are the results or states in achieving a complex goal; the results or states include the specific goals in terms of mental health, emotional stability, behavioral changes or personal growth that counselors hope clients will achieve through counseling;
[0035] The plan is a series of steps, strategies and methods designed to achieve the set goals. The plan covers the structural planning and step arrangement of the consultation. The disassembled plan has the name π, and the plan is briefly described as π desp and the plan body (π) containing the sequence steps.
[0036] The action is the specific behavior and measures of the smallest unit actually implemented in the process of psychological counseling, including the interaction, practice and intervention between the counselor and the client in each counseling session. The disassembled action has a name a, the knowledge required for the action a inst .
[0037] 3) Target-plan tree instantiation to inject knowledge into large models
[0038] Based on the disassembled knowledge, instantiated action nodes, plan nodes, and target nodes are formed, and the knowledge in the plan nodes and action nodes is injected into the large language model. The large language model a Interact with visitors in a language manner, satisfying a inst After the request, the interaction is stopped actively, the content of the value in post(a) is output, and the planning decision and action execution of psychological consultation are completed.
[0039] The plan decision is a process in which there are multiple candidate plans and the most suitable plan needs to be selected according to the visitor's situation. The instruction S that guides the large language model to make a plan decision (plan node p) p Defined as: S p =P P,I +E+pre(p)+{(π,π desc )}. Among them, P P,I is the language instruction that requires the big model to make a choice; E is the summary information of the conversation history between the big model and the visitor; pre(p) is the precondition of the current node; {(π,π desc )} is the space of choices for the large model plan, that is, the large model selects the most suitable and unique π from it.
[0040] The action execution will guide the large language model to perform psychological intervention behavior (action node a) instruction S a Defined as: S a =P A,I +ainst +pre(a)+post(a). Among them, P A,I A language instruction that requires the large model to interact; a inst It is a psychological intervention interaction with knowledge; pre(a) is the assigned pre-condition of the action node being executed; post(a) is the unassigned post-condition of the action node being executed, that is, the set of values to be output after this node needs to be executed.
[0041] The large language model is based on the instruction S a Interact with visitors in a language manner, satisfying a inst After the request, it actively stops the interaction and outputs the content of the value in post(a).
[0042] 4) Execution goal - plan tree instance drives the system engine for large language model to interact with humans
[0043] Using the system engine of any goal-plan instance, the execution of the goal-plan tree instance drives the large language model to interact with humans. The large language model and human interaction are to define the environment E as an action summary and use the pointer p to locate the node during the operation. The pointer p moves back and forth on the instance T of the goal-plan tree. Initially, the pointer p is located at the highest goal, and then the pointer p is moved to its successor node, and the maximum number of rounds t that the counselor A and the visitor C played by the large model interact during the execution of an action is limited.
[0044] The system engine of the target-plan instance adopts the engine algorithm of Table 1 below:
[0045] Table 1 Engine algorithm
[0046]
[0047] The present invention is further described in detail by taking the following specific implementations as examples.
[0048] Example 1
[0049] Definition of psychological counseling dialogue: Psychological counseling dialogue is a professional communication method aimed at helping clients solve psychological problems, improve mental health and quality of life. The process of psychological counseling dialogue is based on the client's expression, emotional response and other relevant information, and the counselor uses listening, questioning, feedback and other skills to communicate with the client in depth to ensure that the client can think deeply, express his true feelings, and get support and guidance during the counseling process.
[0050] (I) Example of action node execution
[0051] The system executes to the HelpClientPayAttentionToSensationsAction action node:
[0052] Knowledge Infusion: Ask the client to describe their experience or emotional experience in detail step by step to better understand their feelings.
[0053] Counselor's task: guide the client to have a conversation based on the knowledge and information injected
[0054] The conversation history description is as follows:
[0055] Counselor (the big model plays the role of a psychologist): Jamie, I would like to ask you to share slowly and deeply what specific feelings you have in your body when you face the pressure of the college entrance examination? For example, in your chest, stomach or head.
[0056] Client (the person seeking psychological help): When I face the pressure of the college entrance examination, I feel tightness in my chest and sometimes even have difficulty breathing. My head also feels very heavy, as if there are a lot of things pressing down on it.
[0057] Counselor: I understand how you feel right now. The tightness in your chest and difficulty breathing, as well as the heaviness in your head, are all physical reactions to stress. Can you describe how you cope when these feelings are most intense?
[0058] Client: When the feelings are the strongest, I usually try to distract myself, such as listening to music or taking a walk, but sometimes these methods don't always work.
[0059] Clinician: It’s great that you’ve been trying some methods to cope with these feelings, but when you find that these methods aren’t working, what other reactions do you have in your body? For example, do you notice any other physical sensations or emotional changes?
[0060] Client: When these methods don’t work very well, I feel more anxious and helpless, and sometimes even feel trapped.
[0061] C: Jamie, I want to invite you to explore these feelings with me, even though they may be painful, and let's try not to judge or react immediately, but just allow ourselves to really experience these emotions. Do you feel ready?
[0062] Client: I think I'm ready. Although I'm a little scared, I'm willing to try.
[0063] Counselor: Great, Jamie. It's an important step to face your feelings. When you feel scared or upset, try to take a deep breath and allow yourself to slowly immerse in these feelings. We are here to support you, not to judge. What are you feeling right now?
[0064] Client: Now, I feel a mixed emotion, both fear and anticipation. I am afraid to face the deep-seated anxiety and pain, but at the same time I also look forward to finding some ways to release these emotions.
[0065] Clinician: Jamie, it's great that you're able to identify and express this complex mix of emotions, fear and anticipation, which is a natural process. Let's explore these feelings slowly and gently together, not rushing to find a solution, but allowing yourself to feel them fully. In doing so, you may find that you have a deeper understanding and acceptance of these emotions. Are you willing to share something specific that makes you feel uncomfortable and painful now?
[0066] Client: I am willing to start sharing some things that make me feel uneasy and painful. The first is my fear of the college entrance examination. I am afraid of failure and afraid of disappointing my family. Secondly, I feel that my efforts and existence are often ignored or denied at home and in school, which makes me feel very painful.
[0067] Counselor: Jamie, thank you for sharing and trusting me. The fear of facing the college entrance exam, the fear of failure and disappointing your family, and the pain of feeling ignored and denied are all very strong and real feelings. In this process, I would like to invite you to try to accept these emotions and understand that they are a part of your inner self and they reflect your needs and concerns. Together, we will explore these feelings slowly and patiently, not rushing to change them, but learning to coexist with them and gain deep insights from them. Do you think this will help you?
[0068] (II) Example of plan node execution
[0069] The system executes to the EvaluateWhetherPrimaryEmotionsAreHealthyPlan plan node:
[0070] Since there are multiple candidate nodes after this node and they are parallel successor relationships of "or", a large model is needed to select the only successor node that best suits the client to promote the progress of psychological counseling.
[0071] Instruction text:
[0072] You are a counselor, and your task is to select the most appropriate follow-up plan from multiple options based on the conversation summary and known situation to promote the counseling process. You are now in the plan called "EvaluateWhetherPrimaryEmotionsAreHealthyPlan", and you know that the client's main emotions are fear and tension.
[0073] The following is a list of follow-up scenarios and their descriptions:
[0074] [Plan Name]EvaluateWhetherSadnessIsHealthyOrUnhealthyPrimarySadnessPlan
[0075] [Program Description] If the client's primary emotion is sadness...
[0076] [Plan Name]EvaluateWhetherAngerIsHealthyOrUnhealthyPrimaryAngerPlan
[0077] [Program Description] If the client's primary emotion is anger...
[0078] [Plan Name] EvaluateWhetherFearAndAnxietyAreHealthyOrUnhealthyPrimaryEmotionsPlan
[0079] [Program Description] If the client's primary emotions are fear and anxiety...
[0080] (End of command)
[0081] Based on the above instruction text, the big language model playing the role of a psychological counselor will make choices similar to the following.
[0082] C: My choice is "Evaluate Whether Fear And Anxiety Are Healthy Or Unhealthy Primary Emotions Plan" because the primary emotions identified by the client and me are fear and anxiety. Therefore, I suggest evaluating whether these emotions are healthy or unhealthy.
[0083] Then, the system will enter the Evaluate Whether Fear And Anxiety Are Healthy Or Unhealthy Primary Emotions Plan according to the counselor's choice and continue the psychological counseling process.
[0084] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A large-scale language model psychological consultation dialogue system driven by psychology theory, characterized by: The method adopts the goal-plan tree technology to inject psychological counseling knowledge into the large language model and control the dialogue process. The method uses the powerful cognitive evaluation ability, reasoning selection ability and language generation ability of the large language model to inject external psychological counseling knowledge and process control, so as to realize the large language model to automatically evaluate the psychological state of the psychological counseling visitor and generate a smooth and natural counselor intervention dialogue. The method specifically includes: 1) A formal framework for guiding the behavior of large language models using goal-plan trees A goal-plan tree framework suitable for simulating human psychological counselors is defined. The framework is a tree structure. Each tree node has a precondition and a postcondition, which is empty or one or a group of key-value pairs, representing the value of the named attribute that has been satisfied before the node enters and the value of the named attribute generated after the node leaves. The tree nodes are composed of three types: action nodes, plan nodes, and goal nodes. The action node is an interaction implemented by the counselor with a minimum realization purpose and can be used for dialogue with the visitor, denoted as a, formalized as a 5-tuple (a inst ,a pred ,a post ,pre(a),post(a)), where a inst Indicates interactive instructions for psychological intervention, a pred ,a post They represent the predecessor and successor of a respectively, pre(a) and post(a) represent the pre- and post-conditions of a respectively; The planning node is a series of steps set by the consultant to achieve a certain state, denoted as π, formalized as a 6-tuple (π desp ,π pred ,π succ ,post(π),post(π),body(π)), where π desp Represents the description of the plan, π pred ,π succ is the predecessor and successor of the node, pre(π), post(π) are the pre- and post-conditions of the node, body(π) represents the components of π, body(π)=(π seq ,op),π seq =α1,…,α m , where α i It can be an action node or a target node or an iterative sub-plan node sequence β1,…,β k , op={∧,∨} represents the logical relationship between {a} elements, ∧ represents the AND relationship, ∨ represents the OR relationship; The target node is a state that the consultant expects to achieve, denoted by g, and formalized as {π1,…,π n }, π i is the planning node; 2) Dismantling of theoretical knowledge of psychological counseling The intervention techniques, theories and knowledge of counselors in psychological counseling are broken down into: goals or sub-goals, plans and actions. The goals or sub-goals are the intermediate or final results or states expected to be achieved in the psychological counseling process; the sub-goals are the results or states in achieving a complex goal; the results or states include the specific goals in terms of mental health, emotional stability, behavioral changes or personal growth that counselors hope clients will achieve through counseling; The plan is a series of steps, strategies and methods designed to achieve the set goals. The plan covers the structural planning and step arrangement of the consultation. The disassembled plan has the name π, and the plan is briefly described as π desp and the plan body body(π) containing the sequence steps; The action is the specific behavior and measures of the smallest unit actually implemented in the process of psychological counseling, including the interaction, practice and intervention between the counselor and the client in each counseling session. The disassembled action has a name a, the knowledge required for the action a inst ; 3) Target-plan tree instantiation to inject knowledge into large models Based on the disassembled knowledge, instantiated action nodes, plan nodes, and target nodes are formed, and the knowledge in the plan nodes and action nodes is injected into the large language model. The large language model a Interact with visitors in a language manner, satisfying a inst After the request, the interaction is stopped actively, the content of the value in post(a) is output, and the planning decision and action execution of psychological consultation are completed; The plan decision is a process in which there are multiple candidate plans and the most suitable plan needs to be selected according to the visitor's situation. The instruction S that guides the large language model to make a plan decision (plan node p) p Defined as: S p =P P,I +E+pre(p)+{(π,π desc )}, where P P,I is the language instruction that requires the big model to make a choice; E is the summary information of the conversation history between the big model and the visitor; pre(p) is the precondition of the current node; {(π,π desc )} is the space of choices for the large model plan, that is, the large model selects the most suitable unique π from it; The action execution will guide the large language model to perform psychological intervention behavior (action node a) instruction S a Defined as: S a =P A,I +a inst +pre(a)+post(a), where P A,I A language instruction that requires the large model to interact; a inst is the interaction of psychological intervention with knowledge;,pre(a) is the assigned pre-condition of the action node being executed; post(a) is the unassigned post-condition of the action node being executed, that is, the set of values that need to be output after this node is executed; The large language model is based on the instruction S a Interact with visitors in a language manner, satisfying a inst After the request, the interaction is stopped actively and the content of the value in post(a) is output; 4) Execution goal - plan tree instance drives the system engine for large language model to interact with humans A system engine using any goal-plan instance executes the goal-plan tree instance to drive the large language model to interact with humans. The large language model interacts with humans by defining the environment E as an action summary and using a pointer p to locate nodes during operation. The pointer p moves back and forth on the instance T of the goal-plan tree. Initially, the pointer p is positioned at the highest goal, and then the pointer p is moved to its successor node, and the maximum number of rounds of interaction between the counselor A and the visitor C played by the large model during the execution of an action is limited to t.
Citation Information
Cited By
Psychological counseling interaction method and device based on autonomous psychological planning architecture
CN120636701A
Psychological counseling interaction method and device based on autonomous psychological planning architecture
CN120636701B
