Legal consultation reply method and related device

Through pre-configured large models and knowledge plug-ins, legal consultation responses with strong logic and standardized formats are generated, which solves the problems of inaccurate and irregular formats of legal consultation responses in the existing technology, and achieves efficient responses to complex consultations.

CN120067265APending Publication Date: 2025-05-30IFLYTEK CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510178048.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-18
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

In the prior art, legal consultation responses are inaccurate, lack logic and irregular format, making it difficult to deal with complex or non-standardized legal consultation issues.

Method used

The pre-configured large model determines the target reply path corresponding to the intent classification results of the information to be consulted, calls the knowledge plug-in to obtain relevant knowledge search results, and generates highly logical and standardized reply content through the large model.

Benefits of technology

It realizes accurate understanding and responses to complex or non-standardized legal consultation information, improves the accuracy, professionalism and stability of the response, and ensures the logical and format uniformity of the reply content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120067265A_ABST
    Figure CN120067265A_ABST
Patent Text Reader

Abstract

The invention provides a legal consultation reply method and a related device, and relates to the technical field of computers.The method comprises the steps that a target reply path corresponding to an intention classification result of to-be-consulted information is determined through a pre-configured large model, and a knowledge plug-in corresponding to a first path node in the target reply path is determined, and calling the knowledge plug-in to obtain a knowledge retrieval result related to the to-be-consulted information, and generating reply content corresponding to each path node in the target reply path through the large model according to the knowledge retrieval result, the to-be-consulted information and the intention classification result. According to the method, the to-be-consulted information is subjected to intention recognition, the consultation reply is subjected to path planning, the logicality, specialty and normalization of the consultation reply are improved, legal consultation reply is performed in combination with the knowledge plug-in and the retrieval enhancement generation method, and the richness and correctness of the consultation reply are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and particularly to a legal consultation reply method and related devices. Background Art

[0002] With the rapid development of artificial intelligence technology, intelligent legal consultation reply has become an important application direction in the legal service industry. Especially in the context of the increasing demand for legal consultation reply, the ability to achieve efficient, accurate, and customized automatic reply is of great significance for improving the efficiency of legal services and reducing labor costs.

[0003] The existing legal consultation reply methods mainly include the following two types.

[0004] The first is the question template matching method, that is, the corresponding relationship between legal questions and answer templates is pre-constructed. When a user asks a question, the legal question closest to the information to be consulted is first matched, and then the answer template corresponding to the legal question is used as the reply content for the information to be consulted. However, when the information to be consulted is relatively complex or a non-standard question, this method is difficult to provide targeted reply content.

[0005] The second is the method based on a general large language model, that is, the reply content of legal questions is output through a general large language model. However, the general large model lacks a deep understanding of legal knowledge and may have logical errors, factual deviations, or even violate legal regulations during the reply process. In addition, the reply content generated by the general large language model lacks a unified format and specification. Summary of the Invention

[0006] In view of this, this application provides a legal consultation reply method and related devices to solve the problems of inaccurate, illogical, and non-standard format in legal consultation reply in the prior art. The technical solutions are as follows:

[0007] In a first aspect, a legal consultation reply method is provided, including:

[0008] Determine a target reply path corresponding to the intention classification result of the information to be consulted through a pre-configured large model, where the large model is obtained by training a general large model using legal-related texts as training data, and different intention classification results correspond to different reply paths;

[0009] Determine the knowledge plugin corresponding to the first path node in the target reply path, and call the knowledge plugin to obtain a knowledge retrieval result related to the information to be consulted, where the knowledge retrieval result includes a case retrieval result and / or a legal provision retrieval result;

[0010] Based on the knowledge retrieval result, the information to be consulted, and the intention classification result, the large model generates the response content corresponding to each path node in the target response path.

[0011] Optionally, the knowledge plugin includes a case retrieval plugin and / or a legal provision retrieval plugin;

[0012] The obtaining the knowledge retrieval result related to the information to be consulted by invoking the knowledge plugin includes:

[0013] Invoking the case retrieval plugin to retrieve cases related to the information to be consulted from a pre-constructed case knowledge base to obtain the case retrieval result, where the case knowledge base is a structured knowledge base composed of case types, case causes at each level, and attribute values of case entity attributes;

[0014] And / or,

[0015] Invoking the legal provision retrieval plugin to retrieve legal provisions related to the information to be consulted from a pre-constructed legal provision knowledge base to obtain the legal provision retrieval result, where the legal provision knowledge base is a structured knowledge base composed of laws and regulations at each level, legal provisions in the last-level laws and regulations, and attribute values of preset legal provision attributes in the legal provisions.

[0016] Optionally, the case entity attributes include relevant regulations, and the relevant regulations and the legal provisions in the legal provision knowledge base are associated by a fuzzy matching method.

[0017] Optionally, the invoking the case retrieval plugin to retrieve cases related to the information to be consulted from a pre-constructed case knowledge base to obtain the case retrieval result includes:

[0018] Invoking the case retrieval plugin to extract the attribute value of the case entity attribute from the information to be consulted as the first attribute value, taking the attribute value of the case entity attribute in the case knowledge base as the second attribute value, and performing similarity matching on the first attribute value and the second attribute value by using a preset matching method to obtain the case retrieval result according to the matching result, where the preset matching method includes a keyword matching method and / or a vector similarity matching method;

[0019] The invoking the legal provision retrieval plugin to retrieve legal provisions related to the information to be consulted from a pre-constructed legal provision knowledge base to obtain the legal provision retrieval result includes:

[0020] Call the legal provision retrieval plugin, extract the attribute value of the preset legal provision attribute from the information to be consulted as the third attribute value, use the attribute value of the preset legal provision attribute in the legal provision knowledge base as the fourth attribute value, and use the preset matching method to perform similarity matching on the third attribute value and the fourth attribute value, so as to obtain the legal provision retrieval result according to the matching result.

[0021] Optionally, the construction process of the case knowledge base includes:

[0022] Construct a multi-level case library with the case type as the main trunk and the case causes at each level as the lower-level branches;

[0023] Obtain a set of judgment cases;

[0024] For each judgment case in the set of judgment cases, extract the attribute value of the case entity attribute from the judgment case, and determine the last-level case cause corresponding to the judgment case from the last-level case causes included in the multi-level case library, and use the extracted attribute value as the lower-level branch of the last-level case cause corresponding to the judgment case; to obtain the case knowledge base.

[0025] Optionally, the construction process of the legal provision knowledge base includes:

[0026] Construct a multi-level legal regulation library with the laws and regulations of multiple legal departments as the main trunk;

[0027] Obtain a set of laws and regulations;

[0028] For each law and regulation in the last-level laws and regulations included in the multi-level legal regulation library, use the legal provisions in the law and regulation as the lower-level branch of the law and regulation, and use the attribute value of the preset legal provision attribute extracted from the legal provisions as the lower-level branch of the legal provisions; to obtain the legal provision knowledge base.

[0029] Optionally, the last path node of any of the reply paths is a view summary and analysis node;

[0030] The reply content corresponding to the view summary and analysis node is a summary legal opinion generated based on the reply contents corresponding to all the previous path nodes respectively.

[0031] In a second aspect, a legal consultation reply device is provided, including:

[0032] A path determination unit, configured to determine a target reply path corresponding to the intent classification result of the information to be consulted through a pre-configured large model, where the large model is obtained by training a general large model using legal-related texts as training data, and different intent classification results correspond to different reply paths;

[0033] A knowledge retrieval unit, configured to determine a knowledge plugin corresponding to a first path node in the target reply path, and call the knowledge plugin to obtain a knowledge retrieval result related to the information to be consulted, where the knowledge retrieval result includes a case retrieval result and / or a legal provision retrieval result;

[0034] A question reply unit, configured to generate reply contents corresponding to each path node in the target reply path through the large model according to the knowledge retrieval result, the information to be consulted, and the intention classification result.

[0035] In a third aspect, an electronic device is provided, including a memory and a processor;

[0036] The memory is used to store a program;

[0037] The processor is configured to execute the program to implement each step of the legal consultation reply method as described in any one of the above.

[0038] In a fourth aspect, a storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, each step of the legal consultation reply method as described in any one of the above is implemented.

[0039] As can be seen from the above technical solutions, for the legal consultation reply method provided in this application, a target reply path corresponding to the intention classification result of the information to be consulted is determined through a pre-configured large model, a knowledge plugin corresponding to the first path node in the target reply path is determined, the knowledge plugin is called to obtain a knowledge retrieval result related to the information to be consulted, and reply contents corresponding to each path node in the target reply path are generated through the large model according to the knowledge retrieval result, the information to be consulted, and the intention classification result. Thus, it can be seen that by performing intention recognition and classification on the information to be consulted in this application, even complex or non-standardized information to be consulted can still be accurately understood, which further helps the large model to give a more accurate consultation reply.

[0040] Furthermore, by calling the knowledge plugin in this application, knowledge retrieval results with higher professionalism, rigor, and authority can be obtained from outside the large model, which helps the large model to more deeply understand legal knowledge through the knowledge retrieval results, and further gives a consultation reply with higher accuracy and professionalism.

[0041] Even further, by setting reply paths corresponding to each intention classification result in this application, the consultation reply can be made more standardized and logical, further improving the accuracy and stability of the consultation reply. Different intention classification results correspond to different reply paths, enabling this application to flexibly adjust the consultation reply for information to be consulted with different intentions, ensuring that the reply content is not single. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on the provided drawings.

[0043] Figure 1 It is a schematic flowchart of a legal consultation reply method provided by an embodiment of the present application;

[0044] Figure 2 It is a schematic diagram of a case knowledge base provided by an embodiment of the present application;

[0045] Figure 3 It is a schematic diagram of a legal provision knowledge base provided by an embodiment of the present application;

[0046] Figure 4 It is a schematic structural diagram of a legal consultation reply device provided by an embodiment of the present application;

[0047] Figure 5 It is a hardware structure block diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0048] The following will clearly and completely describe the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.

[0049] The present application provides a legal consultation reply method and related device, and the legal consultation reply method and related device can be applied to scenarios that require automatic reply to legal consultations.

[0050] For example, when it comes to labor contract disputes, the user can put forward a legal question to be consulted, such as "I have worked in a company for three years, but the company has never signed a formal labor contract with me. Now the company suddenly wants to lay off employees. Do I have the right to claim compensation?", and the present application can give an automatic reply based on this legal question.

[0051] For another example, when it comes to traffic accident compensation, the user can put forward a legal question to be consulted, such as "I collided with a motorcycle while driving, causing the motorcycle driver to be injured. The traffic police determined that I am mainly responsible. May I ask what compensation responsibilities I need to bear?", and the present application can give an automatic reply based on this legal question.

[0052] Of course, the above scenarios of automatic reply for legal consultation are only examples. In addition, the scenarios of automatic reply for legal consultation can be others, and the present application does not make specific limitations.

[0053] Optionally, the legal consultation reply method and related devices provided by the present application can be applied to terminal devices with data processing capabilities, such as mobile phones, laptop computers, etc.; they can also be applied to servers communicating with terminal devices, etc.

[0054] To make those skilled in the art better understand the present application, the legal consultation reply method provided by the present application will be introduced in detail through the following embodiments.

[0055] Please refer to Figure 1 , which shows a schematic flowchart of the legal consultation reply method provided by the embodiment of the present application. The legal consultation reply method can include:

[0056] Step S101: Determine a target reply path corresponding to the intent classification result of the information to be consulted through a pre-configured large model.

[0057] Here, the information to be consulted can be legal-related questions raised by users, such as "Can I request a return for expired food bought at the supermarket?", "Breaking into someone's house to steal, and then killing the person after discovering someone. How is this behavior convicted?", etc.; it can also be non-question descriptions related to law proposed by users, such as "Please explain the scope of application of Article 10 of the Tort Liability Law of the Civil Law", "Giving a colleague a ride home on the way and then having a car accident", etc.

[0058] As introduced in the background technology, general large models lack in-depth understanding of legal knowledge and may have logical errors, factual deviations, or even violate legal provisions during the reply process. To obtain high-quality and high-accuracy consultation replies, this embodiment can perform secondary development based on general large models to inject legal domain knowledge into general large models, resulting in vertical domain large models that accurately master legal domain knowledge, that is, the above-mentioned pre-configured large models. Here, a general large model refers to a large model trained to handle multiple tasks and domains. For example, iFlytek Spark Cognitive Large Model, Tongyi Qianwen Large Model, Wenxin Yiyan Large Model, ChatGPT Large Model, ChatGLM Large Model, and so on.

[0059] Specifically, this embodiment can use legal-related texts as training data to train existing general large models to obtain the above-mentioned pre-configured large models.

[0060] Optionally, legal-related texts include but are not limited to the following texts: legal provisions, regulations, case laws, and academic papers.

[0061] Optionally, the method for training the general large model in this embodiment can adopt the continued pre-training method or the instruction fine-tuning method. In addition, other methods can also be used for training in this embodiment, and the present application does not make specific limitations.

[0062] By training on legal domain data in the embodiments of the present application, the large model obtained by training can accurately master the terms, concepts, logical reasoning, and inference methods unique to the law, and thus can output more logical, professional, and accurate consultation responses in subsequent replies.

[0063] Furthermore, in this embodiment, the information to be consulted can be subjected to intent recognition based on a pre-configured large model, and the intent recognition result is matched with a preset set of intent categories, and the matched intent category is used as the intent classification result of the information to be consulted.

[0064] Optionally, the set of intent categories includes: measure category, qualitative category, explanation category, and description category. Among them, the measure category refers to the category that expects to obtain implementable measures in the consultation response. For example, the information to be consulted is "Can I request a return for expired food purchased at the supermarket?"; the qualitative category refers to the category that expects to obtain the nature of the object (such as person, behavior, event, phenomenon, etc.) described in the information to be consulted in the consultation response. For example, the information to be consulted is "Breaking into someone's house to steal, killing the person after discovering someone, how to convict this kind of behavior?"; the explanation category refers to the category that expects to obtain the explanatory information of the object described in the information to be consulted in the consultation response. For example, the information to be consulted is "Please explain the scope of application of Article 10 of the Tort Liability Law of the Civil Law"; the description category refers to the category that only describes the object in the information to be consulted. For example, the information to be consulted is "Giving a colleague a ride home on the way back and having a car accident."

[0065] Of course, the intent categories in the set of intent categories can be other than the above four categories, and the present application does not make limitations.

[0066] By performing intent recognition on the information to be consulted, the present application can accurately understand the context of the information to be consulted and the details of the legal information involved, improving the accuracy of the response in the case of complex or ambiguous expressions.

[0067] In this embodiment, different intent classification results correspond to different response paths. Here, the response path contains several logically related path nodes, so that the consultation response based on the response path can make the response content more logical, standardized, and unified in format. In addition, designing multiple response paths enables the present application to provide personalized responses in combination with the specific scenarios covered by the information to be consulted, better meeting the needs of users.

[0068] For example, the reply paths corresponding to the measure category are: concept analysis -> legal basis analysis -> similar case analysis -> view summary analysis; the reply paths corresponding to the qualitative category are: behavior analysis -> legal basis analysis -> similar case analysis -> view summary analysis; the reply paths corresponding to the explanation category are: legal basis analysis -> similar case analysis -> view summary analysis; the reply paths corresponding to the description category are: case analysis -> legal basis analysis -> similar case analysis -> view summary analysis.

[0069] Thus, in this embodiment, the reply path corresponding to the intent classification result of the information to be consulted can be determined through the pre-configured large model. For the convenience of subsequent description, the determined reply path is defined as the target reply path.

[0070] Step S102: Determine the knowledge plugin corresponding to the first path node in the target reply path, and call the knowledge plugin to obtain the knowledge retrieval result related to the information to be consulted.

[0071] As introduced above, in this embodiment, legal-related texts can be used as training data to train the general large model, so that the pre-configured large model obtained by training can have a deeper understanding of legal knowledge. However, considering that it is different from the question-and-answer system in the general field, the legal field has its uniqueness, including the professionalism of legal terms, the rigor of legal regulations, and the authority and consistency of reply views. Relying solely on limited training data, the professionalism and comprehensiveness of the consultation replies output by the large model may still be weak.

[0072] In order to further assist the large model in outputting more professional, comprehensive, and logical consultation replies, knowledge plugins are set for at least some path nodes in the reply path, so as to obtain professional legal knowledge from outside the large model through the knowledge plugins.

[0073] Optionally, at least some of the path nodes include the first path node. Taking the target reply path as an example, in this embodiment, the knowledge plugin corresponding to the first path node in the target reply path can be determined, and then the knowledge plugin is called to obtain the knowledge retrieval result related to the information to be consulted. Here, the knowledge retrieval result includes at least one of the case retrieval result and the legal provision retrieval result.

[0074] For example, if the first path node includes "legal basis analysis" and "similar case analysis", the knowledge retrieval result retrieved by the knowledge plugin corresponding to "legal basis analysis" is the legal provision retrieval result, and the knowledge retrieval result retrieved by the knowledge plugin corresponding to "similar case analysis" is the case retrieval result.

[0075] Here, the legal provision retrieval result can be, for example, Article 38 of the Food Safety Law; the case retrieval result can be a publicly disclosed judgment case, such as the judgment case with the case number (2020) ***********.

[0076] Step S103: Use the large model to generate the response content corresponding to each path node in the target response path based on the knowledge retrieval result, the information to be consulted, and the intention classification result.

[0077] As introduced above, this embodiment can preset multiple response paths. In a possible implementation, the last path node of any response path is a view summary and analysis node, and the response content corresponding to this view summary and analysis node is a summary legal opinion generated based on the response content corresponding to all the previous path nodes.

[0078] The process of generating the response content corresponding to each path node is introduced below.

[0079] As introduced above, the target response path includes a first path node. Optionally, this embodiment can use the large model to perform a summary analysis on the knowledge retrieval result to obtain the response content corresponding to the first path node.

[0080] For example, if the first path node includes "Legal Basis Analysis" and "Similar Case Analysis", then a summary analysis can be performed on the legal provision retrieval result to obtain the response content corresponding to "Legal Basis Analysis", and a summary analysis can be performed on the case retrieval result to obtain the response content corresponding to "Similar Case Analysis".

[0081] In this embodiment, in addition to the first path node, the target response path at least further includes a second path node whose path order is after the first path node. For example, when the first path node includes "Legal Basis Analysis" and "Similar Case Analysis", the second path node is "View Summary Analysis". Then, this embodiment can use the large model to perform a summary analysis on the knowledge retrieval result, the information to be consulted, and the intention classification result to obtain the response content corresponding to the second path node.

[0082] Optionally, the target response path may further include a third path node whose path order is before the first path node. For example, when the first path node includes "Legal Basis Analysis" and "Similar Case Analysis", the third path node is "Concept Analysis" or "Behavior Analysis" or "Case Circumstances Analysis". Then, this embodiment can use the large model to analyze the information to be consulted and the intention classification result to obtain the response content corresponding to the third path node.

[0083] Taking the information to be consulted as "Can I request a return if I buy near-expired food in a supermarket?" as an example, the existing general large model (GPT) responds as follows:

[0084] According to the Consumer Rights and Interests Protection Law of China, whether one can request a return after purchasing near-expiry food mainly depends on the following factors:

[0085] 1. Food labels and information transparency: According to the Food Safety Law and the Consumer Rights and Interests Protection Law, merchants are required to clearly mark the production date and shelf life on the food they sell. If the food you purchased was clearly marked as near-expiry or approaching the shelf life at the time of sale, and you were aware of this in advance, generally you cannot request a return or exchange, unless there are quality problems with the food.

[0086] 2. Food quality problems: If you find quality problems (such as spoilage, damaged packaging, etc.) in the near-expiry food you purchased during consumption, you can request a return or exchange according to the relevant provisions of the Consumer Rights and Interests Protection Law. According to the law, consumers can request a return, exchange, or repair from the merchant within seven days after purchase if they find quality problems with the goods.

[0087] 3. The merchant's return and exchange policy: Some supermarkets or merchants may have specific policies for near-expiry food, which may state that "near-expiry food is not eligible for return" or "near-expiry goods are not accepted for return or exchange". However, regardless of the merchant's policy, if there are quality problems with the food itself, consumers still have the right to request a return or compensation.

[0088] 4. Special circumstances: If the merchant sells near-expiry food without informing you that the goods are near-expiry, or without clearly marking the near-expiry information, consumers can consider that the merchant has not fulfilled the obligation of notification and may request a return.

[0089] Generally speaking, if the near-expiry food purchased has no quality problems, and the merchant has clearly informed you and obtained your consent at the time of sale, usually a return cannot be requested. However, if there are quality problems with the food, or the merchant has not clearly informed you that the goods are near-expiry, consumers can still request a return based on relevant laws.

[0090] In this embodiment, the target reply path is: Concept analysis -> Legal basis analysis -> Similar case analysis -> Viewpoint summary analysis. Among them, "Concept analysis" is to analyze the legal definition of near-expiry products and relevant consumer protection regulations; "Legal basis analysis" is to retrieve the Consumer Rights and Interests Protection Law and relevant contract law provisions to confirm the consumer's right to return; "Similar case analysis" is to retrieve to find cases in similar situations, such as cases of "return due to product quality problems"; "Viewpoint summary analysis" is to generate a summary legal opinion, clarify that consumers have the right to return in this situation, and provide relevant legal provisions for support.

[0091] Based on this, regarding the question of "Can one request a return for near-expiry food bought in a supermarket?", the consultation reply of this embodiment is as follows:

[0092] I. Concept Analysis:

[0093] Generally speaking, foods within 30 days of their expiration dates can be regarded as near-expired foods, but different merchants may have different criteria. There is no specific provision in the "Law of the People's Republic of China on the Protection of Consumers' Rights and Interests" regarding "near-expired foods", but it requires merchants to truthfully inform consumers of the true situation of the goods, especially the production date, expiration date, storage conditions, etc. of the goods. If a food is close to its expiration date, the merchant has the obligation to label it and must not conceal information.

[0094] II. Legal Bases:

[0095] 1. "Law of the People's Republic of China on the Protection of Consumers' Rights and Interests"

[0096] Article 24: When consumers purchase goods, they have the right to know the true situation of the goods. Merchants shall clearly display information about the goods, especially key information such as quality and expiration date. If a merchant fails to clearly inform, consumers may request a return or compensation.

[0097] 2. "Food Safety Law"

[0098] Article 38: Food business operators shall not sell foods that have exceeded their expiration dates. If a supermarket sells near-expired foods and fails to label them as required or provide a reasonable explanation, it may constitute an illegal act.

[0099] III. Court Judgments:

[0100] In Case No. (2021) **********, the court determined that a supermarket selling expired foods falls under the category of selling foods that are knowingly not in compliance with food safety standards, and consumers have the right to request a return and obtain compensation. In addition, Case No. (2021) ********** also supported the consumers' requests for return and compensation. These cases indicate that the court generally supports consumers' requests for return and compensation due to purchasing foods that do not meet food safety standards.

[0101] IV. Summary of Views:

[0102] When consumers purchase near-expired foods, if a supermarket fails to clearly inform them of the near-expired information or does not comply with relevant legal regulations, consumers have the right to request a return. If a food has quality problems or expires during the reasonable usage period, consumers can also request a return, exchange, or compensation in accordance with the "Law of the People's Republic of China on the Protection of Consumers' Rights and Interests". When selling near-expired foods, supermarkets should fulfill their obligation of clear notification; otherwise, they will bear the responsibility of return or compensation.

[0103] Comparing the consultation responses of the existing general large model with the consultation responses of the large model in this embodiment, it can be seen that although the consultation responses of the general large model mention relevant laws, there is no support from specific laws and relevant cases, which makes its responses less reliable and lacks logic. Compared with the general large model, the large model in this embodiment generates response content according to the four path nodes included in the target response path, which not only has basic concept analysis, but also has support from relevant laws and cases, as well as the final summary of views. It is clearer, more standardized in format, more logical, and more in line with the rigorous and professional requirements of legal consultation.

[0104] In summary, the legal consultation response method provided by this application determines the target response path corresponding to the intent classification result of the information to be consulted through a preconfigured large model, determines the knowledge plug-in corresponding to the first path node in the target response path, calls the knowledge plug-in to obtain the knowledge retrieval result related to the information to be consulted, and generates the response content corresponding to each path node in the target response path according to the knowledge retrieval result, the information to be consulted, and the intent classification result through the large model. It can be seen that this application can accurately understand the information to be consulted even if it is complex or non-standardized, by identifying and classifying the intent of the information to be consulted, thereby helping the large model to give a more accurate consultation response.

[0105] Furthermore, this application can obtain more professional, rigorous and authoritative knowledge retrieval results from outside the big model by calling the knowledge plug-in, which helps the big model to understand the legal knowledge more deeply through the knowledge retrieval results, and then give more accurate and professional consultation responses.

[0106] Furthermore, the present application sets up a response path corresponding to each intent classification result, which can make the consultation response more standardized and logical, further improve the accuracy and stability of the consultation response, and different intent classification results correspond to different response paths, so that the present application can flexibly adjust the consultation response according to the information to be consulted with different intentions, ensuring that the response content is not monotonous.

[0107] In some embodiments of the present application, the process of "determining the knowledge plug-in corresponding to the first path node in the target reply path, and calling the knowledge plug-in to obtain the knowledge retrieval results related to the information to be consulted" in the above step S102 is introduced.

[0108] In an alternative embodiment, this embodiment may call a knowledge plugin to retrieve information from the Internet to obtain a knowledge retrieval result related to the information to be consulted; it may also call a knowledge plugin to retrieve information from a third-party system or a specific location through a preset Application Programming Interface (API) to obtain a knowledge retrieval result related to the information to be consulted.

[0109] In another relatively preferred implementation, the above-mentioned knowledge plugin may include at least one of a case retrieval plugin and a legal provision retrieval plugin. For example, when the first path node is "analysis of legal basis", the knowledge plugin determined in this embodiment is a legal provision retrieval plugin; when the first path node is "analysis of similar cases", the knowledge plugin determined in this embodiment is a case retrieval plugin; when the first path node includes both "analysis of legal basis" and "analysis of similar cases", the knowledge plugin determined in this embodiment includes a case retrieval plugin and a legal provision retrieval plugin.

[0110] The following separately introduces the process of calling a case retrieval plugin to obtain a case retrieval result related to the information to be consulted, and the process of calling a legal provision retrieval plugin to obtain a legal provision retrieval result related to the information to be consulted.

[0111] Optionally, the process of "calling a case retrieval plugin to obtain a case retrieval result related to the information to be consulted" may include: calling a case retrieval plugin to retrieve cases related to the information to be consulted from a pre-constructed case knowledge base to obtain a case retrieval result. Among them, the case knowledge base is a structured knowledge base composed of the case type, the case causes of action at each level, and the attribute values of the case entity attributes.

[0112] In a specific implementation, this embodiment may collect public judgment cases and construct a structured case knowledge base based on the case causes of action at each level of the judgment and the content of the judgment.

[0113] Optionally, the process of constructing a case knowledge base may include: constructing a multi-level case library with the case type as the main trunk and the case causes of action at each level as the lower-level branches ( Figure 2 for example, the multi-level case library consists of the case type, the first-level case cause of action, the second-level case cause of action, and the third-level case cause of action); obtaining a set of judgment cases; for each judgment case in the set of judgment cases, extracting the attribute values of the case entity attributes from the judgment case, and determining the last-level case cause of action corresponding to the judgment case from the last-level case cause of action included in the multi-level case library, and taking the extracted attribute values as the lower-level branches of the last-level case cause of action corresponding to the judgment case; to obtain a case knowledge base.

[0114] See Figure 2 As shown, it is a schematic diagram of a case knowledge base provided by an embodiment of the present application. As Figure 2, the case type is the main category, including but not limited to criminal, civil, administrative and other types. The first-level case cause is a sub-branch of the case type. Taking the civil type as an example, the first-level case causes include: disputes over property rights, disputes over tort liability, disputes over personal rights, etc. The second-level case cause is a sub-branch of the first-level case cause, and the third-level case cause is a sub-branch of the second-level case cause. Taking the dispute over tort liability as an example, the third-level case causes include: liability disputes for injuries caused by employees providing labor services, liability disputes for employees providing labor services suffering injuries, liability disputes of employers, etc.

[0115] The case entity attributes are sub-branches of the third-level case cause. As Figure 2 shown, optionally, the case entity attributes of each judgment case include one or more of the following attributes: case number, case cause, document name, party information, trial process, plaintiff's statement, defendant's defense, facts found in the trial, reasons for judgment, judgment result, relevant issues, relevant laws and relevant essential facts. Among them, the case number, case cause, document name, party information, trial process, plaintiff's statement, defendant's defense, facts found in the trial, reasons for judgment and judgment result are all parts of the judgment case, and the relevant issues, relevant laws and relevant essential facts are case facts obtained through summary and analysis.

[0116] It should be noted that the above case entity attributes are only examples, and the case causes at each level, including the three-level case causes, are also examples and do not limit this application.

[0117] In a possible implementation, the process of "invoking the case retrieval plugin to retrieve cases related to the information to be consulted from the pre-built case knowledge base and obtaining the case retrieval result" may include: invoking the case retrieval plugin, extracting the attribute values of the case entity attributes from the information to be consulted as the first attribute values, taking the attribute values of the case entity attributes in the case knowledge base as the second attribute values, and using a preset matching method to perform similarity matching on the first attribute values and the second attribute values to obtain the case retrieval result according to the matching result.

[0118] Optionally, the above preset matching method may include at least one of a keyword matching method and a vector similarity matching method; optionally, the keyword matching method may be the BM25 (Best Match 25) method or the TextRank method; optionally, the vector similarity matching method may be a vector matching method based on the Jaccard similarity coefficient or an Euclidean distance method (such as cosine similarity).

[0119] Taking the vector similarity matching method as an example, the process of "invoking the case retrieval plug-in, extracting the attribute values of the case entity attributes from the information to be consulted as the first attribute values, taking the attribute values of the case entity attributes in the case knowledge base as the second attribute values, and using a preset matching method to perform similarity matching on the first attribute values and the second attribute values to obtain a case retrieval result according to the matching result" may include: invoking the case retrieval plug-in, extracting and vectorizing the attribute values of the case entity attributes from the information to be consulted to obtain a first attribute vector, vectorizing the attribute values of the case entity attributes in the case knowledge base to obtain a second attribute vector, and performing similarity matching on the first attribute vector and the second attribute vector to obtain a case retrieval result according to the matching result.

[0120] For example, extract the attribute values of case entity attributes such as case cause, related issues, related regulations, and related essential facts from the information to be consulted, and then vectorize the extracted attribute values to obtain a first attribute vector; then vectorize the attribute values of case entity attributes such as case cause, document name, party information, trial process, plaintiff's statement, defendant's defense, trial findings, reasons for judgment, judgment result, related issues, related regulations, and related essential facts in the case knowledge base to obtain a second attribute vector. Finally, obtain the case retrieval result through vector matching.

[0121] Optionally, the vectorization process when obtaining the first attribute vector and the second attribute vector can be implemented by a word embedding method or a sentence vector (Sentence-BERT) method. Among them, Sentence-BERT refers to Sentence Bidirectional Encoder Representations from Transformers, abbreviated as SBERT, which is a sentence embedding representation model.

[0122] Optionally, the word embedding method can be the Word2Vec method or the GloVe (Global Vectors for Word Representation) method. Here, GloVe is a word embedding method for mapping words to a continuous vector space.

[0123] It should be noted that the word embedding method and the sentence vector method used for the above vectorization are only examples. In addition, other methods can also be used, and the present application does not make specific limitations.

[0124] It should also be noted that the above-mentioned preset matching method can also be other methods, such as the multi-channel recall method (the multi-channel recall method refers to a strategy of using different strategies, features or simple models to recall a part of the candidate set respectively, and then mixing these candidate sets together for subsequent sorting models to use. In the context of vector matching, the multi-channel recall can include various methods such as recall based on text similarity, recall based on vector space distance, recall based on user behavior data, etc.).), the method of chunking and clause splitting of knowledge base text (the method of chunking and clause splitting of knowledge base text refers to cutting long text into smaller text chunks or sentences to facilitate vectorization and matching processing), and so on. The present application does not make specific limitations.

[0125] When the preset matching method includes at least two matching methods, the above-mentioned "obtaining the case retrieval result according to the matching result" may include: performing weighted fusion on the matching results corresponding to at least two matching methods (such as using score fusion, reciprocal rank fusion (RRF), etc.), and obtaining the case retrieval result according to the weighted fusion value. For example, taking the top n (n can be preset) cases with the largest weighted fusion value as the case retrieval result of the embodiment of the present application.

[0126] Optionally, the process of the above-mentioned "invoking the legal provision retrieval plug-in to obtain the legal provision retrieval result related to the information to be consulted" may include: invoking the legal provision retrieval plug-in, retrieving the legal provisions related to the information to be consulted from the pre-constructed legal provision knowledge base, and obtaining the legal provision retrieval result, where the legal provision knowledge base is a structured knowledge base composed of laws and regulations at all levels, legal provisions in the last-level laws and regulations, and the attribute values of the preset legal provision attributes in the legal provisions.

[0127] In a specific implementation, existing laws and regulations can be collected, and a structured legal provision knowledge base can be constructed in the order from the largest coverage scope of laws and regulations to the smallest. For example, taking laws in multiple legal departments such as laws related to the Constitution, civil law and commercial law as the main body, and multiple levels of legal norms such as laws, administrative regulations, and local regulations as the lower-level branches, a complete and hierarchical structured legal provision knowledge base is formed.

[0128] Based on this, optionally, the process of constructing the legal provision knowledge base may include: constructing a multi-level law and regulation library with laws and regulations in multiple legal departments as the main body (taking Figure 3 as an example, the multi-level law and regulation library consists of the first three levels, that is, the level where judicial interpretations are located, the level where the Criminal Law is located, and the level where the Marriage Law is located); obtaining a set of laws and regulations; for each law and regulation in the last-level laws and regulations included in the multi-level law and regulation library, taking the legal provisions in the law and regulation as the lower-level branches of the law and regulation, and taking the attribute values of the preset legal provision attributes extracted from the legal provisions as the lower-level branches of the legal provisions; so as to obtain the legal provision knowledge base.

[0129] Specifically, after constructing a multi-level legal and regulatory library, for each law and regulation in the last-level laws and regulations included in the multi-level legal and regulatory library, the articles in the law and regulation are used as the lower-level branches of the law and regulation; for each article in the law and regulation, the attribute values of the preset article attributes are extracted from the article, and the extracted attribute values are used as the lower-level branches of the article; the above process is executed for each law and regulation in the last-level laws and regulations included in the multi-level legal and regulatory library respectively, and the finally obtained library is used as the article knowledge base.

[0130] Optionally, the process of extracting the attribute values of the preset article attributes from the articles can be implemented by a named entity recognition (NER) method.

[0131] See Figure 3 As shown, it is a schematic diagram of an article knowledge base provided by an embodiment of the present application. As Figure 3 , the laws and regulations of multiple legal departments include judicial interpretations, constitutions, implementation rules, etc., which serve as the main body of the article knowledge base. Criminal law, civil and commercial law, administrative law, etc. are the lower-level branches of the constitution, and the Marriage Law, the Tort Liability Law of the People's Republic of China, the Inheritance Law, etc. are the lower-level branches of civil and commercial law. Then, the articles in the Tort Liability Law of the People's Republic of China are used as the lower-level branches of the Tort Liability Law of the People's Republic of China. Finally, the attribute values of the preset article attributes in the articles are used as the last-level branches, and the article knowledge base can be obtained.

[0132] As Figure 3 shown, optionally, the preset article attributes of each article include one or more of the following attributes: article name, article content, subject classification, subject, object, right, obligation, and main idea.

[0133] It should be noted that the above preset article attributes are only examples and do not limit the present application.

[0134] In a possible implementation, the process of "invoking the article retrieval plugin to retrieve articles related to the information to be consulted from the pre-constructed article knowledge base and obtaining the article retrieval result" can include: invoking the article retrieval plugin to extract the attribute values of the preset article attributes from the information to be consulted as the third attribute values, using the attribute values of the preset article attributes in the article knowledge base as the fourth attribute values, and performing a similarity match on the third attribute values and the fourth attribute values by using a preset matching method to obtain the article retrieval result according to the matching result.

[0135] The above preset matching method and the specific similarity match and the process of obtaining the article retrieval result according to the matching result correspond to the relevant content of the case retrieval result in the previous text. For details, refer to the previous introduction and will not be elaborated here.

[0136] See Figure 2As shown, the case entity attributes in the above case knowledge base include relevant regulations, which are used to describe the specific legal articles involved in this case. Therefore, in a possible implementation, the attribute values of the relevant regulations in the case knowledge base can be extracted, and then the relevant regulations can be associated with the legal articles in the legal article knowledge base according to the extracted attribute values, so as to assist the knowledge plug-in to retrieve the case retrieval results and legal article retrieval results more quickly. For example, when the relevant regulation in the case retrieval result is "Article 2 of the Tort Liability Law of the People's Republic of China", the attribute values such as the legal article name and legal article content of Article 2 of the Tort Liability Law of the People's Republic of China can be directly retrieved from Figure 3 the legal article knowledge base shown. This can save the time of the previous similarity matching to a certain extent and improve the retrieval efficiency.

[0137] Optionally, the relevant regulations in the case knowledge base and the legal articles in the legal article knowledge base can be associated by a fuzzy matching method.

[0138] Of course, the relevant regulations in the case knowledge base and the legal articles in the legal article knowledge base can also be associated by methods such as keyword matching and vector similarity matching. The present application does not make specific limitations.

[0139] In summary, the embodiment of the present application constructs a structured professional legal knowledge base (that is, a case knowledge base and a legal article knowledge base), uses it as the data source of RAG (Retrieval Augmented Generation), and combines the knowledge plug-in and the RAG method to increase the supplement of legal regulations knowledge and case libraries in the process of consulting reply summary, enrich the content of the summary, and increase the reliability, correctness and comprehensiveness of the reply.

[0140] The embodiment of the present application also provides a legal consultation reply device. The legal consultation reply device provided by the embodiment of the present application will be described below. The legal consultation reply device described below can be correspondingly referred to the legal consultation reply method described above.

[0141] Please refer to Figure 4 , which shows the structural schematic diagram of the legal consultation reply device provided by the embodiment of the present application. As shown in Figure 4 , the legal consultation reply device may include: a path determination unit 401, a knowledge retrieval unit 402, and a question reply unit 403.

[0142] The path determination unit 401 is configured to determine a target reply path corresponding to the intention classification result of the information to be consulted through a pre-configured large model, where the large model is obtained by training a general large model with legal-related texts as training data, and different intention classification results correspond to different reply paths;

[0143] A knowledge retrieval unit 402, configured to determine a knowledge plugin corresponding to a first path node in a target reply path, and call the knowledge plugin to obtain a knowledge retrieval result related to the information to be consulted, where the knowledge retrieval result includes a case retrieval result and / or a legal provision retrieval result;

[0144] A question reply unit 403, configured to generate reply contents respectively corresponding to each path node in the target reply path through a large model according to the knowledge retrieval result, the information to be consulted, and the intention classification result.

[0145] In a possible implementation manner, the knowledge plugin determined by the above knowledge retrieval unit may be at least one of a case retrieval plugin and a legal provision retrieval plugin.

[0146] When the knowledge plugin includes a case retrieval plugin, the process of the knowledge retrieval unit calling the knowledge plugin to obtain a knowledge retrieval result related to the information to be consulted may include: calling the case retrieval plugin to retrieve cases related to the information to be consulted from a pre-constructed case knowledge base to obtain a case retrieval result, where the case knowledge base is a structured knowledge base composed of case types, case causes of action at each level, and attribute values of case entity attributes.

[0147] When the knowledge plugin includes a legal provision retrieval plugin, the process of the knowledge retrieval unit calling the knowledge plugin to obtain a knowledge retrieval result related to the information to be consulted may include: calling the legal provision retrieval plugin to retrieve legal provisions related to the information to be consulted from a pre-constructed legal provision knowledge base to obtain a legal provision retrieval result, where the legal provision knowledge base is a structured knowledge base composed of laws and regulations at each level, legal provisions in the last-level laws and regulations, and attribute values of preset legal provision attributes in the legal provisions.

[0148] In a possible implementation manner, the above case entity attributes include relevant regulations, and the relevant regulations and the legal provisions in the legal provision knowledge base are associated through a fuzzy matching method.

[0149] In a possible implementation manner, the process of the above knowledge retrieval unit calling the case retrieval plugin to retrieve cases related to the information to be consulted from a pre-constructed case knowledge base to obtain a case retrieval result may include: calling the case retrieval plugin to extract an attribute value of a case entity attribute from the information to be consulted as a first attribute value, taking the attribute value of the case entity attribute in the case knowledge base as a second attribute value, and performing a similarity match on the first attribute value and the second attribute value by using a preset matching method to obtain a case retrieval result according to the matching result, where the preset matching method includes a keyword matching method and / or a vector similarity matching method.

[0150] In a possible implementation, the process of the above-mentioned knowledge retrieval unit invoking the legal provision retrieval plug-in to retrieve legal provisions related to the information to be consulted from the pre-constructed legal provision knowledge base may include: invoking the legal provision retrieval plug-in to extract the attribute value of the preset legal provision attribute from the information to be consulted as the third attribute value, taking the attribute value of the preset legal provision attribute in the legal provision knowledge base as the fourth attribute value, and performing a similarity match on the third attribute value and the fourth attribute value by using a preset matching method, so as to obtain the legal provision retrieval result according to the matching result.

[0151] In a possible implementation, the construction process of the case knowledge base in the above-mentioned knowledge retrieval unit may include:

[0152] Construct a multi-level case library with the case type as the main trunk and each level of case causes as the lower-level branches;

[0153] Obtain the judgment case set;

[0154] For each judgment case in the judgment case set, extract the attribute value of the case entity attribute from the judgment case, and determine the last-level case cause corresponding to the judgment case from the last-level case causes included in the multi-level case library, and use the extracted attribute value as the lower-level branch of the last-level case cause corresponding to the judgment case; to obtain the case knowledge base.

[0155] In a possible implementation, the construction process of the legal provision knowledge base in the above-mentioned knowledge retrieval unit may include:

[0156] Construct a multi-level legal regulations library with the legal regulations of multiple legal departments as the main trunk;

[0157] Obtain the legal regulations set;

[0158] For each legal regulation in the last-level legal regulations included in the multi-level legal regulations library, take the legal provisions in the legal regulation as the lower-level branch of the legal regulation, and take the attribute value of the preset legal provision attribute extracted from the legal provisions as the lower-level branch of the legal provisions; to obtain the legal provision knowledge base.

[0159] In a possible implementation, the last path node of any of the above reply paths is a view summary and analysis node;

[0160] The reply content corresponding to the view summary and analysis node is a summary legal opinion generated based on the reply contents corresponding to all the previous path nodes respectively.

[0161] The embodiments of the present application also provide an electronic device. Optionally, Figure 5 The hardware structure block diagram of the electronic device is shown. Refer to Figure 5, the hardware structure of the electronic device may include: at least one processor 501, at least one communication interface 502, at least one memory 503, and at least one communication bus 504;

[0162] In the embodiments of the present application, the number of the processor 501, the communication interface 502, the memory 503, and the communication bus 504 is at least one, and the processor 501, the communication interface 502, and the memory 503 complete mutual communication through the communication bus 504;

[0163] The processor 501 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention, etc.;

[0164] The memory 503 may include a high-speed RAM memory, and may also include a non-volatile memory, etc., such as at least one disk memory;

[0165] Among them, the memory 503 stores a program, and the processor 501 can call the program stored in the memory 503, and the program is used to implement each step of the legal consultation reply method as described above.

[0166] Optionally, the refined functions and extended functions of the program can be referred to the above description.

[0167] The embodiments of the present application also provide a readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, each step of the legal consultation reply method as described above is implemented.

[0168] Optionally, the refined functions and extended functions of the program can be referred to the above description.

[0169] Finally, it should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover a non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.

[0170] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the various embodiments, reference can be made to each other.

[0171] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments shown herein, but rather will be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A legal consultation response method, characterized in that: include: Determine the target response path corresponding to the intent classification result of the information to be consulted through a pre-configured big model, wherein the big model is obtained by training a general big model using legal-related texts as training data, and different intent classification results correspond to different response paths; Determine a knowledge plug-in corresponding to a first path node in the target reply path, and call the knowledge plug-in to obtain a knowledge retrieval result related to the information to be consulted, wherein the knowledge retrieval result includes a case retrieval result and / or a legal provision retrieval result; The large model generates reply contents corresponding to each path node in the target reply path according to the knowledge retrieval results, the information to be consulted and the intention classification results.

2. The legal consultation reply method according to claim 1, characterized in that: The knowledge plug-in includes a case search plug-in and / or a law search plug-in; The calling of the knowledge plug-in to obtain knowledge retrieval results related to the information to be consulted includes: Calling the case search plug-in to search for cases related to the information to be consulted from a pre-built case knowledge base to obtain the case search result, wherein the case knowledge base is a structured knowledge base composed of case types, case causes at various levels, and attribute values ​​of case entity attributes; and / or, The legal article retrieval plug-in is called to retrieve the legal articles related to the information to be consulted from the pre-built legal article knowledge base to obtain the legal article retrieval results, wherein the legal article knowledge base is a structured knowledge base composed of the legal articles in each level, the legal articles in the last level of laws and regulations, and the attribute values ​​of the preset legal article attributes in the legal article.

3. The legal consultation reply method according to claim 2, characterized in that: The case entity attributes include relevant laws and regulations, and the relevant laws and regulations are associated with the laws in the legal knowledge base through a fuzzy matching method.

4. The legal consultation reply method according to claim 2 or 3, characterized in that: The calling of the case retrieval plug-in to retrieve cases related to the information to be consulted from a pre-built case knowledge base to obtain the case retrieval results includes: Calling the case retrieval plug-in, extracting the attribute value of the case entity attribute from the information to be consulted as the first attribute value, taking the attribute value of the case entity attribute in the case knowledge base as the second attribute value, and using a preset matching method to perform similarity matching on the first attribute value and the second attribute value, so as to obtain the case retrieval result according to the matching result, wherein the preset matching method includes a keyword matching method and / or a vector similarity matching method; The calling of the legal article search plug-in to search for legal articles related to the information to be consulted from a pre-built legal article knowledge base to obtain the legal article search results includes: Call the law retrieval plug-in, extract the attribute value of the preset law attribute from the information to be consulted as the third attribute value, use the attribute value of the preset law attribute in the law knowledge base as the fourth attribute value, and use the preset matching method to perform similarity matching on the third attribute value and the fourth attribute value to obtain the law retrieval result based on the matching result.

5. The legal consultation reply method according to claim 2 or 3, characterized in that: The process of constructing the case knowledge base includes: Construct a multi-level case library with the case types as the main trunk and the causes of cases at each level as the lower branches; Get a collection of judgment cases; For each judgment case in the judgment case set, the attribute value of the case entity attribute is extracted from the judgment case, and the last level of cause of action corresponding to the judgment case is determined from the last level of cause of action contained in the multi-level case library, and the extracted attribute value is used as the lower branch of the last level of cause of action corresponding to the judgment case; so as to obtain the case knowledge base.

6. The legal consultation reply method according to claim 2 or 3, characterized in that: The construction process of the legal knowledge base includes: Build a multi-level legal and regulatory database with laws and regulations from multiple legal departments as the backbone; Get a collection of laws and regulations; For each law or regulation in the last level of laws and regulations contained in the multi-level legal and regulatory database, the legal provisions in the law or regulation are taken as subordinate branches of the law or regulation, and the attribute value of the preset legal provision attribute extracted from the legal provision is taken as the subordinate branch of the legal provision; so as to obtain the legal provision knowledge base.

7. The legal consultation reply method according to claim 1, characterized in that: The last path node of any of the response paths is a point of view summary and analysis node; The reply content corresponding to the opinion summary analysis node is a summary legal opinion generated based on the reply contents corresponding to all the preceding path nodes.

8. A legal consultation reply device, characterized in that: include: A path determination unit, used to determine a target response path corresponding to the intention classification result of the information to be consulted through a preconfigured big model, wherein the big model is obtained by training a general big model using legal-related texts as training data, and different intention classification results correspond to different response paths; A knowledge retrieval unit, used to determine the knowledge plug-in corresponding to the first path node in the target reply path, and call the knowledge plug-in to obtain a knowledge retrieval result related to the information to be consulted, wherein the knowledge retrieval result includes a case retrieval result and / or a legal provision retrieval result; The question answering unit is used to generate the reply content corresponding to each path node in the target reply path according to the knowledge retrieval result, the information to be consulted and the intention classification result through the large model.

9. An electronic device, characterized in that: including memory and processor; The memory is used to store programs; The processor is used to execute the program to implement the various steps of the legal consultation response method as claimed in any one of claims 1 to 7.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the legal consultation response method as claimed in any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Data generation method and device, storage medium and electronic equipment

    CN121458311A

  • A data generation method and device, a storage medium and an electronic device

    CN121458311B