A method and system for implementing AI intelligent question answering based on digital intelligence platform

By integrating natural language processing, machine learning, big models and legal knowledge base technologies into an intelligent legal consulting system, we can achieve in-depth understanding and high-quality answers to users' legal issues, and solve the shortcomings of the existing system in natural language processing and legal professionalism, and improve the accuracy and practicality of legal consulting.

CN118761470BActive Publication Date: 2025-04-04GUANGZHOU RUILU INTELLIGENT TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410933523.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2025-04-04
Estimated Expiration
2044-07-12

AI Technical Summary

Technical Problem

The existing intelligent legal consulting system has shortcomings in natural language processing and legal professionalism, resulting in insufficient understanding and handling of complex legal issues.

Method used

Using AI intelligent question-and-answer implementation methods based on digital intelligence platforms, we can achieve in-depth understanding and high-quality answers to users' legal issues by integrating natural language processing, machine learning, big models and legal knowledge bases. This method includes preliminary processing of user questions, information supplement guidance, legal provision search and case integration to ensure the accuracy and authority of the answers.

Benefits of technology

It improves the accuracy and practicality of legal consultation, provides higher quality legal services, can better understand and deal with complex legal issues, and reduces issues such as content illusion and forgery of laws and regulations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118761470B_ABST
    Figure CN118761470B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of intelligent question answering, and provides an AI intelligent question answering implementation method and system based on a digital intelligence platform, including: a user inputs a first question on the digital intelligence platform; the digital intelligence platform processes the first question according to a first model, and the second model outputs the information missing from the first question; the digital intelligence platform guides the user to supplement the first question according to the missing information to obtain a second question; the digital intelligence platform processes the second question according to the first model to obtain at least one second legal provision with a confidence level not less than a preset value; the digital intelligence platform obtains at least one precedent according to at least one second legal provision; the digital intelligence platform combines the second question, at least one second legal provision, and at least one precedent into a third question; the digital intelligence platform submits the third question to a large model, and the large model returns the answer to the third question; the digital intelligence platform returns the answer to the third question to the user. The present invention can optimize the intelligent question answering answers for legal consultation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of intelligent question answering, and specifically relates to an AI intelligent question answering implementation method and system based on a digital intelligence platform. Background Art

[0002] In the existing technology, there are some intelligent systems that provide legal consultation and legal information services. These systems are based on artificial intelligence (AI) and natural language processing (NLP) technologies, which can understand and process legal issues raised by users and provide corresponding legal advice and information. These systems use advanced machine learning algorithms, legal knowledge bases, and text generation technologies to simulate the workflow of human lawyers to improve the efficiency and accessibility of legal services. However, despite the significant progress made in these technologies, there are still some problems and challenges in the existing intelligent systems that cannot be ignored.

[0003] First, these systems still have a large gap with human capabilities in natural language processing. Natural language is highly complex and diverse, and different users may express the same legal issue in different ways. Existing AI systems often have difficulties understanding and parsing these diverse expressions, leading to misunderstandings or improper handling of issues. For example, the same legal term may have different meanings in different contexts, and AI systems often fall short in distinguishing these nuances.

[0004] Secondly, the response texts generated by existing technologies are too formatted and lack flexibility and personalization. These systems usually rely on pre-set templates and fixed response modes, resulting in rigid responses that are not natural and vivid enough. Although such responses can provide basic legal information, they often fail to meet the needs of users in complex and specific legal consultation scenarios. When seeking legal advice, users expect insightful and targeted advice, not just formatted information.

[0005] At present, with the continuous advancement of technology, some large models with more accurate natural language processing have emerged, such as ChatGPT, iFlytek Spark, Wenxin Yiyan, Tongyi Qianwen, etc. These large models perform well in understanding and generating natural language texts, and can generate more natural, fluent and humanized answers. However, although these large models have demonstrated strong capabilities in handling general issues, there are still some challenges when facing professional legal issues.

[0006] First, although these big models have powerful language processing capabilities, they are still difficult to completely replace the role of professional lawyers in terms of professionalism and authority in the legal field. Legal issues usually involve complex legal provisions, regulatory interpretation, and case analysis, and the answers of big models, although natural, may lack details and accuracy. For example, when it comes to the interpretation of specific legal provisions or the details of legal procedures, big models may not be able to provide completely accurate and reliable advice.

[0007] Secondly, the quality of the questions users ask the big model directly affects the quality of the big model's answers. In order for the big model to better handle legal issues, users need to provide high-quality questions, including clear problem descriptions, relevant background information, and specific legal contexts. However, for ordinary users, how to ask high-quality questions is a difficult problem to solve. Users often lack professional legal knowledge and may not be able to accurately express their legal needs or provide the necessary background information, which makes it difficult for the big model to fully understand and handle these issues.

[0008] In addition, the complexity and diversity of legal issues also increase the difficulty of large models. Different legal issues may involve different legal fields and specific legal provisions, and large models need to have extensive and in-depth legal knowledge when facing these diverse issues. Although large models can improve their capabilities by continuously learning and updating their knowledge base, in actual applications, they still need to be properly guided and optimized. Summary of the invention

[0009] In order to solve the problems of legal AI and big models in legal consultation, a method and system for implementing AI intelligent question answering based on a digital intelligence platform is proposed. This method and system aims to improve the accuracy and practicality of legal consultation by integrating multiple advanced technologies, and provide users with higher quality legal services.

[0010] In one embodiment, the present invention proposes an AI intelligent question answering implementation method based on a digital intelligence platform, comprising the following steps:

[0011] The user inputs a first question on the digital intelligence platform; the digital intelligence platform processes the first question according to the first model to obtain a first legal article list; if the confidence of each item in the first legal article list is less than a preset value, the first question and the first legal article list are input into the second model, and the second model outputs the information missing from the first question; the digital intelligence platform guides the user to supplement the first question according to the missing information to obtain a second question; the digital intelligence platform processes the second question according to the first model to obtain at least one second legal article whose confidence is not less than a preset value; the digital intelligence platform obtains at least one precedent based on the at least one second legal article; the digital intelligence platform combines the second question, the at least one second legal article, and the at least one precedent into a third question; the digital intelligence platform submits the third question to the big model, and the big model returns the answer to the third question; the digital intelligence platform returns the answer to the third question to the user.

[0012] In another embodiment, the present invention further proposes an AI intelligent question-answering implementation system based on a digital intelligence platform, characterized in that the system is used for legal consultation and includes the following modules:

[0013] An input module, used for a user to input a first question on the digital intelligence platform;

[0014] A processing module, used for the digital intelligence platform to process the first question according to the first model to obtain a first legal article list; if the confidence of each item in the first legal article list is less than a preset value, the first question and the first legal article list are input into a second model, and the second model outputs the information missing from the first question; the digital intelligence platform guides the user to supplement the first question according to the missing information to obtain a second question; the digital intelligence platform processes the second question according to the first model to obtain at least one second legal article with a confidence not less than a preset value;

[0015] a forwarding module, configured for the digital intelligence platform to obtain at least one precedent according to the at least one second legal provision; the digital intelligence platform combines the second question, the at least one second legal provision, and the at least one precedent into a third question; the digital intelligence platform submits the third question to the big model, and the big model returns an answer to the third question;

[0016] The display module is used for the digital intelligence platform to return the answer to the third question to the user.

[0017] The present invention can produce the following beneficial effects through the above technical solution:

[0018] Using natural language and machine learning technology, we can fully analyze the legal issues input by users and accurately understand the user's intentions. This includes steps such as grammatical analysis, semantic understanding, and context processing to ensure a deep understanding of the problem.

[0019] Through the deep semantic analysis of the first model, the intention and background of the question are understood, and the relevant legal provisions are accurately retrieved and matched from the legal knowledge base to provide highly relevant and authoritative legal provisions. The confidence of the search results is evaluated to ensure that the returned legal provisions are highly matched with the user's questions, thereby improving the accuracy and reliability of the answers. If the confidence of the retrieved legal provisions is lower than the preset value, the second model analyzes the user's questions and matching results, identifies the key information missing in the questions, and generates detailed prompt information to guide the user to add the necessary details. Through the dynamic interaction of user supplementary information and system prompts, the questions are ensured to be more comprehensive and specific, so that the system can more accurately process and provide high-quality legal consulting services.

[0020] Integrate user questions, legal provisions and relevant precedents into the third question to provide detailed background information for the big model and help it generate more accurate and high-quality answers.

[0021] The present invention builds an intelligent and automated legal consultation platform by integrating multiple advanced technologies such as NLP, machine learning, large models (such as ChatGPT, Wenxin Yiyan, Tongyi Qianwen) and legal knowledge base. The system can efficiently process users' legal consultation requests, provide accurate laws, judicial cases and judicial essences, and eliminate the problems of content illusion and forged laws that are common in other large models. It also ensures the comprehensiveness and specificity of users' questions through intelligent guidance and information supplementation mechanisms, and ultimately improves the efficiency and accessibility of legal services. This solution not only solves the shortcomings of existing intelligent systems in legal consultation, but also provides users with a more high-quality and personalized legal service experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments 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.

[0023] Figure 1 is a flow chart of the method of the present invention. DETAILED DESCRIPTION

[0024] Below, the invention is preferably described in conjunction with the accompanying drawings and specific implementation methods.

[0025] This embodiment solves the above problem through the following steps:

[0026] In one embodiment, reference Figure 1 The present invention provides an AI intelligent question-answering implementation method based on a digital intelligence platform, comprising the following steps:

[0027] First, the user inputs the first question on the digital intelligence platform.

[0028] The core functions of the digital intelligence platform of the present invention include natural language processing (NLP), intelligent guidance, background information processing, legal knowledge base integration, large model interface, and feedback mechanisms. These functional modules work together to enable the platform to efficiently handle users' legal consultation requests and provide accurate and detailed legal advice. The platform design takes into account the diverse needs of users and supports multiple interaction methods such as text input, voice input, and file upload to ensure that users can raise legal issues conveniently and quickly.

[0029] Users access the digital intelligence platform through computers, smartphones or other Internet-connected devices. The platform provides a simple and clear user interface, allowing users to easily navigate to the legal consultation module.

[0030] Users can choose the appropriate consultation method, including text input, voice input or file upload. For example, for questions that require detailed explanation, users may choose text input; for simple inquiries, users may choose voice input; for consultations involving specific files, users can upload relevant files.

[0031] The user enters their legal question (first question) in the text box. During the input process, the platform will display input prompts in real time to help users describe their questions more accurately. For voice input, the platform will use voice recognition technology to convert speech into text.

[0032] After the user completes the input, click the Submit button. The platform will send the user's first question to the natural language processing module and begin to parse and process the question.

[0033] The digital intelligence platform processes the first question according to the first model to obtain a first list of legal provisions.

[0034] Specifically, the digital intelligence platform uses its built-in first model, through natural language processing and machine learning technology, to comprehensively analyze and understand the first question entered by the user, so as to accurately retrieve and match relevant legal provisions.

[0035] After the user submits the first question, the Natural Language Processing (NLP) module analyzes the question. NLP technology converts the user's natural language input into structured data that the system can process through steps such as grammatical analysis, semantic understanding, and context processing.

[0036] The system extracts keywords and core concepts from the first question. This step involves identifying the user's intent, legal terms, case type, legal fields involved (such as contract law, labor law, family law, etc.), any specific time or location information, and information such as the subject, subject matter, object of the legal relationship, and type of legal dispute.

[0037] The first model uses deep learning (such as BERT, GPT and other large models) to perform semantic analysis on questions and understand the intention and context of the question. For example, if a user asks about the legal liability in a specific situation, the model needs to understand the specific details and relevant legal issues in that situation.

[0038] Based on the results of parsing and semantic analysis, the first model matches relevant legal provisions from the pre-established legal knowledge base. The legal knowledge base contains a wide range of legal documents, regulations, judicial interpretations, and precedents. The retrieval process uses information retrieval technology and matching algorithms to ensure that the legal provisions found are highly relevant to the user's question.

[0039] The retrieved legal provisions are screened and sorted by the first model, with the most relevant and authoritative provisions being displayed first. The screening process takes into account the scope of application of the provisions, the latest revisions, and the frequency of application in legal practice.

[0040] The first model evaluates the confidence of the search results and calculates the matching degree of each legal provision with the question. If the confidence of the first legal provision is higher than the preset threshold, it is considered that the provision can be used as an answer.

[0041] If the confidence of each item in the first legal provision list is less than a preset value, the first question and the first legal provision list are input into a second model, and the second model outputs the information missing from the first question.

[0042] This process is designed to ensure that the system can provide accurate and comprehensive legal advice and help users refine their questions to obtain more effective answers.

[0043] After the first model completes the matching of legal provisions, it assigns weights to the matched legal provisions. The weight of each provision is the confidence of the legal provision. The confidence reflects the degree of match between the legal provision and the user's question. The calculation of confidence is based on multiple factors, including keyword matching, semantic similarity, contextual relevance, etc.

[0044] The calculated confidence level is compared with the system preset threshold. The preset value is a set standard, usually set by the system administrator based on actual application requirements. For example, the preset value can be set to 0.75, indicating that legal provisions with a confidence level of more than 75% are considered credible.

[0045] If the confidence of the first legal provision is less than the preset value, the system will trigger the missing information identification module. This module analyzes the matching results of the user's question and the legal provision through the second model and identifies the key information missing in the question. This information may include specific legal details, time and place, relevant legal context, etc.

[0046] The second model generates prompts based on the identified missing information. These prompts are designed to guide users to add necessary details to make their questions more comprehensive and specific. For example, if the user's question involves a contract dispute, but the signing time of the contract and the terms involved are not provided, the prompts may include "Please provide the signing time of the contract" and "Please describe the specific terms involved."

[0047] The digital intelligence platform guides the user to supplement the first question based on the missing information to obtain the second question. This process is designed to ensure that the user can provide more detailed and specific information through system intelligent prompts and user interaction, so that the system can accurately process and provide high-quality legal consulting services.

[0048] When the first model determines that the confidence of the first legal provision is lower than the preset value, the second model will analyze the gap between the question and the retrieved legal provision. Through this analysis, the key information missing from the question is identified, which may include specific legal details, time nodes, event background, relevant people, etc.

[0049] The system generates detailed prompts to clearly indicate what specific content the user needs to provide. These prompts are presented in an easy-to-understand manner to help users understand the additional information they need to provide. For example, prompts may include "Please provide the specific date when the contract was signed", "Please describe the specific terms involved", and "Please explain the specific background of the dispute".

[0050] The digital intelligence platform displays prompt information to users through the user interface. The user interface is simple and intuitive, and users can easily see and understand the type of information that needs to be supplemented. The platform provides a variety of interactive methods, including text input boxes, multiple-choice questions, multiple-choice boxes, etc., so that users can easily supplement information.

[0051] Users can supplement the missing information according to the system prompts. In this step, users can enter a detailed text description in the input box provided by the platform, or select relevant options. In addition, users can also upload relevant documents or evidence, such as contract copies, email records, photos, etc., to support their supplementary descriptions.

[0052] After the user completes the information supplement, the system integrates the user's new input with the original question to generate a second question. The second question contains more comprehensive and specific details, allowing the system to more accurately understand the user's legal needs. For example, the user's original question is "Does the company need to give advance notice when firing an employee?" After the supplement, the second question becomes "In Beijing, does the company need to give advance notice when firing an employee due to poor performance?"

[0053] The system will conduct a preliminary confirmation of the second question to ensure that the supplementary information is complete and helpful for further analysis of the question. If the system still believes that the information is insufficient, it may generate another prompt to further guide the user to add more details until the information is complete enough.

[0054] Example:

[0055] Initial question: User input: "I was fired by the company, can I ask for compensation?"

[0056] Prompt message: System prompt: "Please provide the company's location, specific reasons for dismissal and the time of dismissal notice."

[0057] User supplement: The user enters supplementary information: "The company is located in Shanghai. I was fired because my performance did not meet the standards. The company did not notify me in advance."

[0058] Second question: The second question generated by the system is: "In Shanghai, if a company fires an employee for failing to meet performance standards without prior notice, can the employee demand compensation?"

[0059] The digital intelligence platform processes the second question according to the first model to obtain the second legal provision. After the user supplements the necessary information under the guidance of the system, a second question is formed. This question contains more specific and detailed details, allowing the system to understand the user's legal problem more accurately.

[0060] The second question is passed to the Natural Language Processing (NLP) module. This module uses advanced NLP technology to perform grammatical parsing and semantic analysis on the user's question and convert the natural language text into structured data. This step includes identifying key information such as keywords, legal terms, time nodes, people and places in the question.

[0061] The first model performs deep semantic analysis on structured data to understand the intent and context of the question. Through context analysis and semantic matching, the model can identify the core issues of the question. For example, the legal fields involved in the question (such as contract law, labor law, intellectual property law, etc.) and specific legal situations (such as dismissal, compensation, breach of contract, etc.).

[0062] Based on the results of deep semantic analysis, the first model retrieves relevant legal provisions from the pre-established legal knowledge base. The legal knowledge base contains a wide range of legal documents, regulations, judicial interpretations, and precedents. The model uses information retrieval technology and matching algorithms to ensure that the legal provisions found are highly relevant to the user's second question.

[0063] The retrieved legal provisions are screened and sorted by the first model. The screening process takes into account the applicability of the legal provisions, the latest revisions, and the frequency of application in legal practice. The purpose of sorting is to prioritize the most relevant and authoritative provisions to improve the accuracy and practicality of the answers.

[0064] The first model evaluates the confidence of the screened legal provisions and calculates the matching degree of each provision with the second question. If the confidence reaches or exceeds the preset value, the legal provision is considered credible and can be used as part of the answer.

[0065] After screening and confidence assessment, the first model generates the second legal provision. This legal provision is a direct response to the user's second question, and contains detailed legal provisions, relevant legal interpretations, and application examples. For example, if a user asks "In Beijing, when a company fires an employee for substandard performance, does it need to give advance notice?" the second legal provision generated may include specific provisions on dismissal notice in the Labor Contract Law.

[0066] The digital intelligence platform displays the generated second legal provisions to users. The displayed content includes the full text of the legal provisions, relevant judicial interpretations and practical application cases, helping users to fully understand the meaning and scope of application of the legal provisions. Users can view detailed information through the interface.

[0067] In the above steps, the first model focuses on the retrieval and matching of legal provisions, and the second model focuses on the identification of missing information and user guidance. The two are used in combination to give full play to their respective expertise, optimize resource utilization, and improve the overall performance of the system.

[0068] The digital intelligence platform obtains at least one precedent based on the second legal provision.

[0069] After the digital intelligence platform generates and displays the second legal article, the system will identify the key parts of the legal article. These key parts usually include specific legal clauses, relevant legal terms and the core content of the article. Identifying these key contents is the basis for subsequent case retrieval.

[0070] Based on the identified key legal provisions, the system constructs a case search query. The search query includes keywords and legal terms directly related to the legal provision. For example, if the legal provision involves the termination notice provisions in the Labor Contract Law, the search query may include keywords such as "Labor Contract Law Article 40", "Termination Notice Case", "Termination for Failure to Meet Performance Standards", etc.

[0071] The cases in the Digital Intelligence Platform come from the China Judgments Online, which is China's official legal case database that covers judgments from courts across the country. The China Judgments Online is an authoritative and comprehensive legal case resource that can provide a wealth of case references.

[0072] Using the constructed search query, the Digital Intelligence Platform searches for relevant legal precedents in the China Judgments Online data. The search process uses advanced search algorithms and information retrieval technology to ensure that the search results are highly relevant to the user's legal issues. The system will select the precedents that are most relevant to the second legal article, focusing on those actual cases that can explain and apply the article.

[0073] The retrieved cases are screened and sorted. The screening process considers the authority, applicability and completeness of the case documents. The purpose of sorting is to prioritize the most relevant and valuable cases. For example, the system may prioritize cases from higher courts or the Supreme Court, as well as those classic cases that are widely cited in similar legal contexts.

[0074] The digital intelligence platform combines the second question, the second legal provision, and the at least one case into a third question. By integrating these elements together, the digital intelligence platform can provide more detailed and complete background information for large models (such as ChatGPT, Wenxin Yiyan, Tongyi Qianwen, etc.), helping them to better understand users' questions and generate more accurate and high-quality answers.

[0075] After the digital intelligence platform obtains and displays the second legal article and at least one relevant case, it begins to integrate the user's second question, the generated second legal article, and the retrieved case. The integration process includes organizing this information into a structured input to ensure that the big model can fully understand the user's question background and legal basis.

[0076] The digital intelligence platform constructs the third question based on the integrated information. The third question includes not only the user's specific legal question, but also the legal provisions and precedents directly related to the question. This combination helps the big model refer to more detailed and relevant background information when generating answers, improving the accuracy and depth of the answers.

[0077] The third question not only includes a direct description of the problem, but also comes with detailed background information. This background information helps the big model understand the specific legal context of the problem. For example:

[0078] Case background: specific time, place, parties involved and legal relationship.

[0079] Legal basis: relevant legal provisions and judicial interpretations to help the big model understand the legal framework.

[0080] Actual Cases: Judgment results and legal reasoning of actual cases, providing examples of legal application in real life.

[0081] Suppose the user's second question is: "In Beijing, when a company fires an employee for failing to meet performance standards, does it need to give advance notice?"

[0082] Second legal provision: for example, the content of Article 40 of the Labor Contract Law.

[0083] Related case: A court case that explains in detail the notice requirements when firing an employee due to unsatisfactory performance.

[0084] Integrate into the third question:

[0085] The third question may be integrated into the following form:

[0086] In Beijing, when a company fires an employee for failing to meet performance standards, does it need to give advance notice?

[0087] Please refer to the following legal provisions and precedents when answering:

[0088] Legal provisions: According to Article 40 of the Labor Contract Law, an employer may terminate a labor contract after notifying the employee in writing thirty days in advance or paying the employee an additional one month's salary.

[0089] Cases: Upload relevant cases to the big model.

[0090] The digital intelligence platform submits the third question to the big model, and the big model returns the answer to the third question.

[0091] After integrating the user's second question, the second legal provision, and relevant precedents, the digital intelligence platform constructs a complete and detailed third question. The platform formats and confirms the third question to ensure that its structure is clear and the information is complete, which is convenient for the big model to understand and process.

[0092] The digital intelligence platform submits the third question to the big model through the big model interface module. The interface module is responsible for passing the formatted third question to the big model and ensuring the stability and security of data transmission. The big model can be a powerful natural language processing model such as ChatGPT, Wenxin Yiyan, Tongyi Qianwen, etc.

[0093] After receiving the third question, the big model first parses it. The big model uses its advanced natural language understanding (NLU) technology to identify the various parts of the question, including the user's question description, relevant legal provisions and case information. Through semantic analysis, the big model can fully understand the background and core issues of the question.

[0094] After parsing the third question, the big model generates an answer to the question based on its huge knowledge base and training data. The big model refers to the background information, legal provisions and precedents provided by the user, performs in-depth reasoning and information integration to ensure the accuracy and authority of the answer. The big model's answer not only covers the interpretation of legal provisions, but also includes specific legal advice and case analysis.

[0095] The digital intelligence platform returns the answer to the third question to the user.

[0096] After the big model generates the answer, it formats the answer into text that is easy for users to understand. This formatting process includes organizing the language, ensuring clear logic, and highlighting key information. The formatted answer is easy for users to read and refer to.

[0097] The big model returns the formatted answers to the digital intelligence platform through the interface module. The digital intelligence platform receives the answers and performs preliminary verification to ensure that the answers are complete and consistent with the information in the third question.

[0098] The digital intelligence platform displays the answers generated by the big model to users. The user interface is simple and clear, and users can easily view the details of the answers. The displayed content includes direct answers to user questions, explanations of relevant legal provisions, and application analysis of case law.

[0099] The big model generates answers based on the detailed information provided. For example, "According to Article 40 of the Labor Contract Law, an employer can terminate a labor contract after notifying the employee in writing 30 days in advance or paying the employee an additional month's salary. In addition, according to a court case (the specific content is omitted here)."

[0100] The second embodiment, based on the above embodiment, the present invention further describes the training process of the first model.

[0101] Get the case set and format the case data.

[0102] Collect a large amount of legal case data from authoritative legal databases such as the China Judgment Documents Network. Ensure that the data covers a wide range of legal fields and multiple types of cases to enhance the generalization ability of the model. Case data should include information such as case background, legal issues, reasons for judgment, and judgment results.

[0103] Organize case data into a structured format to ensure that each case text contains clear legal questions and corresponding answers (legal provisions).

[0104] A question recognition model is used to extract legal questions from case texts, and answers are extracted from corresponding judgment texts, wherein the answers include legal provisions.

[0105] You can use a pre-trained question recognition model (such as BERT) to automatically extract legal issues from case texts, or use any other trained commercial model. In this step, you can use a combination of rules and natural language processing technology to improve the accuracy of extraction.

[0106] It can also perform word segmentation and syntactic analysis on case texts. It can also use question recognition models or regular expressions to identify and extract legal issues in texts.

[0107] Use keyword matching and semantic analysis techniques to identify key information in the judgment. Extract the answer text and its position in the case for subsequent training.

[0108] The legal questions and corresponding answers are combined into training samples to train a first model, wherein the first model can output multiple answers, each of which includes a confidence level.

[0109] In order to obtain samples, we first construct question-answer pairs, combining the extracted legal questions and the corresponding answers into training samples.

[0110] Select the pre-trained BERT model and fine-tune it to adapt it to the legal question answering task. The output layer of the BERT model includes logits of the starting position and the ending position.

[0111] By performing a Softmax operation on the logits, the probability distribution of each position is obtained. The constructed question-answer pairs are used as training data and input into the BERT model for training. The cross entropy loss function is used to calculate the loss of the start and end positions, as well as the mean square error loss of the confidence prediction. The Adam optimizer and learning rate scheduler are used for training to ensure that the model converges and achieves optimal performance.

[0112] In the prediction phase, the model processes each question and outputs multiple possible answers. The Top-k method is used to obtain the k most confident answers and their confidences. The Softmax operation is performed on the start and end position logits of each answer to calculate its confidence. The model outputs multiple answers, each of which includes the start position, end position, and confidence.

[0113] The third embodiment, based on the above embodiments, the present invention further describes the training process of the second model.

[0114] Obtain a first training sample used for training the first model; organize the first training sample into an answer-question format, and annotate samples without missing information.

[0115] In the previous embodiment, the samples have been organized into a question-answer format. The second model is to find the conditions required to determine the corresponding legal conditions based on the legal conditions, so the samples are organized into answer-questions. Since these samples are generated based on precedents, they can be determined as samples without missing information.

[0116] Randomly delete entities in the question and annotate missing samples according to the type of deleted entities.

[0117] To generate missing information samples, we can randomly delete entities in the question and annotate them according to the type of deleted entities. These steps include identifying entities in the question, randomly deleting entities, annotating the missing information type, and generating new training samples.

[0118] First, named entity recognition (NER) is performed. Entity names usually include names of people, places, organizations, dates, behaviors, etc. Furthermore, this embodiment also adds legal entities. Pre-trained NER models (such as Spacy, BERT-NER, etc.) can be used to identify entities in the question.

[0119] Randomly select an entity and delete it or replace it with a placeholder (such as "[missing]") in the question. At the same time, annotate it according to the type of entity deleted, such as missing time, missing place, etc.

[0120] The samples without missing information and the samples with missing information are combined into a second training sample; the second training sample is used to train the second model, and the second model can output the type of missing information according to the input legal provisions and questions.

[0121] Collect the samples labeled as no missing information and the generated samples labeled as missing information together. Merge the two types of samples to ensure that the dataset contains diversity and balance.

[0122] The second model architecture is designed as follows:

[0123] Input: Legal text and user question text. Output: Type of missing information in the question. Model selection: Use a pre-trained language model (such as BERT) and fine-tune it to adapt it to the missing information identification task.

[0124] Before training, legal provisions and questions are encoded to generate vector representations required for model input. Corresponding labels are generated according to the type of missing information for model training.

[0125] During training, the cross entropy loss function is selected for training classification tasks. The Adam optimizer and learning rate scheduler are used for training to ensure that the model converges and achieves optimal performance.

[0126] Load the second training sample into the training pipeline. Iterate the model, monitor the training loss and performance on the validation set, and adjust hyperparameters to improve the accuracy of the model. Evaluate the model performance on the validation set to ensure that it can accurately identify the type of missing information.

[0127] The above embodiment uses natural language and machine learning technology to comprehensively analyze the legal issues input by users and accurately understand the user's intentions, including steps such as grammatical analysis, semantic understanding, and context processing to ensure a deep understanding of the issues.

[0128] Through the deep semantic analysis of the first model, the intention and background of the question are understood, and the relevant legal provisions are accurately retrieved and matched from the legal knowledge base to provide highly relevant and authoritative legal provisions. The confidence of the search results is evaluated to ensure that the returned legal provisions are highly matched with the user's questions, thereby improving the accuracy and reliability of the answers. If the confidence of the retrieved legal provisions is lower than the preset value, the second model analyzes the user's questions and matching results, identifies the key information missing in the questions, and generates detailed prompt information to guide the user to add the necessary details. Through the dynamic interaction of user supplementary information and system prompts, the questions are ensured to be more comprehensive and specific, so that the system can more accurately process and provide high-quality legal consulting services.

[0129] Integrate user questions, legal provisions and relevant precedents into the third question to provide detailed background information for the big model and help it generate more accurate and high-quality answers.

[0130] On the other hand, the present invention also provides an AI intelligent question-answering implementation system based on a digital intelligence platform, comprising the following modules:

[0131] An input module, used for a user to input a first question on the digital intelligence platform;

[0132] A processing module, used for the digital intelligence platform to process the first question according to the first model to obtain a first legal article list; if the confidence of each item in the first legal article list is less than a preset value, the first question and the first legal article list are input into a second model, and the second model outputs the information missing from the first question; the digital intelligence platform guides the user to supplement the first question according to the missing information to obtain a second question; the digital intelligence platform processes the second question according to the first model to obtain at least one second legal article with a confidence not less than a preset value;

[0133] a forwarding module, configured for the digital intelligence platform to obtain at least one precedent according to the at least one second legal provision; the digital intelligence platform combines the second question, the at least one second legal provision, and the at least one precedent into a third question; the digital intelligence platform submits the third question to the big model, and the big model returns an answer to the third question;

[0134] The display module is used for the digital intelligence platform to return the answer to the third question to the user.

[0135] Furthermore, the specific implementation methods of the above-mentioned AI intelligent question and answer implementation system based on digital intelligence platform are the same as an AI intelligent question and answer implementation method based on digital intelligence platform, and all further technical solutions in an AI intelligent question and answer implementation method based on digital intelligence platform are completely introduced into an AI intelligent question and answer implementation system based on digital intelligence platform.

[0136] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

[0137] The present invention does not particularly specify the structure of some modules, which shall be subject to the contents recorded in the prior art. The prior art mentioned in the above background technology section and the specific embodiment section of the present invention can be used as part of the present invention to understand the meaning of some technical features or parameters. The scope of protection of the present invention shall be subject to the contents actually recorded in the claims.

Claims

1. A method for implementing AI intelligent question answering based on a digital intelligence platform, characterized in that The method is used for legal consultation and comprises the following steps: The user inputs a first question on the digital intelligence platform; The digital intelligence platform processes the first question according to the first model to obtain a first list of legal provisions; If the confidence of each item in the first legal provision list is less than a preset value, the first question and the first legal provision list are input into a second model, and the second model outputs the information missing from the first question; The digital intelligence platform guides the user to supplement the first question according to the missing information to obtain a second question; The digital intelligence platform processes the second question according to the first model to obtain at least one second legal provision with a confidence level not less than a preset value; The digital intelligence platform obtains at least one precedent according to the at least one second legal provision; The digital intelligence platform combines the second question, the at least one second legal provision, and the at least one precedent into a third question; The digital intelligence platform submits the third question to the big model, and the big model returns the answer to the third question; The digital intelligence platform returns the answer to the third question to the user; The first model is obtained by the following training method: Obtain case collection and format case data; Using a question recognition model to extract legal questions from case texts, and extracting answers from corresponding judgment texts, wherein the answers include legal provisions; The legal question and the corresponding answer form a first training sample, and train a first model, wherein the first model can output multiple answers, each answer including a confidence level; The second model is obtained by the following training method: Obtaining a first training sample used for training the first model; Organizing the first training samples into an answer-question format and marking samples without missing information; Randomly delete entities in the question and annotate missing samples according to the deleted entity types; The samples without missing information and the samples with missing information form a second training sample; The second model is trained using the second training sample, and the second model can output the type of missing information according to the input legal provisions and questions.

2. The method for implementing AI intelligent question and answer based on a digital intelligence platform according to claim 1 is characterized in that: The first model and the second model are both BERT models.

3. The method for implementing AI intelligent question and answer based on a digital intelligence platform according to claim 1, characterized in that: The large model is at least one of ChatGPT, iFlytek Spark, Wenxin Yiyan, and Tongyi Qianwen.

4. An AI intelligent question-answering implementation system based on a digital intelligence platform, characterized in that The system is used for legal consultation and includes the following modules: An input module, used for a user to input a first question on the digital intelligence platform; A processing module, configured for the digital intelligence platform to process the first question according to the first model to obtain a first list of legal provisions; If the confidence of each item in the first list of legal provisions is less than a preset value, the first question and the first list of legal provisions are input into a second model, and the second model outputs the information missing from the first question; the digital intelligence platform guides the user to supplement the first question according to the missing information to obtain a second question; the digital intelligence platform processes the second question according to the first model to obtain at least one second legal provision with a confidence not less than a preset value; a forwarding module, configured for the digital intelligence platform to obtain at least one precedent according to the at least one second legal provision; the digital intelligence platform combines the second question, the at least one second legal provision, and the at least one precedent into a third question; the digital intelligence platform submits the third question to the big model, and the big model returns an answer to the third question; A display module, used for the digital intelligence platform to return the answer to the third question to the user; The first model is obtained by the following training method: Obtain case collection and format case data; Using a question recognition model to extract legal questions from case texts, and extracting answers from corresponding judgment texts, wherein the answers include legal provisions; The legal question and the corresponding answer form a first training sample, and a first model is trained, wherein the first model can output multiple answers, each answer including a confidence level; The second model is obtained by the following training method: Obtaining a first training sample used for training the first model; Organizing the first training samples into an answer-question format and marking samples without missing information; Randomly delete entities in the question and annotate missing samples according to the deleted entity types; The samples without missing information and the samples with missing information form a second training sample; The second model is trained using the second training sample, and the second model can output the type of missing information according to the input legal provisions and questions.

5. The AI ​​intelligent question-answering implementation system based on the digital intelligence platform according to claim 4 is characterized in that: The first model and the second model are both BERT models.

6. The AI ​​intelligent question-answering implementation system based on the digital intelligence platform according to claim 4 is characterized in that: The large model is at least one of ChatGPT, iFlytek Spark, Wenxin Yiyan, and Tongyi Qianwen.

Citation Information

Patent Citations

  • Response method and device of question

    CN108509463A

  • Intelligent legal dialogue system, method and equipment based on large language model

    CN117909462A