Administrative law enforcement supervision method and system based on judicial fine-tuning large model
Through judicial fine-tuning of the big model and RAG technology, the elements of law enforcement cases are extracted and discretionary benchmarks are matched. Combined with the scoring model, the problem of irregular law enforcement is solved, the accuracy and efficiency of supervision is improved, and fairness and transparency are enhanced.
Patent Information
- Application Number
- CN202510407031.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-07-25
AI Technical Summary
The existing technology has problems of irregular law enforcement behavior, abuse of power and overpowering law enforcement without manual participation, and the failure to effectively integrate and utilize law enforcement data, resulting in inefficient supervision and insufficient fairness.
The judicial fine-tuning big model is used to combine search and enhance generation technology (RAG), and the elements of law enforcement cases are extracted, the discretionary benchmarks are matched for classification, and the rationality of law enforcement behavior is automatically judged through the scoring model, and the language understanding ability of the big model is used for automated supervision.
It realizes real-time identification and correction of law enforcement deviations without manual review, improves the accuracy and efficiency of supervision, enhances the fairness and transparency of law enforcement, and reduces the labor workload.
Smart Images

Figure CN120374031A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automated administrative law enforcement supervision, and specifically relates to an administrative law enforcement supervision method based on a judicial fine-tuning large model. Background Art
[0002] With the development of society and the progress of technology, building a law-based society is of great significance, improving law enforcement efficiency and fairness. However, law enforcement supervision work is facing a series of complex challenges. Law enforcement officers are spread across multiple fields such as transportation and market supervision, and the large number of personnel undoubtedly increases the difficulty of supervision. At present, law enforcement supervision mainly relies on means such as inspections by superior departments and reports from the masses, and these methods have limitations in achieving all-round and real-time supervision. At the same time, a large amount of data generated during the law enforcement process has not been effectively integrated and utilized, and the low utilization rate of the data fails to fully exert its potential value in law enforcement supervision.
[0003] In the context of a large number of law enforcement officers and high supervision difficulty, it is particularly necessary to introduce a large language model for automated law enforcement supervision. It can not only improve supervision efficiency, ensure supervision consistency, but also effectively detect and prevent irregular behaviors, and enhance data utilization capabilities. In addition, automated supervision helps to improve law enforcement transparency and credibility, reduce labor costs, and at the same time has adaptability and scalability to support real-time supervision. Therefore, using a large language model for law enforcement supervision is a necessary means to improve supervision effectiveness and ensure law enforcement fairness, and is also a key step in promoting the intelligent and refined development of law enforcement supervision work.
[0004] In implementing the law enforcement supervision mechanism driven by a large model, the present invention has carried out specialized judicial fine-tuning on the model to enhance its in-depth understanding and accurate analysis capabilities in the legal context. This process involves incorporating rich judicial precedents, legal texts, and adjudication logics into the training scope of the model, aiming to improve the professional applicability and judgment accuracy of the model in the legal field. In addition, the present invention also uses a model based on the Retrieval-Augmented Generation (RAG) technology to achieve precise matching and response to law enforcement discretion benchmarks. This step closely connects law enforcement discretion elements with established discretion benchmarks to ensure the compliance and consistency of law enforcement results. Finally, this supervision method that combines judicial fine-tuning and RAG technology not only greatly improves the intelligent level of law enforcement supervision, but also effectively reduces human errors, further strengthening the fairness and transparency of the supervision process. Summary of the Invention
[0005] The present invention aims to solve the problem in the prior art of how to use a large model to automatically supervise law enforcement actions without manual review one by one, in order to identify and correct deviations in the law enforcement process in real time, and ensure the efficiency, fairness, and compliance of law enforcement activities.
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] Solution 1. The present invention proposes an administrative law enforcement supervision method based on a judicially fine-tuned large model, and the method includes the following steps:
[0008] Step 1. Use a judicially fine-tuned large model to extract elements of administrative law enforcement cases;
[0009] Step 2. Combine the extracted case elements with the large model retrieval augmented generation technology RAG to match the corresponding discretion benchmarks, and classify the subordinate levels of the discretion reference factors for case judgments;
[0010] Step 3. Construct a scoring model, score the subordinate levels of the discretion reference factors for case judgments obtained in Step 2 according to the scoring model to obtain the reasonable judgment level of the case, and then automatically judge the true judgment level in the penalty decision letter. By comparing the reasonable judgment level and the true judgment level, judge whether the case penalty is reasonable and fair, and complete the automatic supervision of administrative law enforcement cases.
[0011] Furthermore, there is also a preferred embodiment. The method for extracting elements of administrative law enforcement cases in Step 1 is specifically as follows:
[0012] Step 101. Collect multi-source administrative law enforcement case judgment documents, analyze the content structure of the judgment documents, and slice the analyzed judgment documents;
[0013] Step 102. Use legal knowledge to fine-tune the efficient parameters of the large model to obtain a locally judicially fine-tuned large model;
[0014] Step 103. Design prompt engineering and combine it with the locally judicially fine-tuned large model to extract elements from the sliced case judgment documents.
[0015] Furthermore, there is also a preferred embodiment. The elements of the extracted case judgment documents include the basic information of the parties, the source and investigation process of the case, illegal discretion reference factors (illegal duration, illegal circumstances, harmful consequences), and the basis and decision of administrative penalties.
[0016] Furthermore, there is also a preferred embodiment. The method for case level reasoning in Step 2 is specifically as follows:
[0017] Step 201: Collect administrative penalty discretion benchmark data, generate a Facebook AI Similarity Search (FAISS) index, and persistently store it as a knowledge base for enhancing RAG in knowledge retrieval.
[0018] Step 202: Use a pre-trained BERT (Bidirectional Encoder Representations from Transformers) model to vectorize the extracted case elements, calculate the Euclidean distance (L2) between the vectorized case elements and the administrative penalty discretion benchmark data, and search for the most similar vector in the FAISS index to obtain the penalty discretion benchmark corresponding to the current case judgment.
[0019] Step 203: After obtaining the discretion benchmark corresponding to the case, construct a new prompt together with the original case information, which is used to guide the model to classify the subordinate levels of the discretion reference factors in the case judgment.
[0020] Furthermore, there is a preferred embodiment. The subordinate levels of the above discretion reference factors include four categories: lighter, larger, severe, and mitigated. After the level classification, it is convenient for subsequent supervision.
[0021] Furthermore, there is a preferred embodiment. The specific method for supervising the case administrative law enforcement using a scoring model in Step 3 is as follows:
[0022] Step 301: Develop a scoring model standard according to the administrative law enforcement supervision task, score the subordinate levels of the case judgment discretion reference factors obtained in Step 2 according to the scoring model standard, calculate the total score of the discretion reference factors, and obtain the subordinate level (lighter / larger / severe / mitigated) of the reasonable judgment result through the scoring standard.
[0023] Step 302: Use a large model to automatically determine the discretion level (lighter / larger / severe / mitigated) to which the true judgment result in the penalty decision belongs.
[0024] Step 303: Compare the subordinate level of the reasonable judgment result with the discretion level to which the true judgment result belongs to determine whether the case penalty is reasonable and fair, and supervise the law enforcement process and penalty result.
[0025] Furthermore, there is also a preferred embodiment. For the above-mentioned discretionary benchmark matching, the FAISS index search used in the query can efficiently and quickly search for the most matching penalty discretionary benchmark, completing the part of RAG retrieval knowledge. Then, combined with the judgment information and the corresponding discretionary benchmark, a prompt is constructed, and the language understanding ability of the large model is used to determine the specific order of the discretionary reference factors in the case, so as to judge a reasonable penalty decision.
[0026] Furthermore, there is also a preferred embodiment. In step 3 above, for each judgment, the scores of the discretionary factors and the penalty decisions are calculated to judge the rationality of the penalty, converting subjective judgment into objective scoring, and overcoming the problem that directly using the large model prompt engineering judgment may be affected by pre-training data bias or model uncertainty.
[0027] Solution 2: The administrative law enforcement supervision method based on the judicially fine-tuned large model proposed in Solution 1 above can be fully implemented by computer software. Therefore, correspondingly, the present invention also provides an administrative law enforcement supervision system based on the judicially fine-tuned large model. The system includes:
[0028] A case judgment document element extraction module, which extracts the elements of the case judgment document to be supervised and accurately displays the structured judgment document information;
[0029] A case discretionary reference factor order reasoning module, which embeds the "suspected illegal act" in the judgment document and performs fuzzy query matching in the discretionary benchmark database to correspond to the relevant discretionary benchmarks. On this basis, a more accurate prompt is constructed and combined with the supervision large model to efficiently and accurately determine the order of the discretionary reference factors;
[0030] A scoring administrative law enforcement supervision module, which quantitatively scores the discretionary reference factors using the order standard, and calculates the expected reasonable penalty score through calculation. This score is compared and analyzed with the penalty score of the actual case judgment to evaluate the rationality of the judgment result. This process aims to ensure the fairness and compliance of case trials through precise supervision of the judgment result.
[0031] Solution 3: The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, it executes the administrative law enforcement supervision method based on the judicially fine-tuned large model described in any one of the above.
[0032] Solution 4: The present invention also provides a computer device, which includes a memory and a processor. A computer program is stored in the memory. When the processor runs the computer program stored in the memory, the processor executes the administrative law enforcement supervision method based on the judicially fine-tuned large model described in any one of the above.
[0033] The beneficial effects of the present invention are as follows:
[0034] The method described in the present invention addresses the problems of low efficiency and incomplete supervision in the existing law enforcement supervision system, and proposes to conduct automated law enforcement supervision based on a large model with judicial fine-tuning. The large model is trained with specialized legal knowledge so that it can accurately understand and analyze law enforcement documents and records. At the same time, the present invention adopts an efficient RAG discretion benchmark matching technology to match the discretion benchmark corresponding to the current case. A scoring model is designed based on the discretion benchmark to score and compare the case discretion factors and judgment results, thereby realizing law enforcement supervision without manual review one by one.
[0035] Furthermore, by comparing with the existing methods, the present invention can use the large model to more effectively and real-time supervise law enforcement behaviors, not only improving the accuracy of supervision, but also constructing an automated law enforcement supervision system, reducing the manual workload, and improving the overall efficiency of supervision.
[0036] The present invention is applicable to the field of administrative law enforcement supervision. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0038] Figure 1 It is a flowchart of the administrative law enforcement supervision method based on the large model with judicial fine-tuning described in the present invention;
[0039] Figure 2 It is an entity diagram of the overall framework of the administrative law enforcement supervision method based on the large model with judicial fine-tuning described in the present invention;
[0040] Figure 3 For Figure 2 the structured judgment document mentioned in
[0041] Figure 4 It is a framework diagram of the method for extracting case elements from the fine-tuned large model described in the present invention;
[0042] Figure 5 It is a schematic diagram of the storage process of the penalty discretion benchmark described in the present invention;
[0043] Figure 6 It is a technical roadmap of the large model RAG reasoning case discretion reference factors described in the present invention;
[0044] Figure 7 For Figure 6The large model prompt diagram of the classification discretion reference factors mentioned in
[0045] Figure 8 This is the technical roadmap of the administrative law enforcement supervision scoring model described in the present invention;
[0046] Figure 9 is Figure 8 the scoring model standard mentioned in
[0047] Figure 10 This is the experimental accuracy comparison diagram of the real judgment document dataset described in the present invention. Specific embodiments
[0048] The following further elaborates on the specific embodiments of the present invention in conjunction with the accompanying drawings. The following embodiments will help those skilled in the art to further understand the present invention, but do not limit the present invention in any form. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several changes and improvements can still be made, and these all fall within the protection scope of the present invention.
[0049] Embodiment 1. Refer to Figure 1 and Figure 2 to illustrate this embodiment. This embodiment proposes an administrative law enforcement supervision method based on a judicially fine-tuned large model, which is used to solve the problem in the prior art of how to automatically supervise law enforcement behaviors using a large model without manual one-by-one review, so as to identify and correct deviations in the law enforcement process in real time, and ensure the efficiency, fairness, and compliance of law enforcement activities.
[0050] The method is as Figure 1 shown, and includes the following steps:
[0051] Step 1: Use a judicially fine-tuned large model to extract the elements of administrative law enforcement cases;
[0052] Step 2: Combine the extracted case elements with the large model retrieval augmented generation technology RAG to match the corresponding discretion benchmarks, and classify the subordinate levels of the case judgment discretion reference factors;
[0053] Step 3: Construct a scoring model, score the subordinate levels of the case judgment discretion reference factors obtained in Step 2 according to the scoring model to obtain the reasonable judgment level of the case, and then automatically judge the true judgment level in the penalty decision document. By comparing the reasonable judgment level and the true judgment level, determine whether the case penalty is reasonable and fair, and complete the automatic administrative law enforcement supervision of the case.
[0054] In the actual application of this embodiment, according to as Figure 2The overall framework of the administrative law enforcement supervision method based on the judicially fine-tuned large model shown solves the problems of low efficiency and incomplete supervision in the existing law enforcement supervision system. In this embodiment, the large model is trained with specialized legal knowledge so that it can accurately understand and analyze law enforcement documents and records. At the same time, this embodiment adopts an efficient RAG discretion benchmark matching technology to match the discretion benchmark corresponding to the current case. Based on the discretion benchmark, a scoring model is designed to score and compare the case discretion factors and judgment results, so as to achieve law enforcement supervision without manual review one by one.
[0055] Embodiment 2. This embodiment specifically describes an administrative law enforcement supervision method based on the judicially fine-tuned large model described in Embodiment 1 above;
[0056] Step 1. Use the judicially fine-tuned large model to extract the elements of administrative law enforcement cases;
[0057] Specifically:
[0058] Step 101. Collect multi-source administrative law enforcement case judgments, analyze the content structure of the judgments, and slice the analyzed judgments.
[0059] Step 102. Judicially fine-tune the local large model, and use legal regulations knowledge to perform efficient parameter fine-tuning of the large model to adapt to the Chinese administrative law enforcement supervision task.
[0060] Step 103. Design prompt engineering and combine the fine-tuned large model to extract the elements of the case judgment, including 4 sliced case elements, mainly the illegal discretion reference factors and administrative penalty decisions.
[0061] Furthermore, the above-extracted case judgment elements include the basic information of the parties, the case source and investigation process, illegal discretion reference factors (illegal duration, illegal circumstances, harmful consequences), administrative penalty basis and decisions.
[0062] Step 2. Combine the extracted case elements with the large model retrieval augmented generation technology RAG to match the corresponding discretion benchmark, and classify the subordinate levels of the case judgment discretion reference factors;
[0063] Specifically:
[0064] Step 201. Collect administrative penalty discretion benchmark data, generate a vector FAISS index and persistently store it as the knowledge base for retrieving knowledge-enhanced RAG;
[0065] Step 202: Vectorize the case extraction elements using a pre-trained BERT model, calculate the Euclidean distance L2 between the case elements and the administrative penalty discretion benchmark data, and search for the most similar vector in the FAISS index, i.e., query the penalty discretion benchmark corresponding to the current case judgment; to avoid errors, the top-k results can be returned for manual selection;
[0066] Step 203: After obtaining the discretion benchmark corresponding to the case, together with the original case information, construct a new prompt, which is used to guide the model to classify the sub-orders of the discretion reference factors in the case judgment. The orders include four categories: lighter, larger, severe, and mitigated. After the order classification, it is convenient for subsequent supervision.
[0067] Furthermore, for the above discretion benchmark matching, the FAISS index search used in the query can efficiently and quickly search for the most matching penalty discretion benchmark, completing the part of the RAG retrieval knowledge. Then, a prompt is constructed, and the language understanding ability of the large model is used to judge which order in the discretion benchmark the specific discretion reference factors in the case belong to, so as to judge a reasonable penalty judgment.
[0068] Step 3: Construct a scoring model, score the sub-orders of the case judgment discretion reference factors obtained in Step 2 to obtain the reasonable judgment order of the case, and then automatically judge the true judgment order in the penalty decision. By comparing the reasonable judgment order and the true judgment order, judge whether the case penalty is reasonable and fair, and complete the automatic supervision of case administrative law enforcement.
[0069] Specifically:
[0070] Step 301: Develop corresponding scoring model standards according to the administrative law enforcement supervision task, score according to the sub-orders of the discretion reference factors obtained in Step 2, and finally calculate the total score of the discretion reference factors for each sub-order (lighter / larger / severe / mitigated).
[0071] Step 302: Use the large model to automatically judge the discretion order (lighter / larger / severe / mitigated) to which the judgment result in the penalty decision belongs
[0072] Step 303: Obtain the total score of the discretion reference factors in the judgment, obtain the reasonable judgment result sub-order through the standard, and Step 302 will infer the discretion order to which the true judgment result of the judgment belongs. By comparing and analyzing the reasonable result and the true result, judge whether the case penalty is reasonable and fair, and supervise the law enforcement process result.
[0073] Furthermore, in Step 3 above, the scores of the discretion factors and the penalty decisions are calculated for each judgment to judge the penalty rationality, converting the subjective judgment into an objective score, and overcoming the problem that the direct use of the large model prompt engineering judgment may be affected by the pre-training data bias or model uncertainty.
[0074] Embodiment 3. This embodiment proposes an administrative law enforcement supervision system based on a judicially fine-tuned large model. The system includes:
[0075] A case judgment document element extraction module that extracts the elements of the case judgment document to be supervised and accurately displays the structured judgment document information;
[0076] A case discretion reference factor level reasoning module that embeds the "suspected illegal act" in the judgment document, performs fuzzy query matching in the discretion benchmark database, and corresponds to the relevant discretion benchmarks. On this basis, a more accurate prompt is constructed and combined with the supervision large model to efficiently and accurately judge the level to which the discretion reference factor belongs;
[0077] A scoring administrative law enforcement supervision module that quantitatively scores the discretion reference factors using the level standard and calculates the expected reasonable penalty score through calculation. This score is compared and analyzed with the penalty score of the actual case judgment to evaluate the reasonableness of the judgment result. This process aims to ensure the fairness and compliance of case trials through precise supervision of the judgment result.
[0078] Embodiment 4. This embodiment proposes a computer device, including a memory and a processor. A computer program is stored in the memory. When the processor runs the computer program stored in the memory, the processor executes the method and steps described in any one of the above embodiments.
[0079] Embodiment 5. This embodiment proposes a computer-readable storage medium. The computer-readable storage medium stores a computer program, and the computer program is executed by the processor to perform the method and steps described in any one of the above embodiments.
[0080] Embodiment 6. This embodiment proposes an example that is used to explain the above embodiments. The specific example is as follows:
[0081] See Figures 1 to 10 To illustrate this embodiment, the method described in this embodiment includes the following steps:
[0082] This embodiment is an automated law enforcement supervision method that can identify and correct biases in law enforcement.
[0083] First, the judicially fine-tuned large model extracts the elements in the law enforcement case judgment document, quickly and consistently extracts the key information in the document, reducing the labor cost. In addition, a unique scoring model is designed to evaluate the reasonableness and fairness of the case judgment through quantification. The structured scoring process increases the transparency of supervision, facilitating tracking and auditing.
[0084] The administrative law enforcement supervision method based on the judicially fine-tuned large model in this embodiment realizes integrated law enforcement supervision through the introduction of a judicially fine-tuned large model, a supervision large model, and a scoring model, extracts and analyzes penalty judgments, automatically matches the discretionary benchmarks, provides a clear basis, and scores administrative law enforcement cases more scientifically and reasonably, thereby supervising and guaranteeing the fairness and reasonableness of case judgments.
[0085] Combined with Figures 1 to 3 , this embodiment proposes an administrative law enforcement supervision method based on a judicially fine-tuned large model, and the method includes the following steps:
[0086] Step 1: The judicially fine-tuned large model extracts the elements of administrative law enforcement cases.
[0087] The extraction of the elements of the administrative law enforcement case is specifically as follows:
[0088] Step 101: Collect multi-source administrative law enforcement case judgments, analyze the content structure of the judgments, and segment and slice the analyzed judgments, as Figure 4 shown.
[0089] Step 102: Judicially fine-tune the local large model, use legal knowledge to perform efficient parameter fine-tuning of the large model, and adapt to the Chinese administrative law enforcement supervision task. The fine-tuning technology uses the low-rank adaptation of large language models (LoRA) for efficient parameter fine-tuning. During the fine-tuning process, first freeze the weights W0 of the pre-trained large model, and introduce a new low-rank adjustment term ΔW to the frozen weights W0 to achieve model fine-tuning. The fine-tuning formula is as follows:
[0090] W = W0 + ΔW
[0091] Among them, W0 is the frozen pre-trained weight, and ΔW is the learnable parameter introduced through low-rank matrix decomposition. However, during fine-tuning, ΔW is not directly learned, but decomposed into two low-rank matrices W A and W B . The final adjustment result is reflected by the low-rank adjustment term ΔW. The adjustment term formula is as follows:
[0092] ΔW = W A ·W B
[0093] Step 103: Design prompt engineering to extract the elements of the case judgment from the fine-tuned large model, including 4 sliced case elements, "basic information of the parties", "case source and investigation process", "reference factors for illegal discretion" (duration of the violation, circumstances of the violation, harmful consequences), and "administrative penalty and decision".
[0094] Step 2: Subordinate level reasoning of case judgment results and discretionary reference factors.
[0095] The specific content of the subordinate level reasoning of the case judgment results and discretionary reference factors is as follows:
[0096] Step 201: Collect the administrative penalty discretionary benchmark data. Encode the "illegal act" in the discretionary benchmark regulations using the BERT tokenizer, and obtain the embedded vector index of the text through the BERT model. The vector of the [CLS] token output by the model is used to represent the semantics of the entire sentence. The complete administrative penalty discretionary benchmark data and FAISS index are stored as the knowledge base for retrieving knowledge enhanced RAG, as Figure 5 shown;
[0097] Step 202: Use the pre-trained BERT model to vectorize the "illegal act" in the case extraction element information. The "illegal act" is the core associated element between the case judgment document and the discretionary benchmark regulations. Match the vector of the "illegal act" in the case judgment document with the FAISS index of the discretionary benchmark, that is, query the penalty discretionary benchmark corresponding to the current case judgment document. FAISS uses the L2 distance (Euclidean distance) to measure the similarity between vectors. The formula for the L2 distance is as follows:
[0098]
[0099] where a i and b i respectively represent the values of vectors A and B in the i-th dimension. By calculating the L2 distance between the vector to be queried and all vectors in the benchmark library, the most similar discretionary benchmark vector can be quickly found, thereby achieving accurate matching of the penalty basis. To avoid vector matching errors, the system adopts the top-k retrieval strategy, returning the k candidate results with the highest similarity for manual selection. This method not only retains the efficient retrieval ability of AI but also ensures accuracy through manual review, while providing feedback data for system optimization, realizing the organic combination of "machine retrieval + manual confirmation";
[0100] Step 203: After obtaining the discretionary benchmark corresponding to the case, together with the original case information, construct a new prompt, which is used to guide the model to classify the three subordinate levels of discretionary reference factors in the case judgment document, facilitating subsequent calculation and supervision by the scoring model, as Figure 6 shown, Figure 7 which is the prompt for the large model to classify discretionary reference factors.
[0101] Step 3: The scoring model conducts administrative law enforcement supervision on the case process.
[0102] The specific content of the scoring model's administrative law enforcement supervision on the case process is as follows:
[0103] Step 301: Develop a corresponding scoring model standard according to the administrative law enforcement supervision tasks. The specific scoring model standard is shown in Table 1 as follows:
[0104] Table 1
[0105] Reference factors Leniency General Severity Mitigation Duration of violation 1 2 3 0.5 Circumstances of violation 1 2 3 0.5 Harmful consequences 1 2 3 0.5 Penalty result (sum) 2 < sum <= 4 4 < sum <= 7 7 < sum <= 9 sum <= 2
[0106] Score according to the subordinate levels of the three discretionary reference factors (illegal duration, illegal circumstances, and harmful consequences) obtained in Step 2, and finally calculate the total score of the discretionary reference factors at the subordinate level (less serious / larger / serious / mitigated);
[0107] Step 302: The penalty discretion benchmarks queried in Step 2 give the degrees of discretionary factors at different levels. The data obtained by RAG can be used to construct prompts to automatically classify the discretionary level (less serious / larger / serious / mitigated) to which the true penalty result in the penalty decision letter belongs;
[0108] Step 303: By constructing prompts, compare the judgment results in the case judgment letter with the discretion benchmark intelligently, and extract the true penalty discretion level (lenient / ordinary / severe / mitigated); at the same time, quantitatively score the discretionary reference factors in the judgment letter based on the scoring model, and calculate the reasonable penalty discretion level (lenient / ordinary / severe / mitigated); through comparative analysis of the consistency between the true penalty discretion level and the reasonable penalty discretion level, realize the intelligent evaluation of the rationality of the case penalty, so as to effectively supervise the standardization of the law enforcement process and results, as Figure 8 shown.
[0109] This embodiment is aimed at the administrative law enforcement supervision in the typical judicial field. By combining the large model with the scoring model, it improves the case handling efficiency and accuracy in an intelligent and quantitative way, promotes judicial fairness and transparency, and drives the development of legal technology.
[0110] The specific implementation method is as follows:
[0111] (1) Implementation method.
[0112] According to the administrative law enforcement supervision process shown in Figure 1 of the present invention, it mainly includes the extraction of administrative law enforcement case elements, the classification of case judgment results and discretionary reference factor levels based on RAG, and the scoring of judgment letters for administrative law enforcement supervision.
[0113] The administrative law enforcement case judgment letters collected in Step 101 mainly include the administrative penalty judgment letters in the two major fields of market supervision and traffic law enforcement. The length of these judgment letter texts ranges from 2000 to 4000 words, belonging to typical unstructured data. Due to the inconsistent text length and the lack of a unified expression standard, traditional rule-based information extraction methods are difficult to effectively process.
[0114] In step 102, the locally large model is judicially fine-tuned. The knowledge of laws and regulations is used to efficiently fine-tune the parameters of the large model to adapt to the Chinese administrative law enforcement supervision task. The fine-tuning technology adopts LoRA for efficient parameter fine-tuning. During the fine-tuning process, first, the weights W0 of the pre-trained large model are frozen, and a new low-rank adjustment term ΔW is introduced to the frozen weights W0 to achieve model fine-tuning. The fine-tuning formula is as follows:
[0115] W = W0 + ΔW
[0116] Among them, W0 is the frozen pre-trained weight, and ΔW is the learnable parameter introduced through low-rank matrix factorization. However, during fine-tuning, ΔW is not directly learned, but decomposed into two low-rank matrices W A and W B . The final adjustment result is reflected by the low-rank adjustment term ΔW. The adjustment term formula is as follows:
[0117] ΔW = W A ·W B
[0118] The weight update of the model is parameterized through low-rank matrix factorization (Low-Rank Decomposition). The number of parameters of these low-rank matrices is much smaller than the original model parameters, so the video memory and computational volume required for training can be significantly reduced.
[0119] In step 103, prompt engineering is designed to extract elements from case judgment documents in combination with the fine-tuned large model. The prompt has a maximum input sequence Token length limit in the prompt part to maximize the extraction effect. Therefore, the complete judgment document needs to be sliced for extraction, including 4 sliced case elements: "Basic information of the parties", "Case source and investigation process", "Reference factors for illegal discretion" (duration of the violation, circumstances of the violation, harmful consequences), and "Administrative penalty and decision".
[0120] In step 201, administrative penalty discretion benchmark data is collected. The "illegal acts" in the discretion benchmark regulations are encoded using the BERT tokenizer, and the embedding vector index of the text is obtained through the BERT model. The vector of the [CLS] token output by the model is used to represent the semantics of the entire sentence. After completing this series of processes, the complete administrative penalty discretion benchmark data and its embedding vector index obtained through the BERT model are stored together. The combination of these data and indexes forms an efficient knowledge base, which is used to enhance the retrieval ability of the RAG model. The model can better retrieve and utilize relevant knowledge when generating answers.
[0121] In step 202, the pre-trained BERT model is used to vectorize the "illegal act" part in the case extraction element information. This step is crucial because the "illegal act" is the core connection point between the case judgment and the discretionary benchmark regulations, which directly relates to the nature determination and discretionary scale of the case; this vector can capture the deep semantic information of the text. The result of this vectorization will become the key vector we want to query. Match the "illegal act" vector of the case judgment with the FAISS index of the discretionary benchmark, that is, query the penalty discretionary benchmark corresponding to the current case judgment; FAISS uses the L2 distance (Euclidean distance) to measure the similarity between vectors, and the formula for the L2 distance is as follows:
[0122]
[0123] where a i and b i respectively represent the values of vectors A and B in the i-th dimension. By calculating the L2 distance between the vector to be queried and all vectors in the benchmark library, the discretionary benchmark vector most similar to it can be quickly found, so as to achieve accurate matching of the penalty basis. To avoid vector matching errors, the system adopts the top-k retrieval strategy and returns the k candidate results with the highest similarity for manual selection. This method not only retains the efficient retrieval ability of AI but also ensures accuracy through manual review. At the same time, it provides feedback data for system optimization, realizing the organic combination of "machine retrieval + manual confirmation"; after obtaining the discretionary benchmark corresponding to the case, together with the original case information, a new prompt is constructed, and this prompt is used to guide the model to classify the subordinate levels of the discretionary reference factors in the case judgment (less serious / more serious / serious / mitigated), which is convenient for subsequent supervision.
[0124] In step 203, after obtaining the discretionary benchmark corresponding to the case, together with the original case information, a new prompt is constructed, and this prompt is used to guide the model to classify the subordinate levels of the three discretionary reference factors in the case judgment (less serious / more serious / serious / mitigated), which is convenient for subsequent supervision.
[0125] In step 301, corresponding scoring model criteria are formulated according to the administrative law enforcement supervision task, and the specific scoring model criteria are shown in Table 1 above.
[0126] Score according to the subordinate levels of the discretionary reference factors obtained in step 2, and finally calculate the total subordinate level of the discretionary reference factors (less serious / more serious / serious / mitigated);
[0127] In step 302, the administrative penalty discretion benchmarks queried by step 2 using the RAG model provide specific degree divisions for discretion factors at different levels; through querying, discretion benchmark information matching the illegal acts in the original case is obtained, and this information is combined with the original penalty result data of the case to jointly construct a new prompt; the purpose of this prompt is to guide the model to automatically analyze and classify which discretion level (lenient / ordinary / severe / mitigated) the penalty result in the penalty decision letter should belong to.
[0128] Step 303: By constructing a prompt, the judgment result in the case judgment letter is intelligently compared with the discretion benchmark to extract the true penalty discretion level (lenient / ordinary / severe / mitigated); at the same time, based on the scoring model, the quantitative reference factors in the judgment letter are quantitatively scored, and the illegal continuous score is S time , the illegal circumstance score is S act , the harmful consequence score is S res , the total score is S case , and the specific formula is:
[0129] S case =S time +S act +S res
[0130] Through the total score of the case discretion factors calculated, combined with the scoring benchmark, a reasonable penalty discretion level is obtained. S case ∈(2,4] is the lenient penalty level, S case ∈(4,7] is the ordinary penalty level, S case ∈(7,9] is the severe penalty level, S case ∈(0,2] is the mitigated penalty level; by comparing and analyzing the consistency between the true penalty discretion level and the reasonable penalty discretion level, the intelligent evaluation of the rationality of the case penalty is realized, so as to effectively supervise the standardization of the law enforcement process and results.
[0131] (2) Experimental verification.
[0132] In this embodiment, it mainly focuses on comprehensively verifying and evaluating the effectiveness of the proposed law enforcement supervision method. Since there is no widely recognized standard comparison method in the current administrative law enforcement field, we adopt a phased experimental design based on historical data and actual scenarios to fully verify the effectiveness and practicality of the method.
[0133] Collect past law enforcement cases, including market law enforcement cases and traffic law enforcement cases, and construct an experimental data set through expert manual annotation. Apply the law enforcement supervision method of the present invention to test the effect on the annotated data set to obtain Figure 10Results. The extraction accuracy of elements such as "Basic Information of the Party" is 100%, because such data appears intuitively and accurately at the beginning of the judgment document, and there is less interfering text. The accuracy rates of "Case Source and Investigation Process" and "Basis for Penalty and Penalty Result" are 90.32% and 96.67% respectively. "Basis for Penalty and Penalty Result" is expressed relatively clearly in the judgment document and is easily understood by the judicial fine-tuning large model. However, the description text of "Case Source and Investigation Process" is relatively long, and the large model will summarize it, resulting in some deviation from the labeled data. "Reference Factors for Illegal Discretion" occupies a relatively long space and there is no clear locatable marker, which requires the large model to extract from the long text, and the overly long prompt will also lead to a decline in the reasoning effect of the large model, so the accuracy rate is relatively low at only 80.85%. The final law enforcement supervision result is whether the method can correctly judge whether the judgment in the case judgment document is fair and reasonable. Due to the decline in the accuracy rate of the discretion reference factors, it will also affect the final law enforcement supervision effect, making the accuracy rate of finally judging whether the case judgment is fair and reasonable 70%.
[0134] In the future, the present invention will further optimize the supervision method, especially in the extraction link of the discretion reference factors. By improving the prompt construction strategy and the text cutting length, the understanding ability of the model for long texts will be improved, so as to achieve more efficient supervision performance.
[0135] In the above description, it should be understood that Figure 1Any process or method description described in the flowchart or otherwise described herein can be understood to represent a module, segment, or portion of code that includes one or more executable instructions for implementing a customized logical function or process. The scope of the preferred embodiments of the present invention includes additional implementations, where the functions may be performed in a substantially simultaneous manner or in the reverse order according to the functions involved, rather than in the order shown or discussed, which should be understood by those skilled in the technical field to which the embodiments of the present invention pertain. The logic and / or steps represented in the flowchart or otherwise described herein illustrate the possible architectures, functions, and operations of the apparatus and methods according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the figures. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and combinations of blocks in the block diagram or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions. For example, a definite sequence list of executable instructions that can be considered to implement a logical function may be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or in conjunction with these instruction execution systems, apparatus, or devices.
[0136] Those skilled in the art can understand that the above description is only the preferred embodiment of the present invention. The features described in each embodiment and / or claim of the present disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly described in the present disclosure. It is not used to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
[0137] Although the preferred embodiments of the present invention have been described, additional changes and modifications can be made by those skilled in the art once they learn the basic creative concept. Therefore, the appended claims are intended to be interpreted to include the preferred embodiments as well as all changes and modifications that fall within the scope of the present invention. Obviously, those skilled in the art can make various changes and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these modifications and variations.
Claims
1. An administrative law enforcement supervision method based on a judicial fine-tuning large model, characterized in that The method is as follows: Step 1: Use a judicially fine-tuned large model to extract the elements of administrative law enforcement cases; Step 2: Combine the extracted case elements with the large model retrieval-augmented generation technology RAG to match the corresponding discretion benchmarks, and classify the subordinate levels of the discretion reference factors for case judgments; Step 3: Construct a scoring model. According to the scoring model, score the subordinate levels of the case judgment discretion reference factors obtained in Step 2 to obtain the reasonable judgment level of the case. Then, automatically judge the true judgment level in the penalty decision letter. By comparing the reasonable judgment level and the true judgment level, determine whether the case penalty is reasonable and fair, and complete the automatic supervision of administrative law enforcement for cases.
2. The administrative law enforcement supervision method based on the judicial fine-tuning large model according to claim 1, wherein Specifically, Step 1 is as follows: Step 101: Collect multi-source administrative law enforcement case judgment letters, analyze the content structure of the judgment letters, and slice the analyzed judgment letters; Step 102: Use legal knowledge to fine-tune the efficient parameters of the large model to obtain a locally judicially fine-tuned large model; Step 103: Design prompt engineering and combine it with the locally judicially fine-tuned large model to extract elements from the sliced case judgment letters.
3. The administrative law enforcement supervision method based on the judicial fine-tuning large model according to claim 2, wherein The extracted elements of the case judgment letter include the basic information of the parties, the case source and investigation process, the illegal discretion reference factors, the basis and decision of administrative penalty.
4. The administrative law enforcement supervision method based on the judicial fine-tuning large model according to claim 1, wherein, Specifically, Step 2 is as follows: Step 201: Collect administrative penalty discretion benchmark data, generate a Faiss index of Facebook artificial intelligence similarity search vectors and persistently store it as the knowledge base for retrieval-augmented RAG; Step 202: Use the pre-trained BERT model to vectorize the extracted case elements, calculate the Euclidean distance between the vectorized case elements and the administrative penalty discretion benchmark data, and search for the most similar vector in the Faiss index to obtain the penalty discretion benchmark corresponding to the current case judgment letter; Step 203: After obtaining the discretion benchmark corresponding to the case, construct a new prompt together with the original case information, and this prompt is used to guide the model to classify the subordinate levels of the discretion reference factors in the case judgment letter.
5. The administrative law enforcement supervision method based on the judicial fine-tuning large model according to claim 4, characterized in that, The subordinate levels of the discretion reference factors include lighter, larger, severe, and mitigated.
6. The administrative law enforcement supervision method based on the judicial fine-tuning large model according to claim 4, characterized in that After querying the penalty discretion benchmark corresponding to the current case judgment letter, the top-k results can be returned for manual selection.
7. The administrative law enforcement supervision method based on the judicial fine-tuning large model according to claim 4, wherein Specifically, Step 3 is as follows: Step 301: According to the administrative law enforcement supervision task, formulate the scoring model standard. Score the subordinate levels of the case judgment discretion reference factors obtained in Step 2 according to the scoring model standard, calculate the total score of the discretion reference factors, and obtain the subordinate level of the reasonable judgment result through the scoring standard; Step 302: Use the large model to automatically judge the discretion level to which the true judgment result in the penalty decision letter belongs; Step 303: Compare the subordinate level of the reasonable judgment result with the discretion level to which the true judgment result belongs to determine whether the case penalty is reasonable and fair, and supervise the law enforcement process and penalty result.
8. An administrative law enforcement supervision system based on a judicial fine-tuning large model, characterized in that, The system includes a storage device, and the storage device is used to execute the method and steps described in Claim 1.
9. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium. When the computer program is run by a processor, it executes the administrative law enforcement supervision method based on the judicially fine-tuned large model described in any one of claims 1-7.
10. A computer device, characterized in that, The device includes a memory and a processor. A computer program is stored in the memory. When the processor runs the computer program stored in the memory, the processor executes the administrative law enforcement supervision method based on the judicially fine-tuned large model described in any one of claims 1-7.