Government affair question and answer implementation method and implementation system based on large model and multistage convergence

By adopting large models and multi-level convergence technology in the government affairs Q&A system, combining metadata and original data management, Prompt templates are built for multi-level convergence and intelligent answers, the problems of accuracy and reliability in government affairs Q&A are solved, and an efficient and intelligent government affairs Q&A system is realized.

CN119514684AActive Publication Date: 2025-02-25SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

How to achieve the accuracy and reliability of government affairs Q&A based on big models and solve the problem that traditional FAQ cannot cope with complex problems.

Method used

The government affairs question-and-answer implementation method based on large models and multi-level convergence is adopted. The convergence level of government affairs matters is set through metadata management and original data management, and the matter convergence Prompt template and question answer Prompt template are used for multi-level convergence and intelligent answers.

Benefits of technology

It realizes multi-level convergence of user questions, provides intelligent and vivid answers, improves the accuracy and reliability of answers, simplifies knowledge management, and allows dynamic maintenance of Prompt content to optimize effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119514684A_ABST
    Figure CN119514684A_ABST
Patent Text Reader

Abstract

The invention discloses a government affair question and answer implementation method and implementation system based on a large model and multistage convergence, belongs to the technical field of artificial intelligence, and aims to solve the technical problem of how to realize the accuracy and reliability of government affair question and answer and improve the answer quality in combination with the large model. Comprising the steps that business handling of government affair items is deconstructed through metadata management to set convergence levels of the government affair items, a corresponding item convergence Prompt template is set for each convergence level, and a question answering Prompt template is set; on the basis of the last dialogue state, the convergence level of the current question is judged through the service system, an item convergence Prompt template of the corresponding level is provided, the large model conducts item matching answering according to the current question and the item convergence Prompt template of the corresponding level, and a final convergence item is obtained; and the large model answers the question according to the current question and the question answer Prompt template, and returns a question answer 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 in particular to a government affairs question-answering implementation method and implementation system based on a large model and multi-level convergence. Background Art

[0002] Government Q&A is an important part of digital government office and is the preliminary preparation for handling government affairs. Traditional government Q&A usually requires organizing question and answer pairs (FAQ) to answer possible questions from users. FAQ can help users quickly answer created questions, but when the questions raised by users 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 users' questions, but also make the answers more intelligent. However, the questions and answers of big models may not be so accurate, which is not possible for government Q&A. Therefore, how to provide accurate and reliable government Q&A based on big models has become an urgent problem to be solved.

[0003] In fact, a large model based on a knowledge base is usually a common way to solve the accuracy of question and answer. The Chinese patent application number CN202311056160.3 discloses a question and answer processing method, device, system, computing device and computer storage medium. The technical solution discloses a method for implementing question and answer based on a knowledge graph and a natural language generation model. This method has high requirements for the knowledge graph and requires the extraction of prompt words.

[0004] In combination with big 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 deficiencies and provide a government affairs question and answer implementation method and implementation system based on a large model and multi-level convergence, so as to solve the technical problem of how to achieve the accuracy and reliability of government affairs question and answer and provide answer quality in combination with 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 of government affairs, deconstruct the business handling of government affairs through metadata management to set the convergence level of government affairs, set the corresponding matter convergence prompt template for each convergence level, and set the question answer prompt template. The matter convergence prompt template and the question 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 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, and the specific information related to government affairs includes the materials required for the business and the business interpretation;

[0008] Convergence of government affairs: For the current question raised by the user, the convergence level of the current question is determined by the business system based on the last conversation status and a corresponding level of convergence prompt template is provided. The big model matches and answers the question based on the current question and the corresponding level of convergence prompt template to obtain the final converged question.

[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 answering prompt template, and returns the answer to the user through the business system.

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

[0011] The first-level 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 application for food certificates and change of legal representative of food enterprises;

[0013] The third level of convergence is used to determine the business content of government affairs, including the processing time and process for applying for a food certificate.

[0014] As a preferred embodiment, 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 for 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 for 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 users, and the service guidelines are used to describe the requirements related to government affairs.

[0016] As a preferred embodiment, for historical questions raised by users, the business system stores the dialogue information corresponding to each historical question, and records the dialogue status through a status table, and the dialogue 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 last conversation information from the business system. If it exists, obtain the status of the last conversation to obtain the convergence level of the current government affairs. If the last conversation information does not exist, determine that the convergence level of the current government affairs is 0, and judge the first-level convergence;

[0019] L200, based on the current question raised by the user and the current convergence level of the matter, the big model is queried to obtain the answer. The big model's answer includes three types of answers, namely, unanswerable, unique definite item, 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 big model is "cannot answer", it means that the big 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. It 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 of 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 of 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 of the big model is the only determined item, it means that the big model can complete the convergence operation of this level. The business system updates the status table of the dialogue, and inquires the big model about the current question again, and continues to execute step L200 to see whether the big model can complete the next level of convergence, until the government affairs converge or the last level of convergence is completed, or the first execution logic or the second execution logic appears, 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 preferred option, the business system is equipped with an intelligent answer engine and a matter convergence engine;

[0024] The matter convergence prompt template and the corresponding template data are stored in the matter convergence engine. The matter convergence engine is used to optimize the matter convergence prompt template according to historical issues and corresponding convergence matters, and cooperate with the big model to execute government affairs matter convergence;

[0025] The question answering prompt template and the corresponding template data are stored in the intelligent answering engine. The intelligent answering engine is used to optimize the question answering prompt template according to historical questions and corresponding 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, including 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 answering Prompt template, the matter convergence Prompt template and the question answering Prompt template are stored locally in the business system as Prompt templates, and storing the basic information related to government affairs in the knowledge base through raw data management, and storing the specific information related to government affairs in the database, wherein the basic information of government affairs includes the name of the government affairs, 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 is used to determine the convergence level of the current question based on the last conversation status and provide a corresponding level of item convergence prompt template. The large model is used to match and answer items based on the current question and the corresponding level of item convergence prompt template to obtain the final convergence item.

[0029] For the final convergent 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 according to the current question and the question answering prompt template, and the answer is returned to the user through the business system.

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

[0031] The first-level 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 application for food certificates and change of legal representative of food enterprises;

[0033] The third level of convergence is used to determine the business content of government affairs, including the processing time and process for applying for a food certificate.

[0034] As a preferred embodiment, 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 for 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 for 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 users, 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 dialogue information corresponding to each historical question and record the dialogue status through a status table, and the dialogue 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 are used together to perform the following:

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

[0039] L200, based on the current question raised by the user and the current convergence level of the matter, the big model is queried to obtain the answer. The big model's answer includes three types of answers, namely, unanswerable, unique definite item, 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 big model is "cannot answer", it means that the big 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. It 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 of 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 of 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 of the big model is the only determined item, it means that the big model can complete the convergence operation of this level. The business system updates the status table of the dialogue, and inquires the big model about the current question again, and continues to execute step L200 to see whether the big model can complete the next level of convergence, until the government affairs converge or the last level of convergence is completed, or the first execution logic or the second execution logic appears, 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 preferred option, the business system is equipped with an intelligent answer engine and a matter convergence engine;

[0044] The matter convergence prompt template and the corresponding template data are stored in the matter convergence engine. The matter convergence engine is used to optimize the matter convergence prompt template according to historical issues and corresponding convergence matters, and cooperate with the big model to execute government affairs matter convergence;

[0045] The question answering prompt template and the corresponding template data are stored in the intelligent answering engine. The intelligent answering engine is used to optimize the question answering prompt template according to historical questions and corresponding 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. Realized multi-level convergence of user problems: Through the prompt of the large model, multi-level convergence of user problems is achieved, so that user problems can be accurately located to related government affairs;

[0048] 2. Intelligent answers are realized: The prompt of the big model makes the user's answers intelligent and vivid, avoiding the rigid and stiff FAQ questions and answers;

[0049] 3. Knowledge management is relatively simple: Government affairs are maintained through knowledge management, and support is provided for user problem convergence and user problem background knowledge. Knowledge management is only metadata management and original data management, which is relatively simple compared to knowledge graphs;

[0050] 4. The 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 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 drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 creative work.

[0053] The present invention is further described below in conjunction with 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 cooperation between a business system and a 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, which is a government affairs question and answer implementation method based on a large model and multi-level convergence. DETAILED DESCRIPTION

[0057] The present invention is further described below in conjunction with 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 are not intended to limit the present invention. In the absence of 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 and answer implementation method and implementation system based on a large model and multi-level convergence, which are used to solve technical problems.

[0059] Embodiment 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 of government affairs are performed, and the business handling of government affairs is deconstructed through metadata management to set the convergence level of government affairs, and 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, and 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, wherein the basic information of government affairs includes the name of the government affairs matter, and the specific information related to the government affairs matter includes the materials required for the business and the business interpretation.

[0062] In this embodiment, in the knowledge preparation stage, it is necessary to manage the meta-information and original information of government affairs. In order to facilitate the convergence of government affairs issues, in the knowledge preparation stage, it is necessary to divide the original information into different convergence levels. The specific convergence level is based on business knowledge, and the current set convergence level is three levels.

[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 are all 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 raw data. Raw data is the source of materials for the answers of the big model. It is not only the data that serves as the background knowledge of the big model, but also the material basis for the big model to generate answers. Raw data is based on the premise of easy reading. For raw 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 raw data and metadata to facilitate finding the raw data of the corresponding matter based on the metadata.

[0067] The multi-level convergence of problems and the intelligent answers to problems are all 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] {description 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 content to be filled is dynamically changing. Except for the user's question, other content data of the dynamic changes 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 to obtain 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 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 primary 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 definite 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 of 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 of 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 of 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 of the big model is the only determined item, it means that the big model can complete the convergence operation of this level. The business system updates the status table of the dialogue, and inquires the big model about the current question again, and continues to execute step L200 to see whether the big model can complete the next level of convergence, until the government affairs converge or the last level of convergence is completed, or the first execution logic or the second execution logic appears, 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 stage is the core part of this embodiment, and its essence is the understanding of user questions. Unlike the traditional way of extracting entities and intents through matching or knowledge graphs, government Q&A convergence is achieved with the help of a big model. By building a suitable Prompt template, user questions are handed over to the big model. Since the big model itself has semantic understanding capabilities, it can return relevant convergence items based on user questions and Prompt templates. The following will explain the three aspects of Prompt templates, item Q&A convergence processing logic, and how to solve the instability of big model Q&A.

[0098] First, the Prompt template of the big model is the premise 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.

[0099] Then, the next step is the specific convergence logic. During the different convergence processes of user questions, the current convergence level will be maintained through the state table.

[0100] When performing the convergence operation, the results returned by the large model are unstable. On the one hand, this instability can be adjusted by optimizing the prompt, and on the other hand, the project needs to be able to accommodate the inaccurate data returned by the large model. Different from the data required by the traditional interface definition, the results returned by the large model cannot be as accurate as the data format agreed upon by the interface. At this time, the possible noise data can be removed by 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"], in which case 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.

[0101] Step S300 Government Affairs Question and Answer: For the final converged items, the specific information of the government affairs items 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 answering 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 according to 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 according to historical issues and corresponding question answers, and cooperate with the big model to execute government affairs question and answer.

[0104] The method of this embodiment uses knowledge management and Prompt tuning of the big model to achieve multi-level convergence of user questions to accurately locate the questions, and then uses the text generation capability of the big model to achieve intelligent answers. The core of the whole process is the multi-level convergence positioning of user questions, and the technical core it relies on is the Prompt tuning of the big model. However, in the design process, there are two parts that require user interaction to complete.

[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 process.

[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] Embodiment 2:

[0108] The present invention discloses a government affairs question and answer realization 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, where the basic information of government affairs includes the name of the government affairs matter, and the specific information related to the government affairs matter includes the materials required for the business and the business interpretation.

[0110] In this embodiment, in the knowledge preparation stage, it is necessary to manage the meta-information and original information of government affairs. In order to facilitate the convergence of government affairs issues, in the knowledge preparation stage, it is necessary to divide the original information into different convergence levels. The specific convergence level is based on business knowledge, and the current set convergence level is three levels.

[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] The above are all 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 material source for the answers of the large model. It serves as the data for the background knowledge of 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 matters based on 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. Specifically, it is as follows:

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

[0117] <instruction>

[0118] {instruction}

[0119] < / instruction>

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

[0121] <classification description>

[0122] {description 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 locally. 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 big model is queried to obtain the answer. The big model's answer includes three types of answers, namely, unanswerable, unique definite item, 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 big model is "cannot answer", it means that the big 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. It 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 of 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 of 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 of the big model is the only determined item, it means that the big model can complete the convergence operation of this level. The business system updates the status table of the dialogue, and inquires the big model about the current question again, and continues to execute step L200 to see whether the big model can complete the next level of convergence, until the government affairs converge or the last level of convergence is completed, or the first execution logic or the second execution logic appears, 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 stage is the core part of this embodiment, and its essence is the understanding of user questions. Unlike the traditional way of extracting entities and intents through matching or knowledge graphs, government Q&A convergence is achieved with the help of a big model. By building a suitable Prompt template, user questions are handed over to the big model. Since the big model itself has semantic understanding capabilities, it can return relevant converged items based on user questions and Prompt templates. The following will explain the three aspects of Prompt templates, item Q&A convergence processing logic, and how to solve the instability of big model Q&A:

[0146] First, the Prompt template of the big model is the premise 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 status table will be used to maintain the current convergence level of user questions.

[0148] Thirdly, when performing convergence operations, the results returned by the large model are unstable. On the one hand, this instability can be adjusted by optimizing the prompt, and on the other hand, the project needs to be able to accommodate the inaccurate data returned by the large model. Different from the data required by the traditional interface definition, the results returned by the large model cannot be as accurate as the data format agreed upon by the interface. At this time, the 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 destroy 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 convergent 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 according to the current question and the question answering prompt template, and the answer is returned to the user through the business system.

[0150] In this embodiment, after the accurate government affairs items are determined, relevant materials on the relevant government affairs items 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 answer has a basis to rely on.

[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 according to 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 according to historical issues and corresponding question answers, and cooperate with the big model to execute government affairs question and answer.

[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 protection scope of the present invention.

Claims

1. A method for implementing government affairs question and answer based on a large model and multi-level convergence, characterized in that: Applied between business systems and large models, including the following steps: Question and answer knowledge configuration: metadata management and raw data management of government affairs, deconstruct the business handling of government affairs through metadata management to set the convergence level of government affairs, set the corresponding matter convergence prompt template for each convergence level, and set the question answer prompt template. The matter convergence prompt template and the question 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 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, and the specific information related to government affairs includes the materials required for the business and the business interpretation; Convergence of government affairs: For the current question raised by the user, the convergence level of the current question is determined by the business system based on the last conversation status and a corresponding level of convergence prompt template is provided. The big model matches and answers the question based on the current question and the corresponding level of convergence prompt template to obtain the final converged question. 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 answering prompt template, and returns the answer to the user through the business system.

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: There are three levels of convergence, namely, primary convergence, secondary convergence, and tertiary convergence; The first-level 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 application for food certificates and change of legal representative of food enterprises; The third level of convergence is used to determine the business content of government affairs, including the processing time and process for applying for a food certificate.

3. The method for implementing government affairs question and answer based on large model and multi-level convergence according to claim 1 or 2, characterized in that: 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 for 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 the list of items that may match the user's question, the examples represent the examples provided according to the instructions so that the big model can give similar answers, and my questions represent 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 for 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 users, and the service guidelines are used to describe the requirements related to government affairs.

4. The method for implementing government affairs question and answer based on large model and multi-level convergence according to claim 3 is characterized in that: For historical questions raised by users, the business system stores the conversation information corresponding to each historical question and records the conversation status through the status 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 last conversation information from the business system. If it exists, obtain the status of the last conversation to obtain the convergence level of the current government affairs. If the last conversation information does not exist, determine that the convergence level of the current government affairs is 0, and judge the first-level convergence; L200, based on the current question raised by the user and the current convergence level of the matter, the big model is queried to obtain the answer. The big model's answer includes three types of answers, namely, unanswerable, unique definite item, 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 big model is "cannot answer", it means that the big 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. It 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 of 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 of 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 of the big model is the only determined item, it means that the big model can complete the convergence operation of this level. The business system updates the status table of the dialogue, and inquires the big model about the current question again, and continues to execute step L200 to see whether the big model can complete the next level of convergence, until the government affairs converge or the last level of convergence is completed, or the first execution logic or the second execution logic appears, 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.

5. The method for implementing government affairs question and answer based on large model and multi-level convergence according to claim 3 is characterized in that: The business system is equipped with an intelligent answer engine and a matter convergence engine; The matter convergence prompt template and the corresponding template data are stored in the matter convergence engine. The matter convergence engine is used to optimize the matter convergence prompt template according to historical issues and corresponding convergence matters, and cooperate with the big model to execute government affairs matter convergence; The question answering prompt template and the corresponding template data are stored in the intelligent answering engine. The intelligent answering engine is used to optimize the question answering prompt template according to historical questions and corresponding answers, and cooperate with the big model to execute government affairs questions and answers.

6. A government affairs question-answering implementation system based on a large model and multi-level convergence, characterized in that: 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 answering Prompt template, the matter convergence Prompt template and the question answering Prompt template are stored locally in the business system as Prompt templates, and storing the basic information related to government affairs in the knowledge base through raw data management, and storing the specific information related to government affairs in the database, wherein the basic information of government affairs includes the name of the government affairs, 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 is used to determine the convergence level of the current question based on the last conversation status and provide a corresponding level of item convergence prompt template. The large model is used to match and answer items based on the current question and the corresponding level of item convergence prompt template to obtain the final convergence item. For the final convergent 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 according to the current question and the question answering prompt template, and the answer is returned to the user through the business system.

7. The government affairs question and answer realization system based on large model and multi-level convergence according to claim 6 is characterized in that: There are three levels of convergence, namely, primary convergence, secondary convergence, and tertiary convergence; The first-level 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 application for food certificates and change of legal representative of food enterprises; The third level of convergence is used to determine the business content of government affairs, including the processing time and process for applying for a food certificate.

8. The government affairs question-answering implementation system based on a large model and multi-level convergence according to claim 6 or 7, characterized in that: 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 for 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 the list of items that may match the user's question, the examples represent the examples provided according to the instructions so that the big model can give similar answers, and my questions represent 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 for 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 users, and the service guidelines are used to describe the requirements related to government affairs.

9. The government affairs question-answering implementation system based on a large model and multi-level convergence according to claim 8 is characterized in that: 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 the status 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 are used together to perform the following: L100. For questions raised by users, the business system obtains the last conversation information from the local computer. If it exists, the business system obtains the status of the last conversation to obtain the convergence level of the current government affairs. If the last conversation information does not exist, the convergence level of the current government affairs is determined to be 0, and the first-level convergence is determined. L200, based on the current question raised by the user and the current convergence level of the matter, the big model is queried to obtain the answer. The big model's answer includes three types of answers, namely, unanswerable, unique definite item, 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 big model is "cannot answer", it means that the big 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. It 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 of 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 of 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 of the big model is the only determined item, it means that the big model can complete the convergence operation of this level. The business system updates the status table of the dialogue, and inquires the big model about the current question again, and continues to execute step L200 to see whether the big model can complete the next level of convergence, until the government affairs converge or the last level of convergence is completed, or the first execution logic or the second execution logic appears, 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.

10. The government affairs question-answering implementation system based on a large model and multi-level convergence according to claim 8 is characterized in that: The business system is equipped with an intelligent answer engine and a matter convergence engine; The matter convergence prompt template and the corresponding template data are stored in the matter convergence engine. The matter convergence engine is used to optimize the matter convergence prompt template according to historical issues and corresponding convergence matters, and cooperate with the big model to execute government affairs matter convergence; The question answering prompt template and the corresponding template data are stored in the intelligent answering engine. The intelligent answering engine is used to optimize the question answering prompt template according to historical questions and corresponding answers, and cooperate with the big model to execute government affairs questions and answers.

Citation Information

Patent Citations

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

    CN116860949B

  • Intelligent item question-answering implementation method

    CN112487166A

  • Government affair service mutual-assistance question-answering system

    CN113868390A

  • Government affair service field multi-strategy fusion dialogue method based on knowledge graph

    CN116628172A

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

    CN117573834A

Cited By

  • Government affair question answering system based on deep government affair thinking

    CN120763283A