Hang Zhao
Department of Law, Yuncheng University, Yuncheng , China
Abstract: The technological breakthroughs of the DeepSeek series of large models, combined with the practical demands of intelligent judiciary and the accumulated experience in judicial practice, have laid the foundation for the development of a legal evidence-reasoning intelligent agent. Grounded in the theoretical frameworks of evidentiary interpretation, logical reasoning, and probabilistic fact-finding, this agent adopts a technical pathway encompassing case information formalization, reasoning logic modeling, and probabilistic fact computation. Through demonstrations and validation using real-world cases, the project presents a viable and legally substantiated approach for advancing artificial intelligence in legal systems, merging technical feasibility with jurisprudential rigor.
Keywords: DeepSeek; legal evidence reasoning; intelligent agent
1. Introduction
Intelligent Agent (Agent) represents an advanced extension of large language models (LLMs), integrating domain-specific knowledge, planning capabilities, and tool invocation functions to evolve from a generic content generator into an AI entity capable of executing specialized tasks. The “Legal Evidence Reasoning Agent” builds upon the DeepSeek-V3 and DeepSeek-R1 foundational models, leveraging visual reasoning graphs and exploring compatible computational methods to expand the legal application of large models. By constructing an interpretable, cost-efficient, and user-friendly simulation “small model” for legal evidence reasoning, it facilitates the transformation of judicial decision-making from an “experience-driven” paradigm to a “data-intelligence-driven” approach.
2.Prerequisites for Constructing a Legal Evidence Reasoning Agent
With the continuous evolution of data and algorithmic technologies, China’s intelligent judicial practice has undergone a transformative leap—from mere technological assistance to systemic reform—serving as a pivotal driver in modernizing the nation’s rule of law and advancing judicial fairness. This progression has established the essential conditions for the development of a legal evidence reasoning agent, paving the way for a new era of AI-enhanced legal decision-making.
2.1 Breakthroughs in Reasoning Model Technology
The advancement of legal artificial intelligence has long been constrained by two fundamental limitations:
2.1.1 Technical Barriers Impeding Legal Expertise Integration
Conventional closed-source AI models have systematically excluded legal scholars from the technological development process. Without direct participation from domain experts, legal AI systems struggle to extract the tacit knowledge embedded in judicial practice. This unidirectional technological transfer has effectively rendered legal AI a black-box instrument, incapable of addressing the sophisticated analytical demands of juridical work.
2.1.2 Inherent Limitations in Traditional Large Models’ Reasoning Capacity
While existing large language models demonstrate strong performance in structured legal applications—such as document drafting and precedent retrieval—their statistically driven reasoning architecture remains fundamentally inadequate for complex legal tasks, including evidentiary analysis and jurisprudential interpretation. This methodological gap reveals a critical functional deficiency in applying stochastic models to domains requiring deterministic legal reasoning.
2.1.3 The Emergence of DeepSeek: A Paradigm Shift in Legal AI
DeepSeek’s large language model presents a transformative opportunity to overcome existing limitations in legal artificial intelligence:
The DeepSeek-V3-0324 model’s function calling capability and open-source nature substantially lower technical barriers to entry. This architectural innovation enables legal scholars, practitioners, and even students to economically participate in model development, ensuring solutions are grounded in real-world judicial needs rather than abstract technical ideals.
The DeepSeek-R1 model’s Chain of Thought (CoT) technology revolutionizes algorithmic jurisprudence by deconstructing and visualizing the reasoning process step-by-step. This breakthrough creates unprecedented opportunities for formal legal reasoning and ethical argumentation within AI systems.
Leveraging these dual technological breakthroughs, we can synthesize three critical methodologies:
Prompt engineering for precise legal query formulation.
Knowledge graphs for structured legal ontology mapping.
Model fine-tuning for domain-specific optimization.
2.2 The Imperative of Intelligent Justice
The unprecedented advancement of digital technologies is precipitating a profound structural transformation in the legal order of human society. Within the context of China’s socialist rule of law framework, the establishment of an “intelligent societal legal order” has emerged as a pivotal undertaking. In the judicial domain, this paradigm shift manifests through the systematic restructuring of traditional judicial mechanisms, driven by an AI-powered technological architecture centered on big data analytics – heralding the dawn of “intelligent justice.”
The legal evidentiary reasoning agent constitutes a cornerstone methodological framework for realizing intelligent justice. By establishing a visualized rule system for evidentiary reasoning through computational models, this innovation achieves dual objectives: first, addressing the formal logic requirements of AI applications in evidentiary fact-finding scenarios; second, operationalizing probabilistic standards for legal fact verification, thereby transforming the judicial determination of facts from reliance on experiential intuition to verifiable computational logic. This technological breakthrough directly addresses systemic demands for standardized fact-finding procedures and transparent adjudication processes – core tenets of judicial civilization.
2.3 The Accumulation of Judicial Expertise
China’s judicial organs are undertaking a comprehensive digital transformation, marked by exemplary institutional innovation across three pivotal dimensions that collectively advance the systematic development of legal AI systems:
2.3.1 Unified Judicial Data Infrastructure
Since 2023, the Supreme People’s Court’s “Single Judicial Network” initiative has orchestrated the systematic consolidation of judicial case resources spanning 32 provincial-level regions. This institutional breakthrough not only dismantles longstanding data silos but establishes a robust foundation for a nationally integrated judicial database – a prerequisite infrastructure for advanced legal AI applications.
2.3.2 AI-Powered Evidentiary Analysis Systems
The Shanghai High People’s Court’s “Intelligent Criminal Case Assistance System” (206 System) represents a technological watershed, merging OCR, NLP, and judicial element analysis to construct.
Automated verification protocols Demonstrating the operational feasibility of AI in evidentiary assessment, this innovation sets new benchmarks for technological due process in criminal justice .
2.3.3 Institutionalized Legal AI Development Platform
The Supreme People’s Procuratorate’s “Big Data Legal Supervision Model Platform” constitutes an unprecedented institutional innovation in legal AI development:
Providing modular development tools
Curating foundation models
Establishing shared deployment mechanisms This three-tiered architecture has enabled the customized creation of 623 prosecutorial AI models for nationwide implementation by 2025, demonstrating remarkable scalability in legal AI applications.
These coordinated advances reflect China’s unique “embedded innovation” approach to judicial modernization – strategically combining institutional reforms with technological breakthroughs to cultivate an endogenous legal AI ecosystem that is both technologically sophisticated and institutionally grounded.
3.Theoretical Foundations for Constructing Legal Evidentiary Reasoning Agents
The construction of a legal evidence reasoning intelligent agent is a research direction that organically integrates legal theory with artificial intelligence technology, requiring the theoretical frameworks of evidence interpretation theory, reasoning logic theory, and factual probability theory.
3.1 Theory of Evidential Interpretation
The current discourse within Chinese evidence law academia primarily revolves around several doctrinal interpretations of the concept of “evidence,” including the fact theory,” “material theory,” and “information theory.” While these theories differ in their emphasis on the nature, content, and function of evidence, they all inherently recognize that evidence serves to “establish case facts through probative means.” Effective evidential application, however, necessitates a fundamental precondition: interpretation.
The Theory of Evidential Interpretation focuses on transforming evidentiary materials into legally meaningful factual propositions, a process that entails both information extraction and factual proposition construction.This interpretative act can be conceptualized as a “decoding” mechanism, wherein ambiguous, intricate, or inherently opaque evidentiary information is systematically converted into a coherent set of clearly articulated and logically structured propositions—constituting the foundational “nodes” of evidential reasoning.
In the development of AI-driven legal evidence reasoning agents, this theory provides methodological scaffolding for enabling large language models to assimilate and formalize legal concepts and knowledge. The theory’s core function lies in: Distilling critical information from evidentiary materials to isolate their probative essence; and Structuring this information into precise factual propositions that either corroborate or contest factual assertions.
Through these two steps, the Theory of Evidential Interpretation facilitates the formal representation of legal concepts, bridging the gap between raw evidentiary input and judicially actionable reasoning.[[1]]
3.2 Theory of Logical Reasoning in Legal Evidence
In the field of judicial proof, the rule system constructed by modern evidence law theory is generally considered to be based on the philosophical foundation of empiricism represented by Locke, Bentham, and Mill. Therefore, current methods of evidence reasoning heavily rely on the individual “empirical judgment” of fact-finders. As Bentham strongly advocated, this approach abolishes all formal rules of evidence reasoning and returns to a “free proof system” based on everyday experience and common sense reasoning. Generally, the “free evaluation of evidence” system is regarded as more advanced than the rigid “legal evidence” system, as it can better adapt to the needs of evidence reasoning activities. However, research on “free evaluation of evidence” lacks a coherent theoretical foundation, and the judicial proof system based on legal reasoning has difficulty fully incorporating the theories and knowledge of logic.
The significance of reasoning logic theory lies in using unified logical methods to express the process of legal evidence reasoning, which serves as the foundation for artificial intelligence to construct logical models and conduct legal evidence reasoning.
3.2.1 First level: “Experience”
Refers to knowledge formed by fact-finders through inductive logic outside specific cases, encompassing all information individuals encounter in daily life and its projection onto factual issues. This layer is represented by a dashed box to indicate it is hidden in the fact-finder’s mind and not explicitly expressed in the reasoning model.
3.2.2 Second level: “Forward Reasoning”
A process where fact-finders use deductive logic to infer facts (results) from evidence (causes). As this process follows the chronological order of events (from cause to effect), it is termed “forward reasoning”.
3.2.3 Third level: “Reverse Reasoning”
A process where fact-finders use abductive logic to infer facts (causes) from evidence (results). As this process works backward from the result to the cause, it is called “reverse reasoning”.
The theory of reasoning logic is the cornerstone for intelligent agents to accurately analyze evidence and generate legal arguments. DeepSeek-R1’s chain-of-thought reasoning and self-verification capabilities provide critical support by enabling step-by-step evidence analysis and logical inference, which are essential for producing reliable legal arguments. These capabilities allow the intelligent agent to assist judicial work by automating evidence evaluation, cross-referencing legal precedents, and generating structured legal documents, thereby enhancing the efficiency and accuracy of judicial decision-making.
3.3 Fact Probability Theory
Fact Probability Theory applies probability theory to legal evidence reasoning to address the uncertainty in fact-finding. In the judicial context, “facts” refer to propositions or conclusions made by fact-finders after analyzing submitted evidence, while “probability” assesses the likelihood of these facts occurring.
In essence, “fact probability” is a probability evaluation formed by fact-finders based on evidence and experience, describing the degree of possibility of legal facts. Unlike mathematical/statistical probability, it is influenced by the fact-finder’s experience, knowledge, and the credibility/reliability of the evidence itself, thus possessing both subjectivity (personal judgment) and objectivity (evidence-based grounding).
The new evidence law school views statistical probability calculations as a cognitive tool to express the plausibility of evidence reasoning, where “the probabilistic attribute of evidence should be understood through plausibility and best explanation inference, with plausibility determining probability”[[2]]. Polya, in Mathematics and Plausible Reasoning, designed a plausibility calculation formula based on Bayes’ theorem.
This formula provides a framework for testing plausibility through probabilistic calculus, assigning a basic probability between 0 and 1 and evaluating the conclusions of evidentiary reasoning using probability calculations. In judicial practice, the use of probability to assess the standards of fact-finding is not uncommon. For example, a study of the Eastern District of New York courts found that judges generally agreed that the “preponderance of the evidence” standard corresponds to a probability above 50%, “clear and convincing evidence” ranges between 60% and 70%, and “beyond a reasonable doubt” falls between 76% and 90%.[[3]] Thus, testing the plausibility of evidentiary reasoning through probability is a fully viable approach, and scholars of evidence law do not dispute this point. The real issue lies in determining the source of the data for probability calculations. In statistics, one perspective holds that probability relies on “objective” data, such as known evidence and experiments, while another argues that probability stems from the “subjective” judgment of the reasoning agent (i.e., the fact-finder).
From the perspective of “factual probability,” subjective probability aligns more closely with judicial practice, as fact-finders often rely on limited evidence and personal experience to determine legal facts rather than extensive experimental data. However, with the continuous advancement of digital technology, vast amounts of data now serve as evidence in legal proceedings, allowing objective probability to play an increasingly important role in judicial proof—for example, using big data to evaluate a suspect’s behavioral patterns.
Therefore, the subjectivity and objectivity of factual probability are not mutually exclusive. Depending on the nature of the case and the evidence required, they can be applied flexibly. An intelligent agent for legal evidentiary reasoning must integrate the strengths of both approaches and develop corresponding calculation methods tailored to the specifics of each case.
4.Construction Pathways for Legal Evidentiary Reasoning Agents
The fundamental approach involves integrating DeepSeek-V3-0324’s generative capabilities with DeepSeek-R1’s deductive reasoning through a computational model for evidence inference, which generates reasoning graphs and performs probabilistic assessments. This creates a novel large-scale model architecture capable of automated legal evidentiary reasoning (Refer to Figure 1).
Figure. 1 Construction of an Intelligent Agent for Legal Evidence Reasoning Based on the DeepSeek Large Model.
Specifically, the Legal Evidence Reasoning Intelligence Agent consists of three main modules: the DeepSeek-V3-0324 Intent Recognition Model, the DeepSeek-R1 Reasoning Model, and the DeepSeek-R1 Computation Model[[4]] These modules further decompose into three primary tasks: case information formalization, inference logic modeling, and fact probability quantification. The agent transforms the evidence, facts, and reasoning logic of legal cases into a structured, computable model for legal argumentation and decision-making.
4.1 Case Information Formalization
“Case Information Formalization” is the starting point of the Legal Evidence Reasoning Intelligence Agent. Its main role is to use the DeepSeek-V3-0324 Intent Recognition Model to transform case data into a structured and standardized format, converting various case information (e.g., physical evidence, witness testimony, factual claims) into a systematic model. This ensures that scattered information is organized into a coherent structure, providing a verifiable and traceable computational foundation for legal argumentation. The process involves three key steps:
4.1.1 Information Classification
Classify all relevant evidence into three standardized formats to ensure data completeness and consistency:
Evidence: Refers to the physical state of materials presented in court (e.g., a “bottle of poison”). In the model, this is represented by a triangle symbol “△”, and its truth value is determined through probabilistic calculations.
Evidence-Based Facts: These are propositions directly derived from evidence that support or refute a claim (e.g., “The suspect used a bottle of poison”). Represented by a circle symbol “◯”, these facts are the building blocks of legal reasoning.
Facts to be Proven: Represent hypotheses about the state of key facts in the case (e.g., “The suspect committed the murder”). Represented by a square symbol “▢”, these are the assumptions that the reasoning model aims to validate.
4.1.2 Core Sentence Expression
A core sentence expression refers to the structured representation of evidence information in a patterned manner, transforming it into legally compliant language while adhering to logical structures and grammatical rules. Such expressions should clearly, accurately, and comprehensively reflect the substantive content of the evidence information.
- Core Vocabulary of Semantic Content
In the Legal Evidence Reasoning Intelligence Agent, we adopt a verb- and noun-centered expression method. This approach describes the relationships between attributes and objects (e.g., actions and actors) to represent scenarios, events, and contexts, and organizes this information using Boolean logic[[5]].
For example, in the “Nian Bin’s Poisoning Case,” the perpetrator’s actions are described as “Nian Bin sneaked into the kitchen of his convenience store and poured rat poison from a bottle into the water in a kettle.”
This sentence describes the attribute “poisoning,” with “Nian Bin” as the subject. We can create a core phrase “poisoning(rat poison, kettle, Nian Bin)“to represent this action.
The attribute “sneak into” relates “Nian Bin” to the “kitchen,” forming the core phrase “sneak into(Nian Bin, kitchen)“
These core phrases are then logically combined to form a complete “core sentence” that captures the sequence and relationship of actions[6].
- Boolean Logic Combination of Grammatical Structures
Boolean logic is a mathematical logic form used to describe the true/false states of objects. Its basic units are Boolean variables, which have only two states: true or false. These states can form three logical forms:
- AND (“⋀”): Represents the simultaneous presence of two conditions (both must be true).
- OR (“⋁”): Represents that either of two conditions can be true (at least one must be true).
- NOT (“¬”): Represents the exclusion of a condition (the condition must be false).
These logical operators can be combined with core phrases to simplify the representation of complex sentence structures. For example, the sentence “Nian Bin sneaked into the kitchen of his convenience store and poured rat poison from a bottle into the water in a kettle”[Judgments: (2007) Rong Criminal Initial No. 84, (2012) Min Criminal Final No. 10] can be expressed as:
[sneak_into(Nian Bin, kitchen)] ⋀ [poisoning(rat poison, kettle, Nian Bin)]
To create a generalized model for the crime of “discharging dangerous substances,” we can use variables:
X to represent the perpetrator,
Y to represent the location of the act.
The resulting type-model expression is:
[sneak_into(X, Y)] ⋀ [poisoning(X)]
4.2 Inference logic modeling
Inference Logic Modeling is the core modeling layer of the Legal Evidence Reasoning Intelligence Agent, which leverages the DeepSeek-R1 reasoning model to achieve the visualization of legal arguments. This module consists of two specific steps:
4.2.1. Node Labeling
Nodes representing various pieces of evidence and facts are explicitly marked in the reasoning model. The essence of evidence reasoning is to prove the “fact to be proven” (a legal assumption with legal significance) through evidence. For example, “the suspect committed a robbery” is the fact to be proven in a robbery case, while “the supplier delayed delivery” is the fact to be proven in a breach of contract case.
In this process, each node has two possible states: true or false, leading to three attributes:
- Trustworthy: Represented by a solid symbol (e.g., “▲”), indicating the node can serve as a reliable basis for reasoning.
- Pending: Represented by a hollow symbol (e.g., “◯”), indicating the node’s credibility requires further evaluation.
- Untrustworthy: Removed from the model entirely, as it fails to meet the threshold for validity.
4.2.2 Node Connection
Nodes are connected by directed edges to form a complete reasoning model, reflecting the causal relationships between evidence and facts.
In the Legal Evidence Reasoning Intelligence Agent, the causal relationship between evidence and facts is represented by a unidirectional arrow “→”, which denotes the logical structure from cause to effect. In this system, each arrow signifies the causal influence between evidence and facts, where one event (the cause) leads to another event (the result). This causal relationship can be direct (no intermediate variables or conditions affecting the connection) or indirect (mediated by conditions, such that the two events have a probabilistic causal relationship under specific circumstances).
4.3 Fact probability quantification
Fact Probability Quantification serves as the quantitative analysis layer of the Legal Evidence Reasoning Intelligence Agent. This module employs mathematical and statistical methods to calculate probabilities for fact-finding, comprising two submodules:
4.3.1. Value Assignment
This step assigns one or more numerical values (representing probabilities, weights, or other quantifiable metrics) to each node in the model, providing computational data for the DeepSeek-R1 model. Two primary methods are used:
(1) Experimental Assignment Method
This approach quantifies evidence based on experimental or observational data, establishing experimental and control groups with distinct treatments or conditions. It includes three techniques:
- Controlled Experiments: Setting up control groups to compare outcomes.
- Variable Control Methods: Isolating confounding factors.
- Randomized Experiments: Randomizing group assignments to address “reference group” issues.
These methods determine the degree of evidentiary support for facts, enabling probabilistic reasoning.
(2) Reasoning Model Assignment Method
When experimental methods face challenges in judicial contexts (e.g., resource constraints, untestable empirical assumptions), this method leverages existing reasoning models to assign probabilities or weights based on experiential knowledge.
In China’s criminal procedure, “free evaluation of evidence” equates to judges’ subjective weighing of evidence based on expertise. We propose “judge-assigned subjective probabilities” as a operationalized framework for free evaluation:
- Judges assign probabilistic values (0%–100%) to evidence, quantifying their belief in its reliability or factual support.
- Standards:
- Preponderance of evidence: >50%
- High probability: >75%
- Beyond reasonable doubt: >95%
This method provides a structured probabilistic framework for judicial fact-finding, adaptable to China’s judicial realities.
4.3.2. Probability Calculation
This step applies mathematical formulas to compute probabilities, inferring potential causes (fact to be proven) from observed evidence (results) and quantifying their likelihood.
- Bayesian Theorem Adaptation
While Bayesian theorem is conventionally a mathematical concept for conditional probability, it is reinterpreted in judicial proof as follows:
- P(F): Probability of a fact proposition (prior probability, based on experiential judgment).
- P(F|E): Posterior probability (fact probability derived from evidence).
- P(E|F): Forward probability (likelihood of evidence given the fact).
- “|”: Denotes causal relationship between evidence and facts.
The model adheres to five foundational theorems:
- 0 ≤ P(F) ≤ 1 (Probability bounds).
- P(F) + P(¬F) = 1 (Mutually exclusive propositions sum to 1).
- P(F|E)+P(¬F|E)=1(Competing propositions under same evidence sum to 1).
- P(F|E1)+P(¬F|E2)≠1(Competing propositions under different evidence do not sum to 1).
- P(F|E) + P(F|¬E) ≠ 1 (Competing evidence for the same fact do not sum to 1).
Key Formula: Bayesian Inference
P(F | E)=P(F)P(E | F)/P(E)
- P(F): Prior belief in the fact (from experience).
- P(F|E): Posterior belief (fact probability after considering evidence).
- P(E|F): Forward probability (evidence likelihood if the fact is true).
- P(E|F)/P(E): Likelihood ratio (evidence’s probative value).
Simplified Calculation via Likelihood Ratio
To address challenges in determining P(E) (evidence base rate), we derive:
P(F|E) = \frac{O(F) \cdot L(E | F)}{1 + O(F) \cdot L(E | F)}
Where:
- O(F) = P(F)/[1−P(F)]: Odds of the fact (prior odds).
- L(E|F) = P(E| F)/P(E|¬F): Likelihood ratio (evidence’s diagnosticity).
Practical Implications
- Judicial Application: Judges combine prior odds (O(F)) and likelihood ratios (L(EF)) to compute posterior probabilities (P(F|E)), aligning with standards like “beyond reasonable doubt” (>95%).
- Limitations: P(E) (evidence base rate) is often unobservable, necessitating reliance on P(E|F) (forward probability) and subjective priors (P(F)).
Theoretical Foundations
- Bayesian Interpretation: Formalizes evidence reasoning as probabilistic updating.
- Likelihood Ratio Method: Balances sensitivity (true positive rate) and specificity (true negative rate) for forensic evaluation.
This framework bridges legal standards with computational logic, enabling AI-assisted judicial reasoning while accommodating subjective expertise and empirical constraints.
- Conclusion
Intelligent Agent for Legal Evidence Reasoning are interdisciplinary research methodologies that integrate knowledge from law, computer science, probability theory, and related fields. By leveraging computational techniques and graphical representations, they systematically analyze, evaluate, and reason about evidence to provide a scientific foundation for judicial decision-making.
This paper explores various theories and methodologies, such as argumentation models, narrative models, and probabilistic models, each with distinct strengths and limitations suited for different types and complexities of evidentiary reasoning. Intelligent Agent for Legal Evidence Reasoning encompass not only theoretical and methodological aspects of evidentiary analysis but also the integration of computer technologies and mathematical approaches. By leveraging formalized reasoning processes, computable evaluation criteria, and probabilistic assessments, these models aim to provide scientifically grounded support for judicial practice.
Declaration of Conflicting Interests
The author(s) declared no potential conflicts of interest with respect to the research, author-ship, and/or publication of this article.
Data Sharing Agreement
The datasets used and/or analyzed during the current study are available from the corresponding author on reasonable request.
Funding
- Philosophy and Social Sciences Planning Project of Shanxi Province (20240H057YB).
- Philosophy and Social Sciences Research Project of Shanxi Higher Education Institutions (2024W161).
- Teaching Reform and Innovation Project of Shanxi Higher Education Institutions (J20241279).
[[1]] Kevin D. Ashley, LI Juan & WANG Chunsui (2020) AI Systems in Law: New Tools for Legal Practice, Journal of Dialectics of Nature, 42(6): 10-19.
[[2]] Ronald J. Allen (2011) Evidence and Inference/Probability and Plausibility , Evidence Science, 19(1) :113-120.
[[3]] Friedman, R. D (1991) Character Impeachment Evidence: Psycho-Bayesian Analysis and a Proposed Overhaul, UCLA Law Review, 38: 637-697.
[[4]] DeepSeek-AI, DeepSeek-V3 Technical Report, ARXIV, (March 28, 2025), http://arxiv.org/html/2412.19437v1.
[[5]] Tod S. Levitt, Kathryn Blackmond Laskey (2001) Computational Inference for Evidential Reasoning in Support of Judicial Proof, Cardozo Law Review, 22(5) :1961-1731.
[6] Shaun Lim (2021) Judicial Decision-Making and Explainable Artificial Intelligence: A Reckoning from First Principles, Singapore Academy of Law Journal, 33: 280-314.