Government affairs question answering implementation method and implementation system based on large model and multi-level convergence

Through a multi-level convergence method based on a large model, combined with metadata and original data management, a Prompt template is constructed to achieve precise positioning and intelligent answers to government questions and answers, solving the accuracy and reliability problems of the large-model government question and answer system and improving the quality of government question and answer.

CN119514684BActive Publication Date: 2025-09-09SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411536129.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-09-09
Estimated Expiration
2044-10-31

AI Technical Summary

Technical Problem

The existing government question-and-answer system based on large models has problems with accuracy and reliability, especially when user questions go beyond the scope of FAQ design, it cannot provide useful answers.

Method used

A government affairs question-and-answer method based on a large model and multi-level convergence is adopted. Through metadata management and original data management, the convergence level of government affairs is set, and an affairs convergence prompt template and a question answering prompt template are constructed. Combined with the intelligent answer engine and the affairs convergence engine, multi-level convergence and intelligent answers are achieved.

Benefits of technology

It achieves precise positioning and intelligent answers to user questions, improves the accuracy and reliability of government Q&A, simplifies knowledge management, supports dynamic maintenance of prompt content, and adapts to switching between multiple government affairs and multi-level convergent result selection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119514684B_ABST
    Figure CN119514684B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for implementing government affairs question and answer based on a large model and multi-level convergence, belonging to the field of artificial intelligence technology. The technical problem to be solved is how to achieve the accuracy and reliability of government affairs question and answer and provide quality answers by combining a large model. The method includes: deconstructing the business handling of government affairs through metadata management to set the convergence level of government affairs, setting a corresponding matter convergence prompt template for each convergence level, and setting a question answer prompt template; based on the last dialogue status, judging the convergence level of the current question through the business system and providing a matter convergence prompt template of the corresponding level, the large model matches and answers matters according to the current question and the matter convergence prompt template of the corresponding level to obtain the final converged matter; the large model answers the question according to the current question and the question answer prompt template, and returns the answer to the question to the user through the business system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and more specifically to a method and system for implementing government affairs question and answer based on a large model and multi-level convergence. Background Art

[0002] Government Q&A is an important component of digital government office work and is the preliminary preparation for handling government affairs. Traditional government Q&A usually requires the compilation of question and answer pairs (FAQ) to answer possible user questions. FAQs can help users quickly answer created questions, but when users ask questions that exceed the scope of FAQ design, they often cannot get useful answers. The emergence of language big models has changed the stereotype of previous Q&A. It can not only better understand user questions, but also make the answers more intelligent. However, the Q&A of big models may not be so accurate, which is not acceptable for government Q&A. Therefore, how to provide accurate and reliable government Q&A based on big models has become an urgent problem that needs to be solved.

[0003] In practice, large models based on knowledge bases are often a common approach to ensuring accurate question-answering. Chinese patent application number CN202311056160.3 discloses a question-answering processing method, apparatus, system, computing device, and computer storage medium. This technical solution discloses a method for implementing question-answering based on a knowledge graph and a natural language generation model. This method places high demands on the knowledge graph and requires the extraction of prompt words.

[0004] In combination with large models, how to achieve accuracy and reliability in government Q&A and provide quality answers is a technical problem that needs to be solved. Summary of the Invention

[0005] The technical task of the present invention is to address the above shortcomings and provide a government question and answer implementation method and implementation system based on a large model and multi-level convergence to solve the technical problem of how to achieve the accuracy and reliability of government question and answer and provide answer quality by combining a large model.

[0006] In a first aspect, the present invention provides a method for implementing government affairs question and answer based on a large model and multi-level convergence, which is applied between a business system and a large model and includes the following steps:

[0007] Question and answer knowledge configuration: metadata management and raw data management are performed on government affairs. Through metadata management, the business handling of government affairs is deconstructed to set the convergence level of government affairs. A corresponding matter convergence prompt template is set for each convergence level, and a question and answer prompt template is set. The matter convergence prompt template and the question and answer prompt template are stored as prompt templates in the business system. Through raw data management, basic information related to government affairs is stored in the knowledge base, and specific information related to government affairs is stored in the database. Among them, the basic information of government affairs includes the name of the government affairs matter, and the specific information related to government affairs includes the materials required for the business and the business interpretation;

[0008] Government Affairs Convergence: For current questions raised by users, the business system determines the convergence level of the current question based on the previous conversation status and provides a corresponding level of matter convergence prompt template. The large model matches the current question with the corresponding level of matter convergence prompt template to answer the matter and obtain the final converged matter.

[0009] Government affairs Q&A: For the final convergent matters, the specific information of government affairs in the database is used as the background knowledge of the current question. The big model answers the question based on the current question and the question answer prompt template, and returns the answer to the user through the business system.

[0010] As a preference, there are three levels of convergence, namely, first-level convergence, second-level convergence, and third-level convergence;

[0011] Level 1 convergence is used to determine the subject of government affairs, including handling food-related business and handling drug-related business;

[0012] Secondary convergence is used to determine the business of government affairs, including applying for food certificates and changing the legal representative of food enterprises;

[0013] Level three convergence is used to determine the business content of government affairs, including the processing time and process for applying for food certificates.

[0014] Preferably, the content of the item convergence prompt template includes roles, instructions, classification instructions, menu lists, examples, and my questions. The roles represent the role settings of the big model, the instructions represent the work expected to be performed by the big model, the classification instructions are used to further describe the problem so that the big model can understand the problem, the menu list represents a list of items that may match the user's question, the examples represent examples provided according to the instructions so that the big model can give similar answers, and my questions represent actual questions raised by the user.

[0015] The content of the question answering prompt template includes roles, instructions, questions, and service guidelines. The roles represent the role settings of the big model, the instructions represent the work expected to be performed by the big model, the questions represent the actual questions raised by the user, and the service guidelines are used to describe the requirements related to government affairs.

[0016] As a preference, for historical questions raised by users, the business system stores the conversation information corresponding to each historical question and records the conversation status through a state table. The conversation status is used to indicate the convergence level of the government affairs matched to the corresponding historical question.

[0017] Correspondingly, the convergence of government affairs includes the following steps:

[0018] L100: For questions raised by users, obtain the previous conversation information from the business system. If it exists, obtain the status of the previous conversation to obtain the convergence level of the current government affairs matter. If the previous conversation information does not exist, determine that the convergence level of the current government affairs matter is 0, and judge the convergence level of the first level;

[0019] L200, based on the current question raised by the user and the current convergence level of the matter, the convergence prompt template queries the big model to obtain the answer. The big model's answer includes three types of answers: unanswerable, unique, and multiple options. Correspondingly, in the government affairs convergence stage, the big model has the following three execution logics:

[0020] First execution logic: If the answer of the large model is "unable to answer", it means that the large model cannot match the relevant items from the menu list provided by the item convergence prompt template and cannot complete the convergence operation at this level. The large model will return relevant information to the user to prompt the user to provide a detailed description of the problem;

[0021] Second execution logic: If the answer from the big model is multiple options, it means that the big model can match multiple related government affairs from the menu list provided by the matter convergence prompt template, but cannot complete the convergence at this level. The big model returns the matching government affairs to the user, and the user selects from the matching government affairs. Third execution logic: If the answer from the big model is a unique definite option, it means that the big model can complete the convergence operation at this level. The business system updates the status table of the dialogue and asks the big model the current question again. Step L200 is continued to check whether the big model can complete the next level of convergence, until the government affairs converge or the final level of convergence is completed, or the first execution logic or the second execution logic occurs, and the matter convergence operation ends.

[0022] Among them, in step L200, for the answer returned by the large model, the large model denoises the answer data through regular matching and returns the denoised answer to the business system.

[0023] As a preference, the business system is equipped with an intelligent answer engine and an issue convergence engine;

[0024] The event convergence prompt template and the corresponding template data are stored in the event convergence engine. The event convergence engine is used to tune the event convergence prompt template based on historical issues and corresponding convergence events, and cooperate with the big model to execute government event convergence.

[0025] The question answer prompt template and the corresponding template data are stored in the intelligent answer engine. The intelligent answer engine is used to tune the question answer prompt template based on historical questions and corresponding question answers, and cooperate with the big model to execute government affairs questions and answers.

[0026] In a second aspect, the present invention provides a government affairs question-answering implementation system based on a large model and multi-level convergence, comprising a business system and a large model;

[0027] The business system is used to perform the following: metadata management and raw data management of government affairs, deconstructing the business handling of government affairs through metadata management to set the convergence level of government affairs, setting a corresponding matter convergence prompt template for each convergence level, and setting a question-answer prompt template, the matter convergence prompt template and the question-answer prompt template are stored locally in the business system as prompt templates, and basic information related to government affairs is stored in the knowledge base through raw data management, and specific information related to government affairs is stored in the database, where the basic information of government affairs includes the name of the government affairs matter, and the specific information related to government affairs includes the materials required for the business and the business interpretation;

[0028] For the current question raised by the user, the business system determines the convergence level of the current question based on the previous conversation status and provides a corresponding level of item convergence prompt template. The large model matches the current question with the corresponding level of item convergence prompt template to answer the item and obtain the final converged item.

[0029] For the final convergence items, the specific information of government affairs in the database is used as the background knowledge of the current problem, the big model is used to answer the question based on the current question and the question answer prompt template, and the answer to the question is returned to the user through the business system.

[0030] As a preference, there are three levels of convergence, namely, first-level convergence, second-level convergence, and third-level convergence;

[0031] Level 1 convergence is used to determine the subject of government affairs, including handling food-related business and handling drug-related business;

[0032] Secondary convergence is used to determine the business of government affairs, including applying for food certificates and changing the legal representative of food enterprises;

[0033] Level three convergence is used to determine the business content of government affairs, including the processing time and process for applying for food certificates.

[0034] Preferably, the content of the item convergence prompt template includes roles, instructions, classification instructions, menu lists, examples, and my questions. The roles represent the role settings of the big model, the instructions represent the work expected to be performed by the big model, the classification instructions are used to further describe the problem so that the big model can understand the problem, the menu list represents a list of items that may match the user's question, the examples represent examples provided according to the instructions so that the big model can give similar answers, and my questions represent actual questions raised by the user.

[0035] The content of the question answering prompt template includes roles, instructions, questions, and service guidelines. The roles represent the role settings of the big model, the instructions represent the work expected to be performed by the big model, the questions represent the actual questions raised by the user, and the service guidelines are used to describe the requirements related to government affairs.

[0036] Preferably, for historical questions raised by users, the business system is used to store the conversation information corresponding to each historical question and record the conversation status through a state table. The conversation status is used to indicate the convergence level of the government affairs matched to the corresponding historical question;

[0037] Correspondingly, when government affairs converge, the business system and the big model work together to perform the following:

[0038] L100: For questions raised by users, the business system obtains the last conversation information from the local machine. If it exists, it obtains the status of the last conversation to obtain the convergence level of the current government affairs matter. If the last conversation information does not exist, it determines that the convergence level of the current government affairs matter is 0 and determines the first-level convergence.

[0039] L200, based on the current question raised by the user and the current convergence level of the matter, the convergence prompt template queries the big model to obtain the answer. The big model's answer includes three types of answers: unanswerable, unique, and multiple options. Correspondingly, in the government affairs convergence stage, the big model has the following three execution logics:

[0040] First execution logic: If the answer of the large model is "unable to answer", it means that the large model cannot match the relevant items from the menu list provided by the item convergence prompt template and cannot complete the convergence operation at this level. The large model will return relevant information to the user to prompt the user to provide a detailed description of the problem;

[0041] Second execution logic: If the answer from the big model is multiple options, it means that the big model can match multiple related government affairs from the menu list provided by the matter convergence prompt template, but cannot complete the convergence at this level. The big model returns the matching government affairs to the user, and the user selects from the matching government affairs. Third execution logic: If the answer from the big model is a unique definite option, it means that the big model can complete the convergence operation at this level. The business system updates the status table of the dialogue and asks the big model the current question again. Step L200 is continued to check whether the big model can complete the next level of convergence, until the government affairs converge or the final level of convergence is completed, or the first execution logic or the second execution logic occurs, and the matter convergence operation ends.

[0042] Among them, in step L200, for the answer returned by the large model, the large model denoises the answer data through regular matching and returns the denoised answer to the business system.

[0043] As a preference, the business system is equipped with an intelligent answer engine and an issue convergence engine;

[0044] The event convergence prompt template and the corresponding template data are stored in the event convergence engine. The event convergence engine is used to tune the event convergence prompt template based on historical issues and corresponding convergence events, and cooperate with the big model to execute government event convergence.

[0045] The question answer prompt template and the corresponding template data are stored in the intelligent answer engine. The intelligent answer engine is used to tune the question answer prompt template based on historical questions and corresponding question answers, and cooperate with the big model to execute government affairs questions and answers.

[0046] The government affairs question-answering implementation method and implementation system based on a large model and multi-level convergence of the present invention have the following advantages:

[0047] 1. Achieved multi-level convergence of user issues: Through the prompt of the large model, multi-level convergence of user issues is achieved, so that user issues can be accurately located to related government affairs;

[0048] 2. Intelligent answers: The large model prompts make user answers intelligent and vivid, avoiding the rigid and stiff FAQ questions and answers.

[0049] 3. Relatively simple knowledge management: Knowledge management is used to maintain government affairs and provide support for user problem convergence and background knowledge. Knowledge management only involves metadata management and raw data management, which is relatively simple compared to knowledge graphs and other knowledge management methods.

[0050] 4. Prompt content can be dynamically maintained to facilitate effect optimization. The Prompt structure of the large model is fixed, but the specific content can be changed dynamically. When a problem cannot be properly understood by the large model and some abnormal answers are returned, the effect can be optimized by adjusting the data in the Prompt;

[0051] 5. Switching of government affairs topics can be achieved through user interaction, and when faced with multiple convergence items, convergence results can be determined through selection. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0053] The present invention will be further described below with reference to the accompanying drawings.

[0054] Figure 1 This is a flowchart of a method for implementing government affairs question and answer based on a large model and multi-level convergence in Example 1;

[0055] Figure 2 This is a workflow of the cooperation between the business system and the big model in a method for implementing government affairs question and answer based on a big model and multi-level convergence in Example 1;

[0056] Figure 3 This is a flowchart of the government affairs convergence process of Example 1, a government affairs question and answer implementation method based on a large model and multi-level convergence. DETAILED DESCRIPTION

[0057] The present invention will be further described below with reference to the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it. However, the embodiments given are not intended to limit the present invention. Unless there is a conflict, the embodiments of the present invention and the technical features in the embodiments may be combined with each other.

[0058] The embodiments of the present invention provide a government affairs question-answering implementation method and implementation system based on a large model and multi-level convergence, which are used to solve technical problems.

[0059] Example 1:

[0060] The present invention provides a government affairs question and answer implementation method based on a large model and multi-level convergence, which is applied between a business system and a large model, and includes three steps: question and answer knowledge configuration, government affairs matter convergence, and government affairs question and answer.

[0061] Step S100 Question and Answer Knowledge Configuration: metadata management and original data management are performed on government affairs. The business handling of government affairs is deconstructed through metadata management to set the convergence level of government affairs. A corresponding matter convergence Prompt template is set for each convergence level, and a question and answer Prompt template is set. The matter convergence Prompt template and the question and answer Prompt template are stored as Prompt templates in the business system. The basic information related to government affairs is stored in the knowledge base through original data management, and the specific information related to government affairs is stored in the database. Among them, the basic information of government affairs includes the name of the government affairs matter, and the specific information related to government affairs includes the materials required for the business and the business interpretation.

[0062] In this embodiment, during the knowledge preparation phase, metadata and raw information management for government affairs are required. To facilitate convergence of government affairs issues, raw information needs to be organized into different convergence levels during the knowledge preparation phase. The specific convergence level is based on business knowledge, and the current convergence level is three.

[0063] First-level convergence: Determine the subject of the government affairs, such as whether it is food-related business or drug-related business.

[0064] Secondary convergence: Determine the business of government affairs, such as applying for a food certificate or changing the legal representative of a food company.

[0065] Level 3 convergence: Determine the business content of government affairs, such as the specific processing time or processing procedures for applying for a food certificate.

[0066] The above is basic metadata management, which is relatively simple compared to complex knowledge graph management. In addition to metadata management, raw data management is also necessary. Raw data is the source of material for the large model's answers. It serves as both background knowledge and the basis for the model's generated answers. Raw data is designed to be easily accessible. Small amounts of raw data can be stored in a database; larger amounts require object storage. Raw data and metadata must be linked to facilitate finding the corresponding raw data based on metadata.

[0067] The multi-level convergence of problems and the intelligent answers to problems are both returned through the Prompt questions of the large model. The Prompt templates constructed in this embodiment include the matter convergence Prompt template and the question answering Prompt template. The content of the matter convergence Prompt template includes role, instruction, classification description, menu list, example, and my question. The role represents the role setting for the large model, the instruction represents the work expected to be performed by the large model, the classification description is used to further describe the problem for the large model to understand the problem, the menu list represents the list of matters that may be matched according to the user's question, the example represents the example provided according to the instruction for the large model to give a similar answer, and my question represents the actual question raised by the user. Specifically, it is as follows:

[0068] <role>{Role}< / role>

[0069] <instruction>

[0070] {Instruction}

[0071] < / instruction>

[0072] <menu list>{Hierarchical list}< / menu list>

[0073] <classification description>

[0074] {Explanation of the hierarchical list}

[0075] < / classification description>

[0076] <example>

[0077] {Example}

[0078] < / example>

[0079] <my question>{User question}< / my question>

[0080] The content of the question answering Prompt template includes role, instruction, question, and service guide. The role represents the role setting for the large model, the instruction represents the work expected to be performed by the large model, the question represents the actual question raised by the user, and the service guide is used to describe the requirements related to government affairs matters. The specific form is as follows:

[0081] <role>{Role}< / role>

[0082] <instruction>

[0083] {Instruction}

[0084] < / instruction>

[0085] <question>{User question}< / question>

[0086] <service guide>

[0087] {Service Guide}

[0088] < / Service Guide>

[0089] The structure of Prompt is basically fixed, while the specific filling content is dynamically changing. Except for the user's question, other content data of the dynamic change can be directly maintained, and the specific content corresponding to different convergence levels is also different.

[0090] Step S200 Government Affairs Matter Convergence: For the current question raised by the user, based on the previous conversation state, judge the convergence level of the current question through the business system and provide the matter convergence Prompt template corresponding to the level. The large model performs matter matching and answering according to the current question and the matter convergence Prompt template corresponding to the level, and obtains the final convergent matter.

[0091] In this embodiment, for the historical questions raised by the user, the business system stores the conversation information corresponding to each historical question and records the conversation state through the status table. The conversation state is used to represent the convergence level of the government affairs matter matched by the corresponding historical question. Correspondingly, the government affairs matter convergence includes the following steps:

[0092] L100: For the question raised by the user, obtain the previous conversation information from the business system. If it exists, obtain the state of the previous conversation to obtain the convergence level of the current government affairs matter. If the previous conversation information does not exist, determine that the convergence level of the current government affairs matter is 0, and judge the first-level convergence;

[0093] L200: Query the large model based on the current question raised by the user and the matter convergence Prompt template of the current convergence level to obtain an answer. The answer of the large model includes three types of answers, namely unable to answer, a unique determination item, and multiple selection items. Correspondingly, there are the following three execution logics for the large model in the government affairs matter convergence stage:

[0094] The first execution logic: If the answer of the large model is unable to answer, it means that the large model cannot match relevant matters from the menu list provided by the matter convergence Prompt template and cannot complete the current-level convergence operation. It will return relevant information to the user to prompt the user to provide a detailed question description;

[0095] Second execution logic: If the answer from the big model is multiple options, it means that the big model can match multiple related government affairs from the menu list provided by the matter convergence prompt template, but cannot complete the convergence at this level. The big model returns the matching government affairs to the user, and the user selects from the matching government affairs. Third execution logic: If the answer from the big model is a unique definite option, it means that the big model can complete the convergence operation at this level. The business system updates the status table of the dialogue and asks the big model the current question again. Step L200 is continued to check whether the big model can complete the next level of convergence, until the government affairs converge or the final level of convergence is completed, or the first execution logic or the second execution logic occurs, and the matter convergence operation ends.

[0096] Among them, in step L200, for the answer returned by the large model, the large model denoises the answer data through regular matching and returns the denoised answer to the business system.

[0097] The government Q&A convergence phase is the core of this embodiment, and its essence is the understanding of user questions. Unlike traditional methods of extracting entities and intents through matching or knowledge graphs, government Q&A convergence is achieved with the help of a large model. By constructing a suitable prompt template, user questions are handed over to the large model. Because the large model itself has semantic understanding capabilities, it can return relevant converged items based on user questions and prompt templates. The following will explain the prompt template, the question and answer convergence processing logic, and how to solve the instability of large model question and answer.

[0098] First, the large model's prompt templates are a prerequisite for convergence in question and answering. Different prompt templates are generated for different convergence levels of user questions. When users conduct intelligent question and answering, corresponding prompt templates are also generated based on the maintained template data.

[0099] Next, we will look at the specific convergence logic. During the convergence process, the status table will maintain the current convergence level of the user question.

[0100] During convergence, the results returned by large models can be unstable. This instability can be addressed through prompt optimization, while also requiring engineering to accommodate the inaccurate data returned by large models. Unlike the data required by traditional interface definitions, the results returned by large models may not conform to the specified data format. In this case, regular expression matching can be used to remove any noise and maximize the desired results. For example, according to the specified data, when a large model returns multiple options, it will be returned in the form of result:A,B,C. However, in reality, the returned data may be result:['A',B,"C"] . In this case, regular expression matching can be used to complete the data extraction. Furthermore, sometimes the returned data may violate the specified format, such as not including the "result:" prefix. In such cases, a retry mechanism is required for accessing the large model.

[0101] Step S300 Government Affairs Question and Answer: For the final converged matters, the specific information of the government affairs in the database is used as the background knowledge of the current question, the big model answers the question according to the current question and the question answer prompt template, and returns the answer to the user through the business system.

[0102] In this embodiment, after the accurate government affairs matter is determined, the knowledge prepared in step S100 can be used to obtain relevant materials on the relevant government affairs matter, and the relevant materials can be used as background knowledge for the user's question. When asking the big model, an intelligent answer will be obtained; at the same time, after returning the answer to the question, the background knowledge on which the answer is based is returned for the user to view, so that the model answer has a basis.

[0103] As a specific implementation of the business system, the business system is configured with an intelligent answer engine and an issue convergence engine. The issue convergence Prompt template and the corresponding template data are stored in the issue convergence engine. The issue convergence engine is used to optimize the issue convergence Prompt template based on historical issues and corresponding convergence issues, and cooperate with the big model to execute government affairs issue convergence; the question answer Prompt template and the corresponding template data are stored in the intelligent answer engine. The intelligent answer engine is used to optimize the question answer Prompt template based on historical issues and corresponding question answers, and cooperate with the big model to execute government affairs Q&A.

[0104] The method in this embodiment uses knowledge management and large-scale model prompt optimization to achieve multi-level convergence of user questions to accurately locate the questions. Then, leveraging the large-scale model's text generation capabilities, intelligent answers are provided. The core of the entire process is the multi-level convergence of user questions, relying on the core technology of large-scale model prompt optimization. However, during the design process, two parts require user interaction.

[0105] First, if the user's government affairs Q&A needs to switch the category of affairs, the user needs to actively close the current government affairs Q&A process and then start a new government affairs Q&A.

[0106] Second, when multiple matching items are returned during the convergence process of government affairs, the user is required to make a selection to determine the current convergence level.

[0107] Example 2:

[0108] The present invention provides a government affairs question-answering implementation system based on a large model and multi-level convergence, comprising a business system and a large model.

[0109] The business system is used to perform the following: metadata management and raw data management of government affairs, deconstructing the business handling of government affairs through metadata management to set the convergence level of government affairs, setting a corresponding matter convergence Prompt template for each convergence level, and setting a question and answer Prompt template. The matter convergence Prompt template and the question and answer Prompt template are stored locally in the business system as Prompt templates, and the basic information related to government affairs is stored in the knowledge base through raw data management, and the specific information related to government affairs is stored in the database. Among them, the basic information of government affairs includes the name of the government affairs matter, and the specific information related to government affairs includes the materials required for the business and the business interpretation.

[0110] In this embodiment, during the knowledge preparation phase, metadata and raw information management for government affairs are required. To facilitate convergence of government affairs issues, raw information needs to be organized into different convergence levels during the knowledge preparation phase. The specific convergence level is based on business knowledge, and the current convergence level is three.

[0111] First-level convergence: Determine the subject of the government affairs, such as whether it is food-related business or drug-related business.

[0112] Secondary convergence: Determine the business of government affairs, such as applying for a food certificate or changing the legal representative of a food company.

[0113] Level 3 convergence: Determine the business content of government affairs, such as the specific processing time or processing procedures for applying for a food certificate.

[0114] All of the above are basic metadata management, which is relatively simple compared to the management of complex knowledge graphs. In addition to managing metadata, it is also necessary to manage the original data. The original data is the source material for the answers of the large model. It serves as the background knowledge data for the large model and is also the material basis for the large model to generate answers. The original data is premised on being easy to read. For the original data with a small amount of data, it can be stored in the database; for larger materials, object storage is required. An association needs to be established between the original data and the metadata to facilitate finding the original data corresponding to the relevant matter according to the metadata.

[0115] The multi-level convergence of questions and the intelligent answering of questions are both returned through the Prompt questions of the large model. The Prompt templates constructed in this embodiment include the matter convergence Prompt template and the question answering Prompt template. The content of the matter convergence Prompt template includes role, instruction, classification description, menu list, example, and my question. The role represents the role setting for the large model, the instruction represents the work expected to be performed by the large model, the classification description is used to further describe the question to facilitate the large model's understanding of the question, the menu list represents the list of matters that may be matched according to the user's question, the example represents the example provided according to the instruction to facilitate the large model to give a similar answer, and my question represents the actual question raised by the user, as shown below:

[0116] <role>{role}< / role>

[0117] <instruction>

[0118] {instruction}

[0119] < / instruction>

[0120] <menu list>{hierarchical list}< / menu list>

[0121] <classification description>

[0122] {explanation of the hierarchical list}

[0123] < / classification description>

[0124] <example>

[0125] {example}

[0126] < / example>

[0127] <my question>{user question}< / my question>

[0128] The content of the question answering Prompt template includes the role, instruction, question, and service guide. The role represents the role setting for the large model, the instruction represents the work expected to be performed by the large model, the question represents the actual question raised by the user, and the service guide is used to describe the requirements related to government affairs matters. The specific form is as follows:

[0129] <role>{role}< / role>

[0130] <instruction>

[0131] {instruction}

[0132] < / instruction>

[0133] <question>{user question}< / question>

[0134] <service guide>

[0135] {service guide}

[0136] < / service guide>

[0137] The structure of the Prompt is basically fixed, while the specific filling content is dynamically changing. Except for the user's question, the other content data can be directly maintained, and the specific content corresponding to different convergence levels is also different.

[0138] For the current question raised by the user, the business system is used to determine the convergence level of the current question based on the previous conversation state and provide the matter convergence Prompt template at the corresponding level through the business system. The large model is used to perform matter matching and answering according to the current question and the matter convergence Prompt template at the corresponding level to obtain the final convergent matter.

[0139] In this embodiment, for the historical questions raised by the user, the business system is used to store the conversation information corresponding to each historical question and record the conversation state through a status table. The conversation state is used to represent the convergence level of the government affairs matters matched by the corresponding historical question. Correspondingly, the business system and the large model cooperate to perform the following to achieve government affairs matter convergence:

[0140] L100. For the question raised by the user, the business system obtains the previous conversation information from the local. If it exists, it obtains the state of the previous conversation to obtain the convergence level of the current government affairs matter. If the previous conversation information does not exist, it determines that the convergence level of the current government affairs matter is 0 and judges the first-level convergence;

[0141] L200, based on the current question raised by the user and the current convergence level of the matter, the convergence prompt template queries the big model to obtain the answer. The big model's answer includes three types of answers: unanswerable, unique, and multiple options. Correspondingly, in the government affairs convergence stage, the big model has the following three execution logics:

[0142] First execution logic: If the answer of the large model is "unable to answer", it means that the large model cannot match the relevant items from the menu list provided by the item convergence prompt template and cannot complete the convergence operation at this level. The large model will return relevant information to the user to prompt the user to provide a detailed description of the problem;

[0143] Second execution logic: If the answer from the big model is multiple options, it means that the big model can match multiple related government affairs from the menu list provided by the matter convergence prompt template, but cannot complete the convergence at this level. The big model returns the matching government affairs to the user, and the user selects from the matching government affairs. Third execution logic: If the answer from the big model is a unique definite option, it means that the big model can complete the convergence operation at this level. The business system updates the status table of the dialogue and asks the big model the current question again. Step L200 is continued to check whether the big model can complete the next level of convergence, until the government affairs converge or the final level of convergence is completed, or the first execution logic or the second execution logic occurs, and the matter convergence operation ends.

[0144] Among them, in step L200, for the answer returned by the large model, the large model denoises the answer data through regular matching and returns the denoised answer to the business system.

[0145] The government Q&A convergence phase is the core of this embodiment, and its essence lies in understanding user questions. Unlike traditional methods of extracting entities and intents through matching or knowledge graphs, government Q&A convergence is achieved with the help of a large model. By constructing a suitable prompt template, user questions are handed over to the large model. Because the large model itself has semantic understanding capabilities, it can return relevant converged items based on user questions and prompt templates. The following will explain the prompt template, the logic for question and answer convergence processing, and how to solve the instability of large model question and answer:

[0146] First, the Prompt template of the large model is the prerequisite for the convergence of question and answer. When the user's question is at different convergence levels, different Prompt templates will be constructed. When the user conducts intelligent question and answer, the corresponding Prompt template will also be constructed based on the maintained template data.

[0147] Next, there is the specific convergence logic. During different convergence processes, the current convergence level of a user question is maintained through a status table.

[0148] Thirdly, when performing convergence operations, the results returned by the large model are unstable. On the one hand, this instability can be adjusted through Prompt optimization. On the other hand, the project needs to be able to accommodate the inaccurate data returned by the large model. Unlike the data required by traditional interface definitions, the results returned by the large model cannot be as accurate as the data format agreed upon by the interface. At this time, possible noise data can be removed through regular matching and other methods to obtain the required results as much as possible. For example, according to the agreed data, when the large model returns multiple options, it will be returned in the form of result:A,B,C, but in fact, the returned data may be result:['A',B,"C"]. At this time, regular matching can be used to complete the data extraction work. At the same time, sometimes the returned data will violate the agreed format, such as there will be no prefix such as result:. At this time, a retry mechanism needs to be provided for accessing the large model.

[0149] For the final convergence items, the specific information of government affairs in the database is used as the background knowledge of the current problem, the big model is used to answer the question based on the current question and the question answer prompt template, and the answer to the question is returned to the user through the business system.

[0150] In this embodiment, after the accurate government affairs are determined, relevant materials on the relevant government affairs can be obtained based on the prepared knowledge, and the relevant materials can be used as background knowledge for the user's question. When asking the big model, an intelligent answer will be obtained; at the same time, after returning the answer to the question, the background knowledge on which the answer is based is returned for the user to view, so that the model's answer has a basis.

[0151] As a specific implementation of the business system, the business system is configured with an intelligent answer engine and an issue convergence engine. The issue convergence Prompt template and the corresponding template data are stored in the issue convergence engine. The issue convergence engine is used to optimize the issue convergence Prompt template based on historical issues and corresponding convergence issues, and cooperate with the big model to execute government affairs issue convergence; the question answer Prompt template and the corresponding template data are stored in the intelligent answer engine. The intelligent answer engine is used to optimize the question answer Prompt template based on historical issues and corresponding question answers, and cooperate with the big model to execute government affairs Q&A.

[0152] The system of this embodiment can execute the method disclosed in Example 1 to accurately obtain the government affairs requested by the user and provide government affairs answers.

[0153] The present invention has been shown and described in detail above through the accompanying drawings and preferred embodiments. However, the present invention is not limited to these disclosed embodiments. Based on the above multiple embodiments, those skilled in the art can know that the means in the above different embodiments can be combined to obtain more embodiments of the present invention, and these embodiments are also within the scope of protection of the present invention.

Claims

1. A method for implementing government question-answering based on a large model and multi-level convergence, characterized in that: Applied between business systems and large models, it includes the following steps: Question and answer knowledge configuration: metadata management and raw data management are performed on government affairs. Through metadata management, the business handling of government affairs is deconstructed to set the convergence level of government affairs. A corresponding matter convergence prompt template is set for each convergence level, and a question and answer prompt template is set. The matter convergence prompt template and the question and answer prompt template are stored as prompt templates in the business system. Through raw data management, basic information related to government affairs is stored in the knowledge base, and specific information related to government affairs is stored in the database. Among them, the basic information of government affairs includes the name of the government affairs matter, and the specific information related to government affairs includes the materials required for the business and the business interpretation; Government Affairs Convergence: For current questions raised by users, the business system determines the convergence level of the current question based on the previous conversation status and provides a corresponding level of matter convergence prompt template. The large model matches the current question with the corresponding level of matter convergence prompt template to answer the matter and obtain the final converged matter. Government Q&A: For the final converged items, the specific information of the government items in the database is used as the background knowledge of the current question. The large model answers the question based on the current question and the question answer prompt template, and returns the answer to the user through the business system. There are three levels of convergence, namely, first-level convergence, second-level convergence, and third-level convergence; Level 1 convergence is used to determine the subject of government affairs, including handling food-related business and handling drug-related business; Secondary convergence is used to determine the business of government affairs, including applying for food certificates and changing the legal representative of food enterprises; Level 3 convergence is used to determine the business content of government affairs, including the processing time and process for applying for a food certificate; Among them, the business system is equipped with an intelligent answer engine and an event convergence engine; The event convergence prompt template and the corresponding template data are stored in the event convergence engine. The event convergence engine is used to tune the event convergence prompt template based on historical issues and corresponding convergence events, and cooperate with the big model to execute government event convergence. The question answer prompt template and the corresponding template data are stored in the intelligent answer engine. The intelligent answer engine is used to tune the question answer prompt template based on historical questions and corresponding question answers, and cooperate with the big model to execute government affairs questions and answers.

2. The method for implementing government affairs question and answer based on a large model and multi-level convergence according to claim 1 is characterized in that: The content of the item convergence prompt template includes roles, instructions, classification instructions, menu lists, examples, and my questions. Roles represent the role settings of the big model, instructions represent the work expected of the big model, classification instructions are used to further describe the problem to help the big model understand the problem, menu lists are lists of items that may match the user's question, examples are examples provided based on the instructions so that the big model can give similar answers, and my questions are the actual questions raised by the user. The content of the question answering prompt template includes roles, instructions, questions, and service guidelines. The roles represent the role settings of the big model, the instructions represent the work expected to be performed by the big model, the questions represent the actual questions raised by the user, and the service guidelines are used to describe the requirements related to government affairs.

3. The method for implementing government affairs question and answer based on a large model and multi-level convergence according to claim 2 is characterized in that: For historical questions raised by users, the business system stores the corresponding conversation information for each historical question and records the conversation status in a state table. The conversation status is used to indicate the convergence level of the government affairs matched to the corresponding historical question. Correspondingly, the convergence of government affairs includes the following steps: L100: For questions raised by users, obtain the previous conversation information from the business system. If it exists, obtain the status of the previous conversation to obtain the convergence level of the current government affairs matter. If the previous conversation information does not exist, determine that the convergence level of the current government affairs matter is 0, and judge the convergence level of the first level; L200, based on the current question raised by the user and the current convergence level of the matter, the convergence prompt template queries the big model to obtain the answer. The big model's answer includes three types of answers: unanswerable, unique, and multiple options. Correspondingly, in the government affairs convergence stage, the big model has the following three execution logics: First execution logic: If the answer of the large model is "unable to answer", it means that the large model cannot match the relevant items from the menu list provided by the item convergence prompt template and cannot complete the convergence operation at this level. The large model will return relevant information to the user to prompt the user to provide a detailed description of the problem; Second execution logic: If the answer from the big model is multiple options, it means that the big model can match multiple related government affairs from the menu list provided by the matter convergence prompt template, but cannot complete the convergence at this level. The big model returns the matching government affairs to the user, and the user selects from the matching government affairs. Third execution logic: If the answer from the big model is a unique definite option, it means that the big model can complete the convergence operation at this level. The business system updates the status table of the dialogue and asks the big model the current question again. Step L200 is continued to check whether the big model can complete the next level of convergence, until the government affairs converge or the final level of convergence is completed, or the first execution logic or the second execution logic occurs, and the matter convergence operation ends. Among them, in step L200, for the answer returned by the large model, the large model denoises the answer data through regular matching and returns the denoised answer to the business system.

4. A government affairs question-answering system based on a large model and multi-level convergence, characterized by: Including business systems and large models; The business system is used to perform the following: metadata management and raw data management of government affairs, deconstructing the business handling of government affairs through metadata management to set the convergence level of government affairs, setting a corresponding matter convergence prompt template for each convergence level, and setting a question-answer prompt template, the matter convergence prompt template and the question-answer prompt template are stored locally in the business system as prompt templates, and basic information related to government affairs is stored in the knowledge base through raw data management, and specific information related to government affairs is stored in the database, where the basic information of government affairs includes the name of the government affairs matter, and the specific information related to government affairs includes the materials required for the business and the business interpretation; For the current question raised by the user, the business system determines the convergence level of the current question based on the previous conversation status and provides a corresponding level of item convergence prompt template. The large model matches the current question with the corresponding level of item convergence prompt template to answer the item and obtain the final converged item. For the final converged items, the specific information of government affairs in the database is used as the background knowledge of the current question. The large model is used to answer the question based on the current question and the question answer prompt template, and the answer is returned to the user through the business system. There are three levels of convergence, namely, first-level convergence, second-level convergence, and third-level convergence; Level 1 convergence is used to determine the subject of government affairs, including handling food-related business and handling drug-related business; Secondary convergence is used to determine the business of government affairs, including applying for food certificates and changing the legal representative of food enterprises; Level 3 convergence is used to determine the business content of government affairs, including the processing time and process for applying for a food certificate; Among them, the business system is equipped with an intelligent answer engine and an event convergence engine; The event convergence prompt template and the corresponding template data are stored in the event convergence engine. The event convergence engine is used to tune the event convergence prompt template based on historical issues and corresponding convergence events, and cooperate with the big model to execute government event convergence. The question answer prompt template and the corresponding template data are stored in the intelligent answer engine. The intelligent answer engine is used to tune the question answer prompt template based on historical questions and corresponding question answers, and cooperate with the big model to execute government affairs questions and answers.

5. The government affairs question-answering system based on a large model and multi-level convergence according to claim 4 is characterized in that: The content of the item convergence prompt template includes roles, instructions, classification instructions, menu lists, examples, and my questions. Roles represent the role settings of the big model, instructions represent the work expected of the big model, classification instructions are used to further describe the problem to help the big model understand the problem, menu lists are lists of items that may match the user's question, examples are examples provided based on the instructions so that the big model can give similar answers, and my questions are the actual questions raised by the user. The content of the question answering prompt template includes roles, instructions, questions, and service guidelines. The roles represent the role settings of the big model, the instructions represent the work expected to be performed by the big model, the questions represent the actual questions raised by the user, and the service guidelines are used to describe the requirements related to government affairs.

6. The government affairs question-answering system based on a large model and multi-level convergence according to claim 5 is characterized in that: For historical questions raised by users, the business system stores the corresponding conversation information for each historical question and records the conversation status through a state table. The conversation status is used to indicate the convergence level of the government affairs matched to the corresponding historical question. Correspondingly, when government affairs converge, the business system and the big model work together to perform the following: L100: For questions raised by users, the business system obtains the last conversation information from the local machine. If it exists, it obtains the status of the last conversation to obtain the convergence level of the current government affairs matter. If the last conversation information does not exist, it determines that the convergence level of the current government affairs matter is 0 and determines the first-level convergence. L200, based on the current question raised by the user and the current convergence level of the matter, the convergence prompt template queries the big model to obtain the answer. The big model's answer includes three types of answers: unanswerable, unique, and multiple options. Correspondingly, in the government affairs convergence stage, the big model has the following three execution logics: First execution logic: If the answer of the large model is "unable to answer", it means that the large model cannot match the relevant items from the menu list provided by the item convergence prompt template and cannot complete the convergence operation at this level. The large model will return relevant information to the user to prompt the user to provide a detailed description of the problem; Second execution logic: If the answer from the big model is multiple options, it means that the big model can match multiple related government affairs from the menu list provided by the matter convergence prompt template, but cannot complete the convergence at this level. The big model returns the matching government affairs to the user, and the user selects from the matching government affairs. Third execution logic: If the answer from the big model is a unique definite option, it means that the big model can complete the convergence operation at this level. The business system updates the status table of the dialogue and asks the big model the current question again. Step L200 is continued to check whether the big model can complete the next level of convergence, until the government affairs converge or the final level of convergence is completed, or the first execution logic or the second execution logic occurs, and the matter convergence operation ends. Among them, in step L200, for the answer returned by the large model, the large model denoises the answer data through regular matching and returns the denoised answer to the business system.

Citation Information

Patent Citations

  • Question and answer processing method, device, system, computing device and computer storage medium

    CN116860949B

  • Government affair service mutual-assistance question-answering system

    CN113868390A

  • Multi-robot dialogue method and system for software-as-a-service platform

    CN117573834A