Problem clarification method, device and equipment based on entity and intention fuzziness analysis
Through entity and intention ambiguity analysis, the clarification request content is generated, and the semantic understanding of the intelligent question-and-answer system is optimized, the accuracy problem caused by natural language ambiguity is solved, and more efficient user needs analysis is achieved.
Patent Information
- Application Number
- CN202510864891.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-06-26
AI Technical Summary
When faced with the ambiguity and ambiguity of natural language, it is difficult for intelligent question-and-answer systems to accurately understand user needs, resulting in the accuracy of answers and operational errors.
By obtaining the problem statements entered by the user, perform entity and intent analysis loops until the ambiguity is less than or equal to the preset threshold, use the large language model to generate the clarification request content, obtain the user response and update the semantic representation, and realize the closed-loop process optimization semantic understanding.
It improves the accuracy of semantic understanding of user problems, reduces redundant questioning, improves user cooperation and clarification efficiency, and ensures cumulative optimization of semantic understanding in multiple rounds of dialogue.
Smart Images

Figure CN120371982A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of intelligent question answering, and particularly to a question clarification method, device, equipment, medium and product based on entity and intention ambiguity analysis. Background Art
[0002] Interactive applications such as intelligent question answering systems and dialogue robots have been widely used in scenarios such as customer service, information retrieval, and intelligent assistants. Users input question statements in natural language, and the system needs to accurately understand the semantics and generate responses. However, natural language has inherent ambiguity and vagueness. For example, entity reference is not clear (such as "apple" may refer to a fruit or a company), and intention is ambiguous (such as "turn on the device" without specifying the device type and operation details), which makes it difficult for the system to accurately parse the user's needs, thereby affecting the answer accuracy or triggering incorrect operations. Summary of the Invention
[0003] The purpose of this application is to provide a question clarification method, device, equipment, medium and product based on entity and intention ambiguity analysis.
[0004] To achieve the above purpose, this application provides the following solutions: In the first aspect, this application provides a question clarification method based on entity and intention ambiguity analysis, including: obtaining a question statement input by a user; repeatedly executing the following steps until both the entity ambiguity degree and the intention ambiguity degree of the question statement are less than or equal to a preset threshold: parsing the entity and intention in the question statement to obtain the entity ambiguity degree and the intention ambiguity degree of the question statement; in the case where the entity ambiguity degree and / or the intention ambiguity degree is greater than the preset threshold, using a large language model, based on the entity ambiguity corresponding to the entity ambiguity degree and / or the intention ambiguity corresponding to the intention ambiguity degree, generating target clarification request content; sending the target clarification request content to the user and obtaining the user's target clarification response content; updating the semantic representation of the question statement based on the target clarification response content.
[0005] Second aspect, the present application provides a problem clarification device based on entity and intention ambiguity analysis, including: an acquisition module, configured to acquire a problem statement input by a user; a parsing module, configured to loop and execute the following steps until both the entity ambiguity and intention ambiguity of the problem statement are less than or equal to a preset threshold: parse the entity and intention in the problem statement to obtain the entity ambiguity and intention ambiguity of the problem statement; a generation module, configured to, when the entity ambiguity and / or the intention ambiguity is greater than the preset threshold, use a large language model to generate target clarification request content based on the entity ambiguity corresponding to the entity ambiguity and / or the intention ambiguity corresponding to the intention ambiguity; a sending module, configured to send the target clarification request content to the user and obtain the target clarification response content of the user; an update module, configured to update the semantic representation of the problem statement based on the target clarification response content.
[0006] Third aspect, the present application provides a computer device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the steps of the problem clarification method based on entity and intention ambiguity analysis described in any one of the above.
[0007] Fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the problem clarification method based on entity and intention ambiguity analysis described in any one of the above.
[0008] Fifth aspect, the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the steps of the problem clarification method based on entity and intention ambiguity analysis described in any one of the above.
[0009] According to the specific embodiments provided by the present application, the following technical effects are disclosed in the present application: The present application provides a problem clarification method, device, equipment, medium and product based on entity and intention ambiguity analysis. By calculating the entity ambiguity and intention ambiguity, the semantic ambiguity of the user's problem is converted into a quantifiable index, avoiding the blindness of clarification; by generating target clarification request content based on the entity ambiguity corresponding to the entity ambiguity and / or the intention ambiguity corresponding to the intention ambiguity, targeted clarification is achieved, redundant questioning is reduced, and natural language clarification improves the user's cooperation and clarification efficiency; through a closed-loop process of "parsing → clarification → update", the semantic representation of the problem is continuously iterated to ensure the cumulative optimization of semantic understanding in multi-round conversations, so as to be able to more accurately parse the user's needs and improve the answer accuracy. Description of the Drawings
[0010] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0011] Figure 1 A flowchart of a problem clarification method based on entity and intent ambiguity analysis provided by an embodiment of the present application; Figure 2 A schematic diagram of an interactive clarification tool provided by an embodiment of the present application; Figure 3 A flowchart of a problem clarification method based on entity and intent ambiguity analysis provided by another embodiment of the present application; Figure 4 A flowchart of a problem clarification method based on entity and intent ambiguity analysis provided by yet another embodiment of the present application; Figure 5 A flowchart of a problem clarification method based on entity and intent ambiguity analysis provided by still another embodiment of the present application; Figure 6 A flowchart of a problem clarification method based on entity and intent ambiguity analysis provided by still another embodiment of the present application; Figure 7 A flowchart of a problem clarification method based on entity and intent ambiguity analysis provided by still another embodiment of the present application; Figure 8 A schematic diagram of the functional modules of a problem clarification device based on entity and intent ambiguity analysis provided by an embodiment of the present application; Figure 9 A schematic diagram of the structure of a computer device provided by an embodiment of the present application. Detailed implementation manners
[0012] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.
[0013] To make the above objects, features, and advantages of the present application more obvious and understandable, the present application will be further described in detail below with reference to the drawings and specific implementation manners.
[0014] In an exemplary embodiment, as Figure 1As shown, a problem clarification method based on entity and intention ambiguity analysis is provided. This method is executed by a computer device, which can be specifically executed by a computer device such as a terminal or a server alone, or jointly executed by a terminal and a server. In the embodiments of the present application, it includes the following steps 102 to 110. The question-and-answer intelligent agent can execute the following steps 102 to 110, and this question-and-answer intelligent agent can operate as the core component of the intelligent question-and-answer system installed on the computer device. Among them: Step 102: Obtain the question statement input by the user; Among them, the question-and-answer intelligent agent includes a large language model (LLM), and the large language model integrates an interactive clarification tool. Figure 2 It is a schematic diagram of the interactive clarification tool proposed in the embodiments of the present application, which is used to facilitate direct user interaction. The user can input a question statement through the interactive clarification tool. The question statement can be a question actively proposed by the user in ways such as text or voice, such as Figure 2 As shown, the question statement input by the user can be "What made Zhang San famous?"
[0015] Loop and execute the following steps 104 to 110 until both the entity ambiguity and the intention ambiguity of the question statement are less than or equal to the preset threshold: Step 104: Analyze the entities and intentions in the question statement to obtain the entity ambiguity and intention ambiguity of the question statement; Among them, the entity ambiguity refers to the degree of uncertainty of the entity in the question statement, and the intention ambiguity refers to the degree of uncertainty of the intention in the question statement.
[0016] Step 106: In the case where the entity ambiguity and / or the intention ambiguity is greater than the preset threshold, use the large language model to generate target clarification request content based on the entity ambiguity corresponding to the entity ambiguity and / or the intention ambiguity corresponding to the intention ambiguity; Among them, the target clarification request content can be a clarification request that requires the user to further explain, supplement details or clarify the meaning based on the entity ambiguity and / or the question ambiguity in the question statement when the interactive clarification tool has doubts, misunderstandings or unclear information about the content expressed by the user.
[0017] Step 108: Send the target clarification request content to the user and obtain the target clarification response content of the user; Among them, the target clarification response content is the answer or feedback made by the user, and it is supplementary information or a clear explanation provided for the target clarification request content.
[0018] Step 110: Update the semantic representation of the question statement based on the target clarification response content.
[0019] Among them, by updating the semantic representation of the question statement, the semantic representation of the question statement can be made clearer, enabling the question and answer agent to more accurately understand the user's needs.
[0020] In the embodiments of the present application, by calculating the entity ambiguity and intention ambiguity, the semantic ambiguity of the user's question is transformed into a quantifiable index, avoiding the blindness of clarification; by generating the target clarification request content based on the entity ambiguity corresponding to the entity ambiguity and / or the intention ambiguity corresponding to the intention ambiguity, targeted clarification is achieved, reducing redundant follow-up questions, and natural language clarification improves the user's cooperation and clarification efficiency; through the closed-loop process of "parsing → clarification → update", the semantic representation of the question is continuously iterated to ensure the cumulative optimization of semantic understanding in multi-round conversations, so as to be able to more accurately parse the user's needs and improve the answer accuracy.
[0021] In another exemplary embodiment of the present application, as Figure 3 shown, the above step 104 can be replaced by the following steps 1041 to 1043: Step 1041: Decompose the question statement into at least one question triple, where each question triple includes a head entity, a predicate, and a tail entity, and the head entity and the tail entity are collectively referred to as entities; Among them, each question statement can be decomposed to decouple complex question statements into multiple simple triples; in each round T (round index), the intelligent question and answer system will generate an action according to the instruction manual and the interaction history The interaction history and the action can be represented by the following formulas (1) and (2) respectively: (1); (2); Among them, , Inst consists of a pre-written tool description, tool usage method, and interaction format, E represents a set of examples, such as question-answer examples, tool call examples, and Q represents the question and answer statement; represents the action generated in the first round, represents the observation result in the first round, that is, the feedback result obtained by executing the action is defined as , represents the target clarification response content of the user in the first round; similarly, represents the action generated in the T-th round, Denote the observation result of the T-th round, i.e., the feedback result obtained after performing the action is defined as , denotes the content of the user's target clarification response in the T-th round; denotes the action generated in the (T + 1)-th round.
[0022] Among them, for each triple, information related to the query entity and intent can be decomposed and queried.
[0023] Step 1042: For the head entity or tail entity in each of the problem triples, call the entity query tool to query the first information related to the head entity or tail entity in the knowledge base, and based on the first information, generate an entity ambiguity. Among them, an entity query tool is also integrated in the question-and-answer agent. The entity query tool can search for entity nodes in the knowledge base through the given surface name, and return the formal entity name and its distinguishing features (such as description and type). The relationship query tool can include the SearchNodes tool for retrieving entities; exemplarily, the SearchNodes tool can be used to retrieve node information similar to or related to the input entity surface name in the knowledge base, analyze entity ambiguity, so as to obtain the entity ambiguity.
[0024] Such as Figure 2 shown, after obtaining the question statement "What is Zhang San famous for?", the SearchNodes tool for retrieving entities can be used to retrieve the first information related to the entity in the knowledge base, and based on the first information, calculate the entity ambiguity.
[0025] Step 1043: Based on the head entity and predicate in the at least one problem triple, call the predicate analysis tool to query the second information related to the head entity and predicate in the knowledge base, and based on the second information, generate an intent ambiguity. Among them, a predicate analysis tool is also integrated in the question-and-answer agent. The predicate analysis tool is also called a relationship query tool. The relationship query tool can identify and sort the relationship predicates with high semantic relevance by querying the one-hop subgraph around the specified entity, and support the parsing of complex structures (such as CVT nodes). The predicate analysis tool can include the SearchGraphPattern tool for retrieving predicates; exemplarily, the SearchGraphPattern tool can be used to retrieve the knowledge graph (such as a one-hop subgraph) in the knowledge base to analyze the semantic ambiguity of entity relationships, so as to obtain the intent ambiguity.
[0026] Such as Figure 2As shown, the SearchGraphPattern tool for retrieving predicates can retrieve the first information related to the predicate in the knowledge base, and calculate the intention ambiguity degree based on the second information.
[0027] In step 106, "using the large language model to generate the target clarification request content based on the entity ambiguity corresponding to the entity ambiguity degree and / or the intention ambiguity corresponding to the intention ambiguity degree" includes: Invoking the interactive clarification tool in the large language model to generate the target clarification request content based on the entity ambiguity corresponding to the entity ambiguity degree and / or the intention ambiguity corresponding to the intention ambiguity degree.
[0028] Among them, the interactive clarification tool, also known as the fuzzy clarification plugin, is a disambiguation management tool. The interactive clarification tool can be the AskForClarification tool, which can request the user to clarify when needed; when the entity ambiguity degree and / or the intention ambiguity degree is greater than the preset threshold, it indicates that entity ambiguity and / or intention ambiguity has been detected. At this time, the AskForClarification tool can be triggered to automatically generate a natural language clarification request (i.e., the target clarification request content), interrupt the interaction process, request the user to clarify, and then continue to process after the user inputs feedback.
[0029] For each interaction action, it is necessary to judge whether it is necessary to clarify the entity or intention. If so, the interactive clarification tool is called to let the user clarify the question. As Figure 2 shown, when the entity ambiguity degree is greater than the preset threshold, the target clarification request content "Which Zhang San do you want to ask? The athlete from the United States or the writer from China?" can be generated and displayed, and the target clarification response content of the user "I want to ask about the writer from China" can be obtained; similarly, when the intention ambiguity degree is greater than the preset threshold, the target clarification request content "Do you want to know her works, awards or occupation?" can be generated and displayed, and the target clarification response content of the user "I want to know his occupation" can be obtained.
[0030] In the embodiment of the present application, by disassembling the question statement into question triples, using the entity query tool and the predicate analysis tool to quantify the entity and intention ambiguity degrees respectively, it provides a precise basis for question clarification; by means of the interactive clarification tool to generate the target clarification request, it realizes a closed loop from fuzzy recognition to precise questioning, can effectively improve the accuracy of semantic understanding, reduce the user's repeated communication cost, and significantly improve the interaction efficiency and service quality in scenarios such as intelligent question answering and customer service.
[0031] In another exemplary embodiment of the present application, as Figure 4As shown, the step of "generating entity ambiguity based on the first information" in step 1042 above can be replaced by the following steps 10421 to 10425: Step 10421: Determine the prior probability of the corresponding entity based on the popularity of each entity in the first information; Among them, the posterior probability of the entity can be calculated using Bayes' theorem , in order to evaluate the ambiguity of the entities retrieved by the SearchNodes tool with respect to the given question statement Q, a Bayesian-based metric is designed to determine whether the entities in are ambiguous, and the goal is to calculate . First, the popularity of each entity in the knowledge base (such as Freebase) can be used to calculate its prior probability, and the prior probability of the entity can be expressed by the following formula (3): (3); Among them, represents the sum of the popularity of N entities. The popularity of an entity in the knowledge base can refer to the frequency and breadth of the entity being mentioned, used, or associated in the knowledge base. It is a key indicator to measure the importance and attention degree of the entity in the knowledge system.
[0032] Step 10422: Determine the conditional probability of the question statement under the condition that the corresponding entity exists based on the description information of each entity in the first information and the question statement; Among them, the conditional probability can measure the correlation between the entity and the question statement , and it can be derived by using the description of LLM. The conditional probability can be expressed by the following formula (4): (4); Among them, PPL(·) represents the ambiguity function, and the softmax function can be used to normalize it to ensure the validity of the probability distribution, can be a structured or textual description of the semantic information of the entity , which is used to accurately express the connotation, attributes, relationships, and other key features of the entity.
[0033] Step 10423: Determine the posterior probability of the corresponding entity through Bayes' formula based on the prior probability and conditional probability of each entity; Among them, Bayes' theorem can be used to calculate the posterior probability of an entity , as shown in the following formula (5): (5); Step 10424: Determine the entropy of multiple entity distributions based on the posterior probability of each entity; Among them, the entropy of multiple entity distributions can be as shown in the following formula (6): (6); Among them is the softmax regularization for all entities, which is used to quantify the uncertainty or ambiguity of the retrieved entities.
[0034] Step 10425: Generate entity ambiguity based on the entropy of the multiple entity distributions.
[0035] Among them, the ambiguity score of an entity (i.e., entity ambiguity) can be obtained by dividing H by the maximum possible entropy , where N is the total number of retrieved entities, and logN represents the maximum degree of confusion that may occur when the number of entities is N. The entity ambiguity can be calculated by the following formula (7) .
[0036] (7); Among them, the entity ambiguity ranges from 0 to 1. A score close to 0 indicates low ambiguity (a single entity clearly matches the question Q), and a score close to 1 indicates high ambiguity (multiple entities have similar relevance) and needs to be clarified.
[0037] In the embodiments of the present application, by introducing Bayes' formula, the popularity, description information of entities are combined with the user's question statement, and the prior probability, conditional probability, and posterior probability of entities are scientifically calculated. Furthermore, the entity ambiguity is quantified based on the entropy of the probability distribution; this method provides a data-driven precise measurement method for entity ambiguity recognition, is more objective and interpretable, can effectively improve the accuracy of the intelligent question-answering system in understanding the semantics of entities in the user's question, and optimize the question clarification and interaction experience.
[0038] In another exemplary embodiment of the present application, as Figure 5 shown, the "generate intent ambiguity based on the second information" in the above step 1043 can be replaced by the following steps 10431 to 10437: Step 10431: Determine the candidate tail entities in the second information that match the head entity and predicate in each question triple; Among them, the head entity can be represented as , the predicate can be expressed as , the candidate tail entity can be expressed as .
[0039] Step 10432: Generate candidate triples based on the head entity, predicate, and candidate tail entity in each of the problem triples; Among them, the candidate triple can be expressed as .
[0040] Step 10433: Determine the joint prior probability of the candidate triple; Among them, the joint prior probability can be expressed as , the prior probability captures the joint importance of these components for explaining .
[0041] Step 10434: Given the candidate triple composed of the head entity, predicate, and candidate tail entity, determine the semantic matching probability between the problem statement and the corresponding candidate triple, and this probability is used to measure the explanatory ability of the corresponding candidate triple for the problem statement; Among them, the semantic matching probability can be expressed as , indicating the likelihood value of Q given the predicate , its tail entity and the predicted entity .
[0042] Step 10435: Based on the joint prior probability and the semantic matching probability, determine the posterior probability of each predicate through Bayes' formula; Among them, the posterior probability of the predicate can be calculated using Bayes' theorem . To evaluate the ambiguity of the predicate retrieved using the SearchGraphPattern tool, a metric can be adopted to evaluate the uncertainty of the relationship between the predicted entity e′ and the problem statement Q. Let represent the list of candidate predicate-tail entity pairs, where is the predicate, is the corresponding tail entity sampled from the knowledge graph, and the goal is to calculate , which can be simplified to the following formula (8) through Bayes' theorem: (8); Step 10436: Based on the posterior probability of each predicate, determine the entropy of multiple predicate distributions; Among them, the entropy of multiple predicate distributions can be expressed as , where is Softmax regularization for all predicates.
[0043] Step 10437: Generate intent ambiguity based on the entropy of the multiple predicate distributions.
[0044] Among them, following the same ambiguity-based method as for entities, the ambiguity score of a predicate (i.e., intent ambiguity) can be as shown in the following formula (9): (9); Among them, M is the total number of retrieved entities, logM represents the maximum degree of confusion that may occur when the number of entities is M. Similar to the ambiguity score of entities, a high ambiguity score for a predicate indicates that multiple predicates exhibit similar correlations and further clarification is required.
[0045] The embodiment of this application designs a plug-and-play plugin that uses Bayesian inference to dynamically calculate the entity ambiguity score and predicate ambiguity score during the multi-round interaction based on the tool execution results in the multi-round interaction, realizing a quantitative evaluation of the ambiguity degree.
[0046] In the embodiment of this application, by constructing candidate triples, using Bayes' formula to fuse the joint prior probability and semantic matching probability, calculating the posterior probability of the predicate, and then accurately quantifying the intent ambiguity with the probability distribution entropy. This method provides a data-based and measurable analysis path for intent ambiguity recognition, is more scientific and accurate, can effectively help the intelligent question-answering system understand the user's true intent, optimize the question clarification strategy, and improve the accuracy and efficiency of human-computer interaction.
[0047] In another exemplary embodiment of this application, as Figure 6 shown, "using the large language model, based on the entity ambiguity corresponding to the entity and / or the intent ambiguity corresponding to the intent ambiguity, generate the target clarification request content" in step 106 includes: Step 1061: Invoke the interactive clarification tool of the large language model to generate the first clarification request content based on the entity ambiguity corresponding to the entity and / or the intent ambiguity of the intent ambiguity. Among them, when the problem statement is an insurance claim problem related to law, the problem statement can be "Does the 'force majeure' clause in this property insurance contract apply to losses caused by extreme weather?" The entity ambiguities involved in this problem statement include that "this contract" is not clearly specified in terms of specific type (such as house insurance, vehicle insurance, enterprise property insurance). The intention ambiguities involved include that "extreme weather" may have different definitions in insurance terms: strictly conforming to the types of disasters listed in the contract (such as typhoon, flood, earthquake); or belonging to the catch-all clause of "other force majeure", and it is necessary to judge in combination with insurance industry practices. Therefore, the content of the first clarification request generated can be: "May I ask what type of this insurance contract is? (such as house insurance, vehicle insurance), and whether the 'force majeure' clause in the contract clearly lists the situations related to 'extreme weather' (such as typhoon, heavy rain, flood)?".
[0048] When the problem statement is an intelligent home appliance control instruction problem related to smart home, the problem statement can be "Help me turn on the devices in the living room." The entity ambiguities involved in this problem statement include that "devices in the living room" is not clearly defined. There may be various devices in the living room, such as TV, air conditioner, lights, air purifier, etc., and it is not clear which one the user specifically wants to turn on. The intention ambiguities involved include the action of "turn on", which may have different meanings for different devices. For example, turning on the TV may mean turning on the power and switching to the last watched channel; turning on the air conditioner may involve selecting the cooling or heating mode and setting the temperature, etc.; turning on the lights may need to clarify whether all the lights are to be turned on or the lights in a specific area are to be turned on. Therefore, the content of the first clarification request generated can be "Hello, may I ask which device in the living room you want to turn on? Is it the TV, air conditioner, lights or other devices? In addition, for the device you want to turn on, are there any specific setting requirements, such as channel switching for the TV, mode and temperature setting for the air conditioner, or brightness adjustment for the lights?".
[0049] Step 1062: Simulate a response to the content of the first clarification request through the user simulator of the large language model to generate simulated clarification response content; Among them, a user simulator is also integrated in the large language model. For insurance claim problems, the simulated clarification response content generated through the user simulator can be multiple. For example, it can be "It is enterprise property insurance, and 'heavy rain' and 'flood' are listed in the terms.", "Vehicle insurance, the terms only mention 'natural disasters' and do not mention specific weather.", "What counts as 'extreme weather'? We had a once-in-a-decade heavy snowfall here, and the insurance agent said it doesn't count.".
[0050] Among them, for the smart home appliance control command problem, the simulated clarification response content generated by the user simulator can be "I want to turn on the TV in the living room and switch to the news channel.", "Turn on the air conditioner in the living room, cooling mode, 26 degrees." or "What do you mean by specific setting requirements? I just want to turn on the lights."
[0051] Step 1063: Generate target clarification request content based on the simulated clarification response content.
[0052] Among them, for insurance claims, the simulated clarification response content can be analyzed to reveal that "extreme weather" may lack quantitative standards in the contract (such as rainfall, snow thickness, etc.), and users need to be guided to provide clause details. After optimizing the content of the first clarification request, the target clarification request can be "What is the type of insurance contract? (such as housing, vehicles, corporate property); in the 'force majeure' clause of the contract: are the specific types of 'extreme weather' clearly listed (such as typhoons, heavy rains, floods)? If 'natural disasters' are mentioned, is there a definition of 'extreme' (such as 'rainfall exceeding 500mm / day', 'snow thickness exceeding 30cm')?"
[0053] Among them, for the problem of smart home appliance control instructions, the simulated clarification response content can be analyzed, which shows that the expression "specific setting requirements" is relatively professional, and some users may find it difficult to understand, and need to be replaced with a more understandable expression. The content of the target clarification request after optimizing the content of the first clarification request can be "Which device in the living room do you want to turn on? For example, TV, air conditioning, lights or other devices. Are there any special operating requirements for the device you choose to turn on? For example, which channel should the TV be switched to, the air conditioner should be set to cooling, heating or other modes, what is the temperature setting, and whether the lights are all turned on, brightened or dimmed, etc.".
[0054] It should be noted that, in other embodiments, the target clarification request content may also be generated directly based on the entity ambiguity corresponding to the entity ambiguity and / or the intention ambiguity of the intention ambiguity.
[0055] In some embodiments, the intelligent question-answering system may include a dual-agent interaction framework, and a user simulator driven by a language model may interact with the question-answering agent to adaptively optimize the generation of logical forms, thereby gradually eliminating the influence of ambiguity and simulating the user's response to the clarification request issued by the question-answering agent. Given the golden SPARQL query S′ and the first clarification request content, the agent generates the simulated clarification response content in the tth round, as shown in the following formula (10): (10); By integrating information obtained from multiple dimensions, answers to complex questions are ultimately generated.
[0056] In the embodiments of the present application, the first clarification request content is generated by combining entities and intention ambiguities, the user response is rehearsed with the help of a user simulator, and the target clarification request content is optimized based on the simulation results (simulated clarification response content). Potential problems of the clarification request (such as obscure expression and option ambiguity) can be discovered in advance, the accuracy and user acceptance of the clarification content can be improved, multiple rounds of ineffective interactions can be reduced, and the conversation efficiency and user experience can be effectively improved in scenarios such as intelligent Q&A and customer service.
[0057] The embodiments of the present application may relate to the technical field of knowledge graph question answering (KGQA) in the legal field. Most of the questions in the legal field are expressed in an oral language environment, but legal terms are professional, and the direct use of text matching or vector matching technology has poor effects. In the process of parsing a natural language query into an executable logical expression in the embodiments of the present application, by analyzing and clarifying the entity and intention ambiguity of the question sentence, an answer can be efficiently retrieved from the structured knowledge graph, and the target clarification request content is optimized based on the simulation results (simulated clarification response content), and the matching effect is good.
[0058] In another exemplary embodiment of the present application, as Figure 7 shown, the question clarification method based on entity and intention ambiguity analysis further includes the following steps: Step 111: When both the entity ambiguity and the intention ambiguity are less than or equal to the preset threshold, call the SPARQL execution tool to execute a SPARQL query based on the logical structure generated by the semantic representation.
[0059] Among them, a SPARQL execution tool is also integrated in the large language model. When both the entity ambiguity and the intention ambiguity are less than or equal to the preset threshold, it indicates that the semantic representation of the question sentence is clear, and the SPARQL execution tool can directly execute a SPARQL query on the knowledge base to provide basic query function support. After receiving the target clarification response content of the user, the question answering agent (QA Agent) updates the semantic representation of the question sentence, uses the SPARQL tool to execute the constrained query, and updates the logical form in combination with the Bayesian inference result. The user simulator (driven by LLMs) is responsible for simulating possible feedback paths to further constrain the query conditions; the finally generated SPARQL query is executed after being verified to be unambiguous, and the system returns the result and can output the inference process and confidence evaluation. Experiments show that this method improves the accuracy by 3.5% on complex query datasets (such as CWQ), especially in scenarios with limited samples.
[0060] In the embodiments of the present application, by setting the entity and intention ambiguity threshold, the SPARQL execution tool is only called when the semantics is clear, and the query is executed based on the logical structure of the semantic representation, which can avoid query errors caused by ambiguous semantics, ensure the accuracy of SPARQL queries, improve the retrieval efficiency of the knowledge graph, and reduce the consumption of invalid query resources at the same time, so as to achieve efficient and accurate semantic understanding and execution in scenarios such as intelligent question answering and data retrieval.
[0061] The embodiments of the present application aim to solve the ambiguity problem in Knowledge Graph Question Answering (KGQA). The method of the embodiments of the present application dynamically processes entity ambiguity and intention ambiguity by introducing a fuzzy clarification plug-in in the interactive knowledge graph question answering; this method first proposes a new fuzzy clarification plug-in to dynamically process ambiguity through interactive clarification, adopts a Bayesian inference mechanism to quantify query ambiguity, and guides the LLM to determine when and how to request user clarification within the multi-turn dialogue framework. The second is to develop a dual-agent interaction framework, in which the user simulator based on the large language model can iteratively refine the logical form by simulating user feedback.
[0062] Based on the same inventive concept, the embodiments of the present application also provide a problem clarification device based on entity and intention ambiguity analysis for implementing the problem clarification method based on entity and intention ambiguity analysis involved above. The implementation solutions provided by this device to solve problems are similar to the implementation solutions described in the above method. Therefore, the specific limitations in one or more embodiments of the problem clarification device based on entity and intention ambiguity analysis provided below can refer to the limitations on the problem clarification method based on entity and intention ambiguity analysis in the above text, and will not be repeated here.
[0063] In an exemplary embodiment, as Figure 8 shown, a problem clarification device 200 based on entity and intention ambiguity analysis is provided, including: An acquisition module 201, configured to acquire a problem statement input by a user; An analysis module 202, configured to loop and execute the following steps until both the entity ambiguity and the intention ambiguity of the problem statement are less than or equal to a preset threshold: analyze the entities and intentions in the problem statement to obtain the entity ambiguity and the intention ambiguity of the problem statement; A generation module 203, configured to, when the entity ambiguity and / or the intention ambiguity is greater than the preset threshold, use a large language model to generate target clarification request content based on the entity ambiguity corresponding to the entity ambiguity and / or the intention ambiguity corresponding to the intention ambiguity; A sending module 204, configured to send the target clarification request content to the user and obtain the target clarification response content of the user; An updating module 205, configured to update the semantic representation of the question statement based on the target clarification response content.
[0064] As an optional implementation manner, the parsing module 202 includes: a decomposition sub-module, configured to decompose the question statement into at least one question triple, where each question triple includes a head entity, a predicate, and a tail entity, and the head entity and the tail entity are collectively referred to as entities; a first generation sub-module, configured to, for the head entity or the tail entity in each question triple, call an entity query tool to query first information related to the head entity or the tail entity in a knowledge base, and generate an entity ambiguity based on the first information; a second generation sub-module, configured to, based on the head entity and the predicate in the at least one question triple, call a predicate analysis tool to query second information related to the head entity and the predicate in the knowledge base, and generate an intention ambiguity based on the second information; the generation module includes: a third generation sub-module, configured to call an interactive clarification tool in a large language model to generate target clarification request content based on the entity ambiguity corresponding to the entity ambiguity and / or the intention ambiguity corresponding to the intention ambiguity.
[0065] As an optional implementation manner, the first generation sub-module includes: a first determination unit, configured to determine the prior probability of the corresponding entity based on the popularity of each entity in the first information; a second determination unit, configured to determine the conditional probability of the question statement under the condition that the corresponding entity exists based on the description information of each entity in the first information and the question statement; a third determination unit, configured to determine the posterior probability of the corresponding entity through the Bayesian formula based on the prior probability and the conditional probability of each entity; a fourth determination unit, configured to determine the entropy of the distributions of multiple entities based on the posterior probability of each entity; a first generation unit, configured to generate an entity ambiguity based on the entropy of the distributions of multiple entities.
[0066] As an alternative implementation, the second generation sub-module includes: a fifth determination unit configured to determine candidate tail entities in the second information that match the head entity and the predicate in each of the problem triples; a second generation unit configured to generate candidate triples based on the head entity, the predicate, and the candidate tail entities in each of the problem triples; a sixth determination unit configured to determine the joint prior probability of the candidate triples; a seventh determination unit configured to determine the semantic matching probability between the problem statement and the corresponding candidate triple under the condition of a candidate triple composed of a head entity, a predicate, and a candidate tail entity, where the probability is used to measure the explanatory ability of the corresponding candidate triple for the problem statement; an eighth determination unit configured to determine the posterior probability of each predicate based on the joint prior probability and the semantic matching probability through the Bayesian formula; a ninth determination unit configured to determine the entropy of multiple predicate distributions based on the posterior probability of each predicate; and a third generation unit configured to generate an intention ambiguity based on the entropy of the multiple predicate distributions.
[0067] As an alternative implementation, the third generation module includes: a fourth generation sub-module configured to call the interactive clarification tool of the large language model and generate first clarification request content based on the entity ambiguity corresponding to the entity ambiguity and / or the intention ambiguity of the intention ambiguity; a fifth generation sub-module configured to generate simulated clarification response content by simulating a response to the first clarification request content through the user simulator of the large language model; and a sixth generation sub-module configured to generate target clarification request content based on the simulated clarification response content.
[0068] As an alternative implementation, the device further includes: a call module configured to call the SPARQL execution tool and execute a SPARQL query based on the logical structure generated by the semantic representation when both the entity ambiguity and the intention ambiguity are less than or equal to the preset threshold.
[0069] In an exemplary embodiment, a computer device is provided. The computer device can be a server or a terminal, and its internal structure diagram can be as Figure 9As shown in the figure. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, it implements a problem clarification method based on entity and intention ambiguity analysis.
[0070] Those skilled in the art can understand that Figure 9 the structure shown in the figure is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.
[0071] In an exemplary embodiment, a computer device is further provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented.
[0072] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by the processor, the steps in the above method embodiments are implemented.
[0073] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by the processor, the steps in the above method embodiments are implemented.
[0074] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.
[0075] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tapes, floppy disks, flash memories, optical memories, high-density embedded non-volatile memories, resistive random access memories (ReRAM), magnetoresistive random access memories (MRAM), ferroelectric random access memories (FRAM), phase change memories (PCM), graphene memories, etc. Volatile memories can include random access memory (RAM) or external cache memories, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0076] The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in this application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logics, data processing logics based on quantum computing, etc., without limitation.
[0077] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0078] In this article, specific examples are used to elaborate on the principles and implementation manners of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application; at the same time, for those of ordinary skill in the art, according to the idea of this application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to this application.
Claims
1. A problem clarification method based on entity and intention ambiguity analysis, characterized in that The problem clarification method based on entity and intention ambiguity analysis includes: Obtain the problem statement input by the user; Loop through the following steps until both the entity ambiguity and intention ambiguity of the problem statement are less than or equal to a preset threshold: Parse the entities and intentions in the problem statement to obtain the entity ambiguity and intention ambiguity of the problem statement; When the entity ambiguity and / or the intention ambiguity is greater than the preset threshold, use a large language model to generate target clarification request content based on the entity ambiguity corresponding to the entity ambiguity and / or the intention ambiguity corresponding to the intention ambiguity; Send the target clarification request content to the user and obtain the user's target clarification response content; Update the semantic representation of the problem statement based on the target clarification response content.
2. The problem clarification method based on entity and intent ambiguity analysis according to claim 1, wherein The parsing of the entities and intentions in the problem statement to obtain the entity ambiguity and intention ambiguity of the problem statement includes: Decompose the problem statement into at least one problem triple, where each problem triple includes a head entity, a predicate, and a tail entity, and the head entity and the tail entity are collectively referred to as entities; For the head entity or tail entity in each problem triple, call an entity query tool to query the first information related to the head entity or tail entity in the knowledge base, and generate entity ambiguity based on the first information; Based on the head entity and predicate in the at least one problem triple, call a predicate analysis tool to query the second information related to the head entity and predicate in the knowledge base, and generate intention ambiguity based on the second information; The use of a large language model to generate target clarification request content based on the entity ambiguity corresponding to the entity ambiguity and / or the intention ambiguity corresponding to the intention ambiguity includes: Call the interactive clarification tool in the large language model to generate target clarification request content based on the entity ambiguity corresponding to the entity ambiguity and / or the intention ambiguity corresponding to the intention ambiguity.
3. The problem clarification method based on entity and intention ambiguity analysis according to claim 2, characterized in that The generation of entity ambiguity based on the first information includes: Determine the prior probability of the corresponding entity based on the popularity of each entity in the first information; Based on the description information of each entity in the first information and the problem statement, determine the conditional probability of the problem statement under the condition that the corresponding entity exists; Based on the prior probability and conditional probability of each entity, determine the posterior probability of the corresponding entity through Bayes' formula; Based on the posterior probability of each entity, determine the entropy of the multiple entity distributions; Generate entity ambiguity based on the entropy of the multiple entity distributions.
4. The problem clarification method based on entity and intention ambiguity analysis according to claim 2, characterized in that The generation of intention ambiguity based on the second information includes: Determine the candidate tail entities in the second information that match the head entity and predicate in each problem triple; Generate candidate triples based on the head entity, predicate, and candidate tail entities in each problem triple; Determine the joint prior probability of the candidate triples; Given a candidate triple composed of a head entity, a predicate, and a candidate tail entity, determine the semantic matching probability between the problem statement and the corresponding candidate triple, where the probability is used to measure the explanatory ability of the corresponding candidate triple for the problem statement; Based on the joint prior probability and the semantic matching probability, determine the posterior probability of each predicate through Bayes' formula; Based on the posterior probability of each predicate, determine the entropy of multiple predicate distributions; Generate an intention ambiguity based on the entropy of the multiple predicate distributions.
5. The problem clarification method based on entity and intention ambiguity analysis according to claim 1, characterized in that Using the large language model, generating target clarification request content based on the entity ambiguity corresponding to the entity ambiguity and / or the intention ambiguity of the intention ambiguity, including: Invoke the interactive clarification tool of the large language model to generate the first clarification request content based on the entity ambiguity corresponding to the entity ambiguity and / or the intention ambiguity of the intention ambiguity; Simulate a response to the first clarification request content through the user simulator of the large language model to generate simulated clarification response content; Generate target clarification request content based on the simulated clarification response content.
6. The problem clarification method based on entity and intent ambiguity analysis according to any one of claims 1 to 5, characterized in that The problem clarification method based on entity and intention ambiguity analysis further includes: In the case where both the entity ambiguity and the intention ambiguity are less than or equal to the preset threshold, invoke the SPARQL execution tool to execute a SPARQL query based on the logical structure generated by the semantic representation.
7. A problem clarification device based on entity and intention ambiguity analysis, characterized in that The problem clarification device based on entity and intention ambiguity analysis includes: An acquisition module for acquiring a problem statement input by a user; An analysis module for repeatedly performing the following steps until both the entity ambiguity and the intention ambiguity of the problem statement are less than or equal to a preset threshold: analyze the entities and intentions in the problem statement to obtain the entity ambiguity and the intention ambiguity of the problem statement; A generation module for, in the case where the entity ambiguity and / or the intention ambiguity is greater than the preset threshold, using the large language model to generate target clarification request content based on the entity ambiguity corresponding to the entity ambiguity and / or the intention ambiguity corresponding to the intention ambiguity; A sending module for sending the target clarification request content to the user and obtaining the target clarification response content of the user; An update module for updating the semantic representation of the problem statement based on the target clarification response content.
8. A computer device, comprising: A memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the problem clarification method based on entity and intention ambiguity analysis according to any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the problem clarification method based on entity and intention ambiguity analysis according to any one of claims 1-6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the problem clarification method based on entity and intention ambiguity analysis according to any one of claims 1-6.
Citation Information
Patent Citations
Question-answering method and device based on human-computer interaction, equipment and medium
CN112035647A
Clarifying questions for rewriting ambiguous user utterance
CN113906433A
Question and answer method based on combination of semantic analysis and vector modeling
CN114896407A
Question and answer method based on intention determination logic and server
CN118093848A
User intention recognition and application method and system in intelligent question answering system
CN118861219A
Cited By
A large language model-based question and number intention intelligent analysis method and system
CN122757442A