A dialogue control method and system based on an artificial intelligence dialogue large model
Through the preset chain Prompt control method, the dialogue process control problem of the artificial intelligence dialogue model in specific fields is solved, and the active guidance of dialogue and information collection is realized, which improves dialogue efficiency and professionalism.
Patent Information
- Application Number
- CN202411324799.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2044-09-23
AI Technical Summary
The existing AI dialogue big models are difficult to actively guide in-depth communication in specific vertical fields such as psychological counseling and medical consultation, and it is difficult to control multiple rounds and multiple topics of dialogue processes, resulting in insufficient information collection.
The preset chain Prompt active consultation dialogue process control method based on the artificial intelligence dialogue big model is adopted. By setting the dialogue background, full-scene opening remarks, paragraph opening remarks and ending opening remarks, combined with natural language processing technology, intelligently monitor user remarks, dynamically adjust prompt words, and actively guide dialogue and information collection.
It realizes active guidance and information collection of dialogues, improves the efficiency and accuracy of dialogues, and enables the artificial intelligence dialogue system to show higher professionalism and flexibility in occasions where in-depth communication is required.
Smart Images

Figure CN119166782B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence conversations, and particularly to a conversation control method and system based on a large artificial intelligence conversation model. Background Art
[0002] In current large artificial intelligence conversation models, usually the user takes the initiative to ask questions or make requests, and the large artificial intelligence conversation model generates corresponding answers after receiving the questions.
[0003] Although this mode is suitable for general information retrieval or daily communication, in some specific vertical fields, such as psychological counseling, medical consultation, etc., this passive conversation mode may not be efficient enough or deep enough. Especially in cases where professional guidance and in-depth discussion are required, existing artificial intelligence conversation systems usually seem inadequate. At the same time, in these specific vertical fields, the purpose of the conversation is often to obtain sufficient information from the conversation for subsequent use or judgment, and there are several conversation topics, and it is difficult to control the artificial intelligence to communicate one by one to collect data. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide a conversation control method and system based on a large artificial intelligence conversation model to solve the above technical problems.
[0005] To achieve the above object, in a first aspect, a conversation control method based on a large artificial intelligence conversation model is provided, which includes the following steps:
[0006] S10: Provide a conversation background description for the large conversation model to set the scene of the conversation;
[0007] S20: Execute the process of the full-field opening stage, which includes: providing a full-field opening; obtaining a first user reply corresponding to the full-field opening; putting the conversation related to the full-field opening into the full-field opening prompt word of the user reply; judging whether the first user reply has met the requirements of the full-field opening prompt word; when it is determined that the first user reply has met the requirements of the full-field opening prompt word, enter the paragraph opening stage;
[0008] S30: Execute the process of the paragraph opening stage, which includes: providing a paragraph opening; obtaining a second user reply corresponding to the paragraph opening; putting the conversation related to the paragraph opening into the paragraph prompt word of the user reply; judging whether the second user reply has met the requirements of the paragraph prompt word; when it is determined that the second user reply has met the requirements of the paragraph prompt word, further judge whether there are still necessary paragraphs or whether there are conditional paragraphs that meet the trigger conditions. If the judgment result is no, enter the end opening stage;
[0009] S40: Execute the process of the ending opening stage, which includes: providing an ending opening; obtaining a third user response corresponding to the ending opening; putting the conversation related to the ending opening into the ending opening prompt word of the user response; determining whether the third user response has met the requirements of the ending opening prompt word; when the third user response has met the requirements of the ending opening prompt word, providing a closing statement;
[0010] S50: Propose a large model summary requirement and generate a conversation summary according to the large model summary requirement.
[0011] On the other hand, provide a conversation control system based on an artificial intelligence conversation large model, and the system includes:
[0012] A conversation background setting module, which is used to provide a conversation background description for the conversation large model to set the scene of the conversation;
[0013] A full - field opening execution module, which is used to execute the process of the full - field opening stage, including providing a full - field opening, obtaining a first user response corresponding to the full - field opening, putting the conversation related to the full - field opening into the full - field opening prompt word of the user response, determining whether the first user response has met the requirements of the full - field opening prompt word, and triggering the paragraph opening execution module when it is determined that the first user response has met the requirements of the full - field opening prompt word;
[0014] A paragraph opening execution module, which is used to execute the process of the paragraph opening stage, including providing a paragraph opening, obtaining a second user response corresponding to the paragraph opening, putting the conversation related to the paragraph opening into the paragraph prompt word of the user response, determining whether the second user response has met the requirements of the paragraph prompt word, and further determining whether there are still necessary paragraphs or conditional paragraphs that meet the triggering conditions when it is determined that the second user response has met the requirements of the paragraph prompt word. If the judgment result is no, trigger the ending opening execution module;
[0015] An ending opening execution module, which is used to execute the process of the ending opening stage, including providing an ending opening, obtaining a third user response corresponding to the ending opening, putting the conversation related to the ending opening into the ending opening prompt word of the user response, determining whether the third user response has met the requirements of the ending opening prompt word, and providing a closing statement when the third user response has met the requirements of the ending opening prompt word;
[0016] A summary generation module, which is used to propose a large model summary requirement and generate a conversation summary according to the large model summary requirement.
[0017] The above - mentioned technical solution has the following beneficial technical effects:
[0018] An embodiment of the present invention proposes a dialogue process control method based on an artificial intelligence dialogue large model (such as the GPT series models), which can actively guide and manage multi-round and multi-topic conversations with users.
[0019] This system can transform the artificial intelligence dialogue large model from a passive information provider into an active dialogue guide, which has important value in occasions that require in-depth communication such as psychological counseling.
[0020] By intelligently monitoring and analyzing user responses, the system can automatically switch between different preset topics or questions to achieve more targeted conversations.
[0021] An embodiment of the present invention provides a brand-new preset chain prompt word active consultation dialogue process control mechanism based on an artificial intelligence dialogue large model, which is expected to play an important role in the fields of psychological counseling, medical consultation, and other professional consultation fields. Brief Description of the Drawings
[0022] The drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention. Among them:
[0023] Figure 1 is a flowchart of a dialogue control method based on an artificial intelligence dialogue large model according to an embodiment of the present invention;
[0024] Figure 2 is a flowchart of another dialogue control method based on an artificial intelligence dialogue large model according to an embodiment of the present invention;
[0025] Figure 3 is a functional block diagram of a dialogue control system based on an artificial intelligence dialogue large model according to an embodiment of the present invention;
[0026] Figure 4 is a schematic structural diagram of a computer system according to an embodiment of the present invention. Detailed Embodiments
[0027] The following describes exemplary embodiments of the present invention with reference to the accompanying drawings. Various details of the embodiments of the present invention are included to assist understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, descriptions of well-known functions and structures are omitted for clarity and conciseness.
[0028] An embodiment of the present invention proposes a dialogue process control method based on an artificial intelligence dialogue large model (such as the GPT series models), which can actively guide and manage multi-round and multi-topic conversations with users. Briefly, the system presets a series of conversations and questions designed by professionals to guide users into the conversation. The system can also automatically adjust the subsequent questions and topics according to the user's responses, so as to achieve more targeted and in-depth communication.
[0029] The implementation of this system relies on a carefully designed dialogue framework, which includes various elements related to dialogue management, such as dialogue requirements, rounds, opening remarks, preset questions, judgment conditions, etc., to support a flexible and automated dialogue process. And different domain or different professional-designed prompts are placed within this framework. As long as these prompts meet the requirements of the dialogue process control mechanism, the required data and information can be collected one by one for subsequent process use.
[0030] The purpose of the preset chained Prompt active consultation dialogue process control mechanism based on the artificial intelligence dialogue large model is to use the preset framework content to guide the dialogue of the generative large model and collect sufficient information for subsequent business or other practical scenarios.
[0031] Figure 1 is a flowchart of a dialogue control method based on an artificial intelligence dialogue large model according to an embodiment of the present invention. As Figure 1 shown, the method includes the following steps:
[0032] S10: Provide a dialogue background description for the dialogue large model to set the scene of the dialogue;
[0033] S20: Execute the process of the full-field opening remarks stage, which includes: providing the full-field opening remarks; obtaining the first user reply corresponding to the full-field opening remarks; putting the dialogue related to the full-field opening remarks into the full-field opening remarks prompt of the user reply; judging whether the first user reply has met the requirements of the full-field opening remarks prompt; when it is determined that the first user reply has met the requirements of the full-field opening remarks prompt, enter the paragraph opening remarks stage;
[0034] Specifically, the dialogue related to the full-field opening remarks includes the dialogue content between the full-field opening remarks and the user's reply to the full-field opening remarks.
[0035] Specifically, putting the conversation related to the full - session opening remarks into the full - session opening - remarks prompt for the user's reply means that in a dialogue system or a large - language dialogue model, after the user replies with the full - session opening remarks, the system will integrate the conversation content related to the full - session opening remarks and place it as a prompt (or guiding statement) in the user's reply. This is conducive to maintaining the coherence of the conversation and guiding the user to have a more in - depth conversation. By putting the relevant conversation into the prompt, the system can remind the user of the previously discussed content or provide background information for the subsequent conversation, thus making the conversation more fluent and meaningful.
[0036] Specifically, to determine whether the first user's reply has met the requirements of the full - session opening - remarks prompt, it can be evaluated from the following aspects:
[0037] Compare the content of the user's reply with the full - session opening - remarks prompt to see if there is an obvious correlation. If the user's reply is highly relevant to the prompt content, then it can be considered that the user has understood the full - session opening remarks and made a corresponding response.
[0038] Analyze whether the user's reply contains the keywords or phrases in the full - session opening - remarks prompt. The appearance of keywords can indicate the user's attention to and understanding of the opening remarks.
[0039] Consider whether the user's reply is consistent with the context of the full - session opening remarks. If the user's reply is consistent with the theme, emotion, or intention of the opening remarks, then it can be considered that the user has understood the requirements of the opening remarks. Figure 1 Then it can be considered that the user has understood the requirements of the opening remarks.
[0040] Evaluate whether the user's reply completely and clearly responds to the requirements of the full - session opening - remarks prompt. If the reply content is comprehensive and does not omit important information, then it can be considered that the user has met the requirements.
[0041] Through natural language processing technology, perform semantic analysis on the user's reply to judge whether its semantics is consistent with that of the full - session opening - remarks prompt. This can help more accurately judge whether the user has understood the requirements of the opening remarks.
[0042] Based on the evaluation results of the above aspects, it can be judged whether the first user's reply has met the requirements of the full - session opening - remarks prompt.
[0043] S30: Execute the process of the paragraph opening - remarks stage, which includes: providing the paragraph opening - remarks; obtaining the second user's reply corresponding to the paragraph opening - remarks; putting the conversation related to the paragraph opening - remarks into the paragraph prompt for the user's reply; judging whether the second user's reply has met the requirements of the paragraph prompt; when it is determined that the second user's reply has met the requirements of the paragraph prompt, further judge whether there are still mandatory paragraphs or whether there are conditional paragraphs that meet the trigger conditions. If the judgment result is negative, then enter the end - of - opening - remarks stage;
[0044] Specifically, when it is determined that the second user's reply has met the requirements of the paragraph prompt, it indicates that the user has made an appropriate response to the current paragraph content. Next, the system will further check whether there are mandatory paragraphs or conditional paragraphs. Mandatory paragraphs refer to certain key paragraphs that must be discussed or completed in the conversation. If the user's reply has met the requirements of the current paragraph prompt, but there are still uncompleted mandatory paragraphs, then the system will guide the user to continue the discussion of these mandatory paragraphs instead of entering the end of the opening statement stage. Conditional paragraphs refer to paragraphs that appear based on specific conditions. The system will check whether there are conditional paragraphs that meet the conditions. If there are conditional paragraphs that meet the conditions and the user's reply has met the requirements of the current paragraph prompt, then the system will guide the user to enter the discussion of these conditional paragraphs. Only when the judgment result is "no", that is, there are no uncompleted mandatory paragraphs and conditional paragraphs that meet the conditions, will the system enter the end of the opening statement stage. This indicates that the user can successfully end the conversation of the opening statement and start the subsequent conversation content. In short, this process ensures the integrity and accuracy of the conversation, ensuring that all necessary and relevant paragraphs have been properly discussed and completed before entering the next stage.
[0045] S40: Execute the process of the end of the opening statement stage, which includes: providing the end of the opening statement; obtaining the third user's reply corresponding to the end of the opening statement; putting the conversation related to the end of the opening statement into the end of the opening statement prompt word of the user's reply; judging whether the third user's reply has met the requirements of the end of the opening statement prompt word; when the third user's reply has met the requirements of the end of the opening statement prompt word, providing a closing statement;
[0046] S50: Propose the large model summary requirement and generate the conversation summary according to the large model summary requirement.
[0047] In a further embodiment, step S20 further includes the following steps: when it is judged that the user's reply does not meet the requirements of the full - field opening statement prompt word, further judge whether the conversation related to the full - field opening statement has reached the maximum number of turns; if it has not reached the maximum number of turns, give supplementary instructions or encouragement to the user; if it has reached the maximum number of turns, enter the step of providing the paragraph opening statement in the paragraph opening statement stage. Supplementary instructions mean that the system will provide additional information or explanations so that the user can more clearly understand the meaning and background of the full - field opening statement. This can include clarifying concepts, providing examples, or further describing related topics, etc. Encouragement means that the system will give positive feedback and encouragement to the user to stimulate the user's interest and motivation to continue participating in the conversation. This can include affirming the user's efforts, expressing respect for the user's views, or encouraging the user to ask more questions and ideas, etc.
[0048] In a further embodiment, step S30 further includes the following steps: If the requirements of the paragraph prompt words are not met, further determine whether the conversation related to the paragraph opening remarks has reached the maximum number of turns; if the maximum number of turns has not been reached, give a supplementary explanation or encouragement to the user; if the maximum number of turns has been reached, enter the step of determining whether there are still mandatory paragraphs or conditional paragraphs that meet the trigger conditions.
[0049] In a further embodiment, step S40 further includes: determining whether the conversation related to the end opening remarks has reached the maximum number of turns; if the conversation related to the end opening remarks has not reached the maximum number of turns, give a supplementary explanation or encouragement to the user, and then enter the step of obtaining the third user reply in this end opening stage; if the conversation related to the end opening remarks has reached the maximum number of turns, enter the step of providing a closing statement.
[0050] In a further embodiment, step S50 specifically includes: analyzing and summarizing the user's intention, question, and emotional state to obtain a comprehensive understanding of the conversation result. Specifically, the specific implementation may include the following steps: performing text analysis on the user's input, including identifying keywords, phrases, grammatical structures, and semantic relationships, etc., to understand the user's intention and the content expressed; analyzing the user's emotional state, which can be inferred through emotional words, tones, emojis, etc. in the text, such as anger, happiness, sadness, etc.; combining the user's intention and emotional state, summarizing and generalizing the conversation result to obtain a comprehensive understanding. This can be presented to the user by generating natural language text or visual charts, etc.
[0051] In a further embodiment, before step S10, the method further includes: setting a preset conversation framework, which includes: a full - field opening remark, a paragraph opening remark, an end opening remark, and a closing statement; the opening remarks of the conversation framework can be dynamically replaced according to the user's personal information, which includes: storing the user's personal information in the database in advance; setting an opening - remark template in advance; obtaining the user's personal information from the database; replacing the obtained user personal information at the corresponding placeholder in the opening - remark template to generate a personalized opening remark; presenting the generated personalized opening remark to the user; the placeholder in the opening - remark template is used to indicate the user personal information that needs to be replaced.
[0052] In some embodiments, the dialogue background description is provided by the system role; the paragraph opening remarks and the ending opening remarks are provided by the assistant role; the closing remarks are provided by the assistant role to end the dialogue; the model summary requirement is proposed by the system role to guide the dialogue large model to conduct a dialogue summary. The technical solution has the following advantages: The system role and the assistant role each undertake different responsibilities, making the information provision and task execution in the dialogue process clearer and more explicit. The dialogue background description provided by the system role can provide the necessary context information for the dialogue large model, helping the model better understand the dialogue content and background. The paragraph opening remarks and the ending opening remarks provided by the assistant role can play a role in guiding the dialogue, making the dialogue more natural and fluent. The closing remarks provided by the assistant role can provide a clear ending signal for the dialogue, making the end of the dialogue clearer and more explicit. The model summary requirement proposed by the system role can guide the dialogue large model to conduct a dialogue summary, helping to extract the key information and points in the dialogue and providing a more comprehensive and accurate dialogue summary for the user.
[0053] In a further embodiment, the method further includes the following steps: During the dialogue process, use a preset prompt word to wrap the user's reply and explain it to the dialogue large model; Dynamically adjust the content of the prompt word according to the progress of the dialogue and the user's reply; When the dialogue large model gives a corresponding answer and enters the next round of dialogue, delete the prompt word of the previous round of dialogue and use a new prompt word to wrap the new user's reply. The advantages of this technical solution are as follows: The method has the following advantages: Using the prompt word can provide targeted guidance for the user's reply, making the dialogue more focused and efficient. The prompt word can provide additional information about the progress and content of the dialogue to the dialogue large model, helping the model better understand the dialogue context. By dynamically adjusting the content of the prompt word, the method can adapt to different stages and requirements of the dialogue, making the dialogue more natural and fluent. Deleting the prompt word of the previous round of dialogue and using a new prompt word for the new user's reply can avoid the confusion and accumulation of prompt words in the dialogue, ensuring the clarity and coherence of the dialogue. Through reasonable use and adjustment of the prompt word, it is possible to guide the user to provide more valuable information, thereby improving the efficiency and accuracy of the dialogue.
[0054] In a further embodiment, the preset prompt word includes: user information, dialogue topic, current dialogue stage, address to the user, supplement and prompt for the large model information in the current dialogue stage, analysis method and judgment criteria for the user's reply, encouragement to the user when the user's reply does not meet the judgment criteria, and structured reply restrictions that constrain the return form of the large model; The judgment criteria include: requirements for the full - field opening - remarks prompt word, requirements for the paragraph prompt word, or requirements for the ending - opening - remarks prompt word.
[0055] Specifically, the analysis method for the user's response content means that the system will adopt specific methods or criteria to analyze the user's response content. This analysis can help the system more accurately understand the user's intentions and needs, so as to make more appropriate responses. Specifically, the analysis methods may include semantic understanding of the conversation content, sentiment analysis, keyword extraction, etc., to judge whether the user's response is relevant to the conversation topic and whether it meets the preset judgment criteria. In this way, the system can more effectively guide the progress of the conversation and improve the user experience.
[0056] Figure 3 is a functional block diagram of a dialogue control system based on an artificial intelligence dialogue large model according to an embodiment of the present invention, as Figure 3 shown, the system 200 includes:
[0057] A dialogue background setting module 210, configured to provide a dialogue background description for the dialogue large model to set the scene of the dialogue;
[0058] A full - field opening speech execution module 220, configured to execute the process of the full - field opening speech stage, including providing the full - field opening speech, obtaining the first user response corresponding to the full - field opening speech, putting the full - field opening speech - related dialogue into the full - field opening speech prompt word of the user response, judging whether the first user response has met the requirements of the full - field opening speech prompt word, and triggering the paragraph opening speech execution module when it is determined that the first user response has met the requirements of the full - field opening speech prompt word;
[0059] A paragraph opening speech execution module 230, configured to execute the process of the paragraph opening speech stage, including providing the paragraph opening speech, obtaining the second user response corresponding to the paragraph opening speech, putting the paragraph opening speech - related dialogue into the paragraph prompt word of the user response, judging whether the second user response has met the requirements of the paragraph prompt word, and further judging whether there are still mandatory paragraphs or conditional paragraphs that meet the triggering conditions when it is determined that the second user response has met the requirements of the paragraph prompt word. If the judgment result is negative, trigger the end - of - opening - speech execution module;
[0060] An end - of - opening - speech execution module 240, configured to execute the process of the end - of - opening - speech stage, including providing the end - of - opening - speech, obtaining the third user response corresponding to the end - of - opening - speech, putting the end - of - opening - speech - related dialogue into the end - of - opening - speech prompt word of the user response, judging whether the third user response has met the requirements of the end - of - opening - speech prompt word, and providing the closing remarks when the third user response has met the requirements of the end - of - opening - speech prompt word;
[0061] A summary generation module 250, configured to put forward the large - model summary requirement and generate a dialogue summary according to the large - model summary requirement.
[0062] In some embodiments, the full - field opening speech execution module 220 further includes:
[0063] A round judgment sub-module, configured to further judge whether the conversation related to the full-field opening remarks reaches the maximum number of rounds when it is determined that the user's reply does not meet the requirements of the full-field opening remarks prompt word;
[0064] A supplementary explanation or encouragement sub-module, configured to give a supplementary explanation or encouragement to the user when the maximum number of rounds is not reached;
[0065] A paragraph opening remarks trigger sub-module, configured to trigger the step of providing paragraph opening remarks in the paragraph opening remarks execution module when the maximum number of rounds is reached.
[0066] In some embodiments, the paragraph opening remarks execution module 230 further includes:
[0067] A round judgment sub-module, configured to further judge whether the conversation related to the paragraph opening remarks reaches the maximum number of rounds when the requirements of the paragraph prompt word are not met;
[0068] A supplementary explanation or encouragement sub-module, configured to give a supplementary explanation or encouragement to the user when the maximum number of rounds is not reached;
[0069] A condition judgment sub-module, configured to trigger the step of judging whether there is still a necessary paragraph or whether there is a conditional paragraph that meets the trigger condition when the maximum number of rounds is reached.
[0070] In some embodiments, the ending opening remarks execution module 240 further includes:
[0071] A round judgment sub-module, configured to judge whether the conversation related to the ending opening remarks reaches the maximum number of rounds;
[0072] A supplementary explanation or encouragement sub-module, configured to give a supplementary explanation or encouragement to the user when the conversation related to the ending opening remarks does not reach the maximum number of rounds;
[0073] An ending remarks providing sub-module, configured to provide ending remarks when the conversation related to the ending opening remarks has reached the maximum number of rounds.
[0074] In some embodiments, the summary generation module specifically includes: an analysis and summary sub-module, configured to analyze and summarize the user's intention, question and emotional state.
[0075] In some embodiments, the system further includes: a preset dialogue framework setting module, configured to set a preset dialogue framework, and the preset dialogue framework includes: full-field opening remarks, paragraph opening remarks, ending opening remarks and ending remarks; the module further includes: a user information storage sub-module, an opening remarks template setting sub-module, a user personal information acquisition sub-module, a personalized opening remarks generation sub-module and a personalized opening remarks presentation sub-module.
[0076] In some embodiments, the dialogue background description is provided by the system role; the paragraph opening and the ending opening are provided by the assistant role; the closing remarks are provided by the assistant role; and the model summary requirement is proposed by the system role.
[0077] In some embodiments, the system further includes: a prompt word wrapping and description module, configured to wrap the user's reply with preset prompt words during the dialogue and explain it to the dialogue large model; the module further includes a dynamic adjustment sub-module and a deletion and addition sub-module.
[0078] In some embodiments, the preset prompt words include user information, dialogue topic, current dialogue stage, address to the user, supplement and prompt of large model information in the current dialogue stage, analysis method and judgment criteria for the user's reply, encouragement to the user when the user's reply fails to meet the judgment criteria, and a structured reply restriction that constrains the return form of the large model; the judgment criteria include the requirements for the full-field opening prompt words, paragraph prompt words, or ending opening prompt words.
[0079] The above technical solutions are described in more detail below.
[0080] This mechanism mimics the scenario of people communicating with each other to collect information or requirements. Generally, an expert faces a user and conducts a prepared guided dialogue to collect the user's information or requirements. For example: a mental health expert interviews a user to understand the user's mental health status; a bank customer manager has a dialogue with a user to understand the business the user needs to handle and the goals; a sales customer service communicates with a user by phone to promote products and explain product details.
[0081] The above scenario can be abstracted into three parts:
[0082] The first part is the full-field opening, which is preset or prepared in advance by the expert, including: the identity or role of the expert, what can be done or achieved for the user, a general description of what the expert is going to talk about next, a detailed description of the subsequent communication or dialogue method, and the words to attract the user to continue the communication and dialogue.
[0083] After the expert completes the description of the first part, the user will raise his own questions or indicate that he already understands. If questions are raised, the expert will answer the user's questions or indicate that the subsequent dialogue will answer the user's questions. If the user indicates that he already understands, he will directly enter the second part. The dialogues related to the opening after the full-field opening are called full-field opening related dialogues.
[0084] The second part generally consists of multiple paragraphs with similar structures. The main objective is for the expert to introduce each of the key points, themes, or stages to be communicated in detail, while the user expresses their doubts and the expert explains them. Each paragraph here can be broken down into two parts: the paragraph opening and the conversation related to the paragraph opening. There are two types of paragraphs: mandatory paragraphs, which are paragraphs that must be communicated under any circumstances; conditional paragraphs, which are paragraphs that are triggered or not triggered due to the user's different responses in other paragraphs (for example, they are triggered by default, but a special response from the user will cause them not to be triggered, or they are not triggered by default, but a special response from the user will cause them to be triggered). There is an order among different paragraphs because communication generally needs to maintain logic, but in some special scenarios, the order between paragraphs may also be random. After the second part is completed, it enters the third part.
[0085] The third part mainly involves the expert summarizing the conversation, confirming the user's needs or information, or conducting a polite closing communication using pre-set phrases. The conversation in the third part can be broken down into an ending opening, the conversation related to the ending opening, and an ending statement.
[0086] Here is an example in a sales scenario as follows:
[0087] Part 1:
[0088] Expert: Hello, miss. I'm glad you answered our call. Our bank is currently promoting credit cards with many benefits. As our high-quality customer, please allow me to introduce our offers to you in detail. (Full-scenario opening statement)
[0089] User: Which bank are you? (Conversation related to the full-scenario opening statement)
[0090] Expert: [Bank name]. (Conversation related to the full-scenario opening statement)
[0091] User: Okay. (Conversation related to the full-scenario opening statement)
[0092] Part 2:
[0093] Paragraph 1:
[0094] Expert: Recently, the procedures for applying for our bank's credit card are simple and can be operated online, making it very convenient. (Paragraph 1 opening statement)
[0095] User: Can it be applied for online? (Conversation related to the Paragraph 1 opening statement)
[0096] Expert: Yes, you can open the web page on your mobile phone. (Conversation related to the Paragraph 1 opening statement)
[0097] User: How exactly is the operation? (Conversation related to the Paragraph 1 opening statement)
[0098] Expert: Open XXX with your mobile phone. (Relevant conversation in the opening paragraph 1)
[0099] Paragraph 2:
[0100] Expert: In addition to the convenience of handling, our bank has recently cooperated with a large number of shopping malls. You can enjoy a 15% discount when using our bank's credit card for consumption in the shopping malls. (Opening of paragraph 2)
[0101] User: Which shopping malls are there specifically? (Relevant conversation in the opening of paragraph 2)
[0102] Expert: Including XX Shopping Mall near you, etc. (Relevant conversation in the opening of paragraph 2)
[0103] The third part:
[0104] Expert: Are you interested in applying for our bank's credit card? (End of the opening)
[0105] User: No, I'm sorry. (Relevant conversation at the end of the opening)
[0106] Expert: Thank you for answering the call. Wish you a happy life. (Closing words)
[0107] It can be found that in all parts, the expert guides the topic. It all starts with an opening paragraph for explanation or clarification. After the opening, the user starts to have questions related to the opening topic, and the expert answers, that is, this part of the relevant conversation.
[0108] The above process is a most commonly used mode in human daily life, but it is difficult for generative large models to complete and control. Even if a detailed process description is given to the large model at the beginning of the conversation, the large model will still show the phenomenon of forgetting during the continuous conversation process. At the same time, when there are many paragraphs and logical relationships in the second part, it is difficult for the large model to remember and conduct effective conversations.
[0109] Therefore, the preset chained Prompt active consultation conversation process control mechanism proposed in the embodiments of the present invention aims to use a specific framework to guide the large model, so that the large model can play the role of the expert in the above conversation process.
[0110] First, before specifically describing the mechanism, several concepts should be confirmed. First is the role. In current mainstream generative conversation large models, generally there are three roles: the system role (system, explaining the background or putting forward requirements to the AI), the assistant role AI (assistant), and the user role (user).
[0111] In the mechanism of the embodiments of the present invention, the user's words are not directly sent to the dialogue large model, but are sent after being wrapped with a prompt. Here, the prompt will elaborate on the progress, theme of the current dialogue, and the expected response of the large model to ensure that the large model can give a correct reply. For example:
[0112] User's reply: How exactly is it operated?
[0113] prompt: The user's reply is ---{reply}---. The current topic being discussed with the user is the way to apply for a credit card. Please make a corresponding explanation for the user's question. Steps to apply for a credit card: Need to open the XX website, enter XX, and then click XX to apply for a credit card.
[0114] So in this example, the content of the user actually sent to the large model is:
[0115] user: The user's reply is ---How exactly is it operated?---. The current topic being discussed with the user is the way to apply for a credit card. Please make a corresponding explanation for the user's question. Steps to apply for a credit card: Need to open the XX website, enter XX, and then click XX to apply for a credit card.
[0116] There is another implementation method, that is, using the system role (system) to prompt the prompt, because the system will use the system role as the main prompter. For example:
[0117] User's reply: How exactly is it operated?
[0118] prompt: The current topic being discussed with the user is the way to apply for a credit card. Please make a corresponding explanation for the user's question according to the next sentence of the user (user). Steps to apply for a credit card: Need to open the XX website, enter XX, and then click XX to apply for a credit card.
[0119] So in this example, the content actually sent to the large model is:
[0120] system: The current topic being discussed with the user is the way to apply for a credit card. Please make a corresponding explanation for the user's question according to the next sentence of the user (user). Steps to apply for a credit card: Need to open the XX website, enter XX, and then click XX to apply for a credit card.
[0121] user: How exactly is it operated?
[0122] In the embodiments of the present invention, a preset prompt will be used to wrap the user's answer and explain it to the large model to ensure that the large model has an appropriate response. The prompt here includes: user information, conversation topic, current conversation stage, address for the user, supplement and hint for the large model information at the current stage, analysis method and judgment criteria for the user's answer content, and encouragement method for the user when the user's answer fails to meet the judgment criteria.
[0123] Here, it is necessary to further explain "the analysis method and judgment criteria for the user's answer content". For example, in the second part, in order for the large model to determine that the conversation in this paragraph has been completed, it needs to use this content to judge the user's conversation and determine that the conversation goal in the current paragraph has been completed and the next stage can be entered.
[0124] After the large model gives the corresponding answer, when entering the next round of conversation, the prompt of the previous round of conversation needs to be deleted, and the new user's answer is wrapped with the prompt. For example, the previous example:
[0125] user: The user's reply is --- Specifically, how to operate? ---. The current topic discussed with the user is the way to apply for a credit card. Please make a corresponding explanation for the user's question. Steps to apply for a credit card: You need to open the XX website, enter XX, and then click XX to apply for a credit card.
[0126] Large model reply:
[0127] assistant: Open XXX with your mobile phone.
[0128] When generating the next conversation, this conversation still needs to be put into the generation, but the user's content needs to remove the prompt. When this conversation is input into the model, it will become:
[0129] user: Specifically, how to operate?
[0130] assistant: Open XXX with your mobile phone.
[0131] In addition, the embodiments of the present invention also need to require the return form of the large model in the prompt. Generally, by default, the return of the large model is a paragraph of text. However, when trying to obtain multiple structured information, such a return is very inconvenient. For example, in this embodiment, it is required that the large model complete the following tasks based on the user's reply: determine the intention to apply for a credit card, give a reply to the user, and use sentiment analysis to detect the hidden sentiment in the user's conversation. The returns of these three tasks are all different. The first return is a boolean value, the second return is a paragraph of text, and the third return is an option, selecting one from multiple human emotions. If this embodiment directly states the three requirements without restricting and explaining the reply method of the large model, the reply of the large model may be like this:
[0132] "The user has no intention of applying for a credit card. My reply is: Thank you for answering, goodbye. The user's emotion is calm."
[0133] When getting such a result, it is undoubtedly difficult to use. Because it is necessary to restrict the return of the large model in the prompt. One way adopted here is the json format. The latest interface of chatgpt has been implemented, and it is possible to ensure that the return of the large model is in json format by setting the format when calling. However, the mainstream large models in China do not have this parameter configuration. Therefore, it is necessary to make a detailed description in the prompt to let the large model return in the form required by this embodiment. For example:
[0134] prompt: The user's reply is ---{reply}---. The current topic of discussion with the user is the method of applying for a credit card. Steps to apply for a credit card: It is necessary to open the XX website, enter XX, and then click XX to apply for a credit card.
[0135] You need to reply in the following JSON form:
[0136]
[0137] Through such a form, a standardized and structured reply can be obtained, which is more convenient for further exploring and using the capabilities of the large model.
[0138] The embodiments of the present invention have the ability to replace content. For example, the opening statement contains a salutation to the user. The part in the opening statement where the user's salutation needs to be placed can be replaced with the user name stored in the database. For example:
[0139] Opening: Hello, {user_name}. I'm glad you answered our call. Our bank's credit cards are currently being promoted with many benefits. As our high-quality customer, please allow me to introduce these benefits to you in detail.
[0140] After replacement:
[0141] Opening: Hello, Miss Li. I'm glad you answered our call. Our bank's credit cards are currently being promoted with many benefits. As our high-quality customer, please allow me to introduce these benefits to you in detail.
[0142] Except for the name, all information targeted at the user can be filled in real-time, which can ensure the pertinence to the user. The information here includes but is not limited to: name, gender, age, things done, hobbies.
[0143] After understanding all the above basic capabilities and dialogue abstraction capabilities, the design of the embodiments of the present invention will be described.
[0144] The embodiments of the present invention use a framework to simulate this process and will explain the implementation methods one by one starting from the first part. As Figure 2 shown, it includes the following steps:
[0145] Step S10: First, before the first part, the large model needs to be informed of the background and relevant information of the entire conversation. The information here is given by the system role (system). In this embodiment, this part is called the conversation background description (system_begin_prompt). For example:
[0146] system_begin_prompt: You are now a credit card sales manager and need to have a one-on-one conversation with the customer, explain the welfare benefits, application process, etc. of the current credit cards of our bank to the user, and confirm the user's intention to apply.
[0147] Step S20: Execute the process of the first part.
[0148] The process of the first part includes: the full-field opening remarks and the conversations related to the full-field opening remarks. The full-field opening remarks are called assistant_begin_prologue, and the prompt words of all users in the conversations related to the full-field opening remarks are called user_begin_prologue_prompt. Step 20 specifically includes the following steps S21 to S25:
[0149] Step S21: The assistant role (assistant) presents the full-field opening remarks (assistant_begin_prologue).
[0150] Step S22: Obtain the user's reply.
[0151] Step S23: Put the full - scene opening - related dialogue (prompt reply) into the user's full - scene opening prompt (user_begin_prologue_prompt).
[0152] Step S24: Determine whether the user's reply has met the requirements of the prompt. If it has not met the requirements of the prompt, execute Step S25; if it has met the requirements of the prompt, execute Step S31.
[0153] Step S25: If it has not met the requirements of the prompt, further determine whether the full - scene opening - related dialogue has reached the maximum number of rounds (begin_prologue_max_round). If it has not reached the maximum number of rounds, execute Step S26. If it has reached the maximum number of rounds, execute Step S31.
[0154] Step S26: When it has not reached the maximum number of rounds, give supplementary explanations or encouragement to the user. After Step S26, enter Step S22.
[0155] Step S30: Execute the process of the second part. It includes the following steps:
[0156] Step S31: The assistant role generates the section opening (assistant_section_prologue).
[0157] Step S32: Obtain the user's reply.
[0158] Step S33: Put the section - opening - related dialogue (prompt reply) into the user's section prompt (user_section_prologue_prompt).
[0159] Step S34: Determine whether the user's reply has met the requirements of the section prompt. If it has not met the requirements of the section prompt, execute Step S36; if it has met the requirements of the section prompt, execute Step S35.
[0160] Step S35: Determine whether there are still necessary sections or conditional sections that meet the conditions. If the judgment result is no, execute Step S41.
[0161] Step S36: Determine whether the conversation related to the paragraph prologue has reached the maximum number of rounds (section_prologue_max_round). If it has not reached the maximum number of rounds, execute Step S37; if it has reached the maximum number of rounds, execute Step S35.
[0162] Step S36: Give supplementary explanations or encouragement to the user, and then proceed to Step S32.
[0163] Step S40: Execute the third part of the process, which specifically includes the following steps:
[0164] S41: The assistant role (assistant) provides or generates an end prologue (assistant_end_prologue).
[0165] S42: Obtain the user's reply (reply).
[0166] S43: Put the conversation related to the end prologue (prompt reply) into the end prologue prompt for the user's reply (user_end_prologue_prompt).
[0167] S44: Determine whether the user's reply (reply) has met the requirements of the end prologue prompt.
[0168] S45: When the user's reply has met the requirements of the end prologue prompt, the assistant role (assistant) provides or generates an ending (assistant_end).
[0169] S46: Determine whether the conversation related to the end prologue has reached the maximum number of rounds (end_prologue_max_round).
[0170] S47: If the conversation related to the end prologue has not reached the maximum number of rounds, give supplementary explanations or encouragement to the user, and then proceed to Step S42.
[0171] S45: If the conversation related to the end prologue has reached the maximum number of rounds, proceed to Step S45 where the assistant role (assistant) provides or generates an ending (assistant_end).
[0172] S50: The system role (system) generates or proposes a model summary requirement (system_end_prompt).
[0173] The following is a specific explanation:
[0174] When having a conversation with the user, the first sentence the user hears is "assistant_begin_prologue", and then the user makes a reply, which is referred to as "reply" in this embodiment. At this time, the large model needs to be called for the first time. When calling, the background description before the conversation is combined. The information input to the large model in this embodiment is as follows:
[0175] system:system_begin_prompt
[0176] assistant:assistant_begin_prologue
[0177] user:user_begin_prologue_prompt[reply]
[0178] Here, user_begin_prologue_prompt[reply] is an explanation that the user's reply (reply) needs to be put into user_begin_prologue_prompt.
[0179] If there is a relevant conversation here, the subsequent conversation in the first part should be as follows:
[0180] system:system_begin_prompt
[0181] assistant:assistant_begin_prologue
[0182] user:reply
[0183] assistant:ai_reply
[0184] user:user_begin_prologue_prompt[reply]
[0185] In the user_begin_prologue_prompt, a criterion for the end of the first part needs to be given so that the large model can determine whether to terminate the current conversation and enter the second part. However, in actual use, due to possible mistakes in the judgment of the large model or the continuous conversation of the user not meeting the requirements, the relevant conversation may continue indefinitely. Therefore, in this embodiment, a maximum number of rounds (max_round) needs to be set. When the number of rounds of the relevant conversation for the full-field opening remarks reaches the maximum number of rounds, it is forced to enter the second part. Similar problems exist in all subsequent relevant conversations. Therefore, a maximum number of rounds needs to be set for each relevant conversation. To distinguish, the maximum number of rounds of the relevant conversation for the full-field opening remarks in this embodiment is named begin_prologue_max_round.
[0186] Each paragraph in the second part is similar, including: the paragraph opening remarks assistant_section_prologue and the relevant conversation for the paragraph opening remarks user_section_prologue_prompt, and also includes a maximum number of rounds control section_prologue_max_round.
[0187] The third part is divided into the ending opening remarks assistant_end_prologue, the relevant conversation for the ending opening remarks user_end_prologue_prompt, the number of rounds of the relevant conversation for the ending opening remarks end_prologue_max_round, and the closing remarks assistant_end. The special feature of the third part is that in this embodiment, it is required that after the conversation ends, the large model summarizes the conversation, such as giving the user's willingness or existing questions about applying for a credit card. Therefore, a requirement for the system role system_end_prompt will be added at the end in this embodiment.
[0188] For example:
[0189] The first part:
[0190] system:system_begin_prompt
[0191] assistant:assistant_begin_prologue
[0192] user:reply
[0193] assistant:ai_reply
[0194] user:reply
[0195] The second part:
[0196] Paragraph 1:
[0197] assistant:assistant_section_1_prologue
[0198] user:reply
[0199] assistant:ai_reply
[0200] Paragraph 2:
[0201] assistant:assistant_section_2_prologue
[0202] user:reply
[0203] assistant:ai_reply
[0204] Part Three:
[0205] assistant:assistant_end_prologue
[0206] user:reply
[0207] assistant:assistant_end
[0208] system:system_end_prompt
[0209] assistant:ai_reply
[0210] The final system role (system) enables the large model to summarize the conversation and other tasks, making better use of the capabilities of the large model.
[0211] The framework of this embodiment includes the following content that needs to be preset:
[0212] Before the conversation:
[0213] system_begin_prompt: Explanation of the conversation background (system).
[0214] Part One:
[0215] assistant_begin_prologue: Full-field opening remarks (assistant);
[0216] user_begin_prologue_prompt: Prompt words for the user's reply (user);
[0217] begin_prologue_max_round: The maximum number of rounds for the conversation related to the full - scene opening remarks.
[0218] The second part:
[0219] assistant_section_prologue: Paragraph opening remarks (assistant);
[0220] user_section_prologue_prompt: Prompt for the user's reply (user);
[0221] section_prologue_max_round: The maximum number of rounds for the conversation related to the paragraph opening remarks;
[0222] Required paragraph or conditional paragraph;
[0223] The order of paragraphs or preset conditions (in the form of triples).
[0224] The third part:
[0225] assistant_end_prologue: Ending opening remarks;
[0226] user_end_prologue_prompt: Prompt for the user's reply (user);
[0227] end_prologue_max_round: The maximum number of rounds for the conversation related to the ending opening remarks;
[0228] assistant_end: Closing remarks.
[0229] After the conversation:
[0230] system_end_prompt: Instructions and requirements for the model to summarize the conversation.
[0231] Here, this embodiment is illustrated with a simple example:
[0232] Before the conversation:
[0233] system_begin_prompt:
[0234] You are now a credit card sales manager and need to
[0235] Have a one - on - one conversation with the customer, explain the current welfare offers, application processes, etc. of our bank's credit cards to the user, and confirm the user's intention to apply.
[0236] The first part:
[0237] assistant_begin_prologue:
[0238] {user_name}, hello. I'm glad you answered our call. Our bank is currently promoting credit cards with many benefits. As our high-quality customer, please allow me to introduce our offers to you in detail.
[0239] user_begin_prologue_prompt:
[0240] The user's reply is ---{reply}---. Currently, the user indicates that we are promoting credit cards.
[0241] You need to reply in the following JSON format:
[0242]
[0243] begin_prologue_max_round:5
[0244] Part Two:
[0245] Paragraph 1:
[0246] assistant_section_prologue:
[0247] The procedures for applying for our bank's credit cards are simple recently. You can operate online, which is very convenient.
[0248] user_section_prologue_prompt:
[0249] The user's reply is ---{reply}---. Currently, the topic discussed with the user is the way to apply for a credit card. Steps to apply for a credit card: You need to open the XX website, enter XX, and then click XX to apply for a credit card.
[0250] You need to reply in the following JSON format:
[0251]
[0252] section_prologue_max_round:5
[0253] Required Paragraph
[0254] Paragraph 2:
[0255] assistant_section_prologue:
[0256] In addition to the convenience of application, our bank has recently cooperated with a large number of shopping malls. You can enjoy a 15% discount when using our credit card for consumption in the mall.
[0257] user_section_prologue_prompt:
[0258] The user's reply is ---{reply}---. The current topic of discussion with the user is that there is a discount for using the credit card in the mall. The shopping malls we cooperate with are XXX, XXX, XXX.
[0259] You need to reply in the following JSON format:
[0260]
[0261] section_prologue_max_round:5
[0262] Required paragraph
[0263] Paragraph 3:
[0264] assistant_section_prologue:
[0265] You can tell me your home address and I will provide you with the location information of the nearest credit card application outlet.
[0266] user_section_prologue_prompt:
[0267] The user's reply is ---{reply}---. The current topic of discussion with the user is the location of the offline outlets for applying for credit cards. Our outlets are XXX, XXX, XXX.
[0268] You need to reply in the following JSON format:
[0269]
[0270] section_prologue_max_round:5
[0271] Conditional paragraph when the user expresses that they cannot use online application.
[0272] The third part:
[0273] assistant_end_prologue:
[0274] Are you interested in applying for our bank's credit card?
[0275] user_end_prologue_prompt:
[0276] The user's reply is ---{reply}---. Currently, it is necessary to obtain the user's willingness to apply for a credit card.
[0277] You need to reply in the following JSON format:
[0278]
[0279] end_prologue_max_round: 5
[0280] assistant_end:
[0281] Thank you for answering the call. Wish you a happy life.
[0282] After the conversation:
[0283] system_end_prompt:
[0284] The conversation has ended. You need to reply in the following JSON format:
[0285]
[0286] Using this mechanism, after human experts preset the conversation framework, the large model can be made to play the role of an expert to communicate with users, greatly reducing human consumption, and the standardized conversation of the large model can also improve the conversation efficiency.
[0287] The beneficial technical effects of the technical solution of the embodiment of the present invention include:
[0288] Active conversation guidance: This system enables the artificial intelligence conversation large model to transform from a passive information provider to an active conversation guide, which has important value in occasions that require in-depth communication such as psychological counseling.
[0289] Adaptive multi-topic switching: By intelligently monitoring and analyzing user responses, the system can automatically switch between different preset topics or questions to achieve more targeted conversations.
[0290] For targeted conversations.
[0291] Combination of professionalism and flexibility: By introducing opening remarks and questions designed by professionals, this system not only ensures the professionalism of the conversation, but also, due to its adaptive and automatic switching characteristics, has a high degree of flexibility.
[0292] Expansion of application fields: Although this process is designed with psychological counseling as an example, its active conversation management characteristics make it potentially applicable to other occasions that require professional guidance and multi-round, multi-topic communication.
[0293] Generally speaking, the embodiments of the present invention provide a brand-new preset chain-type Prompt active consultation dialogue process control mechanism based on an artificial intelligence dialogue large model, which is expected to play an important role in the fields of psychological consultation, medical consultation, and other professional consultation fields.
[0294] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the above-mentioned division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of the present application. The specific working processes of the units and modules in the above system can refer to the corresponding processes in the foregoing method embodiments and will not be repeated here.
[0295] The embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements any one of the above methods.
[0296] When the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above-described embodiment methods of the present invention, it can also be completed by a computer program instructing relevant hardware. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-described various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. Of course, there are other ways of readable storage media, such as quantum memory, graphene memory, and so on. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice within the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0297] The present invention also provides an electronic device. The electronic device according to an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method provided by the present invention.
[0298] Reference is made below to Figure 4 , which shows a schematic structural diagram of a computer system 800 suitable for implementing the electronic device according to an embodiment of the present invention. Figure 4 The electronic device shown is only an example and should not impose any limitation on the functions and usage scope of the embodiments of the present invention.
[0299] As Figure 4 shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 802 or the program loaded from the storage section 808 into the random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the computer system 800 are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other through a bus 804. The input / output (I / O) interface 805 is also connected to the bus 804.
[0300] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as required. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is mounted on the drive 810 as required so that a computer program read therefrom is installed into the storage section 808 as required.
[0301] Specifically, according to the embodiments disclosed in the present invention, the process described in the main step diagram above can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program codes for performing the method shown in the main step diagram. In the above embodiment, the computer program can be downloaded and installed from a network through the communication section 809, and / or installed from the removable medium 811. When the computer program is executed by the central processing unit 801, the above functions defined in the system of the present invention are executed.
[0302] It should be noted that the computer-readable medium shown in the present invention can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of a computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, and this computer-readable medium can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0303] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram can represent a module, a program segment, or a part of code, and the above-mentioned module, program segment, or part of code contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0304] The units involved in the embodiments of the present invention can be implemented in software or in hardware. The described units can also be provided in a processor. For example, it can be described as: a processor includes a pre-response unit, a receiving unit, and a request unit. Among them, the names of these units do not constitute a limitation on the units themselves in some cases. For example, the pre-response unit can also be described as "the unit that provides the withdrawal amount and the withdrawal path to the request unit".
[0305] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims
1. A dialogue control method based on an artificial intelligence dialogue large model, characterized in that It includes the following steps: S10: Provide a conversation background description for the dialogue large model to set the scene of the conversation; S20: Execute the process of the full - session opening stage, which includes: providing a full - session opening statement; obtaining the first user response corresponding to the full - session opening statement; putting the conversation related to the full - session opening statement into the full - session opening prompt word of the user response; judging whether the first user response has met the requirements of the full - session opening prompt word; when it is determined that the first user response has met the requirements of the full - session opening prompt word, enter the paragraph opening stage; S30: Execute the process of the paragraph opening stage, which includes: providing a paragraph opening statement; obtaining the second user response corresponding to the paragraph opening statement; putting the conversation related to the paragraph opening statement into the paragraph prompt word of the user response; judging whether the second user response has met the requirements of the paragraph prompt word; when it is determined that the second user response has met the requirements of the paragraph prompt word, further judge whether there are still mandatory paragraphs or whether there are conditional paragraphs that meet the trigger conditions. If the judgment result is no, enter the ending opening stage; S40: Execute the process of the ending opening stage, which includes: providing an ending opening statement; obtaining the third user response corresponding to the ending opening statement; putting the conversation related to the ending opening statement into the ending opening prompt word of the user response; judging whether the third user response has met the requirements of the ending opening prompt word; when the third user response has met the requirements of the ending opening prompt word, provide a closing statement; S50: Put forward the large - model summary requirement and generate a conversation summary according to the large - model summary requirement; Among them, the judgment of whether the first user response has met the requirements of the full - session opening prompt word specifically includes: Compare the content of the first user response with the full - session opening prompt word to determine whether there is a correlation; Analyze whether the first user response contains keywords or phrases in the full - session opening prompt word; Judge whether the first user response is consistent with the context of the full - session opening statement; Evaluate whether the first user response completely responds to the requirements of the full - session opening prompt word; Through natural language processing technology, perform semantic analysis on the first user response to judge whether the first user response is semantically consistent with the full - session opening prompt word; Among them, the judgment of whether the second user response has met the requirements of the paragraph prompt word specifically includes: Compare the content relevance between the second user response and the paragraph prompt word; Analyze whether the second user response contains preset keywords or phrases; Verify whether the context of the second user response is consistent with the theme, emotion or intention of the paragraph opening statement; Through natural language processing technology, perform semantic analysis on the second user response to judge whether the second user response meets the semantic requirements of the paragraph prompt word; Analyze the field values returned in a structured manner in the second user response and verify whether the field values meet the numerical range predefined in the paragraph prompt word; Among them, the judgment of whether the third user response has met the requirements of the ending opening prompt word specifically includes: Analyze the intention identification field returned in a structured manner in the third user response and judge whether it is a preset positive value; Parse the emotion identification field returned in a structured manner in the third user reply, and verify whether it is within the range of non-negative emotions; Perform semantic analysis on the third user reply through natural language processing technology to determine whether the third user reply completely responds to the requirements of the end opening prompt word.
2. The method according to claim 1, wherein Step S20 further includes: When it is determined that the user's reply does not meet the requirements of the full-field opening prompt word, further determine whether the full-field opening-related conversation has reached the maximum number of rounds; If the maximum number of rounds has not been reached, give supplementary explanations or encouragement to the user; If the maximum number of rounds has been reached, enter the step of providing a paragraph opening in the paragraph opening stage.
3. The method according to claim 1, wherein Step S30 further includes: When the requirements of the paragraph prompt word are not met, further determine whether the paragraph opening-related conversation has reached the maximum number of rounds; If the maximum number of rounds has not been reached, give supplementary explanations or encouragement to the user; If the maximum number of rounds has been reached, enter the step of determining whether there are still mandatory paragraphs or conditional paragraphs that meet the trigger conditions.
4. The method according to claim 1, wherein Step S40 further includes: Determine whether the end opening-related conversation has reached the maximum number of rounds; If the end opening-related conversation has not reached the maximum number of rounds, give supplementary explanations or encouragement to the user, and then enter the step of obtaining the third user reply in this end opening stage; If the end opening-related conversation has reached the maximum number of rounds, enter the step of providing a closing statement.
5. The method according to claim 1, characterized in that, Step S50 specifically includes: Analyze and summarize the user's intentions, questions, and emotional states to obtain a comprehensive understanding of the conversation result.
6. The method according to claim 1, wherein Before step S10, it further includes: Set a preset conversation framework, which includes: full-field opening, paragraph opening, end opening, and closing statement; the opening of the conversation framework can be dynamically replaced according to the user's personal information, which includes: storing the user's personal information in the database in advance; setting an opening template in advance; obtaining the user's personal information from the database; replacing the obtained user personal information at the corresponding placeholder in the opening template to generate a personalized opening; presenting the generated personalized opening to the user; the placeholder in the opening template is used to indicate the user personal information that needs to be replaced.
7. The method according to claim 1, wherein The conversation background description is provided by the system role; The paragraph opening and the end opening are provided by the assistant role; The closing statement is provided by the assistant role and is used to end the conversation; The model summary requirement is proposed by the system role and is used to guide the conversation large model to summarize the conversation.
8. The method according to claim 1, wherein The method further includes: During the conversation, use the preset prompt word to package the user's reply and explain it to the conversation large model; dynamically adjust the content of the prompt word according to the progress of the conversation and the user's reply; when the conversation large model gives the corresponding answer and enters the next round of conversation, delete the prompt word of the previous round of conversation and use the new prompt word to package the new user reply.
9. The method according to claim 8, wherein The preset prompt words include: user information, conversation topic, current conversation stage, address to the user, supplement and prompt for the large model information in the current conversation stage, analysis method and judgment criteria for the user's reply, encouragement to the user when the user's reply fails to meet the judgment criteria, and structured reply restrictions that constrain the return form of the large model; the judgment criteria include: requirements for the full - session opening prompt words, requirements for the paragraph prompt words, or requirements for the end - opening prompt words.
10. A dialogue control system based on an artificial intelligence dialogue large model, characterized in that, The system includes: A conversation background setting module, which is used to provide a conversation background description for the conversation large model to set the conversation scene; A full - session opening execution module, which is used to execute the process of the full - session opening stage, including providing the full - session opening, obtaining the first user reply corresponding to the full - session opening, putting the full - session opening related conversation into the full - session opening prompt words of the user reply, judging whether the first user reply has met the requirements of the full - session opening prompt words, and triggering the paragraph opening execution module when it is determined that the first user reply has met the requirements of the full - session opening prompt words; A paragraph opening execution module, which is used to execute the process of the paragraph opening stage, including providing the paragraph opening, obtaining the second user reply corresponding to the paragraph opening, putting the paragraph opening related conversation into the paragraph prompt words of the user reply, judging whether the second user reply has met the requirements of the paragraph prompt words, and further judging whether there are still mandatory paragraphs or conditional paragraphs that meet the triggering conditions when it is determined that the second user reply has met the requirements of the paragraph prompt words. If the judgment result is negative, it triggers the end - opening execution module; An end - opening execution module, which is used to execute the process of the end - opening stage, including providing the end - opening, obtaining the third user reply corresponding to the end - opening, putting the end - opening related conversation into the end - opening prompt words of the user reply, judging whether the third user reply has met the requirements of the end - opening prompt words, and providing a closing statement when the third user reply has met the requirements of the end - opening prompt words; A summary generation module, which is used to propose large model summary requirements and generate a conversation summary according to the large model summary requirements; Among them, the judgment of whether the first user reply has met the requirements of the full - session opening prompt words specifically includes: Comparing the content of the first user reply with the full - session opening prompt words to determine whether there is a correlation; Analyzing whether the first user reply contains keywords or phrases in the full - session opening prompt words; Judging whether the first user reply is consistent with the context of the full - session opening; Evaluating whether the first user reply completely responds to the requirements of the full - session opening prompt words; Through natural language processing technology, performing semantic analysis on the first user reply to judge whether the first user reply is semantically consistent with the full - session opening prompt words; Among them, the judgment of whether the second user reply has met the requirements of the paragraph prompt words specifically includes: Comparing the content relevance between the second user reply and the paragraph prompt words; Analyzing whether the second user reply contains preset keywords or phrases; Verify whether the context of the second user's reply is consistent with the theme, sentiment, or intention of the paragraph opening; Perform semantic analysis on the second user's reply through natural language processing technology to determine whether the second user's reply meets the semantic requirements of the paragraph prompt; Parse the field values returned in a structured manner in the second user's reply, and verify whether the field values meet the numerical range predefined in the paragraph prompt; Among them, the judgment on whether the third user's reply has met the requirements of the ending opening prompt specifically includes: Parse the intention identification field returned in a structured manner in the third user's reply, and determine whether it is a preset positive value; Parse the emotion identification field returned in a structured manner in the third user's reply, and verify whether it is within the range of non-negative emotions; Perform semantic analysis on the third user's reply through natural language processing technology to determine whether the third user's reply completely responds to the requirements of the ending opening prompt.
Citation Information
Patent Citations
Electric power marketing client communication system
CN110769124A
Dialogue method, dialogue device and intelligent equipment
CN114756646A