Law and regulation question answering system and method based on industry large model
By building a legal and regulatory question-and-answer system based on an industry big model and combining RAG technology to build a dynamic knowledge base, we have solved the bottlenecks of the existing system in terms of professional knowledge understanding, knowledge updating efficiency, and data security compliance, and achieved efficient and secure legal consulting services.
Patent Information
- Application Number
- CN202510709094.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-09-12
AI Technical Summary
The existing legal and regulatory question-and-answer system has multiple bottlenecks in terms of the depth of professional knowledge understanding, knowledge updating efficiency, complex problem handling capabilities, and data security compliance, making it difficult to meet the professional needs of the legal field.
A legal and regulatory question-and-answer system based on an industry big model is adopted, combined with RAG technology to build a dynamic knowledge base. Through online learning and incremental training, an in-depth understanding and real-time update of legal concepts are achieved, and security mechanisms are integrated to ensure data compliance.
It improves the accuracy and timeliness of legal issues, ensures data security, meets the professional needs and compliance requirements in the legal field, and provides personalized and precise legal consulting services.
Smart Images

Figure CN120633839A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of artificial intelligence and natural language processing, and specifically to a legal and regulatory question-answering system and method based on an industry macro model. Background Art
[0002] Against the backdrop of the rapid development of legal informatization, efficient access to and accurate understanding of laws and regulations have become core requirements for legal practice, corporate compliance, and public legal education. Traditional legal question-and-answer systems primarily rely on rule engines and static knowledge bases, enabling document retrieval and simple question-and-answering through pre-set keyword matching and limited logical rules. While these systems played a fundamental role in early legal information management, their technical architecture suffered from fundamental flaws. For example, the rules engine struggled to capture complex legal semantics. For example, the interpretation of specialized terms like "unjust enrichment" and "apparent agency" relied solely on fixed templates and could not dynamically adjust to context. Furthermore, static knowledge bases relied on manual entry and updating. With thousands of laws and regulations revised annually, the update cycle stretched to weeks or even months, significantly lagging behind actual needs. With the advancement of natural language processing (NLP) technology, statistical learning-based question-and-answer models have begun to be applied. These models, trained on lexical and syntactic features of legal texts, have significantly improved semantic matching capabilities. However, early models were limited by the scale and quality of training data, and were still weak in complex tasks such as parsing long texts and reasoning about cross-domain legal relationships. They also lacked a deep understanding of the legal logic system and could not meet core requirements such as "precise citation" and "compliance judgment" in legal practice.
[0003] In recent years, the emergence of general-purpose large-scale models (such as the DeepSeek series) has brought new breakthroughs to legal question-answering. Their powerful contextual understanding and generation capabilities have, to a certain extent, alleviated the semantic parsing problems of traditional models. However, the application of general-purpose large-scale models in the legal field has significant limitations: First, the proportion of legal professional corpus in pre-training data is extremely low, resulting in the model's accuracy in distinguishing easily confused legal concepts such as "dismissal of prosecution" and "dismissal of lawsuit request", "deposit penalty" and "liquidated damages clause" being far lower than that of human experts; second, general-purpose models lack an understanding of the legal source system and are prone to logical errors when dealing with conflicts between old and new laws; in addition, the generation process of general-purpose models is opaque and cannot provide references to the provisions, making it difficult to meet the strict requirements of "traceability" and "compliance" in legal scenarios. To address the above problems, some studies have attempted to fine-tune general models or build small-scale legal-specific models through domain data. However, due to the high cost of data annotation and insufficient number of model parameters, they have failed to achieve complete modeling of the legal knowledge system. In particular, when dealing with complex tasks such as "nested application of multiple laws" and "case element extraction", manual secondary verification is still required, making it difficult to form an automated solution.
[0004] At the same time, the dynamic and professional nature of knowledge in the legal field has placed higher demands on knowledge base management. Traditional knowledge bases use relational database storage and keyword indexing for retrieval. When faced with unstructured legal texts (such as judicial documents and legal reviews), knowledge extraction efficiency is low and semantic loss is serious. Although some systems have introduced vector retrieval technologies (such as TF-IDF and BM25) to optimize retrieval performance, the real-time problem of knowledge updating has not been solved. In terms of data security, legal questions and answers involve a large amount of sensitive information, such as corporate contract details and personal case information. Existing systems generally lack privacy protection mechanisms for legal scenarios, the level of data encryption is insufficient, and access rights control is extensive, making it difficult to meet the strict compliance requirements for sensitive data processing.
[0005] In summary, existing legal question-and-answer technologies have multiple bottlenecks in terms of the depth of professional knowledge understanding, knowledge updating efficiency, complex problem handling capabilities, and data security compliance. Although the combination of general large models and traditional NLP technology has brought certain progress, it has not fundamentally solved the professional needs of the legal field - the model needs to have a deep understanding of legal concepts, article logic, and judicial practice, and the knowledge base needs to support dynamic updates and semantic retrieval while meeting strict compliance standards. Therefore, there is an urgent need for an innovative solution that integrates industry large model fine-tuning and RAG technology, enhances model capabilities through domain-specific knowledge, builds a dynamic and scalable knowledge system, and realizes the intelligent upgrade of legal question-and-answering. This is the starting point of the technical research and development of this invention and the core innovative value. Summary of the Invention
[0006] The purpose of the present invention is to provide a legal and regulatory question-answering system and method based on an industry big model to solve the problems raised in the above background technology.
[0007] To achieve the above-mentioned purpose, the present invention provides the following technical solutions: a legal and regulatory question-answering system based on an industry macro-model, comprising a data layer, a model layer, a service layer, and an application layer;
[0008] The data layer is responsible for the collection, storage and management of legal and regulatory data; the model layer includes industry large models and RAG modules; the service layer provides question and answer generation, multi-round dialogue management, and security control core services; the application layer provides diverse application scenarios for different user groups.
[0009] Preferably, the data layer optimizes and adjusts the system by collecting user feedback and new legal and regulatory data, and adopts online learning or incremental learning to enable the model to learn new industry knowledge, new terminology and new trends in a timely manner. It also uses the performance monitoring module to track the accuracy of questions and answers and key indicators of response time in real time to optimize the operating efficiency and stability of the system.
[0010] Preferably, it also includes a user interaction module, through which users can evaluate, modify and provide feedback on the generated legal questions and answers. The system adjusts the question and answer generation strategy in real time based on the user's interactive information, further improving the quality of the questions and answers and user satisfaction, and supports multi-language processing capabilities to meet the needs of different user groups.
[0011] Preferably, the system is applied to different scenarios such as paralegal, corporate legal affairs, judicial consultation platform, and legal education. It provides personalized and precise legal question-and-answer services based on the legal needs and business processes of each scenario, and provides strong support for legal practice, popularization of legal knowledge, and improvement of legal service efficiency.
[0012] A method for a legal and regulatory question-answering system based on an industry macromodel comprises the following steps:
[0013] Industry data collection and preprocessing phase: Collect a large amount of data from specific legal fields, covering legal provisions, judicial interpretations, typical cases, and legal commentary. Preprocess the collected data, including formatting, noise removal, word segmentation, semantic annotation, and professional annotation. The annotation content includes keywords of legal provisions, scope of application, related legal provisions, and the essence of the case judgment.
[0014] Industry-specific large-scale model construction and fine-tuning phase: Based on collected legal data, industry-specific large-scale models are constructed. Existing general large-scale models are selected as the base model, and fine-tuned and trained on legal data. The model's structure and training strategy are optimized to adapt the model to the data distribution and semantic characteristics of the legal field, improving the understanding of legal terminology, professional expressions, and context.
[0015] Dynamic knowledge base management stage: Utilize Retrieval Augmentation Generation (RAG) technology to build a dynamic knowledge base. Through real-time connection with legal information sources, the latest laws and regulations are automatically obtained and quickly integrated into the knowledge base through vector retrieval technology. This enables real-time addition, deletion, modification, and query of legal knowledge, ensuring the timeliness and accuracy of the knowledge base.
[0016] Question and answer generation and optimization: Combining the logical reasoning capabilities of the industry model with RAG's multi-source knowledge retrieval capabilities, this system implements complex functions such as multi-legal article correlation analysis, case analogy reasoning, and compliance judgment. Through multi-round dialogue interaction and visualization tools, the accuracy of question and answer and user experience are improved, generating structured answers that include article citations, logical deductions, and conclusions.
[0017] Security and compliance mechanism stage: Integrate sensitive information encryption, access control, and compliance verification security mechanisms, use the AES-256 encryption algorithm to encrypt data, establish a multi-level access rights management system, and monitor user operations and data processing processes in real time to ensure data security and compliance.
[0018] Preferably, in the industry data collection and preprocessing stage, preprocessing also includes semantic annotation of unstructured text data, labeling legal subjects, legal acts and legal concepts through named entity recognition technology, and extracting entity relationships in combination with the legal knowledge graph to provide richer semantic information for subsequent model training and analysis.
[0019] Preferably, during the stage of building and fine-tuning the industry large model, during the fine-tuning training process, transfer learning technology is used to transfer the knowledge learned by the general large model on large-scale general data to legal specific data, accelerate the convergence speed of the model, improve the initial performance of the model, and introduce legal knowledge graphs as an auxiliary to enhance the legal logical reasoning ability of the model.
[0020] Preferably, in the dynamic knowledge base management stage, the knowledge base supports the parallel management of multiple versions of knowledge. Users can choose to view the latest version or historical version of the regulations according to their needs. The system automatically marks the version information of the referenced regulations in the answers to avoid legal risks caused by confusion of regulatory versions.
[0021] Preferably, during the question and answer generation and optimization stage, the multiple rounds of dialogue interaction optimize the accuracy of questions and answers by tracking the dialogue context. The system gradually guides the user to improve the question description based on the user's feedback, and displays the legal relationship and clause logic through visualization tools to help the user understand the answer more intuitively.
[0022] Preferably, in the security and compliance mechanism stage, the privacy protection and data anonymization processing adopts anonymization technology to remove sensitive identification information in the data, such as the name and ID number of the parties, without affecting the availability of the data, and only retain the core legal facts of the case.
[0023] Compared with the prior art, the present invention has the following beneficial effects:
[0024] The proposed legal and regulatory Q&A system and method, based on an industry-specific big model, utilizes massive amounts of professional legal data to fine-tune a general big model. This allows the model to deeply understand the connotation and extension of legal concepts, the logical connections between provisions, and the essence of case decisions. This fine-tuning enables the model to accurately grasp the core of complex legal issues and provide answers that meet legal professional standards, ensuring accuracy and rigor, thereby effectively addressing the problem of misunderstanding of professional knowledge.
[0025] Utilizing RAG technology to build a dynamic knowledge base, the system enables real-time addition, deletion, modification, and querying of legal knowledge. By connecting to legal information sources in real time, the system automatically retrieves the latest laws and regulations and rapidly integrates them into the knowledge base using vector search technology. This technological breakthrough significantly improves the efficiency of knowledge updating, reduces maintenance costs, and ensures that the system promptly reflects the latest developments in the legal field, providing users with more accurate and timely legal consulting services.
[0026] Advanced encryption algorithms are used to encrypt legal data during storage and transmission, ensuring data confidentiality. Strict access control ensures that only authorized users can access and manipulate relevant data, preventing data leakage and abuse. Compliance verification mechanisms monitor the system's behavior and data processing in real time to ensure compliance with legal requirements. These security measures provide a solid barrier for the system, allowing users to use it with confidence when processing sensitive legal data, providing reliable protection for the application of legal technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 Flow chart of the method of the present invention. DETAILED DESCRIPTION
[0028] In order to clearly and completely describe the objectives and technical solutions of the present invention and make the advantages more clearly understood, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are part of the embodiments of the present invention, not all of them, and are only used to explain the embodiments of the present invention, not to limit the embodiments of the present invention. All other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0029] In embodiment 1, the present invention provides a technical solution: a legal and regulatory question-answering system based on an industry big model, comprising a data layer, a model layer, a service layer, and an application layer;
[0030] The data layer is responsible for the collection, storage and management of legal and regulatory data; the model layer includes industry large models and RAG modules; the service layer provides question and answer generation, multi-round dialogue management, and security control core services; the application layer provides diverse application scenarios for different user groups.
[0031] The data layer optimizes and adjusts the system by collecting user feedback and new legal and regulatory data. It uses online learning or incremental learning to enable the model to timely learn new industry knowledge, new terminology, and new trends. It also uses the performance monitoring module to track key indicators such as the accuracy and response time of questions and answers in real time to optimize the system's operating efficiency and stability.
[0032] It also includes a user interaction module, through which users can evaluate, modify and provide feedback on the generated legal questions and answers. The system adjusts the question and answer generation strategy in real time based on the user's interactive information, further improving the quality of the questions and answers and user satisfaction, and supports multi-language processing capabilities to meet the needs of different user groups.
[0033] The system is applied to different scenarios such as legal assistants, corporate legal affairs, judicial consulting platforms, and legal education. It provides personalized and precise legal question-and-answer services based on the legal needs and business processes of each scenario, providing strong support for legal practice, popularization of legal knowledge, and improvement of legal service efficiency.
[0034] Example 2, based on Example 1, refer to the attached Figure 1 , a method for a legal and regulatory question-answering system based on an industry large model is proposed, which includes the following steps:
[0035] (1) Data collection and preprocessing
[0036] The core of the legal question-and-answer system lies in its deep understanding and efficient processing of legal knowledge. To achieve this goal, we first need to build a high-quality legal knowledge dataset encompassing multi-dimensional data such as legal provisions, judicial interpretations, typical cases, and legal commentary. This data comes from a wide range of sources, including national legal databases, authoritative legal publishers, judicial case libraries, and professional legal research institutions. The data types are diverse, encompassing structured legal text databases as well as unstructured text data such as judgment documents and legal commentary articles.
[0037] During the data collection process, the system utilizes a combination of automated crawling and manual screening. Firstly, by connecting to APIs of authoritative legal data sources, it achieves real-time synchronization of legal and regulatory texts. Secondly, for unstructured data such as judicial documents and legal commentaries, the system utilizes natural language processing technology to perform preliminary screening, eliminating irrelevant content and extracting core information. To ensure data accuracy and authority, all data is reviewed and annotated by legal professionals. This annotation includes keywords, scope of application, related legal provisions, and the essence of the case judgment.
[0038] Data preprocessing is a key step in ensuring system performance. First, the collected legal and regulatory texts are segmented, using a specialized segmentation dictionary for the legal field to ensure accurate segmentation of legal terms. Second, unstructured text data is semantically annotated, using named entity recognition technology to label legal entities (such as parties, courts, etc.), legal acts (such as prosecutions, judgments, etc.), and legal concepts (such as contracts, torts, etc.). In addition, the system also vectorizes the data, converting the text data into a high-dimensional vector representation for subsequent semantic retrieval and knowledge graph construction.
[0039] (2) Construction and optimization of industry large models
[0040] While general-purpose big models demonstrate strong language understanding and generation capabilities across a wide range of fields, their performance in the highly specialized field of law is less than satisfactory. The precision of legal terminology, the rigor of legal textual logic, and the complexity of judicial cases all place extremely high demands on the model's understanding capabilities. This invention utilizes a vast amount of specialized legal data to fine-tune the general-purpose big model, enabling it to deeply learn the connotation and extension of legal concepts, the logical connections between legal texts, and the essence of case decisions.
[0041] During model building, we first select a base model that has been pre-trained on large-scale general data, such as DeepSeek or the Qwen series. Next, we fine-tune the model on legal domain data, focusing on optimizing the model's understanding of legal terminology, professional expressions, and context. During fine-tuning, we employ transfer learning techniques to transfer knowledge learned by the general model on large-scale general data to legal-specific data, accelerating model convergence and improving initial performance.
[0042] To enhance the model's legal logic and reasoning capabilities, the system incorporates a legal knowledge graph as an aid. The knowledge graph uses entity relationship extraction technology to construct a semantic network of associations between legal concepts, provisions, and cases. During model training, the structured information from the knowledge graph is integrated into the model's contextual understanding, enabling the model to perform logical reasoning based on graph relationships, such as determining the priority of application between different legal provisions and analyzing legal disputes in case studies.
[0043] Furthermore, to address the opacity of the model generation process, the system employs interpretability-enhancing technology. By introducing a visualization tool based on the attention mechanism, the system demonstrates the model's focus on different legal provisions and cases when generating responses, providing users with a more intuitive basis for logical deduction. Furthermore, a legal reference module is embedded in the model output, clearly marking the legal provisions and case sources on which responses are based, ensuring traceability and compliance.
[0044] (3) Dynamic knowledge base management
[0045] Laws and regulations, as crucial norms of social order, are constantly being revised and improved. Thousands of new laws and regulations are introduced or existing ones are revised every year. This dynamic nature requires question-answering systems to be able to rapidly update their knowledge bases. However, traditional question-answering systems mostly rely on static knowledge bases, requiring manual entry and review of each item. This process is time-consuming and labor-intensive, with long update cycles and often lagging behind actual legal changes.
[0046] This invention uses RAG technology to build a dynamic knowledge base, enabling real-time addition, deletion, modification, and query of legal knowledge. By connecting to legal information sources in real time, the system can automatically obtain the latest laws and regulations and quickly integrate them into the knowledge base through vector retrieval technology. The specific implementation steps are as follows:
[0047] Real-time data synchronization: The system establishes real-time API connections with authoritative data sources such as the national legal database and judicial announcement platform to ensure that updated content is obtained as soon as new regulations are issued or existing regulations are revised.
[0048] Incremental knowledge update: Newly acquired legal and regulatory data is preprocessed and then converted into corresponding vector representations. Similarity comparisons are performed with vector representations in the existing knowledge base. New regulations are directly added to the knowledge base; revised regulations replace the existing entry's vector representation, and the revision history is recorded.
[0049] Semantic Retrieval Optimization: To improve the efficiency and accuracy of knowledge retrieval, the system uses a Transformer-based semantic retrieval model. This model jointly embeds user questions and knowledge base entries, calculating the similarity between the two in the semantic space, thereby quickly locating the legal provisions and cases most relevant to the question.
[0050] Multi-version knowledge management: Given the frequent revisions of regulations, the system supports the parallel management of multiple versions of knowledge. Users can choose to view the latest or previous versions of regulations as needed. The system automatically annotates the version information of the referenced regulations in responses, avoiding legal risks caused by confusion over regulatory versions.
[0051] (4) Question and answer generation and optimization
[0052] The core function of the Legal Question and Answer System is to provide users with more accurate, comprehensive, and structured legal answers. By combining the logical reasoning capabilities of the industry model with the multi-source knowledge retrieval capabilities of RAG, this system enables complex functions such as multi-legal correlation analysis, case-by-case analogy reasoning, and compliance judgment. The question and answer generation process mainly includes the following key steps:
[0053] Question Parsing and Semantic Understanding: When a user enters a question, the system first uses a large industry model to perform semantic parsing, identifying the legal subject, behavior, object, and legal relationship in the question. Using named entity recognition and relationship extraction techniques, the system converts natural language questions into structured legal representations, such as "contract dispute" or "liability for breach of contract."
[0054] Multi-source knowledge retrieval: Based on a structured representation of legal issues, the system uses RAG technology to retrieve relevant legal provisions, cases, and judicial interpretations from a dynamic knowledge base. The retrieval process not only considers keyword matching but also incorporates semantic similarity and contextual relevance to ensure comprehensive and accurate results.
[0055] Logical reasoning and answer generation: The industry-wide model uses the retrieved knowledge and the specific context of the question to perform logical reasoning. For example, when handling contract disputes, the model can analyze the legality of contract terms, the elements of breach of contract, and the possible legal consequences. Based on the reasoning results, it generates a structured answer that includes clause citations, logical deductions, and conclusions.
[0056] Multi-round dialogue and interaction optimization: To improve the accuracy of question-answering, the system supports multi-round dialogue interaction. After the initial answer, the system further adjusts the search scope and reasoning logic based on user feedback (such as follow-up questions and clarifications), gradually guiding users to refine their question descriptions, and ultimately providing answers that better meet their needs.
[0057] Answer visualization and user guidance: For complex legal issues, the system uses visualization tools (such as flowcharts and mind maps) to display legal relationships and legal logic, helping users more intuitively understand the answers. The system also provides interactive guidance, asking questions or prompts to help users clarify the core of the issue, lowering the barrier to entry for users.
[0058] (5) Security and compliance mechanisms
[0059] Legal data involves a large amount of sensitive information, such as personal privacy, corporate trade secrets, and state secrets. Leakage of this data not only harms the legitimate rights and interests of relevant parties but can also lead to serious legal consequences. This invention prioritizes data security and compliance, integrating a series of security mechanisms, including sensitive information encryption, access control, and compliance verification.
[0060] Data encryption and transmission security: The system uses the AES-256 encryption algorithm to encrypt legal data during storage and transmission, ensuring data confidentiality. All data transmission is carried out via the HTTPS protocol to prevent data theft or tampering during transmission.
[0061] Access Control: The system establishes a multi-tiered access management system, assigning different access rights based on user roles (e.g., lawyer, corporate legal affairs officer, general user, etc.) and permission levels (e.g., read-only, editor, administrator, etc.). Users must log in to the system using multi-factor authentication (e.g., password, fingerprint, dynamic verification code, etc.), ensuring that only authorized users can access and manipulate relevant data.
[0062] Compliance Verification and Auditing: The system includes a built-in compliance verification module that monitors user operations and data processing in real time to ensure compliance with laws and regulations. For example, when handling user issues, the system automatically checks for the risk of sensitive information leakage and issues warnings for high-risk operations. Furthermore, the system logs all operations, supporting post-audit and traceability, providing a strong guarantee for data security.
[0063] Privacy Protection and Data Anonymization: For data involving personal privacy or commercial secrets, the system uses anonymization technology to remove sensitive identifying information from the data without affecting its usability. For example, when processing case information, the system automatically blocks sensitive information such as the parties' names and ID numbers, retaining only the core legal facts of the case.
[0064] (6) System architecture and technical implementation
[0065] To achieve the above functions, the present invention constructs a modular and extensible system architecture, which mainly includes a data layer, a model layer, a service layer and an application layer.
[0066] Data layer: Responsible for the collection, storage, and management of legal and regulatory data. Distributed file systems (e.g., HDFS) are used to store unstructured data, such as judgment documents and legal commentaries. Relational databases (e.g., MySQL) are used to store structured data, such as legal texts and case labels. Vector databases (e.g., Milvus) are also used to enable semantic retrieval of legal knowledge.
[0067] Model layer: This includes the industry-wide model and the RAG module. The industry-wide model, based on the Transformer architecture, is fine-tuned and trained on legal data, enabling legal semantic understanding, legal text parsing, and case-based reasoning. The RAG module manages and retrieves dynamic knowledge bases, leveraging vector retrieval technology to enable real-time knowledge updates and efficient querying.
[0068] Service layer: Provides core services such as question and answer generation, multi-turn dialogue management, and security control. The question and answer generation service combines the inference results of the model layer to generate structured legal answers; the multi-turn dialogue management service optimizes the accuracy of question and answer by tracking the conversation context; and the security control service is responsible for operations such as user authentication, permission management, and data encryption.
[0069] Application layer: This layer provides diverse application scenarios for different user groups, including paralegal workstations, enterprise legal management systems, judicial consultation platforms, and legal education tools. Each application scenario interacts with the service layer through a unified API, ensuring the system's versatility and scalability.
[0070] In terms of technical implementation, the system adopts a microservices architecture, deploying each functional module as an independent service. Dynamic service scaling and load balancing are achieved through containerization technologies (such as Docker and Kubernetes). The front-end adopts a responsive design and supports multi-terminal access, including web pages, mobile applications, and smart hardware devices. The back-end uses distributed computing frameworks (such as Spark) to process large amounts of data, ensuring efficient operation and stability of the system.
[0071] (7) System optimization and continuous learning
[0072] To ensure the system is always in the best condition during long-term operation, the present invention has designed a system optimization and continuous learning mechanism. During the system operation, user feedback and new legal and regulatory data are continuously collected to optimize and adjust the system.
[0073] User feedback analysis: The system analyzes user satisfaction with answers and provides improvement suggestions based on feedback such as user satisfaction ratings and modification suggestions. Based on this feedback, the system adjusts the model parameters and processing strategies to optimize the quality of question and answer generation.
[0074] Continuous model training: Leveraging new legal and regulatory data and typical cases, we continuously train and update our industry-wide models. Through online or incremental learning, we enable the models to promptly learn new industry knowledge, terminology, and trends, enabling them to quickly adapt to dynamic changes in the legal field.
[0075] Performance Monitoring and Optimization: The system establishes a performance monitoring module to track key metrics such as question-answering accuracy, response time, and resource utilization in real time. Based on this monitoring data, the system optimizes the model architecture, adjusts hyperparameters, and rationally allocates computing resources to improve system efficiency and stability.
[0076] Knowledge base updates: As laws and regulations are constantly revised and added, the system regularly updates the knowledge base to ensure the timeliness and accuracy of the knowledge. The update process uses a combination of automation and manual review to ensure the quality and authority of the newly added knowledge.
[0077] Through the above-mentioned optimization and learning mechanism, the legal and regulatory question-and-answer system of the present invention can continuously evolve, maintain sensitivity and understanding of legal knowledge, and provide users with more accurate and efficient legal consulting services.
[0078] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. A legal and regulatory question-answering system based on an industry model, characterized by: Includes data layer, model layer, service layer and application layer; The data layer is responsible for the collection, storage and management of legal and regulatory data; the model layer includes industry large models and RAG modules; the service layer provides question and answer generation, multi-round dialogue management, and security control core services; the application layer provides diverse application scenarios for different user groups.
2. The legal and regulatory question-and-answer system based on an industry model according to claim 1 is characterized by: The data layer optimizes and adjusts the system by collecting user feedback and new legal and regulatory data. It uses online learning or incremental learning to enable the model to timely learn new industry knowledge, new terminology, and new trends. It also uses the performance monitoring module to track key indicators such as the accuracy and response time of questions and answers in real time to optimize the system's operating efficiency and stability.
3. The legal and regulatory question-and-answer system based on an industry model according to claim 2 is characterized by: It also includes a user interaction module, through which users can evaluate, modify and provide feedback on the generated legal questions and answers. The system adjusts the question and answer generation strategy in real time based on the user's interactive information, further improving the quality of the questions and answers and user satisfaction, and supports multi-language processing capabilities to meet the needs of different user groups.
4. The legal and regulatory question-and-answer system based on an industry macromodel according to claim 1 is characterized by: The system is applied to different scenarios such as legal assistants, corporate legal affairs, judicial consulting platforms, and legal education. It provides personalized and precise legal question-and-answer services based on the legal needs and business processes of each scenario, providing strong support for legal practice, popularization of legal knowledge, and improvement of legal service efficiency.
5. A method for a legal and regulatory question-answering system based on an industry large model according to claim 4, characterized in that: The following steps are involved: Industry data collection and pre-processing stage: Collect a large amount of data in specific legal fields, covering legal provisions, judicial interpretations, typical cases, and legal commentary. Pre-process the collected data, including formatting, noise removal, word segmentation, semantic annotation, and professional annotation. The annotation content includes the keywords of the legal provisions, scope of application, related legal provisions, and the essence of the case judgment; Industry-specific large-scale model construction and fine-tuning phase: Based on collected legal data, industry-specific large-scale models are constructed. Existing general large-scale models are selected as the base model, and fine-tuned and trained on legal data. The model's structure and training strategy are optimized to adapt the model to the data distribution and semantic characteristics of the legal field, improving the understanding of legal terminology, professional expressions, and context. Dynamic knowledge base management stage: Utilize Retrieval Augmentation Generation (RAG) technology to build a dynamic knowledge base. Through real-time connection with legal information sources, the latest laws and regulations are automatically obtained and quickly integrated into the knowledge base through vector retrieval technology. This enables real-time addition, deletion, modification, and query of legal knowledge, ensuring the timeliness and accuracy of the knowledge base. Question and answer generation and optimization: Combining the logical reasoning capabilities of the industry model with RAG's multi-source knowledge retrieval capabilities, this system implements complex functions such as multi-legal article correlation analysis, case analogy reasoning, and compliance judgment. Through multi-round dialogue interaction and visualization tools, the accuracy of question and answer and user experience are improved, generating structured answers that include article citations, logical deductions, and conclusions. Security and compliance mechanism stage: Integrate sensitive information encryption, access control, and compliance verification security mechanisms, use the AES-256 encryption algorithm to encrypt data, establish a multi-level access rights management system, and monitor user operations and data processing processes in real time to ensure data security and compliance.
6. A method according to claim 5, characterized in that: During the industry data collection and preprocessing stage, preprocessing also includes semantic annotation of unstructured text data, labeling legal entities, legal acts and legal concepts through named entity recognition technology, and extracting entity relationships in combination with legal knowledge graphs to provide richer semantic information for subsequent model training and analysis.
7. A method according to claim 6, characterized in that: During the stage of building and fine-tuning the industry large model, transfer learning technology is used in the fine-tuning training process to transfer the knowledge learned by the general large model on large-scale general data to legal specific data, accelerate the convergence speed of the model, improve the initial performance of the model, and introduce legal knowledge graphs as an auxiliary to enhance the model's legal logical reasoning ability.
8. A method according to claim 6, characterized in that: During the dynamic knowledge base management stage, the knowledge base supports the parallel management of multiple versions of knowledge. Users can choose to view the latest version or historical version of the regulations according to their needs. The system automatically marks the version information of the referenced regulations in the answers to avoid legal risks caused by confusion of regulatory versions.
9. A method according to claim 6, characterized in that: During the question and answer generation and optimization stage, the multiple rounds of dialogue interaction optimize the accuracy of questions and answers by tracking the dialogue context. The system gradually guides users to improve the question description based on user feedback, and displays the legal relationship and clause logic through visualization tools to help users understand the answers more intuitively.
10. A method according to claim 6, characterized in that: During the security and compliance mechanism stage, the privacy protection and data anonymization processing uses anonymization technology to remove sensitive identification information in the data, such as the name and ID number of the parties, without affecting the availability of the data, and only retain the core legal facts of the case.
Citation Information
Patent Citations
Law and regulation question-answering system based on generative language model and construction method
CN117271716A
Training method for improving accuracy of large language model in answering legal compliance questions
CN118152628A
Legal consultation system construction method based on multi-model collaborative reasoning
CN120030130A
AI Legal Support System for Legal Experts
KR102770197B1
Cited By
Safety control method, system and equipment for interaction data of large language model and medium
CN121051738A
Enterprise knowledge base construction method and device suitable for question and answer large model, equipment and medium
CN121072699A
Enterprise knowledge base construction method and device applicable to question and answer large model, equipment and medium
CN121072699B
Fine adjustment method for contract review large language model
CN121981191A