Intelligent feedback error correction method for legal judgment result prediction and electronic device

By introducing court clerk, prosecution, defense, and sentencing judge agents into the judicial adjudication system, and performing event-level decomposition and extraction to generate and verify the crime set and rebuttal set, the problem of insufficient accuracy of judgment results in the face of complex facts in the judicial adjudication system is solved, and stable, interpretable and efficient legal judgment prediction is achieved.

CN122048593BActive Publication Date: 2026-07-03FUJIAN UNIV OF TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
FUJIAN UNIV OF TECH
Filing Date
2026-04-17
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

The existing judicial adjudication system struggles to effectively predict judgment outcomes when faced with complex legal documents, especially when different parties have different understandings of the same event, resulting in insufficient accuracy and interpretability of the judgments.

Method used

By setting up a court clerk agent, a prosecution agent, a defense agent, and a sentencing judge agent, the case fact text is broken down and extracted at the event level to generate a set of charges and a set of rebuttals. Through adversarial collaborative reasoning, an initial conviction result is obtained, and then verified and corrected to finally generate the final conviction result.

Benefits of technology

It improves the ability to analyze complex facts and points of contention and the accuracy of reasoning, ensuring the stability and interpretability of judgments, and enabling more stable, interpretable and efficient prediction of legal judgments in high-risk cases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122048593B_ABST
    Figure CN122048593B_ABST
Patent Text Reader

Abstract

The application provides a kind of legal judgment result prediction intelligent feedback error correction method and electronic equipment, including the secretary intelligent agent obtained by the training of large language model, the prosecution intelligent agent, the defense intelligent agent and the judge intelligent agent of sentencing, method includes: through secretary intelligent agent, event-level disassembly and extraction are carried out to case fact text, and fact atom set is obtained;Through the prosecution intelligent agent, the charge set is generated based on fact atom set, and through the defense intelligent agent, the refutation set is generated based on fact atom set;Through the judge intelligent agent of sentencing, the charge set and the refutation set are carried out to confrontation type collaborative reasoning, and initial sentencing result is obtained;The initial sentencing result is checked, if there is doubt charge, then the prosecution intelligent agent and the defense intelligent agent are used to generate correction content for doubt charge;Through the judge intelligent agent of sentencing, the final sentencing result is generated according to the correction content.Can assist judicial organ to realize more stable, interpretable and efficient legal judgment prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of judicial document processing technology, and in particular to an intelligent feedback error correction method and electronic device for predicting legal judgment results. Background Technology

[0002] With the development of artificial intelligence, AI technology has also been introduced into judicial adjudication systems to assist in judgments. However, different roles exist in judicial settings, and these roles have different understandings of the facts regarding the same event. Faced with complex judicial documents, current AI systems struggle to effectively predict judgment outcomes. Summary of the Invention

[0003] The technical problem to be solved by this invention is to provide an intelligent feedback error correction method and electronic device for predicting legal judgment results.

[0004] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:

[0005] A method for intelligent feedback error correction in predicting legal judgment outcomes is applied to court clerk agents, prosecution agents, defense agents, and sentencing judge agents trained using a large language model. The method includes:

[0006] The court clerk intelligent agent performs event-level decomposition and extraction of the case fact text to obtain a set of fact atoms.

[0007] The prosecution's intelligent agent generates a set of charges based on the set of fact atoms, and the defense's intelligent agent generates a set of rebuttals based on the set of fact atoms.

[0008] The sentencing judge intelligent agent performs adversarial collaborative reasoning on the set of charges and the set of rebuttals to obtain an initial conviction result;

[0009] The initial conviction result is verified. If there is a doubtful charge, the prosecution's intelligent agent and the defense's intelligent agent generate revised content for the doubtful charge.

[0010] The sentencing judge intelligent agent generates the final conviction result based on the revised content.

[0011] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:

[0012] An electronic device includes a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the steps of the intelligent feedback error correction method for predicting legal judgment results as described above.

[0013] The beneficial effects of this invention are as follows: By setting up a court clerk agent, a prosecution agent, a defense agent, and a sentencing judge agent as different roles in a judicial scenario, the facts of the case can be understood from the perspectives of different roles. The court clerk agent performs event-level decomposition and extraction of the case fact documents to obtain a set of fact atoms. Then, the prosecution agent and the defense agent generate a set of charges and a set of rebuttals based on the set of fact atoms, respectively. Finally, the sentencing judge agent conducts adversarial collaborative reasoning on the set of charges and the set of rebuttals, which improves the ability to analyze complex facts and points of contention and the accuracy of reasoning, and obtains an initial conviction result. Furthermore, the initial conviction result is verified and corrected, thereby assisting judicial institutions in obtaining the final conviction result and enabling more stable, interpretable, and efficient prediction of legal judgments in high-risk cases. Attached Figure Description

[0014] Figure 1 This is a flowchart illustrating the steps of an intelligent feedback error correction method for predicting legal judgment results in an embodiment of the present invention.

[0015] Figure 2 This is a flowchart of another step in an intelligent feedback error correction method for predicting legal judgment results in an embodiment of the present invention;

[0016] Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0017] To explain in detail the technical content, objectives, and effects of the present invention, the following description is provided in conjunction with the embodiments and accompanying drawings.

[0018] Please refer to Figure 1 A method for intelligent feedback error correction in predicting legal judgment outcomes is applied to court clerk agents, prosecution agents, defense agents, and sentencing judge agents trained using a large language model. The method includes:

[0019] The court clerk intelligent agent performs event-level decomposition and extraction of the case fact text to obtain a set of fact atoms.

[0020] The prosecution's intelligent agent generates a set of charges based on the set of fact atoms, and the defense's intelligent agent generates a set of rebuttals based on the set of fact atoms.

[0021] The sentencing judge intelligent agent performs adversarial collaborative reasoning on the set of charges and the set of rebuttals to obtain an initial conviction result;

[0022] The initial conviction result is verified. If there is a doubtful charge, the prosecution's intelligent agent and the defense's intelligent agent generate revised content for the doubtful charge.

[0023] The sentencing judge intelligent agent generates the final conviction result based on the revised content.

[0024] As described above, the beneficial effects of this invention are as follows: By setting up a court clerk intelligent agent, a prosecution intelligent agent, a defense intelligent agent, and a sentencing judge intelligent agent as different roles in a judicial scenario, the facts of the case can be understood from the perspectives of different roles. After the court clerk intelligent agent performs event-level decomposition and extraction of the case fact documents to obtain a set of fact atoms, the prosecution intelligent agent and the defense intelligent agent generate a set of charges and a set of rebuttals based on the set of fact atoms, respectively. Then, the sentencing judge intelligent agent conducts adversarial collaborative reasoning on the set of charges and the set of rebuttals, which improves the ability to analyze complex facts and points of contention and the accuracy of reasoning, and obtains an initial conviction result. Furthermore, the initial conviction result is verified and corrected, thereby assisting judicial institutions in obtaining the final conviction result and enabling more stable, interpretable, and efficient prediction of legal judgments in high-risk cases.

[0025] Furthermore, the process of decomposing and extracting the case fact text through the clerk intelligent agent at the event level to obtain the fact atom set includes:

[0026] The structured output template of the clerk's intelligent agent and the case fact text are input into a preset large language model to generate and number each event fragment;

[0027] The event fragment includes at least one optional field from the following: perpetrator, manner of action, target, time and place, amount, consequences, and injury result;

[0028] The set of fact atoms is obtained based on all the event fragments and their numbers.

[0029] As described above, when generating event atoms, each event fragment is numbered and includes short facts and optional fields to ensure that subsequent outputs from the prosecution, defense, and judge are referable and traceable.

[0030] Furthermore, the step of generating the set of charges based on the set of fact atoms by the prosecutorial intelligent agent includes:

[0031] Obtain a list of potential charges;

[0032] The structured output template of the prosecution agent, along with the candidate crime list and the set of fact atoms, are input into a preset large language model;

[0033] The large language model generates and numbers each crime triplet, which includes the target crime, the reason, and the evidence fact atom; the evidence fact atom is obtained from the set of fact atoms.

[0034] The set of crimes is obtained from all the triples of the stated crimes.

[0035] As described above, when the prosecution agent generates a set of charges, the output of the prosecution agent must include the target charges, the reasons for the charges, and the factual atoms of the evidence, so that each target charge has a corresponding factual atom basis, making the accusation of each target charge more reliable.

[0036] Furthermore, the step of generating a rebuttal set based on the set of fact atoms by the defense agent includes:

[0037] The structured output template of the defense agent, along with the set of charges and the set of fact atoms, are input into a preset large language model;

[0038] The large language model generates and numbers rebuttal triples, each rebuttal triple including a target charge, a rebuttal opinion, and a rebuttal fact atom. The rebuttal opinion includes at least one of the following: missing elements of a crime, insufficient evidence, dispute over the severity of the circumstances, and suggestions for concurrent / changed charges. The rebuttal fact atom is obtained from the set of fact atoms.

[0039] The set of rebuttals is obtained from all the rebuttal triples.

[0040] As described above, when the defense agent generates a set of rebuttals, it is required that the defense agent include rebuttal opinions corresponding to the target crime and the factual atoms cited, so that each rebuttal reason has factual atoms as its basis, thereby improving the reliability of the rebuttal reasons.

[0041] Furthermore, the process of obtaining an initial conviction result through adversarial collaborative reasoning of the set of charges and the set of objections by the sentencing judge intelligent agent includes:

[0042] The structured output template of the sentencing judge agent, along with the set of charges, the set of rebuttals, and the set of fact atoms, are input into a preset large language model;

[0043] The large language model evaluates the effectiveness of each candidate crime in the crime set through the crime set and the rebuttal set. For the target candidate crime that has been traversed, if the crime set covers the key fact atoms and the rebuttal set lacks fact atom support, then the target candidate crime is maintained.

[0044] If the set of rebuttals lacks the ability to point out missing elements and has factual atomic support, then the confidence level of the target candidate crime is reduced or it is eliminated.

[0045] An initial conviction result is obtained based on all the stated target candidate crimes.

[0046] As described above, the use of adversarial collaborative reasoning allows the prosecution and defense to compete with each other in multiple rounds of interaction, thereby improving their ability to analyze complex facts and points of contention and the accuracy of their reasoning, ensuring the reliability of each charge.

[0047] Furthermore, the verification of the initial conviction result includes:

[0048] Based on the set of fact atoms, determine whether there is at least one of the following situations: suspected omission of crimes, disputed crimes not covered, or missing evidence chains. If so, generate a candidate list of doubtful crimes based on the doubtful crimes and the corresponding fact atoms.

[0049] As described above, when verifying the initial conviction result, if there are suspected omissions, uncovered controversial charges, or missing evidence chains, it indicates that there are obvious problems with the current judgment. By generating a candidate list of doubtful charges and their corresponding factual atoms, it is ensured that each doubtful charge has corresponding factual atoms as a basis.

[0050] Furthermore, the generation of revised content for the doubtful charges through the prosecution's intelligent agent and the defense's intelligent agent includes:

[0051] The prosecution's intelligent agent performs differential correction based on the list of candidate charges of doubt and the initial conviction result to obtain the content to be corrected; and supplements the set of corrected charges related to the content to be corrected based on the set of fact atoms.

[0052] The defense agent obtains a revised rebuttal set based on the set of fact atoms and the set of supplementary charges.

[0053] The revised content is obtained based on the revised crime set and the revised rebuttal set.

[0054] As described above, by employing a minimum difference correction strategy by the prosecution's intelligent agent, unnecessary modifications to the confirmed results are avoided, thereby enhancing the stability and accuracy of the reasoning results. Furthermore, when the content to be corrected is obtained, the prosecution's intelligent agent and the defense's intelligent agent generate a set of corrected charges and a set of corrected rebuttals to obtain the corrected content, making the corrected content more reliable.

[0055] Furthermore, the step of generating the final conviction result through the sentencing judge's intelligent agent based on the revised content includes:

[0056] Determine whether the number of final crimes is greater than a preset number. If so, iterate through each of the final crimes. For each target final crime that has been traversed, if the target final crime cannot be mapped to at least one fact atom, then delete the target final crime.

[0057] As described above, the final charge is supported by pruning based on the mapping relationship between the final charge and the factual atoms, which precisely controls the generation of redundancy and errors; by decoupling conviction and sentencing, the problem of sentencing drift is avoided, and the stability of the judgment is improved.

[0058] Furthermore, the step of generating the final conviction result through the sentencing judge's intelligent agent based on the revised content includes:

[0059] Obtain the sentencing result and the corresponding factual elements;

[0060] Determine whether the sentencing result is consistent with the sentencing signal in the fact atom; if not, adjust the sentencing result according to the sentencing signal.

[0061] As described above, by conducting consistency checks and corrections on sentencing results, the system effectively curbs extreme errors and obviously unreasonable ranges, significantly alleviates the MAE explosion caused by errors in sentencing types, provides explainable adjustment criteria, and enhances the credibility of the system in engineering implementation and review scenarios.

[0062] Another embodiment of the present invention provides an electronic device, the electronic device including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the computer program, it implements the steps of the intelligent feedback error correction method for predicting legal judgment results as described above.

[0063] One embodiment of the present invention is as follows:

[0064] Please refer to Figure 1 as well as Figure 2 This invention presents an intelligent feedback error correction method for predicting legal judgment outcomes, applied to court clerk agents, prosecution agents, defense agents, and sentencing judge agents trained using a large language model (LLM). The LLM in this invention is not used in a "freely generated" manner, but rather as a constrained structured information extraction and inference engine. Each agent module is input using a "fixed instruction + variable instruction" assembly method. Fixed instructions define role responsibilities, output formats, and constraint rules; variable instructions include fact atom sets, a candidate crime database, and prosecution and defense context information. Each module's output is in a structured format. The system performs format parsing, candidate set filtering, field integrity verification, and rule consistency checks on the output (e.g., crimes must be copied from the candidate crime database, each crime must be bound to a fact atom number, and second-round corrections must satisfy minimum difference constraints), thereby ensuring the technical solution is implementable, reproducible, and auditable. Alternatively, by training a pre-defined LLM, agents such as court clerk agents, prosecution agents, defense agents, and sentencing judge agents are formed, each outputting corresponding content. The method includes:

[0065] S1. The court clerk agent performs event-level decomposition and extraction of the case fact text to obtain a set of fact atoms. Specifically: the structured output template of the court clerk agent and the case fact text are input into a preset large language model to generate and number each event fragment; based on all the event fragments (short_fact) and their IDs, the set of fact atoms (Atoms) A = {a1, a2, ..., a...} is obtained. i The event fragment includes at least one optional field from the following: perpetrator, manner of action, target, time and place, amount, consequences, and damage result.

[0066] For example, factual text and structured output templates are input into the LLM, and the process of "extraction-numbering-redundancy removal" is performed through few-shot constraints. Each factual atom corresponds to a specific factual fragment and is not repeated. Each case text is parsed through constraints and a structured result is output.

[0067] ;

[0068] in, For the case facts text; This is the i-th fact atom. It enables traceability back to the original text's evidence sentence / fact fragment.

[0069] For example, the case text states: "The People's Procuratorate of XX City alleged that: At approximately 3:00 AM on August 5, 2016, the defendant Wang and the victim Huang, after drinking, walked to an alleyway next to Building XX, Courtyard XX, XX Road, XX City. A dispute arose over a debt, leading to a fight. During the altercation, the defendant Wang stabbed the victim Huang in the abdomen with a folding knife he was carrying. The defendant Wang then took the victim Huang's mobile phone from the scene. The victim Huang was found dead at the scene at approximately 7:00 AM on August 5, 2016. An autopsy determined that Huang died from hemorrhagic shock caused by a single-edged sharp weapon stabbing his left hypochondrium, penetrating his left kidney, renal artery, and descending colon. During the trial, the prosecution presented the murder weapon, the mobile phone, the police report registration form, and documents from XX Province." The court found that the evidence presented included a hospital order, witness testimonies, forensic medical examination, DNA testing, crime scene photographs, investigation records, on-site surveillance video, and the defendant Wang's confession, all of which proved the facts and charges of the crime alleged. The court held that the defendant Wang intentionally and illegally deprived another person of their life with a knife, resulting in death; his actions constituted intentional homicide, and requested the court to sentence him accordingly. The plaintiffs in the incidental civil suit, Huang Yi and Liu Jia, demanded that the defendant Wang compensate them for economic losses, including death compensation of RMB 490,846, funeral expenses of RMB 30,919, living expenses for dependents of RMB 153,604, transportation expenses of RMB 1,000, and mental anguish compensation of RMB 100,000, totaling RMB 776,369.

[0070] After processing by the clerk's AI agent, the following is obtained: A = {a1. At approximately 3:00 AM on August 5, 2016, the defendant, Wang, and the victim, Huang, met in an alleyway next to Building XX, Courtyard XX, XX Road. a2. Both Wang and Huang were intoxicated at the time. a3. The two argued over a debt dispute. a4. The argument escalated into a fight. a5. During the fight, Wang stabbed Huang in the abdomen with a folding knife he was carrying. a6. Wang took Huang's mobile phone away from the scene. a7. At approximately 7:00 AM on August 5, 2016, Huang was found dead at the scene. a8. Forensic examination showed that Huang was stabbed in the left hypochondrium by a single-edged sharp instrument. a9. The wound pierced the left kidney, renal artery, and descending colon. a10. The cause of death was hemorrhagic shock. a11. The physical evidence presented by the prosecution included: the murder weapon (folding knife) and the victim's mobile phone.} a12. Documentary evidence presented by the prosecution includes: a police report registration form and an order from XX Hospital in XX Province. a13. Witness testimonies presented by the prosecution. a14. Forensic medical examination report presented by the prosecution. a15. DNA test report presented by the prosecution. a16. Criminal scene photographs presented by the prosecution. a17. Scene investigation record presented by the prosecution. a18. Scene surveillance video presented by the prosecution. a19. Confession of the defendant, Wang. a20. Claims for compensation made by the plaintiffs in the incidental civil suit, Huang (Yi) and Liu (Jia). a21. Claims for compensation include: death compensation of 490,846 yuan. a22. Funeral expenses of 30,919 yuan. a23. Living expenses for dependents of 153,604 yuan. a24. Transportation expenses of 1,000 yuan. a25. Compensation for mental distress of 100,000 yuan. a26. Total compensation of 776,369 yuan.

[0071] S2. The prosecution's intelligent agent generates a set of charges based on the set of fact atoms, and the defense's intelligent agent generates a set of rebuttals based on the set of fact atoms.

[0072] The prosecution agent performs the following steps: obtaining a list of candidate charges; inputting the structured output template of the prosecution agent, the list of candidate charges, and the set of fact atoms into a preset large language model; the large language model generates and numbers each charge triple, the charge triple including the target charge, the reason, and the evidence fact atom; the evidence fact atom is obtained from the set of fact atoms; and the charge set is obtained based on all the charge triples.

[0073] For example, based on fact atoms, the prosecuting agent generates a set of candidate charges C and grounds for charge R through reasoning using a large language model. c The system provides the prosecution agent with a list of candidate charges S. The prosecution agent must copy the charge names from S to form a set of candidate charges C, and provide the basis and evidence for each charge, outputting the grounds for prosecution R.c And the evidence fact atom support map (support_map). The capabilities of the prosecution agent derive from the pre-defined element matching reasoning paradigm and structured output constraints in the fixed instructions, namely, "the output must include accusations, rationale for each accusation, and fact atom numbers for each accusation (support_map)", resulting in:

[0074] "accusations": {"crime 1", "crime 2"};

[0075] "rationale": {"Criminal Charge 1": "Explanation of the elements of the charge + corresponding factual fulfillment"; "Criminal Charge 2": "..."}; / The "rationale" in the prosecution's triple is summarized in "notes".

[0076] "support_map": {"crime 1": fact_ids=[2, 3, 4] / indicates that the key elements of the crime are supported by fact atoms 2 / 3 / 4, "crime 2": fact_ids=[1, 4]};

[0077] Based on the above facts, the atomic output is as follows:

[0078] "prosecutor_r1_raw": "{\n\"accusations\": [\"Intentional homicide\",\"Robbery\"],\n\"support_map\": [\n{\"accusation\":\"Intentional homicide\",\"fact_ids\":[5,7,8,9,10]},\n{\"accusation\":\"Robbery\",\"fact_ids\":[6]}\n],\n\"notes\":\"Wang stabbed someone to death with a knife and took the victim's mobile phone."\n}".

[0079] The defense agent performs the following steps:

[0080] The structured output template of the defense agent, along with the set of charges and the set of fact atoms, is input into a preset large language model. The large language model generates and numbers rebuttal triples, each including a target charge, a rebuttal opinion, and a rebuttal fact atom. The rebuttal opinion includes at least one of the following: missing elements of a crime, insufficient evidence, dispute over the severity of the offense, and suggestions for concurrent / changed charges. The rebuttal fact atoms are obtained from the set of fact atoms. The rebuttal set is obtained based on all the rebuttal triples.

[0081] The goal of the defense agent is to provide verifiable rebuttals to each of the prosecution's candidate charges. The defense agent is also subject to fixed instructions and output formats, requiring that rebuttals must cite fact atom numbers and that rebuttals should revolve around whether "fact atoms support the elements of the charges," thereby avoiding unfounded free generation.

[0082] Output example:

[0083] "rebuttals":[

[0084] {"target":"crime 1","type":"missing element","atom_ids":[2]","text":"..."},

[0085] {"target":"Criminal 1","type":"Minor offense","atom_ids":[3]","text":"..."}

[0086] ],

[0087] "alternative_suggestions":["can be changed to charge X (if applicable)"];

[0088] For example, based on the above facts, the atomic output is obtained as follows:

[0089] "defense_r1_raw":"The prosecution accuses the defendant, Wang, of intentional homicide and robbery, but some of the charges lack factual support or are inappropriate:\n\n1. Intentional homicide Facts 3 / 4 / 5 / 8 / 9 / 10 show that Wang and Huang had a dispute and fight over a debt, during which Wang stabbed Huang with a folding knife, causing Huang to die from hemorrhagic shock. However, the existing evidence cannot prove that Wang had a premeditated or intentional motive to kill, and is more consistent with the characteristics of intentional injury resulting in death. Therefore, the charge of intentional homicide should be downgraded to intentional injury resulting in death. \n\n2. robbery Fact 6 shows that Wang took Huang's phone away from the scene, but there is no evidence to show that Wang had the subjective intent to illegally possess the property. It is more likely that Wang acted on impulse or to prevent Huang from calling the police. Therefore, the charge of robbery lacks factual support and should not be established.

[0090] S3. The sentencing judge agent performs adversarial collaborative reasoning on the set of charges and the set of objections to obtain an initial conviction result. Specifically:

[0091] S31. Input the structured output template of the sentencing judge agent and the set of crimes, the set of rebuttals, and the set of fact atoms into a preset large language model; the large language model evaluates the validity of each candidate crime in the set of crimes through the set of crimes and the set of rebuttals. For the target candidate crime traversed, if the set of crimes covers key fact atoms and the set of rebuttals lacks fact atom support, then the target candidate crime is maintained; if the set of rebuttals lacks indication of missing elements but has fact atom support, then the confidence of the target candidate crime is reduced or eliminated.

[0092] Adversarial collaborative reasoning refers to a multi-round dialogue between the prosecution and defense under pre-set constraints, with controlled iterations around factual atoms and elements of the charge: the prosecution provides a tripartite of "charge - reason - evidence atom number"; the defense provides a tripartite of "rebuttal type - rebuttal content - evidence atom number" for the same charge. The sentencing judge conducts an evidence coverage check and an assessment of the effectiveness of the rebuttal for each charge.

[0093] For example, the prosecution charges "robbery," with support_map=[2, 3, 4], based on "threat with a knife + obtaining property"; the defense argues for "non-violent coercion" but cannot provide corresponding factual atom numbers. The sentencing judge confirms the key elements are established based on a2 (threat with a knife) and a3 (delivery of property), thus retaining the charge in the conviction outcome.

[0094] Taking the aforementioned set of factual atoms as an example, the sentencing judge's intelligent agent outputs:

[0095] "judge_feedback_raw":"{\n\"has_issue\":true,\n\"need_add_fact_ids\":[5,6,7,8,9,10],\n\"possible_missing_crimes\":[\"Intentional injury\"],\n\"overcharged_crimes\":[\"Robbery\"],\n\"notes\":\"Intentional homicide may be too severe; robbery lacks supporting subjective intent\"\n}"

[0096] "judge_feedback_json":{

[0097] "has_issue":true, / indicates that there is an error that can be corrected in the current output;

[0098] "possible_missing_crimes":["Intentional injury"], / This may indicate that the direction of "intentional injury" is missing;

[0099] "overcharged_crimes":["robbery"], / Note: "robbery" may be an overcharged charge (lacking subjective element support);

[0100] need_add_fact_ids=[5,6]: Gives the atomic numbers of key facts that need to be added for correction (knife injury, phone removed);

[0101] Notes: "Intentional homicide may be too severe; robbery lacks the support of subjective intent."

[0102] S32. Obtain an initial conviction result based on all the stated target candidate crimes.

[0103] In sentencing, the sentencing judge agent bases its decisions on a set of fact atoms (containing IDs and event fragments short_facts) and the prosecution's output (a set of candidate charges C and grounds for charge R). c (and its supporting evidence map) and the defense's rebuttal arguments R b For each candidate charge, a requirement matching and evidence coverage review is performed: if the evidence for a charge is insufficient, or if the defense's rebuttal points out the missing requirements and has supporting factual atoms, the charge is not accepted; when there are concurrent or redundant charges (e.g., a conflict between a higher and lower charge), the charge that better matches the factual atom is retained. The final output is the first-round conviction result C1 and its corresponding mapping support_map1, providing an auditable basis for subsequent gating and error correction.

[0104] The specific process of generating the evidence support map (support_map) can be carried out in two ways: (1) The prosecution's intelligent agent generates it synchronously when outputting the candidate crime set (giving a list of fact atom numbers for each crime); the sentencing judge reviews the map, and if it finds that a crime lacks fact atom support or the number is invalid, the prosecution is required to supplement the evidence atom or directly remove the crime. (2) The sentencing judge generates the support_map directly during the conviction stage (selecting the fact atom number corresponding to the elements for each crime). Regardless of the method used, the system mandates that "each crime must be bound to at least one fact atom number", otherwise the crime cannot be included in the final conviction result, so as to ensure the traceability of evidence output in the judgment.

[0105] This process improves the recall and accuracy of conviction results through multi-agent collaborative reasoning and support-grounding. Specifically, the formalized model is as follows:

[0106] ;

[0107] C represents the set of crimes, R b For rebuttal set.

[0108] The sentencing process occurs after preliminary conviction or final conviction. The sentencing judge's agent generates the type of punishment and sentence P based on a predetermined set of charges C and key sentencing factors of the case facts (such as the manner of the act, the severity of the consequences, etc.).

[0109]

[0110] The sentencing judge agent first extracts key sentencing factors from the set of fact atoms, including but not limited to: the manner of the act (whether violence / weapons were used / multiple offenses were committed), the harmful consequences (degree of injury, loss), the amount involved, the perpetrator's status (principal or accomplice), and possible mitigating / aggravating circumstances (such as surrender, recidivism, compensation and forgiveness, etc., if included in the fact atoms). Then, combining the final set of charges (or the initial set of charges), and based on prompt constraints and structured output, it generates the type of punishment (such as probation, detention, fixed-term imprisonment, life imprisonment, etc.) and the term of imprisonment P (in months).

[0111] After the sentencing result is generated by the sentencing judge's intelligent agent, it is handed over to the sentencing verification officer's intelligent agent for consistency verification and necessary correction / re-response, with the goal of minimizing the sentencing error (MeanAbsoluteError).

[0112] ;

[0113] in, This represents the actual sentencing outcome.

[0114] S4. Verify the initial conviction result. If there is a doubtful charge, generate revised content for the doubtful charge through the prosecution's intelligent agent and the defense's intelligent agent.

[0115] Specifically: Based on the gating mechanism, the system uses a gating decision maker (rules + large language model review) to determine whether a second round of error correction is needed: based on the set of fact atoms, it determines whether there is at least one of the following situations: suspected omission of crimes, disputed crimes not covered, or missing evidence chains. If so, a candidate list of doubtful crimes is generated based on the doubtful crimes and the corresponding fact atoms.

[0116] The gating mechanism is triggered when both the prosecution and defense provide clear evidence of suspected omitted or disputed crimes, and the support_map contains corresponding factual atomic support. Second-round error correction is triggered only when the following conditions are met:

[0117] ① Identification of obvious problems (e.g., suspected omission of crimes, lack of coverage of disputed crimes, missing chain of evidence); 1. Suspected omission of crimes: If a clear "new disputed point signal" appears in the set of fact atoms (e.g., consequences of the act, amount, tools and means, multiple accomplices, etc. are explicitly stated in the atom), but the corresponding direction is not covered in the set of crimes in the first round of debate, and the defense's rebuttal / audit can locate the specific fact-ID, then output possible_missing_crimes and list the atom number that triggered this judgment in need_add_fact_ids. 2. Disputed crimes not covered / overcharged: If the defense points out that the elements of a crime are missing or the evidence is insufficient for a certain crime (and cites the fact-ID), and the prosecution's claim and support_map cannot respond to the rebuttal, or there are multiple crimes "over-covered / conflicting" on the same set of atoms, then output overcharged_crimes and give the fact-ID that needs to be reviewed. 3. Incomplete chain of evidence: If the support_map of any charge is empty, contains an illegal fact-ID, or the charge lacks factual atomic support, the chain of evidence is deemed incomplete.

[0118] ② Provide a candidate list of suspected missing / controversial charges;

[0119] ③ The corresponding fact atom IDs need_add_fact_ids must be provided as supporting evidence.

[0120] To avoid divergence caused by meaningless multi-round reasoning, the gating mechanism will not be triggered if fact atomic numbers cannot be provided to support it.

[0121] The output will be: {

[0122] "has_issue":true,

[0123] "missing_crimes":["crime X"],

[0124] "need_add_fact_ids":[5,7],

[0125] "reason": "atom5 / 7 indicates the existence of…"

[0126] Subsequently, the prosecution and defense agents engage in adversarial collaborative reasoning to further generate revised content for the doubtful charges: the prosecution agent performs differential correction based on the candidate list of doubtful charges and the initial conviction result to obtain the content to be revised; and supplements the set of revised charges related to the content to be revised based on the set of fact atoms; the defense agent obtains a set of revised rebuttals based on the set of fact atoms and the supplemented set of charges; and obtains the revised content based on the set of revised charges and the set of revised rebuttals. Specifically, as follows:

[0127] "r2_triggered":1; / When r2_triggered=1, the second round of error correction begins. At this point, the system does not rewrite the entire result, but instead performs a "differential patch update" based on the gating feedback.

[0128] Output prosecutor_r2_json:

[0129] final_accusations = ["Intentional injury", "Robbery"]

[0130] final_support_map:

[0131] "Intentional injury" ← fact_ids=[5, 7, 8, 9, 10]

[0132] "Robbery" ←fact_ids=[6]

[0133] diff={"added":["Intentional Injury"],"removed":[]}: Clearly record the difference change (new charge) and explain "Intentional homicide is changed to intentional injury".

[0134] The final output is:

[0135] Prosecutor: "prosecutor_r2_raw":"{\n\"final_accusations\":[\"Intentional injury\",\"Robbery\"],\n\"final_support_map\":[\n{\"accusation\":\"Intentional injury\",\"fact_ids\":[5,7,8,9,10]},\n{\"accusation\":\"Robbery\",\"fact_ids\":[6]}\n],\n\"diff\":{\"added\":[\"Intentional injury\"],\"removed\":[]},\n\"notes\":\"Based on the judge's recommendation, intentional homicide is changed to intentional injury, while robbery is retained\"\n}";

[0136] Defense: "defense_r2_raw": "Your Honor, regarding the prosecution's final charges, the defense argues:\n\n1. Intentional injury The defendant, Wang, and the victim, Huang, had a dispute over a debt, which escalated into a physical fight (facts 3 and 4). During the fight, Wang stabbed Huang in the abdomen with a folding knife (fact 5). According to the forensic examination, Huang's cause of death was hemorrhagic shock (fact 10). The defense argued that while Wang's actions did lead to Huang's death, he did not have the subjective motive to intentionally kill, but rather acted negligently due to emotional distress. Therefore, the death should be considered intentional injury resulting in death, not intentional homicide. \n\n2. robbery The prosecution alleges that Wang took Huang's phone away from the scene after the fight (Fact 6), but based on the existing evidence, it cannot be proven that Wang had the subjective intent to illegally possess another person's property. The dispute arose after both parties were intoxicated, and Wang took the phone in the chaos, which is more consistent with an impromptu act than a premeditated robbery. Therefore, it should not be considered robbery. In conclusion, the defense argues that Wang's actions should be considered intentional injury resulting in death, not intentional homicide or robbery. The defense requests the court to render a fair judgment according to law.

[0137] The final output of the sentencing judge's intelligent agent:

[0138] "judge_charge_raw":"{\n\"predicted_accusation\":\"Intentional injury\",\n\"support_map\":[\n{\n\"accusation\":\"Intentional injury\",\n\"fact_ids\":[3,4,5,7,8,9,10]\n}\n],\n\"notes\":\"No intent to kill; robbery lacks subjective element\"\n}",

[0139] S5. The sentencing judge intelligent agent generates the final conviction result based on the modified content.

[0140] Support-Prune: Determine if the number of final charges is greater than a preset number. If so, iterate through each of the final charges. For each target final charge, if it cannot be mapped to at least one fact atom, delete the target final charge. This process is a guarantee mechanism for the final conviction stage. For example, when the number of final charges is greater than 3 and a certain charge cannot be mapped to at least one fact atom through support_map, pruning is performed.

[0141] Sentencing Consistency Verification and Correction: The sentencing verification agent checks whether the generated sentencing result is consistent with the sentencing signals in the factual atoms of the case, and makes necessary adjustments. Specifically: it obtains the sentencing result and the corresponding factual atoms; it determines whether the sentencing result is consistent with the sentencing signals in the factual atoms; if not, it adjusts the sentencing result according to the sentencing signals. This process is implemented through rule constraints and large language model review, making the correction results more stable and consistent.

[0142] The final output of the sentencing judge's intelligent agent:

[0143] "judge_sent_raw":"{\n\"predicted_penalty_type\":\"imprisonment\",\n\"predicted_imprisonment\":120\n}",

[0144] "judge_sent_json":{

[0145] "predicted_penalty_type":"imprisonment for a fixed term"

[0146] "predicted_imprisonment":120 (month)

[0147] },

[0148] "sentence_verifier_applied": 1, / Sentencing verifier triggers consistency correction

[0149] "sentence_verifier_raw":"{\n\"should_adjust\":true,\n\"direction\":\"harden (aggravated)\",\n\"adjusted_penalty_type\":\"life imprisonment\",\n\"adjusted_imprisonment\":-1 (normalized mapping to life imprisonment),\n\"rationale_fact_ids\":[1,5,7,8,9,10],\n\"notes\":\"caused death by knife, serious circumstances\n}"

[0150] "final_pred_accusation": "Intentional injury"

[0151] "final_pred_penalty_type":"life imprisonment"

[0152] "final_pred_imprisonment_norm":350.

[0153] The final system output is: final_pred_penalty_type="life imprisonment", and according to the unified mapping, it is obtained as final_pred_imprisonment_norm=350 (400 for death penalty, to ensure that there is a severe penalty for type judgment errors in MAE calculation).

[0154] Please refer to Figure 3 This embodiment provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of the intelligent feedback error correction method for predicting legal judgment results as described above.

[0155] In summary, this invention provides an intelligent feedback error correction method for predicting legal judgment outcomes. This method includes a court clerk agent, a prosecution agent, a defense agent, and a sentencing judge agent trained using a large language model. The court clerk agent performs event-level decomposition and extraction of the case factual text to obtain a set of factual atoms. The prosecution agent generates a set of charges based on the set of factual atoms, and the defense agent generates a set of rebuttals based on the set of factual atoms. The sentencing judge agent performs adversarial collaborative reasoning on the set of charges and the set of rebuttals to obtain an initial conviction result. During this process, an evidence support binding mechanism is established: each charge is required to establish a support mapping with at least one factual atom, ensuring the judgment is interpretable and traceable to evidence.

[0156] The initial conviction result is then verified. If there are doubtful charges, the prosecution and defense agents generate revised content for the doubtful charges. This involves setting up a gated two-round error correction mechanism: the gated decision maker determines whether to enter the second round of error correction, and only corrects the differences, reducing computational overhead and improving reasoning stability. In addition, a minimum difference correction strategy is adopted to avoid unnecessary modifications to the confirmed results, thereby enhancing the stability and accuracy of the reasoning results.

[0157] By generating the final conviction result through the sentencing judge intelligent agent based on the revised content, the final conviction result is generated by support pruning based on support mapping, which precisely controls the generation of redundancy and errors. Furthermore, by decoupling conviction and sentencing, the problem of "sentencing drift" is avoided, and the stability of the judgment result is improved. This can help judicial institutions achieve more stable, interpretable and efficient prediction of legal judgments.

[0158] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. An intelligent feedback error correction method for predicting legal judgment outcomes, characterized in that, The method, applied to court clerk agents, prosecution agents, defense agents, and sentencing judge agents trained using a large language model, includes: The court clerk intelligent agent performs event-level decomposition and extraction of the case fact text to obtain a set of fact atoms. The prosecution's intelligent agent generates a set of charges based on the set of fact atoms, and the defense's intelligent agent generates a set of rebuttals based on the set of fact atoms. The sentencing judge intelligent agent performs adversarial collaborative reasoning on the set of charges and the set of rebuttals to obtain an initial conviction result; The initial conviction result is verified. If there is a doubtful charge, the prosecution's intelligent agent and the defense's intelligent agent generate revised content for the doubtful charge. The sentencing judge's intelligent agent generates the final conviction result based on the revised content; The process of decomposing and extracting case fact text through the clerk's intelligent agent at the event level to obtain a set of fact atoms includes: The structured output template of the clerk's intelligent agent and the case fact text are input into a preset large language model to generate and number each event fragment; The event fragment includes at least one optional field from the following: perpetrator, manner of action, target, time and place, amount, consequences, and injury result; Based on all the event fragments and their numbers, the set of fact atoms is obtained; The process of generating a set of charges based on the set of fact atoms by the prosecution's intelligent agent includes: Obtain a list of potential charges; The structured output template of the prosecution agent, along with the candidate crime list and the set of fact atoms, are input into a preset large language model; The large language model generates and numbers each crime triplet, which includes the target crime, the reason, and the evidence fact atom; the evidence fact atom is obtained from the set of fact atoms. The set of crimes is obtained by combining all the triples of the stated crimes. The step of generating a rebuttal set based on the set of fact atoms by the defense agent includes: The structured output template of the defense agent, along with the set of charges and the set of fact atoms, are input into a preset large language model; The large language model generates and numbers rebuttal triples, each rebuttal triple including a target charge, a rebuttal opinion, and a rebuttal fact atom. The rebuttal opinion includes at least one of the following: missing elements of a crime, insufficient evidence, dispute over the severity of the circumstances, and suggestions for concurrent / changed charges. The rebuttal fact atom is obtained from the set of fact atoms. The set of rebuttals is obtained from all the rebuttal triples.

2. The intelligent feedback error correction method for predicting legal judgment results according to claim 1, characterized in that, The process of obtaining an initial conviction result by having the sentencing judge intelligent agent perform adversarial collaborative reasoning on the set of charges and the set of objections includes: The structured output template of the sentencing judge agent, along with the set of charges, the set of rebuttals, and the set of fact atoms, are input into a preset large language model; The large language model evaluates the effectiveness of each candidate crime in the crime set through the crime set and the rebuttal set. For the target candidate crime that has been traversed, if the crime set covers the key fact atoms and the rebuttal set lacks fact atom support, then the target candidate crime is maintained. If the set of objections lacks the specified requirements and has factual atom support, then the confidence level of the target candidate crime is reduced or it is eliminated. An initial conviction result is obtained based on all the stated target candidate crimes.

3. The intelligent feedback error correction method for predicting legal judgment results according to claim 1, characterized in that, The verification of the initial conviction result includes: Based on the set of fact atoms, determine whether there is at least one of the following situations: suspected omission of crimes, disputed crimes not covered, or missing evidence chains. If so, generate a candidate list of doubtful crimes based on the doubtful crimes and the corresponding fact atoms.

4. The intelligent feedback error correction method for predicting legal judgment results according to claim 3, characterized in that, The process of generating revised content for the doubtful charges through the prosecution's intelligent agent and the defense's intelligent agent includes: The prosecution's intelligent agent performs differential correction based on the list of candidate charges of doubt and the initial conviction result to obtain the content to be corrected; and supplements the set of corrected charges related to the content to be corrected based on the set of fact atoms. The defense agent obtains a revised rebuttal set based on the set of fact atoms and the set of supplementary charges. The revised content is obtained based on the revised crime set and the revised rebuttal set.

5. The intelligent feedback error correction method for predicting legal judgment results according to claim 1, characterized in that, The process of generating the final conviction result through the sentencing judge's intelligent agent based on the revised content includes: Determine whether the number of final crimes is greater than a preset number. If so, iterate through each of the final crimes. For each target final crime that has been traversed, if the target final crime cannot be mapped to at least one fact atom, then delete the target final crime.

6. The intelligent feedback error correction method for predicting legal judgment results according to claim 5, characterized in that, The process of generating the final conviction result through the sentencing judge's intelligent agent based on the revised content includes: Obtain the sentencing result and the corresponding factual elements; Determine whether the sentencing result is consistent with the sentencing signal in the fact atom; if not, adjust the sentencing result according to the sentencing signal.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements each step of the intelligent feedback error correction method for predicting legal judgment results as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Conflict-aware legal case judgment prediction method and system

    CN121235859A

  • Multi-agent collaborative confrontation case trial method and system

    CN121563448A