Conversation content generation method and device, electronic equipment and storage medium

By dynamically adjusting the intensity of illusion suppression and assessing the risk of candidate dialogue responses in multi-turn dialogues, the hallucination problem of model-generated dialogue content is solved, improving the flexibility and accuracy of dialogue content and reducing the risk of hallucination while meeting business rules.

CN121833905APending Publication Date: 2026-04-10CHINA UNICOM SMART CONNECTION TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-15
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing technologies may suffer from illusion problems in model-generated dialogue content. Strict constraints lead to unnaturalness and poor flexibility, while insufficient constraints result in process loss of control, reducing the accuracy and reliability of generated dialogue content.

Method used

During the multi-round dialogue, by determining the dialogue state and the strength of hallucination suppression, and combining the business rule base and the dialogue evidence base, the strength of hallucination suppression is dynamically adjusted to assess the hallucination risk of candidate dialogue responses and generate the final dialogue content.

Benefits of technology

It improves the flexibility and accuracy of dialogue content, meets business rules, reduces illusion problems, and builds a mechanism for real-time extraction and consistency maintenance of dialogue-level evidence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121833905A_ABST
    Figure CN121833905A_ABST
Patent Text Reader

Abstract

The invention provides a dialogue content generation method and device, electronic equipment and a storage medium. The method comprises the following steps: in a multi-round dialogue process, in response to first dialogue content of a current round, determining a first dialogue state corresponding to the first dialogue content; according to the first dialogue state, determining a target business rule matched with the first dialogue content from a preset business rule base, and determining current illusion suppression intensity corresponding to the current round; generating a plurality of candidate dialogue responses of the first dialogue content, and determining an illusion risk score of each candidate dialogue response according to a current dialogue evidence library and the target business rule, the current dialogue evidence library being generated according to historical dialogue content before the current round; and according to the current illusion suppression intensity and the illusion risk score of each candidate dialogue response, based on the plurality of candidate dialogue responses, determining second dialogue content replied for the first dialogue content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to a method, apparatus, electronic device, and storage medium for generating dialogue content. Background Technology

[0002] In business scenarios, AI dialogue can be based on models. However, dialogue content generated by models may have illusion problems. In related technologies, strict constraints can be defined in advance to limit this. However, excessive constraints may lead to unnatural dialogue content with poor flexibility and adaptability. On the other hand, insufficient constraints may lead to problems such as process loss of control and failure to meet business requirements, thereby reducing the accuracy and reliability of the generated dialogue content. Summary of the Invention

[0003] This disclosure provides a method, apparatus, electronic device, and storage medium for generating dialogue content.

[0004] Firstly, this disclosure provides a method for generating dialogue content, which includes:

[0005] During a multi-round dialogue, in response to the content of the first dialogue in the current round, the first dialogue state corresponding to the first dialogue content is determined;

[0006] Based on the first dialogue state, a target business rule matching the content of the first dialogue is determined from a preset business rule base, and the current hallucination suppression intensity corresponding to the current round is determined;

[0007] Generate multiple candidate dialogue responses for the first dialogue content, and determine the illusion risk score for each candidate dialogue response based on the current dialogue evidence base and the target business rules. The current dialogue evidence base is generated based on the historical dialogue content before the current round.

[0008] Based on the current hallucination suppression intensity and the hallucination risk score of each candidate dialogue response, a second dialogue content is determined in response to the first dialogue content, based on multiple candidate dialogue responses.

[0009] Secondly, this disclosure provides a dialogue content generation apparatus, which includes:

[0010] The first determining module is used to determine the first dialogue state corresponding to the first dialogue content in response to the first dialogue content of the current round during a multi-round dialogue process.

[0011] The second determining module is used to determine, based on the first dialogue state, a target business rule matching the content of the first dialogue from a preset business rule base, and to determine the current hallucination suppression intensity corresponding to the current round.

[0012] The third determining module is used to generate multiple candidate dialogue responses of the first dialogue content, and determine the illusion risk score of each candidate dialogue response according to the current dialogue evidence library and the target business rules. The current dialogue evidence library is generated based on the historical dialogue content before the current round.

[0013] The fourth determining module is used to determine, based on the current hallucination suppression intensity and the hallucination risk score of each candidate dialogue response, a second dialogue content to respond to the first dialogue content.

[0014] Thirdly, this disclosure provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores one or more computer programs executable by the at least one processor, the one or more computer programs being executed by the at least one processor to enable the at least one processor to perform the above-described dialogue content generation method.

[0015] Fourthly, this disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the above-described dialogue content generation method.

[0016] The dialogue content generation method provided in this disclosure, in the process of multi-round dialogue, responds to the first dialogue content of the current round, determines the first dialogue state corresponding to the first dialogue content, thereby determining the current hallucination suppression strength of the current round and the matching target business rule. The hallucination suppression strength can be adaptively adjusted with each dialogue round, making it more flexible and accurate. Furthermore, based on the current hallucination suppression strength and the hallucination risk score of each candidate dialogue response, the final response second dialogue content can be determined. In this way, a real-time extraction and consistency maintenance mechanism for dialogue-level evidence can be constructed, which can effectively track historical dialogue content and realize multi-dimensional and interpretable hallucination suppression decisions, which can not only meet business rules but also reduce hallucination problems.

[0017] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0018] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the embodiments of the present disclosure to explain the disclosure and do not constitute a limitation thereof. The above and other features and advantages will become more apparent to those skilled in the art from the detailed description of exemplary embodiments with reference to the accompanying drawings, in which:

[0019] Figure 1 An application scenario diagram of the dialogue content generation method and apparatus provided in the embodiments of this disclosure;

[0020] Figure 2 A flowchart of a dialogue content generation method provided in this embodiment of the disclosure;

[0021] Figure 3 A flowchart of a dialogue content generation method provided in this embodiment of the disclosure;

[0022] Figure 4 A block diagram of a dialogue content generation apparatus provided in an embodiment of this disclosure;

[0023] Figure 5 This is a block diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation

[0024] To enable those skilled in the art to better understand the technical solutions of this disclosure, exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments of this disclosure to aid understanding. These should be considered merely exemplary. Therefore, those skilled 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 this disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0025] Where there is no conflict, the various embodiments of this disclosure and the features thereof in the embodiments may be combined with each other.

[0026] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.

[0027] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. As used herein, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of the stated feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded. Words such as “connected” or “linked” are not limited to physical or mechanical connections but can include electrical connections, whether direct or indirect.

[0028] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined herein.

[0029] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information in this technical solution comply with relevant laws and regulations and do not violate public order and good morals. The use of user data in this technical solution follows relevant national laws and regulations (e.g., the "Information Security Technology - Personal Information Security Specification"). For example, appropriate measures are taken for personal information access control; restrictions are imposed on the display of personal information; the purpose of using personal information does not exceed the scope of direct or reasonable association; and explicit identity targeting is eliminated when using personal information to avoid precisely identifying specific individuals.

[0030] In scenarios such as automotive customer service chatbots, AI dialogue can typically be conducted based on models. However, dialogue content generated based on models may suffer from illusion problems. Related technologies can limit this by pre-defining strict constraint rules. However, excessive constraints may lead to unnatural dialogue content with poor flexibility and adaptability. On the other hand, insufficient constraints may lead to problems such as process loss of control and failure to meet business requirements, thereby reducing the accuracy and reliability of the generated dialogue content.

[0031] The dialogue content generation method provided in this embodiment can adaptively adjust the hallucination suppression intensity with each round of dialogue, making it more flexible and accurate. It can solve the problems of excessive or insufficient constraints in related technologies. Furthermore, it can determine the hallucination risk score of candidate dialogue responses based on the dialogue evidence library of historical dialogue content. Then, based on the current hallucination suppression intensity and the hallucination risk score of each candidate dialogue response, it can determine the final response dialogue content. In this way, a real-time extraction and consistency maintenance mechanism for dialogue-level evidence can be constructed, which can effectively track historical dialogue content and realize multi-dimensional and interpretable hallucination suppression decisions. It can not only meet business rules but also reduce hallucination problems.

[0032] Figure 1 This diagram illustrates an application scenario of the dialogue content generation method and apparatus provided in the embodiments of this disclosure.

[0033] like Figure 1 As shown, the application scenario of this disclosure embodiment may include terminal device 101, network 103, and server 102. Network 103 is used as a medium to provide a communication link between terminal device 101 and server 102. Network 103 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.

[0034] Users can use terminal device 101 to interact with server 102 via network 103 to receive or send messages, etc. Various communication client applications can be installed on terminal device 101, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (for example only).

[0035] Terminal device 101 can be various electronic devices with a display screen and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0036] Server 102 can be a server that provides various services, such as a backend management server that supports websites browsed by users using terminal device 101 (for example only). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0037] It should be noted that the dialogue content generation method and apparatus provided in this disclosure embodiment can be executed by server 102. Accordingly, the dialogue content generation method and apparatus provided in this disclosure embodiment can be set in server 102. The dialogue content generation method and apparatus provided in this disclosure embodiment can also be executed by a server or server cluster that is different from server 102 and can communicate with terminal device 101 and / or server 102. Accordingly, the dialogue content generation method and apparatus provided in this disclosure embodiment can also be set in a server or server cluster that is different from server 102 and can communicate with terminal device 101 and / or server 102.

[0038] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0039] Figure 2 A flowchart illustrating a dialogue content generation method provided in an embodiment of this disclosure. (Refer to...) Figure 2 The method includes:

[0040] Step S210: In the process of multi-turn dialogue, in response to the first dialogue content of the current round, determine the first dialogue state corresponding to the first dialogue content.

[0041] The dialogue content generation method in this embodiment can be applied to any multi-turn dialogue scenario, such as customer service scenarios, question consultation scenarios, chat scenarios, etc., and is not limited in this embodiment.

[0042] In this embodiment of the disclosure, semantic analysis can be performed on the first dialogue content of the current round based on the model to extract the first dialogue state. The first dialogue state may include intent, dialogue topic, dialogue round, etc., and there are no restrictions on this.

[0043] Step S220: Based on the first dialogue state, determine the target business rule that matches the content of the first dialogue from the preset business rule library, and determine the current illusion suppression intensity corresponding to the current round.

[0044] In this embodiment, the business rule base can be pre-configured and can be configured by relevant personnel through a visual interface, making it faster and more flexible. This allows for quicker deployment and activation of business rules. The business rule base can be understood as a structured and executable collection of business rules formalized from standard operating procedures, compliance requirements, product rules, and communication constraints within the target business scenario. Each business rule can include metadata such as triggering conditions, constraint type, applicable scenarios, and violation penalty weights, which are not limited and can be set according to actual needs.

[0045] Illusion suppression strength can be used to characterize the strictness of constraints on the generated dialogue response content.

[0046] Step S230: Generate multiple candidate dialogue responses for the first dialogue content, and determine the illusion risk score for each candidate dialogue response based on the current dialogue evidence base and the target business rules. The current dialogue evidence base is generated based on the historical dialogue content before the current round.

[0047] In this embodiment of the disclosure, the dialogue evidence database extracts key factual information fragments from the dialogue content during real-time dialogue. These fragments may include the user's explicitly expressed intent (such as the intended car model or budget range), confirmed business elements (such as verified credit information), and commitments made by the model-generated response (such as interest rate commitments or discount validity periods).

[0048] Step S240: Based on the current hallucination suppression intensity and the hallucination risk score of each candidate dialogue response, determine the second dialogue content to respond to the first dialogue content based on multiple candidate dialogue responses.

[0049] In this embodiment of the disclosure, by constructing a hybrid constraint architecture that decouples business rules and dialogue response generation, a flexible balance between the standardization of dialogue response content and the freedom of generation is achieved. This allows for the dynamic determination of the matching target business rules and the current illusion suppression strength of the current round, as well as the determination of the illusion risk score of the candidate dialogue response. This, in turn, determines the second dialogue content to respond to the first dialogue content, thereby improving the reliability and accuracy of illusion suppression and enhancing the performance of the dialogue response.

[0050] The following is a detailed description of the dialogue content generation method according to embodiments of this disclosure. For ease of understanding, the establishment of the business rule base and dialogue evidence base in embodiments of this disclosure will be introduced first.

[0051] In one possible embodiment, the business rule base includes multiple business rules, each comprising multiple fields: business rule identifier (e.g., business rule 001), business scenario tag (e.g., solution confirmation business stage), triggering condition (e.g., user intent is to inquire about price and the current round is less than a set round value), constraint type (e.g., including mandatory type, warning type, process type), rule expression (e.g., MUST_MENTION: ['document requirement', 'credit inquiry authorization']), penalty weight (e.g., can be set according to different business rules), and effective time (e.g., effective from a certain date).

[0052] For example, for the "interest-free plan recommendation" business, three core business rules can be configured: 1) Mandatory type: Before recommending any financial plan, the customer's credit authorization must be confirmed (if not mentioned, the intensity of illusion suppression will be increased to threshold a); 2) Warning type: If the customer inquires about the interest rate, it must be limited to the "interest-free" category, and other interest rate products must not be introduced (if violated, the response will be rewritten); 3) Process type: After quoting, the time-sensitive clause of "interest-free quota is limited and application must be made on the same day" must be proactively informed (if omitted, it will be forcibly inserted in the next round).

[0053] In this embodiment of the disclosure, the decoupled architecture of business rules and related knowledge base allows for independent storage of the business rule base and knowledge base. This reduces the impact of the knowledge base on business rules and enables flexible configuration by relevant personnel through a natural language configuration interface. It has low requirements for professional expertise, and also enables rapid updates of business rules, supports testing of different business rule versions, reduces maintenance costs, and improves response speed.

[0054] In one possible embodiment, at the end of each round of dialogue, entity extraction can be performed on the current round of dialogue content based on the model, and joint extraction of entities and relations can be supported to continuously update the dialogue evidence base. The key evidence information of the evidence includes name, value, dialogue round, and confidence level. The confidence level is reduced according to a preset decay rule, which is related to the dialogue round and dialogue content. The initial value of the confidence level is determined when the evidence information is first obtained in the dialogue content.

[0055] For example, if the first dialogue content is: "My budget is about a million", the evidence information to be extracted can be: (Name = "Budget Limit", Value = "a million", Dialogue Rounds = "5", Confidence = "0.85"); if the second dialogue content generated by the content generation model is: "This plan has a maximum interest-free limit of b million", the evidence information to be extracted can be: (Name = "Interest-Free Limit", Value = "b million", Dialogue Rounds = "6", Confidence = "0.92", Content Generation Model's Commitment Dialogue = True).

[0056] The confidence level of the evidence information employs a dynamic decay mechanism. The initial value can be determined by the scoring of the extraction model. As the dialogue progresses, the confidence level of evidence information that has not been reconfirmed can decay by a certain percentage each round (for example, if the decay percentage is 10%, the confidence level of the budget evidence information extracted in round 6 will drop to 0.85×(0.9)^4≈0.56 by round 10). However, if the user actively reiterates the evidence information later, the confidence level can be reset to a set value (e.g., 0.9).

[0057] Furthermore, for example, in this embodiment of the disclosure, the evidence information in the dialogue evidence library is stored in the dialogue evidence pool (e.g., Redis cache), using the dialogue identifier as the key, supporting O(1) complexity queries. As another example, in this embodiment of the disclosure, it can also be stored in a blockchain network, with the extraction, updating, and referencing of each piece of evidence information recorded as on-chain transactions. Utilizing the immutability of the blockchain, strong traceability of commitments is achieved. Thus, storage through a blockchain system results in higher credibility of the evidence information, making it suitable for business scenarios with stringent compliance audit requirements.

[0058] In one possible embodiment, the step S220 above, which determines the target business rule matching the content of the first dialogue based on the first dialogue state from a preset business rule base, includes: performing semantic similarity calculation between the first dialogue state and multiple business rules included in the preset business rule base, and filtering out the top N candidate business rules with the highest similarity, where N is an integer greater than or equal to 1; and filtering out the target business rule that meets the triggering condition from the N candidate business rules based on the first dialogue state and the triggering condition corresponding to the candidate business rule.

[0059] In this embodiment, the first dialogue state and the business rules in the business rule base can be vectorized and encoded. Then, through cosine similarity calculation, a nearest neighbor search is performed from the business rule base to recall the top N candidate business rules with the highest semantic similarity. A lightweight rule engine is then used for filtering, retaining only the target business rules whose trigger condition logical expression is true. Furthermore, the rules can be sorted according to their constraint type, with mandatory types taking precedence over warning types, and warning types taking precedence over process types.

[0060] For example, in the 7th round of dialogue, if the customer's intention is to finalize the solution and the topic of the dialogue is payment details, then by retrieving and activating the target business rules 001 (credit authorization must be confirmed) and 002 (time-limited clauses must be disclosed), a structured list of compliance checkpoints can be output: [{Target Business Rule: "001", Check Type: "Exists", Check Target: "Credit Authorization", Penalty Weight: 0.9}, {Target Business Rule: "002", Check Type: "Exists", Check Target: "Time-Limited Clauses", Penalty Weight: 0.7}.

[0061] Thus, in this embodiment of the disclosure, the dynamic retrieval method based on dialogue state can quickly recall currently effective target business rules, with higher accuracy and efficiency.

[0062] In one possible embodiment, determining the current hallucination suppression intensity corresponding to the current round in step S220 above includes:

[0063] 1) Based on the content of the first dialogue, determine the current business stage corresponding to the current round, and determine the current basic illusion suppression intensity corresponding to the current business stage. Different business stages have a mapping relationship with the basic illusion suppression intensity, and the magnitude of the basic illusion suppression intensity is positively correlated with the degree of strictness of the business stage to the facts.

[0064] For example, the basic illusion suppression strength corresponding to the financial scheme confirmation business stage is close to 1, and the basic illusion suppression strength corresponding to the casual conversation business stage is close to 0, which can be set according to the actual situation and needs.

[0065] 2) Based on the confidence level of the evidence information included in the current dialogue evidence base and the current basic hallucination suppression strength, determine the current hallucination suppression strength corresponding to the current round. The values ​​of the current basic hallucination suppression strength and the current hallucination suppression strength are both greater than or equal to 0 and less than or equal to 1.

[0066] Confidence level measures the reliability of existing facts in the current conversation that can be used to support the answer.

[0067] For example, current hallucination suppression strength = ×Current baseline hallucination suppression strength+ × (1 - confidence level), where The lower the confidence level of the evidence information, the higher the current intensity of hallucination suppression, which is a preset weight value.

[0068] It should be noted that in this embodiment, the current hallucination suppression strength can be determined according to the above calculation rules, or it can be determined according to a reinforcement learning model. For example, the reinforcement learning model can be pre-trained, with the first dialogue state or the first dialogue content as input, and outputting the current hallucination suppression strength through semantic analysis, etc. During training, it can be based on a reward function, which can be determined as follows:

[0069] The system combines compliance achievement rewards, conversion success rewards, and user churn penalties. This allows the system to automatically learn the optimal constraint strength based on the current level of illusion suppression, adapting to different user profiles (for example, the intensity of illusion suppression can be appropriately reduced for price-sensitive users to increase flexibility).

[0070] In this embodiment of the disclosure, the current hallucination suppression strength can be adaptively determined to achieve business phase awareness of the degree of constraint strictness and improve reliability.

[0071] In one possible embodiment, for multiple candidate dialogue responses generated in step S230 above, and based on the current dialogue evidence base and target business rules, an illusion risk score is determined for each candidate dialogue response, including:

[0072] S231: Based on the content generation model, multiple candidate dialogue responses are generated for the first dialogue content, taking the target prompt as input. The target prompt is used to instruct the generation of response content for the first dialogue content based on the target business rules.

[0073] For example, the target prompt could be: Based on the content of the first dialogue, generate 3 candidate dialogue responses, among which the business prompt (i.e., determined based on the target business rules) is that the current customer is concerned about the interest-free plan, please emphasize the credit authorization requirements and the application deadline on the same day.

[0074] The content generation model generates multiple candidate dialogue responses based on the target prompt. For example, candidate dialogue response A: "Okay, I'll lock in this 10,000 k interest-free credit limit for you now. You can submit your information through the APP today."; candidate dialogue response B: "The interest-free plan requires you to sign a credit inquiry authorization first. I can only confirm the final credit limit after I see the authorization. The validity period is also today."; candidate dialogue response C: "No problem, interest-free credit limit of 10,000 k, interest rate of 2%, is that okay?"

[0075] S232: Extract entities from multiple candidate dialogue responses to obtain the first evidence information corresponding to each candidate dialogue response.

[0076] For example, the first piece of evidence extracted from candidate dialogue response A is: ("Action commitment", "Locked amount", dialogue round = 7); the first piece of evidence extracted from candidate dialogue response C is: ("Interest-free amount", "k10,000", dialogue round = 7) and ("Interest rate", "k2", dialogue round = 7).

[0077] S233: Perform consistency checks on the first evidence information corresponding to multiple candidate dialogue responses and the evidence information included in the current dialogue evidence base to obtain the first score corresponding to multiple candidate dialogue responses.

[0078] To address this step, this disclosure provides a possible implementation: For any candidate dialogue response among multiple candidate dialogue responses, a consistency check is performed between the first evidence information corresponding to the candidate dialogue response and the evidence information included in the current dialogue evidence base to obtain the penalty weight of the second evidence information in the current dialogue evidence base and the first quantity of the third evidence information, wherein the second evidence information represents evidence information that conflicts with the first evidence information; the third evidence information represents evidence information that meets the similarity condition with the first evidence information but has a confidence level less than the confidence level threshold; based on the penalty weight and the corresponding first weight value, and the first quantity and the corresponding second weight value, a first score corresponding to the candidate dialogue response is obtained.

[0079] In this embodiment of the disclosure, the extracted first evidence information can be matched with the evidence information in the current dialogue evidence base for consistency detection. For example, similarity matching: semantic similarity is calculated. If the similarity is greater than the similarity threshold and the confidence level is greater than the confidence level threshold, it can be determined that the current dialogue evidence base supports the first evidence information. Conflict detection: the numerical values ​​and logic are checked for contradictions. For example, if the candidate dialogue response C proposes "interest rate k2" and there is a logical conflict with ("product type", "interest-free plan", confidence level = 0.95) in the current evidence base (interest-free should not have an interest rate), it can be marked as a serious illusion problem. Commitment tracking: the content generation model is checked for responses that contradict previous commitments. For example, the candidate dialogue response A's "locked quota" is consistent with the previously promised "interest-free quota k10,000", but it needs to be confirmed whether the preconditions in the target business rules have been met (e.g., whether credit authorization has been met).

[0080] S234: Determine whether the first evidence information corresponding to multiple candidate dialogue responses meets the target business rules, and obtain the second score corresponding to multiple candidate dialogue responses.

[0081] S235: Determine the hallucination risk score for each candidate dialogue response based on the first score and the second score corresponding to multiple candidate dialogue responses.

[0082] For example, the hallucination risk score is calculated as follows:

[0083] Hallucination Risk Score = First Weight Value × Penalty Weight + Second Weight Value × First Quantity + Third Weight Value × Second Quantity

[0084] If there are multiple conflicting pieces of evidence, the cumulative penalty weight is calculated, and the second quantity is the number of pieces of evidence in the first piece of evidence that do not meet the target business rules.

[0085] It should be noted that in this embodiment of the disclosure, the scoring determination process based on business rule matching and the current dialogue evidence base can be executed serially or in parallel. For example, it can be performed simultaneously and independently to determine the final hallucination risk score. For example, the hallucination risk score = a × first score + (1-a) × second score, where a is an adjustable weight. The value of a can be adjusted to flexibly adapt to different business types, making it more flexible and improving reliability. For example, the value of a is 0.7 for compliance-oriented business types and 0.3 for sales-oriented types. The specific value can be set according to the actual situation, and this embodiment of the disclosure does not impose any restrictions.

[0086] In one possible embodiment, regarding step S240 above, determining the second dialogue content in response to the first dialogue content based on multiple candidate dialogue responses, according to the current hallucination suppression intensity and the hallucination risk score of each candidate dialogue response, specifically includes: if the current hallucination suppression intensity is less than a first threshold, and if there is a first candidate dialogue response among the multiple candidate dialogue responses with a hallucination risk score greater than or equal to a second threshold, then determining the hallucination risk cause corresponding to the first candidate dialogue response according to the target business rules; selecting a second candidate dialogue response with a hallucination risk score less than the second threshold from the multiple candidate dialogue responses, and rewriting the second candidate dialogue response according to the hallucination risk cause to obtain the second dialogue content in response to the first dialogue content.

[0087] In this embodiment of the disclosure, if the current hallucination suppression intensity is greater than or equal to the first threshold, and the hallucination risk score of a candidate dialogue response is greater than or equal to the second threshold, the candidate dialogue response can be directly blocked; if the current hallucination suppression intensity is less than the first threshold, an automatic correction mechanism can be triggered. For example, a correction model can be called to rewrite the candidate dialogue response. The correction model can be trained based on business rule violation dialogue samples and dialogue samples that conflict with evidence information, and there are no restrictions on this.

[0088] For example, taking candidate dialogue response C as an example, its proposed "interest rate k2%" conflicts with the interest-free product. When the illusion risk score exceeds the second threshold, it is directly blocked. Based on the target business rules, the reason for the illusion risk is identified as the failure to mention credit authorization. Therefore, the correction model can be used to rewrite and optimize candidate dialogue response B to obtain the second dialogue content of the final reply, such as: "Okay, according to the k10,000 interest-free limit we just discussed, I need to initiate a credit inquiry authorization for you first. The limit will take effect immediately after the authorization is approved, and the application also needs to be completed today. Is it convenient for you to operate now?" The final second dialogue content not only meets the business rules but is also consistent with the evidence information in the current evidence database.

[0089] In one possible embodiment, the target prompt of the content generation model can be modified based on the determined cause of the hallucination risk, and then the content generation model can be instructed to re-respond to the candidate content based on the modified target prompt. In this way, the rewriting can be completed by utilizing the understanding ability of the content generation model itself, and the training and maintenance costs of the modification model can be saved.

[0090] In this embodiment of the disclosure, joint decision-making can be made based on the current hallucination suppression strength and hallucination risk score to control the generation of dialogue response content. It can also respond to the control logic of high hallucination risk interception, low hallucination risk rewriting and support output, thereby improving the executability and accuracy of dialogue content generation.

[0091] In one possible embodiment, after determining the second dialogue content in response to the first dialogue content, entity extraction can be performed on the first dialogue content to obtain the fourth evidence information corresponding to the first dialogue content, and entity extraction can be performed on the second dialogue content to obtain the fifth evidence information corresponding to the second dialogue content; the current dialogue evidence database is updated based on the fourth evidence information and the fifth evidence information.

[0092] For example, entity extraction is performed from the second dialogue content to obtain the fifth piece of evidence information ("Credit authorization initiated", "Pending customer confirmation", dialogue round = 7, confidence level = 0.9). The fifth piece of evidence information is added to the current evidence database and marked as dependent on the user's next confirmation. If the user confirms in subsequent dialogue rounds, the confidence level can be maintained or increased. If the user refuses or fails to confirm within the time limit in subsequent dialogue rounds, the confidence level will be reduced.

[0093] The following example illustrates the overall process of the dialogue content generation method using a specific application scenario. In this embodiment, the dialogue content generation method can adopt a microservice architecture, which may include a business rule base manager, a dialogue evidence base manager, a dual matching engine, and an adaptive generation controller. The business rule base manager is mainly used to configure business rules; the dialogue evidence base manager is mainly used for entity extraction and confidence determination of the dialogue content; the dual matching engine includes matching from the business rule base and matching from the dialogue evidence base; and the adaptive generation controller is mainly used to determine the hallucination suppression strength and hallucination risk score, and based on these, control the generation of dialogue content. Specifically, see [link to relevant documentation]. Figure 3 , Figure 3 A flowchart of a dialogue content generation method provided in this disclosure embodiment, the method including:

[0094] Step S301: Multi-turn dialogue begins; create the current dialogue evidence library for the dialogue.

[0095] Step S302: Real-time multi-turn dialogue proceeds.

[0096] Step S303: Extract evidence information in each round of dialogue.

[0097] Step S304: Update the current dialogue evidence database.

[0098] Step S305: Generate multiple candidate dialogue responses based on the content generation model.

[0099] Step S306: Perform consistency checks on the evidence information of multiple candidate dialogue responses with the current dialogue evidence database.

[0100] Step S307: Determine the target business rule to match based on the business rule library.

[0101] Step S308: Determine the current hallucination suppression strength for each round.

[0102] Step S309: Determine the illusion risk score for each candidate dialogue response.

[0103] Step S310: Determine the values ​​of the current hallucination suppression intensity and hallucination risk score. If the current hallucination suppression intensity is greater than or equal to the first threshold and the hallucination risk score is greater than or equal to the second threshold, then proceed to step S311. If the current hallucination suppression intensity is less than the first threshold, then proceed to step S312.

[0104] Step S311: Intercept the generated candidate dialogue response and trigger the correction mechanism to generate the second dialogue content.

[0105] For example, in this case, the content generation model can also be modified based on the reasons for the high hallucination risk score in this embodiment of the disclosure, which can guide the content generation model to regenerate candidate dialogue responses.

[0106] Step S312: Determine the content of the second dialogue based on the responses of multiple candidate dialogues.

[0107] For example, if the hallucination risk scores of multiple candidate dialogue responses are all less than the second threshold, the candidate dialogue response with the lowest hallucination risk score can be selected from the multiple candidate dialogue responses and determined as the second dialogue content.

[0108] For example, if there is a first candidate dialogue response among multiple candidate dialogue responses with a hallucination risk score greater than or equal to the second threshold, then the cause of hallucination risk corresponding to the first candidate dialogue response is determined according to the target business rules; the second candidate dialogue response with a hallucination risk score less than the second threshold is selected from multiple candidate dialogue responses, and the second candidate dialogue response is rewritten according to the cause of hallucination risk to obtain the second dialogue content that responds to the first dialogue content.

[0109] Step S313: Output the content of the second dialogue.

[0110] For example, the content of the second dialogue can be sent to the user's terminal participating in the dialogue and displayed to the user on the user's terminal.

[0111] Step S314: Wait for user feedback in the next round of dialogue.

[0112] Step S315: Persistently store logs.

[0113] In this embodiment of the disclosure, information such as the dialogue evidence library, hallucination risk score, hallucination suppression strength, and business rules during the multi-round dialogue process can be persistently stored in the database, and the first and second dialogue contents of each round of dialogue can be recorded.

[0114] Step S316: The offline quality inspection system performs attribution analysis based on actual business results.

[0115] In this embodiment, the offline quality inspection system can perform attribution analysis based on actual business results (such as customer complaints, conversion rates, and compliance inspection results), identify hallucination-like dialogues, automatically associate business results with problems in business rules, and analyze which business rules are insufficiently covered or whether evidence information extraction is inaccurate. Furthermore, it can dynamically and continuously optimize the evidence extraction model, supporting online learning and optimization.

[0116] For example, if multiple customers complain that the interest-free credit limit promised by the salesperson does not match the final contract, attribution analysis can be used to determine that the reason is that the confidence threshold of the "credit limit" entity in the evidence extraction model is set too high. This can automatically lower the confidence threshold and trigger model fine-tuning, forming a closed-loop optimization.

[0117] Step S317: Optimize business rules and content generation model.

[0118] Step S318: Dynamically update and store the business rule base.

[0119] In this embodiment, a complete and explainable chain is constructed, from business rule activation - current dialogue evidence base matching - illusion risk scoring - interception and correction of candidate dialogue responses - log recording. Thus, the generation and interception of each candidate dialogue response have clear attribution. It can also optimize business rules, evidence extraction models, content generation models, etc., to reduce the illusion rate of content generation and improve dialogue reliability and performance.

[0120] It is understood that the various method embodiments mentioned above in this disclosure can be combined with each other to form combined embodiments without violating the principle and logic. Due to space limitations, this disclosure will not elaborate further. Those skilled in the art will understand that in the above methods of specific implementation, the specific execution order of each step should be determined by its function and possible internal logic.

[0121] In addition, this disclosure also provides a dialogue content generation apparatus, an electronic device, a computer-readable storage medium, and a computer program product, all of which can be used to implement any of the dialogue content generation methods provided in this disclosure. The corresponding technical solutions and descriptions are described in the corresponding section of the method and will not be repeated here.

[0122] Figure 4 This is a block diagram of a dialogue content generation apparatus provided in an embodiment of the present disclosure.

[0123] Reference Figure 4 This disclosure provides a dialogue content generation apparatus, which includes:

[0124] The first determining module 41 is used to determine the first dialogue state corresponding to the first dialogue content in response to the first dialogue content of the current round during a multi-round dialogue process.

[0125] The second determining module 42 is used to determine, based on the first dialogue state, a target business rule matching the content of the first dialogue from a preset business rule library, and to determine the current hallucination suppression intensity corresponding to the current round.

[0126] The third determining module 43 is used to generate multiple candidate dialogue responses of the first dialogue content, and determine the illusion risk score of each candidate dialogue response according to the current dialogue evidence library and the target business rules. The current dialogue evidence library is generated based on the historical dialogue content before the current round.

[0127] The fourth determining module 44 is used to determine, based on the current hallucination suppression intensity and the hallucination risk score of each candidate dialogue response, a second dialogue content to respond to the first dialogue content.

[0128] In one possible embodiment, when determining the target business rule matching the content of the first dialogue from a preset business rule base based on the first dialogue state, the second determining module 42 is used to:

[0129] The semantic similarity between the first dialogue state and multiple business rules included in the preset business rule base is calculated, and the top N candidate business rules with the highest similarity are selected, where N is an integer greater than or equal to 1.

[0130] Based on the first dialogue state and the triggering conditions corresponding to the candidate business rules, target business rules that meet the triggering conditions are selected from the N candidate business rules.

[0131] In one possible embodiment, when determining the current hallucination suppression intensity corresponding to the current round, the second determining module 42 is used to:

[0132] Based on the content of the first dialogue, the current business stage corresponding to the current round is determined, and the current basic illusion suppression intensity corresponding to the current business stage is determined. There is a mapping relationship between different business stages and basic illusion suppression intensity, and the magnitude of basic illusion suppression intensity is positively correlated with the degree of strictness of the business stage to the facts.

[0133] Based on the confidence level of the evidence information included in the current dialogue evidence base and the current basic illusion suppression strength, the current illusion suppression strength corresponding to the current round is determined. The values ​​of the current basic illusion suppression strength and the current illusion suppression strength are both greater than or equal to 0 and less than or equal to 1.

[0134] In one possible embodiment, when generating multiple candidate dialogue responses of the first dialogue content and determining the hallucination risk score of each candidate dialogue response based on the current dialogue evidence base and the target business rules, the third determining module 43 is used to:

[0135] Based on the content generation model, multiple candidate dialogue responses for the first dialogue content are generated using the target prompt as input, wherein the target prompt is used to instruct the generation of response content for the first dialogue content based on the target business rules;

[0136] Entity extraction is performed on multiple candidate dialogue responses to obtain first evidence information corresponding to each candidate dialogue response;

[0137] The consistency of the first evidence information corresponding to the multiple candidate dialogue responses and the evidence information included in the current dialogue evidence library is checked to obtain the first score corresponding to the multiple candidate dialogue responses.

[0138] Determine whether the first evidence information corresponding to the multiple candidate dialogue responses satisfies the target business rules, and obtain the second score corresponding to the multiple candidate dialogue responses;

[0139] Based on the first score and the second score corresponding to the multiple candidate dialogue responses, an illusion risk score is determined for each candidate dialogue response.

[0140] In one possible embodiment, the evidence information includes a name, a value, a dialogue round, and a confidence level. The confidence level is reduced according to a preset decay rule, which is related to the dialogue round and the dialogue content. The initial value of the confidence level is determined when the evidence information is first obtained in the dialogue content. When performing consistency detection on the first evidence information corresponding to multiple candidate dialogue responses and the evidence information included in the current dialogue evidence library to obtain the first score corresponding to multiple candidate dialogue responses, the third determining module 43 is used to:

[0141] For any one of the multiple candidate dialogue responses, a consistency check is performed between the first evidence information corresponding to the candidate dialogue response and the evidence information included in the current dialogue evidence base to obtain the penalty weight of the second evidence information in the current dialogue evidence base and the first quantity of the third evidence information. The second evidence information represents evidence information that conflicts with the first evidence information. The third evidence information represents evidence information that meets the similarity condition with the first evidence information but has a confidence level less than the confidence level threshold.

[0142] Based on the penalty weight and the corresponding first weight value, and the first quantity and the corresponding second weight value, a first score corresponding to the candidate dialogue response is obtained.

[0143] In one possible embodiment, when determining the second dialogue content in response to the first dialogue content based on the current hallucination suppression intensity and the hallucination risk score of each candidate dialogue response, the fourth determining module 44 is used to:

[0144] If the current hallucination suppression intensity is less than the first threshold, and if there is a first candidate dialogue response among the multiple candidate dialogue responses with a hallucination risk score greater than or equal to the second threshold, then the hallucination risk cause corresponding to the first candidate dialogue response is determined according to the target business rules.

[0145] From the multiple candidate dialogue responses, a second candidate dialogue response with a hallucination risk score less than a second threshold is selected, and the second candidate dialogue response is rewritten according to the cause of the hallucination risk to obtain a second dialogue content that responds to the first dialogue content.

[0146] In one possible embodiment, an update module 45 is further included, configured to: extract entities from the first dialogue content to obtain fourth evidence information corresponding to the first dialogue content, and extract entities from the second dialogue content to obtain fifth evidence information corresponding to the second dialogue content; and update the current dialogue evidence database based on the fourth evidence information and the fifth evidence information.

[0147] Each module in the aforementioned dialogue content generation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0148] Figure 5 This is a block diagram of an electronic device provided in an embodiment of the present disclosure.

[0149] Reference Figure 5 This disclosure provides an electronic device, which includes: at least one processor 501; at least one memory 502; and one or more I / O interfaces 503; wherein the memory 502 stores one or more computer programs that can be executed by at least one processor 501, and the one or more computer programs are executed by at least one processor 501 to enable at least one processor 501 to perform the above-described dialogue content generation method.

[0150] The modules in the aforementioned electronic devices can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0151] This disclosure also provides a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the above-described dialogue content generation method. The computer-readable storage medium may be volatile or non-volatile.

[0152] This disclosure also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is run in a processor of an electronic device, the processor in the electronic device executes the above-described dialogue content generation method.

[0153] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software can be distributed on a computer-readable storage medium, which may include computer storage media (or non-transitory media) and communication media (or transient media).

[0154] As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable program instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technologies, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is known to those skilled in the art that communication media typically contain computer-readable program instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0155] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0156] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.

[0157] The computer program product described herein can be implemented specifically through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0158] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0159] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0160] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0161] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0162] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in connection with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in connection with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of this disclosure as set forth by the appended claims.

Claims

1. A method for generating dialogue content, characterized in that, include: During a multi-round dialogue, in response to the content of the first dialogue in the current round, the first dialogue state corresponding to the first dialogue content is determined; Based on the first dialogue state, a target business rule matching the content of the first dialogue is determined from a preset business rule base, and the current hallucination suppression intensity corresponding to the current round is determined; Generate multiple candidate dialogue responses for the first dialogue content, and determine the illusion risk score for each candidate dialogue response based on the current dialogue evidence base and the target business rules. The current dialogue evidence base is generated based on the historical dialogue content before the current round. Based on the current hallucination suppression intensity and the hallucination risk score of each candidate dialogue response, a second dialogue content is determined in response to the first dialogue content, based on multiple candidate dialogue responses.

2. The method according to claim 1, characterized in that, The step of determining the target business rule matching the content of the first dialogue from a preset business rule base based on the first dialogue state includes: The semantic similarity between the first dialogue state and multiple business rules included in the preset business rule base is calculated, and the top N candidate business rules with the highest similarity are selected, where N is an integer greater than or equal to 1. Based on the first dialogue state and the triggering conditions corresponding to the candidate business rules, target business rules that meet the triggering conditions are selected from the N candidate business rules.

3. The method according to claim 1, characterized in that, Determining the current hallucination suppression intensity corresponding to the current round includes: Based on the content of the first dialogue, the current business stage corresponding to the current round is determined, and the current basic illusion suppression intensity corresponding to the current business stage is determined. There is a mapping relationship between different business stages and basic illusion suppression intensity, and the magnitude of basic illusion suppression intensity is positively correlated with the degree of strictness of the business stage to the facts. Based on the confidence level of the evidence information included in the current dialogue evidence base and the current basic illusion suppression strength, the current illusion suppression strength corresponding to the current round is determined. The values ​​of the current basic illusion suppression strength and the current illusion suppression strength are both greater than or equal to 0 and less than or equal to 1.

4. The method according to any one of claims 1-3, characterized in that, The process of generating multiple candidate dialogue responses for the first dialogue content, and determining an illusion risk score for each candidate dialogue response based on the current dialogue evidence base and the target business rules, includes: Based on the content generation model, multiple candidate dialogue responses for the first dialogue content are generated using the target prompt as input, wherein the target prompt is used to instruct the generation of response content for the first dialogue content based on the target business rules; Entity extraction is performed on multiple candidate dialogue responses to obtain first evidence information corresponding to each candidate dialogue response; The consistency of the first evidence information corresponding to the multiple candidate dialogue responses and the evidence information included in the current dialogue evidence library is checked to obtain the first score corresponding to the multiple candidate dialogue responses. Determine whether the first evidence information corresponding to the multiple candidate dialogue responses satisfies the target business rules, and obtain the second score corresponding to the multiple candidate dialogue responses; Based on the first score and the second score corresponding to the multiple candidate dialogue responses, an illusion risk score is determined for each candidate dialogue response.

5. The method according to claim 4, characterized in that, The evidence information includes a name, a value, a dialogue round, and a confidence level. The confidence level is reduced according to a preset decay rule, which is related to the dialogue round and the dialogue content. The initial value of the confidence level is determined when the evidence information is first obtained in the dialogue content. The consistency of the first evidence information corresponding to the multiple candidate dialogue responses and the evidence information included in the current dialogue evidence base is checked to obtain the first score corresponding to the multiple candidate dialogue responses, including: For any one of the multiple candidate dialogue responses, a consistency check is performed between the first evidence information corresponding to the candidate dialogue response and the evidence information included in the current dialogue evidence base to obtain the penalty weight of the second evidence information in the current dialogue evidence base and the first quantity of the third evidence information. The second evidence information represents evidence information that conflicts with the first evidence information. The third evidence information represents evidence information that meets the similarity condition with the first evidence information but has a confidence level less than the confidence level threshold. Based on the penalty weight and the corresponding first weight value, and the first quantity and the corresponding second weight value, a first score corresponding to the candidate dialogue response is obtained.

6. The method according to claim 1, characterized in that, The step of determining the second dialogue content in response to the first dialogue content based on the current hallucination suppression strength and the hallucination risk score of each candidate dialogue response, and based on multiple candidate dialogue responses, includes: If the current hallucination suppression intensity is less than the first threshold, and if there is a first candidate dialogue response among the multiple candidate dialogue responses with a hallucination risk score greater than or equal to the second threshold, then the hallucination risk cause corresponding to the first candidate dialogue response is determined according to the target business rules. From the multiple candidate dialogue responses, a second candidate dialogue response with a hallucination risk score less than a second threshold is selected, and the second candidate dialogue response is rewritten according to the cause of the hallucination risk to obtain a second dialogue content that responds to the first dialogue content.

7. The method according to claim 5, characterized in that, The method further includes: Entity extraction is performed on the first dialogue content to obtain the fourth evidence information corresponding to the first dialogue content, and entity extraction is performed on the second dialogue content to obtain the fifth evidence information corresponding to the second dialogue content. Update the current dialogue evidence database based on the fourth and fifth pieces of evidence.

8. A dialogue content generation device, characterized in that, include: The first determining module is used to determine the first dialogue state corresponding to the first dialogue content in response to the first dialogue content of the current round during a multi-round dialogue process. The second determining module is used to determine, based on the first dialogue state, a target business rule matching the content of the first dialogue from a preset business rule base, and to determine the current hallucination suppression intensity corresponding to the current round. The third determining module is used to generate multiple candidate dialogue responses of the first dialogue content, and determine the illusion risk score of each candidate dialogue response according to the current dialogue evidence library and the target business rules. The current dialogue evidence library is generated based on the historical dialogue content before the current round. The fourth determining module is used to determine, based on the current hallucination suppression intensity and the hallucination risk score of each candidate dialogue response, a second dialogue content to respond to the first dialogue content.

9. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs that can be executed by the at least one processor, the one or more computer programs being executed by the at least one processor to enable the at least one processor to perform the dialogue content generation method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the dialogue content generation method as described in any one of claims 1-7.