Policy problem reply method, apparatus and device, and computer program product

By using pre-generated business knowledge decision trees and agents in the knowledge base question and answer system for information retrieval, the accuracy problem caused by inaccurate file slices is solved, the accuracy and relevance of policy questions are improved, and the question and answer system is improved overall performance.

CN119202167APending Publication Date: 2024-12-27CHINA MERCHANTS BANK
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202411243650.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

During the information retrieval stage, the existing knowledge base question and answer system has inaccurate file slices, resulting in irrelevant or opposite content in the answer, which affects the accuracy and accuracy of policy questions.

Method used

Using a pre-generated business knowledge decision tree method, a business knowledge base is generated through an agent, avoiding slices of knowledge text, and using vectorized processing and similarity calculation algorithms to search information to ensure the accuracy of policy problem responses.

Benefits of technology

It improves the accuracy of information retrieval in the business knowledge base, enhances the accuracy and relevance of policy questions responses, reduces manual intervention, and improves the efficiency and user experience of the question-and-answer system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202167A_ABST
    Figure CN119202167A_ABST
Patent Text Reader

Abstract

The invention discloses a policy question reply method, device and equipment and a computer program product, and relates to the technical field of natural language processing, and the policy question reply method comprises the steps: receiving a policy consultation question; based on a pre-generated business knowledge base, replying the policy consultation question to generate a policy question reply result, the business knowledge base being obtained based on a pre-generated business knowledge decision tree, and the business knowledge decision tree being generated through a preset agent according to the initial business knowledge question-answer pair. In the application, the business knowledge base is obtained based on the pre-generated business knowledge decision-making tree, the business knowledge decision-making tree is generated through the preset agent according to the initial business knowledge question-answer pair, and when the business knowledge base is constructed, the knowledge text does not need to be sliced, so that the problem that an existing knowledge base question-answer system is relatively low in accuracy is solved; the accuracy of information retrieval of the business knowledge base is improved, and then the accuracy of policy question reply is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of natural language processing technology, and in particular to a policy question answering method, device, equipment and computer program product. Background Art

[0002] The current knowledge base question answering system solution based on the large language model is mainly based on Langchain+Vectorstore+LLMs. It provides users with accurate, relevant and high-quality questions and answers through the process of receiving questions, understanding questions, information retrieval, generating answers, optimizing answers, and answer feedback. In the information retrieval stage, the knowledge base question answering system searches the local vector knowledge base based on the key information obtained by understanding the question, and the construction process of the local vector knowledge base is as follows:

[0003] (1) Collect knowledge texts, including different file formats such as text / doc / pdf.

[0004] (2) Segment the knowledge text into text blocks.

[0005] (3) The text block is converted into vector data through the embedding algorithm, and the Faiss index is constructed and stored in the local vector knowledge base.

[0006] However, when slicing knowledge texts, Langchain's fully automatic file slicing cannot guarantee semantic accuracy. Content that is adjacent in position but should be semantically separated may be placed in one slice, resulting in irrelevant or even opposite content in the final answer. The accuracy of information retrieval is poor, and therefore the accuracy of question responses is also low.

[0007] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0008] The main purpose of this application is to provide a policy question answering method, device, equipment and computer program product, aiming to solve the technical problem of low accuracy of existing knowledge base question answering systems.

[0009] To achieve the above objectives, this application proposes a policy question response method, which includes:

[0010] Receive policy consultation questions;

[0011] Based on a pre-generated business knowledge base, the policy consultation question is answered to generate a policy question answering result. The business knowledge base is obtained based on a pre-generated business knowledge decision tree, and the business knowledge decision tree is generated by a preset intelligent agent according to the initial business knowledge question and answer pair.

[0012] In one embodiment, before the step of responding to the policy consultation question based on the pre-generated business knowledge base and generating the policy question response result, the step further includes:

[0013] Obtaining an initial business knowledge question-answer pair, and inputting the initial business knowledge question-answer pair into the intelligent agent;

[0014] Based on the intelligent agent, according to the initial business knowledge question and answer pair, the business knowledge decision tree is generated through a preset question reasoning model;

[0015] The business knowledge base is obtained according to the business knowledge decision tree.

[0016] In one embodiment, the business knowledge question-answer pair includes an initial business knowledge question and a corresponding initial business question answer. Based on the agent, the step of generating a business knowledge decision tree through a preset question reasoning model according to the initial business knowledge question-answer pair includes:

[0017] By means of the intelligent agent, prompt words are assembled according to the initial business knowledge question to obtain a first prompt word;

[0018] Inputting the first prompt word and the initial business knowledge question into the question reasoning model for reasoning to obtain first reasoning data and a first action instruction;

[0019] Performing similarity matching between the first inference data and the initial business question answer to obtain a first similarity;

[0020] Determine whether the first similarity is greater than a preset similarity threshold, and obtain a first determination result;

[0021] The business knowledge decision tree is generated according to the first judgment result and the initial business knowledge question and answer pair.

[0022] In one embodiment, the business knowledge decision tree is a first business knowledge decision tree, and the step of generating the business knowledge decision tree according to the first judgment result and the initial business knowledge question and answer pair further includes:

[0023] When the first judgment result is that the first similarity is greater than the similarity threshold, generating a first reasoning question response according to the first reasoning data;

[0024] The first business knowledge decision tree is generated according to the first reasoning question response and the initial business knowledge question and answer pair.

[0025] In one embodiment, the business knowledge decision tree is a second business knowledge decision tree, and the step of generating the business knowledge decision tree according to the first judgment result and the initial business knowledge question and answer pair includes:

[0026] When the first judgment result is that the first similarity is not greater than the similarity threshold, executing the action instruction and generating a second prompt word;

[0027] Inputting the second prompt word and the initial business knowledge question into the question reasoning model for reasoning to obtain second reasoning data and a second action instruction;

[0028] Performing similarity matching between the second inference data and the initial business question answer to obtain a second similarity;

[0029] Repeat the steps of prompt word generation, model reasoning and similarity matching until the obtained second similarity is greater than the similarity threshold;

[0030] generating a second reasoning question response according to the second reasoning data;

[0031] The second business knowledge decision tree is generated according to the second reasoning question response and the initial business knowledge question and answer pair.

[0032] In one embodiment, the step of obtaining the business knowledge base according to the business knowledge decision tree includes:

[0033] In response to a manual proofreading instruction, generating a proofread decision tree according to the business knowledge decision tree;

[0034] The business knowledge base is obtained according to the proofread decision tree.

[0035] In one embodiment, the business knowledge base includes a plurality of business knowledge question-answer pairs, each of which includes a business question and a corresponding business question answer. The step of answering the policy consultation question based on the pre-generated business knowledge base and generating a policy question answer result includes:

[0036] Vectorizing the policy consultation questions to obtain question vector data;

[0037] Based on a preset similarity calculation algorithm, according to the question vector data, a plurality of the business questions in the business knowledge base are searched to obtain a target business question;

[0038] According to the target business question, a corresponding business question answer is obtained as the target business question answer;

[0039] Based on the target business question response, the policy question response result is generated.

[0040] In addition, to achieve the above purpose, the present application also proposes a policy question answering device, the policy question answering device comprising:

[0041] Question receiving module, used to receive policy consultation questions;

[0042] The question answering module is used to answer the policy consulting questions based on a pre-generated business knowledge base and generate policy question answering results. The business knowledge base is obtained based on a pre-generated business knowledge decision tree, and the business knowledge decision tree is generated by a preset intelligent agent according to the initial business knowledge question and answer pair.

[0043] In addition, to achieve the above-mentioned purpose, the present application also proposes a policy question response device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the policy question response method described above.

[0044] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the policy question response method described above are implemented.

[0045] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the policy question response method described above.

[0046] The present application provides a method for answering policy questions. The business knowledge base is obtained based on a pre-generated business knowledge decision tree. The business knowledge decision tree is generated by a preset intelligent agent according to an initial business knowledge question and answer pair. There is no need to slice the knowledge text when constructing the business knowledge base. This solves the technical problem of low accuracy of the existing knowledge base question and answer system, improves the accuracy of information retrieval of the business knowledge base, and thereby improves the accuracy of answering policy questions. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0049] Figure 1 A flowchart diagram for the first embodiment of the method for answering policy questions in this application;

[0050] Figure 2 This is a brief flow chart of the knowledge base question answering system based on a large language model;

[0051] Figure 3 A flowchart diagram for the second embodiment of the method for answering policy questions in this application;

[0052] Figure 4 A schematic diagram of a brief process of generating a business knowledge decision tree provided in Example 2 of the present application;

[0053] Figure 5 A schematic diagram of the structure of the business knowledge decision tree provided in Example 2 of the present application;

[0054] Figure 6 A schematic diagram of the overall process of the policy question response method provided in Example 2 of this application;

[0055] Figure 7 This is a schematic diagram of the module structure of the policy question answering device according to an embodiment of the present application;

[0056] Figure 8 This is a schematic diagram of the device structure of the hardware operating environment involved in the policy question response method in the embodiment of the present application.

[0057] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0058] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0059] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0060] The main solutions of the embodiments of this application are:

[0061] Receive policy consultation questions;

[0062] Based on a pre-generated business knowledge base, the policy consultation question is answered to generate a policy question answering result. The business knowledge base is obtained based on a pre-generated business knowledge decision tree, and the business knowledge decision tree is generated by a preset intelligent agent according to the initial business knowledge question and answer pair.

[0063] In the existing technology, the intelligent question-answering system provides users with accurate, relevant and high-quality questions and answers through the process of receiving questions, understanding questions, information retrieval, generating answers, optimizing answers, and answer feedback.

[0064] (1) Receiving questions: Users can enter questions via text, such as in a chat window or search box;

[0065] (2) Question understanding: After receiving the question, the system needs to understand and parse it, which is the core step of the entire process. The system uses natural language processing (NLP) technology to perform syntactic and semantic analysis on user questions, extract key information and identify user intent;

[0066] (3) Information retrieval: After understanding the question, the system needs to retrieve relevant information from various data sources to generate accurate answers. Data sources include databases, knowledge bases, document libraries, etc. The system generates retrieval queries based on the keywords and intents extracted during the question understanding phase. The retrieval process is completed with the help of retrieval models, such as probability models, voice models, etc., and finally relevance sorting is performed. The sorting algorithm is used to sort the retrieved content and return the most relevant results first;

[0067] (4) Answering questions: The system generates answers to user questions based on the information obtained during the information retrieval phase. Answer generation can be done by directly extracting text fragments or by using natural language generation (NLG) technology to form more natural and coherent answers.

[0068] Intelligent question answering obtains answers by applying intelligent agents driven by large language models to intelligent question answering systems. The advantage of intelligent agents is that they can greatly improve the three steps of understanding questions, information retrieval, and answering questions, thereby improving the overall system response effect. The basic components of an intelligent agent include the following four parts: planning, tools, execution, and memory.

[0069] (1) Planning: The ability to automatically decompose large tasks into smaller, manageable sub-goals and to self-criticize and reflect on past behaviors can help the agent improve its own intelligence and adaptability, thereby improving the quality of the final result;

[0070] (2) Memory: It can acquire, store, retain, and later retrieve information. It works well in multi-round conversations, that is, users do not need to repeat previous content when talking to AI.

[0071] (3) Action: Supplement the information lacking in its internal model by calling external interfaces or executing external instructions, such as automatically searching web pages or documents;

[0072] (4) Tools: refers to external APIs that can be called by the agent for information extraction or environment interaction, enabling the agent to handle tasks that its core modules cannot handle directly, such as calling the weather API to tell the user weather information, even though the weather information is not in the agent’s knowledge base.

[0073] The current knowledge base question answering system solution based on large language model is mainly based on Langchain+Vectorstore+LLMs, for example: A knowledge base question answering system based on large language model (patent number: CN202410325809), for details, refer to Figure 2 , Figure 2 The following is a brief flow chart of the knowledge base question answering system based on a large language model. The implementation steps are as follows:

[0074] Phase 1: Local vector knowledge base construction process:

[0075] (1) Collect knowledge texts, including different file formats such as text / doc / pdf;

[0076] (2) Segment the knowledge text into text blocks;

[0077] (3) The text block is converted into vector data through the embedding algorithm, and the Faiss index is constructed and stored in the local vector knowledge base.

[0078] Phase 2: User input and retrieval process:

[0079] (4) Convert the user input question into question vector data through the embedding algorithm;

[0080] (5) Search the N text information most similar to the question vector data from the local vector knowledge base through the Faiss library;

[0081] (6) Obtain contextual text information related to the question;

[0082] (7) Fill in the prompt template with text information and questions;

[0083] (8) Input the prompt template into the large language model to get the answer.

[0084] The shortcomings of the knowledge question answering system based on Langchain+Vectorstore+LLMs are as follows:

[0085] 1. When segmenting knowledge in step (2), Langchain’s fully automatic file slicing cannot guarantee semantic accuracy. Content that is adjacent in position but should be semantically separated may be placed in one slice, resulting in irrelevant or even opposite content in the final answer.

[0086] 2. In step (5), it is not possible to extract the appropriate number of slices (Document) based on different questions. Even if the number of slices is accurate, different questions have different requirements for the number of slices. For example, one slice can answer relatively clear questions such as "I don't have an invoice, how can I withdraw my housing fund offline in Shenzhen", while more slices are needed to answer more vague questions such as "I want to buy a house, how can I withdraw my housing fund". Langchain does not have the ability to extract different numbers of slices based on different questions.

[0087] 3. In step (8), for policy-related questions, the original text in the knowledge base is often the best answer, and the "secondary processing" of the original text by the large model will destroy its semantics and integrity, resulting in a decrease in the accuracy of the output results.

[0088] In the actual application process in the field of policy question answering, the above methods perform poorly in the knowledge base application of policy-type questions. Policy-type questions have high requirements for the ability of the application knowledge base to determine the user's intention and the accuracy of the answer: First, 100% accuracy. Based on the seriousness of the interaction, the application output content must be able to achieve 100% accuracy, especially for policy, legal and operating manual documents; second, to determine the user's true intention. In many cases, the user's initial intention is vague, and the application must be able to "ask" or "respond to questions" to guide users to find the target answer. The "one question and one answer" commonly seen in knowledge-based question answering cannot meet this requirement.

[0089] The present application provides a solution, in which a business knowledge base is obtained based on a pre-generated business knowledge decision tree. The business knowledge decision tree is generated by a preset intelligent agent according to an initial business knowledge question and answer pair. There is no need to slice the knowledge text when constructing the business knowledge base, which solves the technical problem of low accuracy of the existing knowledge base question and answer system, improves the accuracy of information retrieval of the business knowledge base, and thereby improves the accuracy of responses to policy questions.

[0090] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a policy question response system, etc. The following takes the policy question response system as an example to illustrate this embodiment and the following embodiments.

[0091] Based on this, the embodiment of the present application provides a policy question reply method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the method for answering policy questions in this application.

[0092] In this embodiment, the policy question response method includes steps S10 to S20:

[0093] Step S10, receiving policy consultation questions;

[0094] It should be noted that policy consultation questions are specific questions asked by users regarding policies, providing the system with the content of the questions that need to be answered.

[0095] Step S20, based on a pre-generated business knowledge base, respond to the policy consultation question and generate a policy question response result. The business knowledge base is obtained based on a pre-generated business knowledge decision tree, and the business knowledge decision tree is generated by a preset intelligent agent according to the initial business knowledge question and answer pair.

[0096] The policy question response system uses keyword matching, topic modeling or semantic search technology to retrieve information related to policy consultation questions from the business knowledge base, and organizes the retrieved information into easy-to-understand answers based on the retrieved knowledge through text generation technology such as natural language generation (NLG).

[0097] In a feasible implementation, the business knowledge base includes a plurality of business knowledge question-answer pairs, each of which includes a business question and a corresponding business question answer. Step S20 may include steps S201 to S204:

[0098] Step S201, vectorizing the policy consultation question to obtain question vector data;

[0099] Step S202, based on a preset similarity calculation algorithm, searching for a plurality of the business problems in the business knowledge base according to the problem vector data to obtain a target business problem;

[0100] Step S203, according to the target business question, obtaining a corresponding business question answer as the target business question answer;

[0101] Step S204: generating the policy question response result according to the target business question response.

[0102] The policy question response system vectorizes policy consulting questions to obtain question vector data. This is usually achieved using word embedding models (such as Word2Vec, GloVe) or deep learning models (such as BERT, GPT). The purpose is to convert text data into a form that can be mathematically calculated to facilitate subsequent similarity calculations and retrieval. Then, a preset similarity calculation algorithm (such as cosine similarity or Euclidean distance) is used to compare the question vector data with the vectors of multiple business questions in the business knowledge base. This can find the business question that is most similar to the policy consulting question, thereby performing accurate retrieval. Then, based on the target business question, the corresponding business question response is obtained as the target business question response, and finally the target business question response is converted into the final policy question response result.

[0103] It should be noted that the similarity calculation algorithm is an algorithm used to calculate the similarity between vectors, such as cosine similarity, Euclidean distance, etc.

[0104] In addition, it should be noted that an agent is a software entity that can perceive the environment, make decisions and perform actions. Unlike traditional artificial intelligence, an agent has the ability to gradually complete a given goal by actively thinking and calling tools. The agent can receive input information and generate corresponding output information based on the information according to a preset logical algorithm. In this solution, when building an agent, the input information includes roles, skills, and restrictions. The tool that can be called is set to TreeMind data map, the question reasoning model that is called is set, and the task is set to generate a business knowledge decision tree based on the input business question and answer pair, where the question reasoning model can use a large language model.

[0105] Among them, the commonly used similarity calculation algorithms include:

[0106] 1. Cosine similarity: measures the cosine value of the angle between two vectors, used to calculate the similarity of text or word vectors.

[0107] 2. Euclidean distance: calculates the straight-line distance between two points, suitable for numerical data.

[0108] 3. Manhattan distance: Calculates the absolute sum of the distances between two points on the coordinate axis, applicable to grid data.

[0109] 4. Jaccard similarity: Calculates the similarity between two sets based on the intersection and union of the sets.

[0110] 5. Pearson correlation coefficient: measures the linear relationship between two variables and is used in statistical data analysis.

[0111] 6. Hamming distance: Calculates the number of different characters between two strings of equal length, often used in encoding and string matching.

[0112] When the cosine similarity is used as the similarity calculation algorithm, the process of similarity calculation using cosine similarity is as follows:

[0113] 1. Prepare data.

[0114] Text data: Convert text into vectors, for example using methods such as Bag of Words (BoW), TF-IDF, word embeddings (such as Word2Vec, GloVe), etc.

[0115] Numerical data: If your data is already in the form of numeric vectors, you can use those directly.

[0116] 2. Calculate the cosine similarity of the vectors.

[0117] For two vectors A and B, the following steps are involved:

[0118] Step 1: Calculate the dot product (inner product) of vectors A and B;

[0119] Step 2: Calculate the modulus (Euclidean norm) of vectors A and B;

[0120] Step 3: Calculate cosine similarity;

[0121] The final result is a value between [-1, 1], where 1 means complete similarity, -1 means complete opposite, and 0 means no similarity.

[0122] 3. Interpret the results.

[0123] Value range:

[0124] 1: Completely similar (both vectors have the same direction).

[0125] 0: No similarity (the two vectors are orthogonal).

[0126] -1: Completely opposite (the two vectors are in opposite directions).

[0127] In this implementation, by vectorizing policy consulting questions and calculating similarity with questions in the business knowledge base, the system can automatically and efficiently find the most relevant business questions and corresponding answers, thereby realizing an automated question-and-answer system. Through similarity calculation and question matching, it can ensure that policy consulting questions receive accurate and relevant business question responses, improve the accuracy and relevance of answers, and through fast matching and response, users can obtain the required information more quickly, thereby improving user experience and satisfaction. Automated question-and-answer matching reduces reliance on manual customer service, enabling the system to provide effective answers without human supervision. This not only improves the efficiency and accuracy of the question-and-answer system, but can also adapt to business changes, optimize user experience, and solve problems existing in traditional methods.

[0128] This embodiment provides a method for answering policy questions. The business knowledge base is obtained based on a pre-generated business knowledge decision tree. The business knowledge decision tree is generated by a preset intelligent agent according to an initial business knowledge question and answer pair. There is no need to slice the knowledge text when constructing the business knowledge base. This solves the technical problem of low accuracy of the existing knowledge base question and answer system, improves the accuracy of information retrieval of the business knowledge base, and thereby improves the accuracy of answering policy questions.

[0129] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can refer to the above introduction, and will not be repeated later. Figure 3 Before step S10, the policy question answering method further includes steps S301 to S303:

[0130] Step S301, obtaining an initial business knowledge question-answer pair, and inputting the initial business knowledge question-answer pair into the agent;

[0131] Step S302, based on the agent, according to the initial business knowledge question and answer pair, generating the business knowledge decision tree through a preset question reasoning model;

[0132] Step S303: obtaining the business knowledge base according to the business knowledge decision tree.

[0133] The policy question answering system obtains the initial business knowledge question and answer pairs and inputs the initial business knowledge question and answer pairs into the intelligent agent. Then, based on the intelligent agent, a business knowledge decision tree is generated through a preset question reasoning model according to the initial business knowledge question and answer pairs. Finally, the structure and information of the decision tree are converted into a complete business knowledge base, which includes organizing, storing and optimizing question and answer pairs so that they can be effectively retrieved and used.

[0134] It should be noted that the initial business knowledge question and answer pairs are preliminary business knowledge question and answer pairs collected from business experts, documents, databases or other relevant resources. These question and answer pairs usually contain standard answers to specific questions. A question and answer pair usually includes a question and its corresponding answer. For example, the question may be "How to apply for a return?", and the answer is "Please provide the purchase receipt and fill out the return application form." The business knowledge decision tree is a structured knowledge base containing decision nodes and paths.

[0135] Among them, the problem reasoning model can use a large language model. The large language model (LLM) is an artificial intelligence model based on deep learning, which is mainly used to process and generate natural language text. Their specific characteristics and working principles include:

[0136] 1. Transformer Architecture.

[0137] Self-Attention: A core technology that captures long-distance dependencies in the context by calculating the relationship between input words.

[0138] Multi-Head Attention: Focus on different parts of the input simultaneously to capture more information and details.

[0139] 2. Pre-training and fine-tuning.

[0140] Pre-training: Unsupervised learning is performed on large-scale text data, and the model learns the structure, grammar, and common sense of the language.

[0141] Fine-tuning: supervised learning on task-specific data, where the model is optimized for a specific application such as question answering, translation, or text generation.

[0142] 3. Text generation capability.

[0143] Natural Language Understanding: Understanding and parsing the intent and content of input text.

[0144] Text generation: Generate fluent and coherent text, capable of having conversations, writing articles, writing code, etc.

[0145] 4. Application areas.

[0146] Dialogue system: Provides natural dialogue for human-computer interaction.

[0147] Text Translation: Translate text between different languages.

[0148] Content generation: such as automatic writing, summary generation, etc.

[0149] Information Extraction: Extracting useful information and knowledge from text.

[0150] The powerful capabilities of the large language model come from its huge number of parameters and deep learning mechanism, which enables it to perform well in processing complex language tasks.

[0151] In a feasible implementation manner, the business knowledge question and answer pair includes an initial business knowledge question and a corresponding initial business question reply, and step S302 may include steps S3021 to S3025:

[0152] Step S3021, assembling prompt words according to the initial business knowledge question through the intelligent agent to obtain a first prompt word;

[0153] Step S3022, inputting the first prompt word and the initial business knowledge question into the question reasoning model for reasoning, and obtaining first reasoning data and a first action instruction;

[0154] Step S3023, performing similarity matching between the first inference data and the initial business question answer to obtain a first similarity;

[0155] Step S3024, determining whether the first similarity is greater than a preset similarity threshold, and obtaining a first determination result;

[0156] Step S3025: Generate the business knowledge decision tree according to the first judgment result and the initial business knowledge question and answer pair.

[0157] The policy question answering system uses an intelligent agent to parse the initial business knowledge question to determine its core elements and requirements, extract keywords and phrases from the parsing results, which are directly related to the question, consider the background and context of the question, obtain the first prompt word, and then input the first prompt word and the initial business knowledge question into the question reasoning model for reasoning to obtain the first reasoning data and the first action instruction, and then extract features from the first reasoning data and the initial question answer, such as word vectors, TF-IDF values, etc., and use the vector values ​​for similarity matching to obtain the first similarity, and then compare the first similarity with the preset similarity threshold to determine whether the first similarity is greater than the preset similarity threshold to obtain the first judgment result, and finally generate a business knowledge decision tree based on the first judgment result and the initial business knowledge question and answer pair.

[0158] In this implementation, the prompt words generated by the intelligent agent are used to improve the efficiency and accuracy of extracting key information from the initial business knowledge questions. The reasoning data and action instructions generated by the question reasoning model are used to support the accurate organization of business knowledge question and answer pairs, thereby improving the degree of automation of knowledge organization. By calculating the similarity between the reasoning data and the initial question response, the consistency of the information in the generated decision tree with the existing knowledge is ensured, thereby avoiding information inconsistency and redundancy. The business knowledge decision tree generated based on the matching results can systematically display business knowledge, which is convenient for subsequent query and management. The use of intelligent agents and reasoning models allows the decision tree to be dynamically adjusted and optimized according to actual business needs, thereby maintaining the timeliness and applicability of the knowledge base. As a result, efficient extraction, processing, matching and organization of business knowledge are achieved. The automatically generated and optimized business knowledge decision tree significantly improves the efficiency and accuracy of the knowledge management system, and solves technical problems such as high manual intervention, inconsistent information and insufficient decision support.

[0159] In another feasible implementation manner, the business knowledge decision tree is a first business knowledge decision tree, and step S3025 may include steps S302511 to S302512:

[0160] Step S302511: when the first judgment result is that the first similarity is greater than the similarity threshold, generating a first reasoning question response according to the first reasoning data;

[0161] Step S302512: Generate the first business knowledge decision tree based on the first reasoning question response and the initial business knowledge question and answer pair.

[0162] When the first judgment result is that the first similarity is greater than the similarity threshold, the policy question response system constructs a detailed first reasoning question response based on the first reasoning data, including an explanation, suggestion or solution to the business problem, ensuring that its content is targeted at the business problem and provides accurate explanation or suggestion, and then combines the first reasoning question response and the initial business knowledge question and answer pair to generate a first business knowledge decision tree.

[0163] In this implementation, when the first similarity is higher than a threshold, the reasoning question responses generated by the first reasoning data ensure that the generated decision tree is based on high-quality reasoning results, thereby improving the accuracy and practicality of the decision tree. The generated first business knowledge decision tree provides a systematic and structured knowledge base by integrating the initial business knowledge question and answer pairs and the reasoning question responses, which is easy to retrieve and use. The decision tree is automatically generated by combining the first reasoning question responses and the initial question and answer pairs, which reduces manual intervention and improves the efficiency of knowledge updating and maintenance. The decision tree can be dynamically generated and adjusted according to the reasoning data to ensure that the knowledge base can adapt to changes in business needs in a timely manner. As a result, efficient and accurate business knowledge decision tree generation is achieved, the knowledge management process is optimized, and the problems of high manual intervention, insufficient information consistency, and insufficient decision support are solved.

[0164] In another feasible implementation, the business knowledge decision tree is a second business knowledge decision tree, and step S3025 may include steps S302521 to S302526:

[0165] Step S302521, when the first judgment result is that the first similarity is not greater than the similarity threshold, executing the action instruction and generating a second prompt word;

[0166] Step S302522, inputting the second prompt word and the initial business knowledge question into the question reasoning model for reasoning, and obtaining second reasoning data and a second action instruction;

[0167] Step S302523, performing similarity matching between the second inference data and the initial business question answer to obtain a second similarity;

[0168] Step S302524, repeatedly executing the steps of prompt word generation, model reasoning and similarity matching until the obtained second similarity is greater than the similarity threshold;

[0169] Step S302525, generating a second reasoning question response according to the second reasoning data;

[0170] Step S302526: Generate the second business knowledge decision tree based on the second reasoning question response and the initial business knowledge question and answer pair.

[0171] When the first judgment result is that the first similarity is not greater than the similarity threshold, the policy question response system executes the action instruction, generates a second prompt word, and then: inputs the generated second prompt word into the question reasoning model together with the initial business knowledge question, and the model performs reasoning based on the new prompt word to obtain second reasoning data and a second action instruction, and then uses the second reasoning data (i.e., the answer based on the second prompt word) to compare with the answer to the initial business question, and calculates the similarity between the two to evaluate the accuracy and relevance of the second reasoning data, obtains the second similarity, and then repeats the steps of prompt word generation, model reasoning and similarity matching until the obtained second similarity is greater than the similarity threshold, and then uses the second reasoning data as the basis to generate the final second reasoning question response, and finally uses the second reasoning question response and the initial business knowledge question and answer pair to construct a second business knowledge decision tree.

[0172] In this implementation, prompt words and reasoning data are generated through continuous iteration to ensure that the ultimately generated second business knowledge decision tree contains accurate business knowledge and reasoning results. The decision tree can be dynamically adjusted according to new prompt words and reasoning results, thereby improving the applicability and accuracy of the decision tree. The automated generation and iteration process reduces manual intervention and improves the efficiency of knowledge updating. Through automated iterative generation and optimization, the problems of possible inaccuracy of initial reasoning results and insufficient quality of the decision tree are solved, thereby achieving efficient and accurate generation of the second business knowledge decision tree.

[0173] In another feasible implementation, step S303 may include steps S3031 to S3032:

[0174] Step S3031, in response to a manual proofreading instruction, generating a proofread decision tree according to the business knowledge decision tree;

[0175] Step S30312, obtaining the business knowledge base according to the proofread decision tree.

[0176] In response to manual proofreading instructions, the policy question response system manually proofreads the business knowledge decision tree, generates a proofread decision tree, and then parses the received proofread decision tree to extract key data such as node information, rules, and logical relationships, and builds a business knowledge base based on the parsed information. This includes: data structure, creating the data structure required for the business knowledge base, including information storage methods, index settings, etc.; content filling, filling the node content, rules, and logic in the decision tree into the knowledge base to form a complete knowledge system; relationship definition, establishing the relationship between information in the knowledge base to ensure that business rules and logic are reflected in the knowledge base.

[0177] It should be noted that manual proofreading instructions are instructions for manually checking and correcting errors or inconsistencies in the decision tree, which can ensure the accuracy and effectiveness of the decision tree in practical applications. These instructions may include modification suggestions for the decision tree structure, node content, branch logic, etc.

[0178] In this embodiment, a proofread decision tree is generated according to the business knowledge decision tree through manual proofreading instructions, which makes up for the parts that may be omitted or erroneous in the automatic generation process, ensures that the business knowledge in the decision tree is accurate, and ensures the accuracy and practicality of the decision tree. The final business knowledge base is obtained through the generated proofread decision tree, ensuring that the business knowledge base contains verified and complete information, and ensuring the quality and integrity of the knowledge base. By combining automatic generation and manual proofreading, the system can better identify and correct potential errors, improve the reliability and accuracy of the overall system, ensure the comprehensiveness of information in the business knowledge base, and reduce business decision-making problems caused by omissions or errors. As a result, a high-quality business knowledge base is generated, the accuracy and practicality of the decision tree are improved, the accuracy problems in the automatic generation process and the integrity problems of the knowledge base are solved, and the combination of automatic and manual processes is optimized.

[0179] For example, refer to Figure 4 and Figure 5 , Figure 4 A schematic diagram of a brief process of generating a business knowledge decision tree provided in the second embodiment of the present application is shown in FIG. Figure 5 A schematic diagram of the structure of the business knowledge decision tree provided in Example 2 of the present application.

[0180] Specifically, the brief process of generating a business knowledge decision tree is as follows:

[0181] (1) Submitting a task: Set the role and task instructions of the original agent, obtain the agent, and submit the task to the agent. You can directly ask questions or give a small number of sample examples so that the agent can better understand the target task and achieve better execution results. For example, you can set the original agent as follows:

[0182] Role:

[0183] A professional provident fund business knowledge expert can accurately construct a provident fund business knowledge graph decision tree.

[0184] Task: Build a decision tree based on citizens’ provident fund questions and answers, including the following:

[0185] 1. Carefully analyze the provident fund questions and answers provided by citizens.

[0186] 2. Build accurate decision trees according to different situations and conditions.

[0187] 3. If there are multiple questions and answers, please build a decision tree from top to bottom based on the questions and corresponding answers, and finally merge them into one decision tree.

[0188] In addition, there are the following restrictions:

[0189] 1. Only focus on content related to provident fund business and refuse to answer topics unrelated to provident fund.

[0190] 2. The constructed decision tree must accurately reflect the questions and answers, without any bias or creation out of thin air.

[0191] 3. Ensure that the decision tree has clear logic and is explainable.

[0192] 4. The decision tree must be output in the form of an xmind mind map.

[0193] (2) Assemble the prompt words and submit them to the big model interface API to obtain the next action instruction: The agent combines the user's task and the preset prompt words and submits them to the big model API, which returns two items:

[0194] Thought: It covers deep thinking, logical reasoning, strategic planning, and self-evaluation of the submission;

[0195] Action: Indicates the action instructions and related parameters to be executed based on the above thinking process

[0196] (3) Loop execution: execute commands, observe evaluation results, and obtain instructions for the next action.

[0197] ① Execute action: The agent decides the next specific action according to the instructions of the large model interface API. When the API provides a clear final answer, the system will directly feedback this answer to the user. If the API fails to give a final answer, the agent will further extract and parse the tools to be executed and their parameter information. Subsequently, the agent performs the corresponding work according to the provided parameters, which includes search engine queries, document retrieval, processing user input, file operations and other functions. After the tool is executed, a result in string format will be returned.

[0198] ② Assemble the prompt words and submit them to the big model interface API to obtain the next step instructions: These values ​​will be added to the prompt words as contextual information (Observation), and then the entire context information will be submitted to the big model API interface again to obtain the next action instructions.

[0199] Thought:……

[0200] Action:……

[0201] Observation: The result of tool execution.

[0202] Thought:……

[0203] Action:……

[0204] ③ Return results and build a decision tree: When the agent provides a clear final answer, the agent will feed back this answer to the user and build a business knowledge decision tree based on this answer.

[0205] In addition, for policy questions, there may be a gap between the user's initial answer and the final answer they want, and follow-up questions are the process of gradually clarifying vague intentions. The following is an example of a simulated conversation between a user and an artificial customer service representative:

[0206] User: Can I withdraw provident fund when renting a house?

[0207] Customer service: Yes, you can withdraw your provident fund for renting a house. You need to have paid your provident fund for three months and do not own a house. If you meet the conditions, you can apply. Where do you rent a house?

[0208] User: XX District.

[0209] Manual customer service: Do you have a rental invoice?

[0210] User: Yes.

[0211] Manual customer service: Do you plan to apply online or go to a branch?

[0212] Customer: Apply online.

[0213] Manual customer service: OK, this is how to apply online...

[0214] In the above case, the human customer service has a "decision tree" in his mind. By constantly "asking questions", he can choose the correct path in the decision tree and finally return the accurate answer.

[0215] In actual projects, in intelligent customer service, especially voice customer service scenarios, humans are required to generate such a "decision tree" based on the policy documents provided by the provident fund, and then configure it in the robot background in the form of a process robot.

[0216] On the one hand, it places high demands on the business knowledge and experience of the operators; on the other hand, if the provident fund provides a large number of policy questions and answers, it is very time-consuming to compile a complete decision tree.

[0217] The policy question answering method described in this embodiment can generate a business knowledge decision tree based on the input initial business knowledge question and answer pairs.

[0218] For example, enter the following initial business knowledge question and answer pair:

[0219] Question 1: How to withdraw housing provident fund if there is no rental invoice and no signed rental contract?

[0220] Answer 1: If the applicant has paid the housing provident fund in full for 3 consecutive months or more, and he or she and his or her spouse do not own a house in XX City and rent a house, they can apply for rental withdrawal without invoice, and the amount that can be withdrawn each month is 2,000 yuan.

[0221] Question 2: What materials are needed to withdraw rent without an invoice?

[0222] Answer 2: No materials are required. When you go to the counter or self-service machine, you only need to bring your original ID card (or facial recognition).

[0223] Question 3: What is the validity period for rental withdrawal without invoice?

[0224] Answer 3: The validity period of “rental withdrawal without invoice” is one year.

[0225] Question 4: What is the validity period for withdrawals for renting commercial housing?

[0226] Answer 4: The validity period of "Withdrawal for renting commercial housing" corresponds to the rental period (month) on the rental invoice.

[0227] Question 5: What is the validity period for withdrawals made by families with many children who rent commercial housing?

[0228] Answer 5: The validity period of the "Withdrawal for a family with many children renting a commercial house" corresponds to the rental period (month) on the rental invoice.

[0229] Question 6: What is the validity period for “Withdrawal for renting public housing” and “Withdrawal for rent-insured housing”?

[0230] Answer 6: The validity period of “Withdrawal for renting public housing” and “Withdrawal for renting insured housing” corresponds to the rental period (month) registered in the housing lease contract.

[0231] Question 7: What is the payment period for various rental withdrawal matters?

[0232] Answer 7: For those who have applied for rental withdrawal and processed the agreed withdrawal before June 5, 2023, the withdrawal period will remain unchanged; for those who applied for rental withdrawal after June 5, the withdrawal period will all be monthly.

[0233] Question 8: What is the limit for withdrawals for renting a house without an invoice?

[0234] Answer 8: The withdrawal limit for renting a house without an invoice is 24,000 yuan, and the monthly withdrawal limit is 2,000 yuan.

[0235] Question 9: Can spouses share rental withdrawals?

[0236] Answer 9: Both spouses can apply for "rental withdrawal without invoice" separately, without sharing the withdrawal. In addition to this type, the other four types of rental withdrawal can apply for spouse sharing withdrawal.

[0237] Question 10: If a customer changes his withdrawal card, will it affect the agreed withdrawal period?

[0238] Answer 10: After the withdrawal card is changed, if the agreed withdrawal conditions are met, the funds will be deposited into the changed withdrawal card, which will have no impact on the withdrawal cycle.

[0239] The business knowledge decision tree output by the agent is as follows: Figure 5 shown.

[0240] In this embodiment, a systematic business knowledge base is formed by converting the initial business knowledge question and answer pairs into a business knowledge decision tree. This structured knowledge base facilitates the organization, storage and retrieval of information, and the structured knowledge base of the decision tree enables the system to answer business-related questions more accurately and efficiently, thereby improving the performance and accuracy of the question and answer system. The generated business knowledge decision tree can automatically support business decisions, reducing the need for manual intervention, thereby improving decision-making efficiency and consistency. The use of machine learning-based intelligent agents can handle complex business problems, adapt to changes in the business environment, and maintain the timeliness and accuracy of the knowledge base. The intelligent agent can continuously learn and optimize the decision tree, so that the business knowledge base can be updated at any time and keep aligned with the latest business practices and policies. This can effectively realize a structured, automated, and flexible business knowledge management system. This system not only improves knowledge management and question-answering capabilities, but also can deal with consistency issues in complex decision-making processes, and can adapt to business changes and keep the knowledge base updated and accurate.

[0241] For example, in order to help understand the implementation process of the policy question reply method obtained by combining this embodiment with the above-mentioned embodiment 2, please refer to Figure 6 , Figure 6 A schematic diagram of the overall process of a policy question response method is provided, specifically:

[0242] S1: Build an agent. An agent is a software entity that can perceive the environment, make decisions, and perform actions. Unlike traditional artificial intelligence, an agent has the ability to gradually complete a given goal by actively thinking and calling tools. The agent can receive input information and generate corresponding output information based on the information according to the preset logical algorithm. When building an agent, the input information includes roles, skills, and restrictions. The tool that can be called is set to TreeMind data map, the question reasoning model to be called is set, and the task is set to generate a business knowledge decision tree based on the input business question and answer pairs.

[0243] S2: Input business knowledge question and answer pairs into the agent.

[0244] S3: The intelligent agent calls the question reasoning model and tools to obtain the business knowledge decision tree output by the intelligent agent for the business question and answer pair, wherein the question reasoning model can select a large language model.

[0245] S4: Manually proofread the business knowledge decision tree output by the intelligent agent, and then enter the proofread decision tree into the knowledge base.

[0246] S5: Receive policy consultation questions from users.

[0247] S6: The dialogue system extracts the corresponding intention of the user's input question through the dialogue model, then retrieves the questions and answers in the knowledge base, and generates a reply for feedback to the user.

[0248] Compared with the existing knowledge base question answering method, the policy question answering method described in this embodiment has the following advantages:

[0249] 1. Use the intelligent agent as the decision-making engine to automatically generate a business knowledge decision tree based on the policy question and answer pairs, and then build a business knowledge base through the manually corrected decision tree. This allows the policy question response system to ensure that the content provided by the system is confirmed by the user through "follow-up questions" during the dialogue with the customer, avoiding irrelevant answers and thus improving the accuracy of the answers.

[0250] 2. When constructing a business knowledge decision tree, the knowledge document slices are not sent to the problem reasoning model. Instead, the problem reasoning model is used as a decision engine, which reduces the external exposure of the original document and improves the security of data and information processing.

[0251] 3. Utilize the classification and decision-making capabilities of the intelligent agent. Instead of sending knowledge document slices to the problem reasoning model, the problem reasoning model is only called when building the business knowledge decision tree, reducing the number of tokens input to the model and saving application costs.

[0252] 4. You can input one or more business question-answer pairs at one time, and automatically build a business knowledge decision tree through the intelligent agent, which greatly reduces the manual process of arranging the decision tree and improves the efficiency of generating the business knowledge base.

[0253] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the method of answering policy questions of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0254] This application also provides a policy question answering device, please refer to Figure 7 , the policy question answering device comprises:

[0255] A question receiving module 10 is used to receive policy consultation questions;

[0256] The question answering module 20 is used to answer the policy consulting questions based on a pre-generated business knowledge base and generate policy question answering results. The business knowledge base is obtained based on a pre-generated business knowledge decision tree, and the business knowledge decision tree is generated by a preset intelligent agent according to the initial business knowledge question and answer pair.

[0257] Optionally, before the step of responding to the policy consultation question based on the pre-generated business knowledge base and generating a policy question response result, the step further includes:

[0258] Obtaining an initial business knowledge question-answer pair, and inputting the initial business knowledge question-answer pair into the intelligent agent;

[0259] Based on the intelligent agent, according to the initial business knowledge question and answer pair, the business knowledge decision tree is generated through a preset question reasoning model;

[0260] The business knowledge base is obtained according to the business knowledge decision tree.

[0261] Optionally, the business knowledge question-answer pair includes an initial business knowledge question and a corresponding initial business question answer, and the step of generating a business knowledge decision tree based on the agent and the initial business knowledge question-answer pair through a preset question reasoning model includes:

[0262] By means of the intelligent agent, prompt words are assembled according to the initial business knowledge question to obtain a first prompt word;

[0263] Inputting the first prompt word and the initial business knowledge question into the question reasoning model for reasoning to obtain first reasoning data and a first action instruction;

[0264] Performing similarity matching between the first inference data and the initial business question answer to obtain a first similarity;

[0265] Determine whether the first similarity is greater than a preset similarity threshold, and obtain a first determination result;

[0266] The business knowledge decision tree is generated according to the first judgment result and the initial business knowledge question and answer pair.

[0267] Optionally, the business knowledge decision tree is a first business knowledge decision tree, and the step of generating the business knowledge decision tree according to the first judgment result and the initial business knowledge question and answer pair further includes:

[0268] When the first judgment result is that the first similarity is greater than the similarity threshold, generating a first reasoning question response according to the first reasoning data;

[0269] The first business knowledge decision tree is generated according to the first reasoning question response and the initial business knowledge question and answer pair.

[0270] Optionally, the business knowledge decision tree is a second business knowledge decision tree, and the step of generating the business knowledge decision tree according to the first judgment result and the initial business knowledge question and answer pair includes:

[0271] When the first judgment result is that the first similarity is not greater than the similarity threshold, executing the action instruction and generating a second prompt word;

[0272] Inputting the second prompt word and the initial business knowledge question into the question reasoning model for reasoning to obtain second reasoning data and a second action instruction;

[0273] Performing similarity matching between the second inference data and the initial business question answer to obtain a second similarity;

[0274] Repeat the steps of prompt word generation, model reasoning and similarity matching until the obtained second similarity is greater than the similarity threshold;

[0275] generating a second reasoning question response according to the second reasoning data;

[0276] The second business knowledge decision tree is generated according to the second reasoning question response and the initial business knowledge question and answer pair.

[0277] Optionally, the step of obtaining the business knowledge base according to the business knowledge decision tree includes:

[0278] In response to a manual proofreading instruction, generating a proofread decision tree according to the business knowledge decision tree;

[0279] The business knowledge base is obtained according to the proofread decision tree.

[0280] Optionally, the business knowledge base includes a plurality of business knowledge question-answer pairs, each of which includes a business question and a corresponding business question answer. The question answering module 20 is further used to:

[0281] Vectorizing the policy consultation questions to obtain question vector data;

[0282] Based on a preset similarity calculation algorithm, according to the question vector data, a plurality of the business questions in the business knowledge base are searched to obtain a target business question;

[0283] According to the target business question, a corresponding business question answer is obtained as the target business question answer;

[0284] Based on the target business question response, the policy question response result is generated.

[0285] The policy question answering device provided by the present application adopts the policy question answering method in the above embodiment, which can solve the technical problem of low accuracy of the existing knowledge base question answering system. Compared with the prior art, the beneficial effects of the policy question answering device provided by the present application are the same as the beneficial effects of the policy question answering method provided by the above embodiment, and the other technical features in the policy question answering device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0286] The present application provides a policy issue response device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the policy issue response method in the above-mentioned embodiment one.

[0287] Reference below Figure 8 , which shows a schematic diagram of the structure of a policy question answering device suitable for implementing the embodiment of the present application. The policy question answering device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The policy question answering device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0288] like Figure 8As shown, the policy question answering device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the policy question answering device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the policy question reply device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a policy question reply device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0289] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0290] The policy question answering device provided by the present application adopts the policy question answering method in the above embodiment, which can solve the technical problem of low accuracy of the existing knowledge base question answering system. Compared with the prior art, the beneficial effects of the policy question answering device provided by the present application are the same as the beneficial effects of the policy question answering method provided by the above embodiment, and the other technical features in the policy question answering device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0291] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0292] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0293] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the policy question answering method in the above-mentioned embodiment.

[0294] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0295] The computer-readable storage medium may be included in the policy question answering device; or may exist independently without being assembled into the policy question answering device.

[0296] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the policy problem answering device, the policy problem answering device:

[0297] Receive policy consultation questions;

[0298] Based on a pre-generated business knowledge base, the policy consultation question is answered to generate a policy question answering result. The business knowledge base is obtained based on a pre-generated business knowledge decision tree, and the business knowledge decision tree is generated by a preset intelligent agent according to the initial business knowledge question and answer pair.

[0299] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through 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).

[0300] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0301] The modules involved in the embodiments of the present application may be implemented by software or hardware, wherein the name of the module does not limit the unit itself in some cases.

[0302] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned policy question answering method, and can solve the technical problem of low accuracy of the existing knowledge base question answering system. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the policy question answering method provided by the above-mentioned embodiment, and will not be repeated here.

[0303] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned policy question response method when executed by a processor.

[0304] The computer program product provided by this application can solve the technical problem of low accuracy of the existing knowledge base question answering system. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the policy question answering method provided by the above embodiment, which will not be repeated here.

[0305] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A policy question answering method, characterized in that: The method comprises: Receive policy consultation questions; Based on a pre-generated business knowledge base, the policy consulting question is answered to generate a policy question answering result. The business knowledge base is obtained based on a pre-generated business knowledge decision tree, and the business knowledge decision tree is generated by a preset intelligent agent according to the initial business knowledge question and answer pair.

2. The method according to claim 1, characterized in that Before the step of responding to the policy consultation question based on the pre-generated business knowledge base and generating a policy question response result, the method further includes: Obtaining an initial business knowledge question-answer pair, and inputting the initial business knowledge question-answer pair into the intelligent agent; Based on the intelligent agent, according to the initial business knowledge question and answer pair, the business knowledge decision tree is generated through a preset question reasoning model; The business knowledge base is obtained according to the business knowledge decision tree.

3. The method according to claim 2, characterized in that The business knowledge question-answer pair includes an initial business knowledge question and a corresponding initial business question answer. Based on the agent, the steps of generating a business knowledge decision tree through a preset question reasoning model according to the initial business knowledge question-answer pair include: By means of the intelligent agent, prompt words are assembled according to the initial business knowledge question to obtain a first prompt word; Inputting the first prompt word and the initial business knowledge question into the question reasoning model for reasoning to obtain first reasoning data and a first action instruction; Performing similarity matching between the first inference data and the initial business question answer to obtain a first similarity; Determine whether the first similarity is greater than a preset similarity threshold, and obtain a first determination result; The business knowledge decision tree is generated according to the first judgment result and the initial business knowledge question and answer pair.

4. The method according to claim 3, characterized in that The business knowledge decision tree is a first business knowledge decision tree, and the step of generating the business knowledge decision tree according to the first judgment result and the initial business knowledge question-answer pair further includes: When the first judgment result is that the first similarity is greater than the similarity threshold, generating a first reasoning question response according to the first reasoning data; The first business knowledge decision tree is generated according to the first reasoning question response and the initial business knowledge question and answer pair.

5. The method according to claim 3, characterized in that The business knowledge decision tree is a second business knowledge decision tree, and the step of generating the business knowledge decision tree according to the first judgment result and the initial business knowledge question and answer pair includes: When the first judgment result is that the first similarity is not greater than the similarity threshold, executing the action instruction and generating a second prompt word; Inputting the second prompt word and the initial business knowledge question into the question reasoning model for reasoning to obtain second reasoning data and a second action instruction; Performing similarity matching between the second inference data and the initial business question answer to obtain a second similarity; Repeat the steps of prompt word generation, model reasoning and similarity matching until the obtained second similarity is greater than the similarity threshold; generating a second reasoning question response according to the second reasoning data; The second business knowledge decision tree is generated according to the second reasoning question response and the initial business knowledge question and answer pair.

6. The method according to claim 2, characterized in that The step of obtaining the business knowledge base according to the business knowledge decision tree comprises: In response to a manual proofreading instruction, generating a proofread decision tree according to the business knowledge decision tree; The business knowledge base is obtained according to the proofread decision tree.

7. The method according to claim 1, characterized in that The business knowledge base includes a plurality of business knowledge question-answer pairs, each of which includes a business question and a corresponding business question answer. The steps of answering the policy consultation question based on the pre-generated business knowledge base and generating the policy question answer result include: Vectorizing the policy consultation questions to obtain question vector data; Based on a preset similarity calculation algorithm, according to the question vector data, a plurality of the business questions in the business knowledge base are searched to obtain a target business question; According to the target business question, a corresponding business question answer is obtained as the target business question answer; Based on the target business question response, the policy question response result is generated.

8. A policy question answering device, characterized in that: The device comprises: Question receiving module, used to receive policy consultation questions; The question answering module is used to answer the policy consulting questions based on a pre-generated business knowledge base and generate policy question answering results. The business knowledge base is obtained based on a pre-generated business knowledge decision tree, and the business knowledge decision tree is generated by a preset intelligent agent according to the initial business knowledge question and answer pair.

9. A policy question answering device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the policy question answering method according to any one of claims 1 to 7.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the policy question answering method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Question and answer knowledge multiplexing method and device, equipment and medium

    CN119808928A

  • Intelligent agent simulation decision-making method and device based on large language model

    CN120069585A

  • Method for generating fine-tuning question and answer data set based on retrieval enhancement

    CN120745855A

  • A fine-tuning question and answer dataset generation method based on retrieval enhancement

    CN120745855B

  • Video content understanding method, electronic equipment and computer readable storage medium

    CN121121584A