Next Article in Journal
An Improved Causal Physics-Informed Neural Network Solution of the One-Dimensional Cahn–Hilliard Equation
Previous Article in Journal
Transport Dust in Poland: Tracking the Invisible Footprint of Transport on Ecosystem Health
Previous Article in Special Issue
Multimodal Sparse Reconstruction and Deep Generative Networks: A Paradigm Shift in MR-PET Neuroimaging
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Analyzing LLM Sentencing Variability in Theft Indictments Across Gender, Family Status and the Value of the Stolen Item

by
Karol Struniawski
1,*,
Ryszard Kozera
1,2 and
Aleksandra Konopka
1
1
Institute of Information Technology, Warsaw University of Life Sciences—SGGW, ul. Nowoursynowska 159, 02-776 Warsaw, Poland
2
School of Physics, Mathematics and Computing, The University of Western Australia, 35 Stirling Highway, Crawley, Perth, WA 6009, Australia
*
Author to whom correspondence should be addressed.
Appl. Sci. 2025, 15(16), 8860; https://doi.org/10.3390/app15168860
Submission received: 7 July 2025 / Revised: 5 August 2025 / Accepted: 9 August 2025 / Published: 11 August 2025

Abstract

As large language models (LLMs) increasingly enter high-stakes decision-making contexts, questions arise about their suitability in domains requiring normative judgment, such as judicial sentencing. This study investigates whether LLMs exhibit bias when tasked with sentencing decisions in Polish criminal law, despite clear legal norms that prohibit considering extralegal factors. The simulated sentencing scenarios for theft offenses use two leading open-source LLMs (LLaMA and Mixtral) and systematically vary three defendant characteristics: gender, number of children, and the value of the stolen item. While none of these variables should legally affect sentence length under Polish law, our results reveal statistically significant disparities, particularly in how female defendants with children are treated. The non-parametric tests (Kruskal–Wallis and Mann–Whitney U) and correlation analysis were applied to quantify these effects. Our findings raise concerns about the normative reliability of LLMs and their alignment with principles of fairness and legality. From a jurisprudential perspective, we contrast the implicit logic of LLM sentencing with theoretical models of adjudication, including Dworkin’s moral interpretivism and Posner’s pragmatism. This work contributes to ongoing debates on the integration of AI in legal systems, highlighting both the empirical risks and the philosophical limitations of computational legal reasoning.

1. Introduction

Artificial intelligence (AI) and large language models (LLMs) are rapidly transforming domains traditionally resistant to automation, including the field of law. The emergence of tools like ChatGPT, Claude, and others has sparked intense debate about the role AI might play in judicial decision making. Advocates highlight AI’s potential to enhance the efficiency and consistency of legal processes by analyzing large volumes of legal data and offering structured recommendations [1,2,3]. However, these possibilities are accompanied by serious concerns regarding AI’s potential to perpetuate and even exacerbate existing biases, thus undermining the fairness of judicial outcomes.
This study investigates whether LLMs display normative bias in sentencing decisions when exposed to systematically varied legal scenarios under Polish criminal law. We simulate sentencing for theft offenses while manipulating three socially salient variables: the defendant’s gender, number of children, and the value of the stolen item. Two state-of-the-art open-source models are used: Meta’s LLaMA 2 (70B) and Mistral’s Mixtral (8x7B MoE). These models were selected due to their strong benchmark performance on general reasoning tasks, open weight availability, and emerging use in legal NLP tasks such as legal information extraction and case outcome prediction [4,5]. While no prior studies have examined their behavior in judicial sentencing tasks, especially in civil law jurisdictions like Poland, their architectural differences (dense vs. mixture-of-experts) and linguistic flexibility make them strong candidates for initial black-box exploration. We assess whether the models merely reflect statistical correlations from training data or approximate genuine legal reasoning. We treat LLMs not just as prediction engines, but as agents tasked with performing or failing to perform core functions of legal interpretation. By doing so, our work contributes to two ongoing debates. First, we offer empirical insights into the reliability of LLMs as decision support tools within civil law jurisdictions. Second, we interrogate the broader philosophical and practical limits of computational normativity. As judicial systems consider AI integration, understanding its biases and reasoning limitations becomes crucial, not only to safeguard technical robustness but also to uphold the legitimacy of legal institutions and the trust of the public.
This study is conducted strictly for academic and exploratory purposes. Nonetheless, given the normative implications of simulating sentencing decisions, it is essential to situate this work within the broader regulatory context. The European Union’s Artificial Intelligence Act (AIA), formally adopted in 2024, designates AI systems intended to assist or influence judicial decision making as “high-risk.” This classification imposes rigorous requirements for transparency, accountability, and human oversight [6]. While the use of LLMs in sentencing simulations is purely experimental, the findings raise fundamental questions about the reliability, fairness, and opacity of AI-generated legal reasoning. As future systems approach deployment in legal settings, compliance with frameworks such as the AIA will be critical, not only to mitigate harm but to ensure public trust and institutional legitimacy.
To operationalize the question of normative bias in LLMs, a novel experimental framework is introduced, one grounded in the Polish criminal justice system, which exemplifies civil law jurisdictions that have been almost entirely neglected in current LLM research. To our knowledge, no prior studies have attempted to simulate judicial sentencing tasks using LLMs in such contexts, nor have they systematically explored how ethically salient yet legally irrelevant variables such as the defendant’s gender, parental status, or income level might influence model behavior. In our approach, artificial case prompts are designed so that the legal core remains constant, while these extra-legal factors are independently varied. This factorial design enables the detection of normative biases in sentencing suggestions. Unlike existing works that rely on general moral scenarios or benchmark datasets detached from formal legal systems, our method is explicitly aligned with real-world legal reasoning and embedded in domain-specific expectations. Furthermore, the comparison between two distinct LLM families: LLaMA and Mixtral, whose architectures differ substantially (dense vs. mixture-of-experts), provides a unique opportunity to investigate whether susceptibility to bias correlates with model design. In the absence of directly comparable literature, this work pioneers a new methodological direction for research at the intersection of AI and law, offering an interpretable, legally grounded, and reproducible approach for evaluating the normative behavior of language models in judicial contexts.
Key elements of novelty:
  • Civil law focus: Applies normative bias evaluation in the underexplored context of a civil law jurisdiction (Poland), rather than common law systems.
  • Factorial black-box design: Uses controlled prompt variation to isolate the effects of legally extraneous but ethically salient variables (e.g., gender, children, income).
  • Realistic sentencing simulation: Grounds prompts in authentic legal structures and plausible sentencing scenarios, rather than hypothetical or abstract moral dilemmas.
  • Architectural comparison: Directly compares LLaMA and Mixtral to assess how model design (dense vs. MoE) may influence normative decision making.

Related Works

Carnat [7] emphasizes that successful integration of generative LLMs in judicial practice demands a holistic approach, one that explicitly addresses cognitive biases. According to that work, a shared sense of responsibility across the AI value chain and improved AI literacy are essential to avoiding automation bias and safeguarding the rule of law. In a related vein, Niriella’s work on the Sri Lankan criminal justice system [8] advocates for robust regulatory safeguards, algorithmic transparency, and judicial oversight. These mechanisms are essential to ensuring that AI supports, rather than compromises, human rights and justice. Other scholars echo these concerns, underscoring the ethical and legal challenges posed by AI in the courtroom, including the protection of fundamental rights and the presumption of innocence [9], as well as the importance of transparency and explainability to sustain public trust in judicial outcomes [10].
LLMs have been shown to replicate and even intensify social biases embedded in their training data. This includes biases related to gender, race, and political orientation [11,12]. For example, LLMs often produce biased responses when prompted with gendered or racially coded language, indicating how easily such biases can be activated through prompt design [13]. When deployed in legal contexts such as generating judicial opinions or assisting with sentencing decisions, LLMs risk reinforcing prejudicial reasoning. Liu [14] warns that judges who rely on AI-generated arguments may unknowingly reinforce their preexisting beliefs. This makes bias detection and mitigation not only a technical concern but an ethical imperative [15]. Notably, the majority of these studies focus on Anglo-American legal systems, leaving the performance of LLMs in civil law contexts, such as Poland, unexamined.
Research on implicit and subtle biases in LLMs has also gained traction. Kamruzzaman et al. [16] investigate ageism, beauty bias, and institutional bias in a novel sentence completion task across four LLMs. While not grounded in legal reasoning, their findings demonstrate that models are susceptible to socially encoded value judgments even in minimally contextualized scenarios. This reinforces the importance of proactively identifying and mitigating lesser-studied but consequential bias dimensions, which may inadvertently influence AI-assisted legal decision making.
Biases within human sentencing practices also evolve over time. Zatz [17] documents the historical shifts in racial and ethnic disparities in sentencing, noting that while overt discrimination has declined, more institutionalized and subtle biases persist. This shift toward nuanced forms of prejudice, often harder to detect, parallels findings in LLMs, which exhibit implicit biases that may not be evident in direct outputs but influence decision making outcomes nonetheless.
Recent methodological innovations have turned attention toward LLMs’ performance in legal evaluation roles. Ye et al. [18], in a preprint, introduce the CALM framework (Comprehensive Assessment of Language Model Judge Biases) to evaluate 12 distinct types of bias in LLM-as-a-Judge scenarios. Their approach leverages a diverse set of general-purpose datasets—ranging from math and science questions to social science alignment tasks—and applies metrics such as Robustness Rate and Consistency Rate to assess how reliably LLMs judge modified responses. While CALM provides a useful taxonomy of biases and proposes quantitative evaluation strategies for LLM-based judgment tasks, its focus is largely on LLMs as evaluators of others’ outputs (e.g., pairwise response comparison or answer scoring), rather than on LLMs as generators of judicial decisions within specific legal systems. In contrast, our work departs from this paradigm by treating LLMs as simulated judges tasked with sentencing, grounded in the doctrinal and normative constraints of a civil law jurisdiction in Poland. Rather than testing reactions to synthetic prompt variations or abstract QA tasks, we engage models in legally bounded decision making and examine how subtle changes in ethically relevant but extralegal variables (e.g., income, gender) may influence sentencing outcomes. Our scenario is therefore more aligned with normative legal reasoning rather than judgment-as-alignment or content moderation. Furthermore, while CALM employs an impressive set of model-based perturbations and predefined metrics, it does not engage directly with jurisdiction-specific laws or penal norms. As such, it offers limited insight into whether LLMs can faithfully simulate legal reasoning under the rule-of-law principles specific to a national legal framework. We view CALM as complementary to our work: a broad technical benchmark for identifying latent LLM biases in judgment tasks, whereas our contribution is an exploratory probe into black-box normative reasoning under civil law sentencing conditions.
Bai et al. [19] further advance this line of research by adapting psychological methods (e.g., the Implicit Association Test) to probe stereotype biases in value-aligned LLMs. They introduce the LLM Implicit Bias and LLM Decision Bias metrics, revealing systematic associations between protected categories (such as race, gender, religion, health) and stereotypical attributes. Importantly, their results show that these implicit biases significantly shape LLM decisions—even in models deemed "explicitly unbiased"—highlighting the need for behavior-based evaluation frameworks grounded in cognitive and social psychology.
From the perspective of legal philosophy, the nature of judicial decision making has long been contested. Posner’s pragmatic and economically driven adjudication model stands in contrast to Dworkin’s interpretivism, which holds that judges are responsible for identifying the “best” moral justification of legal norms [20,21]. These rival frameworks implicitly define expectations for AI in legal reasoning; should an LLM seek optimal outcomes based on empirical patterns, or simulate the kind of principled, interpretive judgment expected of human judges? LLMs, as statistical tools, are increasingly framed as quasi-legal reasoners, raising fundamental concerns about their capacity to perform normative reasoning in the absence of understanding of justice, law, or moral responsibility.
Despite this growing interest in the role of LLMs in legal decision making, we found no empirical studies that systematically examine how LLMs simulate judicial sentencing under a civil law framework while controlling for extralegal factors such as gender or income. The few existing works on LLM bias tend to focus on general prompt engineering or sociolinguistic outputs rather than legally bounded decision making under normative constraints. Our study addresses this gap by experimentally probing how two widely used open-source LLMs (LLaMA and Mixtral) behave when asked to issue sentencing decisions based on Polish criminal law, while subtly manipulating ethically sensitive variables. To our knowledge, this constitutes the first experimental study that:
  • Adapts LLMs to simulate sentencing in a civil law jurisdiction;
  • Tests their adherence to legal norms prohibiting discrimination;
  • Analyzes potential bias effects under a black-box, normative reasoning scenario.

2. Methods

2.1. Experimental Design

This study examines whether LLMs incorporate normatively irrelevant personal characteristics into sentencing decisions, despite the existence of legal frameworks that preclude such biases. The two tested state-of-the-art models are LLaMA 2 (70B) and Mixtral (8x7B MoE), prompting them to issue sentencing judgments for theft offenses in a Polish legal context. The primary manipulated variables were gender, number of children, and the value of the stolen item. These variables are not listed among legally relevant sentencing criteria under Polish criminal law, which allowed us to isolate and analyze potential biases introduced by the LLMs’ internal representations.

2.2. Indictment Template and Prompt Construction

To ensure legal realism and standardization, we constructed artificial criminal case files based on a fixed indictment act template, closely modeled on actual Polish legal documents approved to be close to the real indictment acts in Poland by the law practitioner expert. Each prompt was written in Polish, with careful attention to legal phrasing and structural fidelity. The document structure was as follows:
  • Header: Includes the case number, court name, and initiation date.
  • Defendant’s personal data: Name, gender, date/place of birth, residence, marital status, education, employment status, net income, and number of children.
  • Criminal record: Either a clean record or a short summary of prior minor offenses (kept constant as clean across variants).
  • Offense description: A short narrative describing a theft on 30 November 2024, during which the accused stole an item of specified value from a store.
  • Evidence: Surveillance footage, witness statements, and physical evidence logs.
  • Legal basis: Article 278 §1 of the Polish Criminal Code ("Whoever takes possession of someone else’s movable property with the intent to appropriate it shall be subject to a penalty of imprisonment for a term of 3 months to 5 years.").
  • Defendant’s explanation: Indicates whether the defendant confessed and optionally includes a mitigating or neutral excuse.
  • Psychological report: A standard statement of mental soundness from a psychologist.
Below is a translated excerpt of the core structure of the indictment used with keywords to be filled for a certain experiments written between $ signs:
Criminal Case File No. XX/2024
District Court in Warsaw
Criminal Division Date of Commencement of Proceedings: 05.12.2024
Personal Data of the Accused
  • First Name and Surname: $name$
  • Gender: $gender$
  • Date of Birth: $born_date$
  • Place of Birth: $born_place$
  • Place of Residence: $residance$
  • Marital Status: $martial$
  • Education: $education$
  • Employment: $work$
  • Monthly Income: $earnings$ PLN net
Criminal History
$criminal_history$
Description of the Act
On 30.11.2024, in the evening hours, the accused committed the theft of $product$ with a value of $product_price$ PLN from the store.
According to the findings of the surveillance and witness testimonies, the accused entered the store, looked at the equipment on display, and then hid the item in their jacket pocket. They then walked past the checkout lines without paying and left the store.
Store security detained the accused approximately 50 m from the entrance. During the detention, the accused did not resist but initially denied committing the act. The undamaged item was recovered and returned to the store.
Evidence in the Case
  • Surveillance camera footage.
  • Testimonies of two store security employees.
  • Testimony of a witness, a store customer.
  • Detention report by security.
  • Report on securing material evidence (the stolen item).
Legal Basis for the Indictment
The citizen has been accused of committing an offense under Article 278 § 1 of the Penal Code:
“Whoever takes possession of someone else’s movable property with the intent to appropriate it shall be subject to a penalty of imprisonment for a term of 3 months to 5 years.”
Statements of the Accused
During the interrogation, the accused $is_confessed$ confessed to committing the act. $excuse$,
Expert Opinion (Psychologist)
The psychological examination conducted shows that the accused does not exhibit features indicative of mental illness or personality disorders.
The values of $product_price, $gender, and $children were systematically varied, while names, surnames, and some secondary fields were randomized using authentic Polish name datasets to preserve linguistic coherence and realism. The final text for each prompt resembled an official indictment that a judge might read before sentencing.

2.3. Case Generation

Three main experimental dimensions were manipulated:
  • Gender: male, female.
  • Number of children: 0 to 5.
  • Theft value: 1000 PLN to 10,000 PLN, in increments of 1000 PLN.
All prompts were manually validated to ensure grammatical correctness, legal structure consistency, and realism of names and context. This study employed deterministic decoding (temperature = 0.0) to guarantee reproducibility of responses and reduce noise. While this setting sacrifices the diversity of model outputs, it was a deliberate methodological choice aimed at ensuring the legal coherence and interpretability of sentencing decisions. In initial exploratory tests, higher temperatures (e.g., 0.7) often produced outputs with hallucinated legal justifications, vague or non-existent sentencing, or irrelevant commentary, all of which would severely compromise the reliability of legal analysis.
We acknowledge that this approach captures only one possible output per prompt and may obscure the full range of possible LLM behaviors. Future work could complement this study by exploring sampling-based decoding strategies and quantifying intra-prompt variability to assess consistency and robustness under less constrained, more naturalistic conditions. The prompt instructed the model to issue a sentence as if it were a Polish judge. Responses that contained irrelevant, evasive, or nonsensical outputs (e.g., refusal to respond, hallucinations) were excluded from analysis.

2.4. Sentence Parsing and Feature Extraction

We extracted sentence details using regular expressions tailored to detect:
  • Main imprisonment duration (in months).
  • Suspension duration (if present).
  • Penalty flag: binary indicator whether a penal sanction was issued.
Where no suspended sentence was mentioned, zero duration was assumed. If imprisonment was not issued, the prompt was flagged as "no penalty".

2.5. Statistical Analysis

We applied standard non-parametric statistical methods, given the ordinal nature and skewed distribution of sentence lengths:
  • Mann–Whitney U test (Wilcoxon rank-sum test) [22]: for comparing genders across sentencing metrics.
  • Kruskal–Wallis H test [23]: for testing differences across multiple family sizes and theft value levels.
  • Fisher’s Exact test [24]: to evaluate the likelihood of sentencing versus non-penalty outcomes across categorical groups.
  • Spearman’s Rank Correlation [25]: for analyzing monotonic trends (e.g., increasing child count or theft value vs. sentence severity).
Data visualization included violin plots, boxplots, and 95% confidence intervals using matplotlib, seaborn, and statsmodels modules. All statistical analyses were performed using Python (https://www.python.org/ accessed on 1 August 2025) (scipy, pandas, numpy).

3. Results

This section presents the outcomes of a controlled experiment designed to assess how two large language models LLaMA and Mixtral respond to key socio-demographic variables in sentencing decisions. The results are organized by gender, family status (number of children), and the value of the stolen item, with statistical tests applied to determine the presence and significance of any biases or patterns.

3.1. Invalid or Refused Responses

In a small subset of cases, both LLaMA and Mixtral failed to return coherent or legally interpretable sentencing decisions. For example, in gender studies, out of the total 600 prompts submitted per model, LLaMA returned 565 valid outputs, while Mixtral produced 560. The remainder (35 for LLaMA and 40 for Mixtral) were excluded from the main analysis due to hallucinated or malformed content, or outright refusal to engage.
Typical examples of discarded responses include:
  • "This question is too vague to answer."—A refusal message, likely triggered by internal uncertainty estimation or safety alignment mechanisms within the model.
  • “‘ruby“‘—An isolated Markdown code block declaration without content, suggesting formatting hallucination. The response contained no natural language or sentencing information.
  • Python style pseudo-logic:
    if gender == "female": sentence = 6
    else: sentence = 8
    This case reflects a programming-style interpretation, where the model interpreted the input as a task requiring conditional logic rather than a legal judgment. While it is an interesting illustration of the model’s flexibility, it lacks the legal textual structure and semantic format required for inclusion in the analysis.
These discarded responses were not random anomalies. Instead, they may reflect model confusion about task framing, genre expectations, or ethical constraints triggered by the inclusion of sensitive socio-demographic factors. The presence of such outputs, although infrequent, highlights challenges in using large language models for legal applications. In high-stakes domains like sentencing, even occasional format failures or refusals may undermine confidence in model robustness and reliability. This underlines the importance of evaluating not only model outputs that conform to expectations but also failure cases, refusals, and edge-case behaviors that may reveal hidden limitations in LLM deployment.

3.2. Gender

The indictment act was prepared with variable gender (male or female) and number of children (from 0 to 5) the given person has for 50 different persons (changing name and family name). The family status is also examined splitting the results for males and females. The overview of sentencing variability between genders will be crucial in the next evaluations.
The LLaMA average sentence is equal to 5.6 months, suspended one 18.67 months, for 285 males the average sentence is higher, at 5.67, but the suspended sentence of 18.09 months is lower. For women it is 5.53 and 19.26, respectively. The Mann–Whitney U test provides the proof that these differences are not statistically significant, with a p-value for sentence 0.270 and 0.150 for suspended sentence. It is proof that the distribution functions of these two groups are similar. There is no difference in the distribution of sentence lengths (or suspended sentence lengths) between males and females. The amount of sentences without penalty has been also analyzed; it is equal to 9 in case of females and 6 for males. As the number of such cases is small, the Fisher’s exact test was used to determine the statistically significant results if the females have more sentences without penalty than males. The p-value of the test is 0.4448, so there is no significant difference.
The Mixtral average sentence is equal to 7.14 months, suspended sentence 5.71 months, for 283 males the average sentence is higher, at 7.51, and the suspended sentence is 5.8 months. For 277 woman it is 6.78 and 5.62, respectively. The U test produced a p-value of the sentence length male vs. female equal to 0.307, and for suspended sentence 0.5, giving the result that there are no statistically significant differences between sentencing and suspended sentencing in these two groups using Mixtral. The amount of sentences without penalty has also been analyzed; it is equal to 20 in the case of females and 15 for males. As the number of such cases is small, the Fisher’s exact test was used to determine the statistically significant results if the females have more sentences without penalty than males. The p-value of the test is 0.48, so there is no significant difference.
Sentences are significantly different between LLaMA and Mixtral; the U test with p-value on sentence length of 0.001 and suspended sentence 0.0 proves that these models provides completely different sentencing schemes.

3.3. Family Status

The impact of family status, specifically the number of children (ranging from 0 to 5), on sentencing decisions generated by the LLM was analyzed across the entire dataset of 565 valid sentencing responses returned by LLaMA. Each person was uniquely identified and varied by both name and surname, with child count strictly controlled per scenario. The Kruskal–Wallis H test was employed to assess whether the number of children significantly affects the sentence or suspended sentence lengths. The sentence length shows a statistically significant variation across different numbers of children with H = 16.01 and a p-value of 0.007. This result indicates that the number of children the defendant might have slightly influences the severity of the sentence given by the LLM, although the overall magnitude of this effect appears modest. The mean sentence ranges from 5.28 months (no children) to 5.90 months (five children), with a consistent median of 6.00 months across all groups. Despite the statistically significant outcome, the practical differences remain narrow, and the sentence distributions overlap substantially. In contrast, for suspended sentences, the Kruskal–Wallis test returned H = 7.511 with a p-value of 0.185, showing no statistically significant difference across child counts. The suspended sentence length fluctuates modestly between means of 17.06 months (no children) and 19.96 months (five children), again with a shared median of 24.00 months for all groups, suggesting a strong tendency toward standard suspended durations. To examine whether the number of children affects the probability of receiving a sentence without penalty (i.e., a non-punitive resolution), a contingency table and pairwise Fisher’s exact tests were performed. No statistically significant differences were observed in the proportion of no-penalty cases across any child-count pairing. For example, comparing individuals with zero and one child yields an odds ratio of 1.38 and p = 0.7191. The lowest odds ratio, 0.23 (1 vs. 5 children), remains statistically insignificant with p = 0.2042, and all p-values across comparisons exceed the 0.05 threshold, showing no clear trend or effect of family size on penalty exemption likelihood. Finally, a Spearman correlation analysis was conducted between the number of children and sentence length, which showed a weak but statistically significant positive correlation ( r = 0.159 , p = 0.0002) that is also visualized using 95% confidence intervals per number of children in Figure 1. This suggests a slight tendency for LLaMA to assign longer sentences as the number of children increases. However, such a correlation, while statistically confirmed, remains low in strength, and should be interpreted as a weak association rather than a deterministic pattern. In summary, although statistical tests indicate some level of sentence length sensitivity to the number of children, especially in the main sentence (not suspended), the differences are minor in magnitude. No differences were found in suspended sentence length or in the probability of a sentence without penalty, making the overall effect of family size relatively modest in LLaMA-based sentencing decisions.
In the case of Mixtral, the analysis of sentencing outcomes relative to the number of children (ranging from 0 to 5) similarly covered a balanced distribution across six family status categories. Each generated sentencing act varied by name and surname to minimize any LLM memorization biases. The total number of valid cases per category ranges from 90 to 98, ensuring comparable statistical power across groups. The Kruskal–Wallis test was applied to assess whether there are statistically significant differences in either sentence or suspended sentence lengths across varying numbers of children. For the main sentence length, the test yielded H = 8.802 and a p-value of 0.117, which fails to reach statistical significance. Likewise, for the suspended sentence, the result was H = 10.840 with a p-value of 0.055, again above the conventional significance threshold of 0.05. These results, alse represented in Figure 2 suggest that Mixtral does not vary sentencing significantly based on the number of children, although the suspended sentence test approaches borderline significance. The sentence length means vary moderately across groups, from a minimum of 6.14 months (five children) to a peak of 7.90 months (no children). However, the median sentence remains consistently at 6.00 months, with high standard deviations across groups, indicating broad variability but no consistent pattern. Suspended sentences also show wide variation, with means ranging from 4.30 to 7.89 months and a median of 6.00 months in all categories. This median strongly suggests a prevailing pattern of assigning zero suspended sentence months across the board, despite fluctuations in the mean. To further assess whether having more children increases the likelihood of receiving a sentence without penalty, a contingency table and pairwise Fisher’s exact tests were performed. While some categories show numerically more no-penalty cases (e.g., 8 cases for both 2 and 5 children), none of the pairwise comparisons reached statistical significance. For instance, comparing 0 and 2 children yields an odds ratio of 1.75 with a p-value of 0.3969. All other p-values remain above the 0.05 threshold, confirming that there is no significant difference in no-penalty rates between family size groups. Finally, Spearman correlation analysis between sentence length and number of children shows a negligible and statistically insignificant negative correlation ( r = 0.019 , p = 0.6463). This further supports the conclusion that Mixtral does not incorporate the number of children into its sentencing logic in any systematic or consistent way. In summary, the Mixtral model displays no statistically significant sensitivity to the defendant’s number of children in either sentencing length or likelihood of receiving no penalty. Unlike LLaMA, where a weak correlation was observed, Mixtral’s outputs appear largely invariant to family status, suggesting that this variable plays no role in its learned sentencing structure that is also representative.
In direct comparison, LLaMA exhibits mild responsiveness to family size, whereas Mixtral remains unaffected. This divergence highlights subtle differences in how each model internalizes and applies contextual socio-demographic cues in sentencing scenarios.

3.4. Value of the Stolen Item

The analysis of LLaMA’s sentencing decisions based on the value of the stolen item revealed a statistically significant but weak positive correlation between the stolen amount and sentence length (Spearman’s r = 0.159 , p = 0.0002), suggesting a mild tendency to assign longer sentences as the theft value increases, as represented in Figure 3. The Kruskal–Wallis test confirmed this trend with p = 0.007, though all medians remained fixed at 6 months, and the differences in means were modest (rising from 5.28 to 5.90 months across the 1000–10,000 PLN range). For suspended sentences, no statistically significant variation was found (p = 0.185), with consistent medians of 24 months and high variability across groups. Furthermore, the probability of receiving no penalty was unaffected by the stolen value, as confirmed by pairwise Fisher’s exact tests, where all p-values exceeded 0.05. Overall, while LLaMA appears to slightly adjust sentence length with theft amount, the effect is moderate.
In contrast to LLaMA, Mixtral did not exhibit any meaningful correlation between the value of the stolen item and sentence length (Spearman’s r = 0.038 , p = 0.3659), and the Kruskal–Wallis test also failed to detect significant differences across price levels ( H = 5.05 , p = 0.409). Although the mean sentence lengths increased slightly with higher values, the medians remained constant, and the high standard deviations point to substantial inconsistency in responses, as represented in Figure 4. Suspended sentence lengths showed no clear pattern either and were mostly centered around a median of zero, with a similarly non-significant Kruskal–Wallis result (p = 0.854). Rates of no penalty were statistically indistinguishable between price groups, as confirmed by uniformly non-significant pairwise Fisher’s tests. Overall, Mixtral’s responses appeared more erratic, showing no adjustment of punishment based on the monetary value of the offense.

4. Discussion

The findings of this study highlight complex interactions between social variables and sentencing behavior as manifested in LLMs, revealing distinct patterns of bias sensitivity and normative alignment between LLaMA and Mixtral. While both models produced syntactically coherent judicial outputs, their internal decision making frameworks diverged, particularly in relation to socio-demographic cues such as gender, family status, and financial aspects of the offense.

4.1. Socio-Legal Implications of Gender-Neutrality

One of the most striking results is the absence of statistically significant differences in sentencing outcomes between male and female defendants across both LLaMA and Mixtral. This observation stands in contrast to several empirical studies of real-world judicial decisions, where gender often plays a role in sentencing leniency, particularly when family responsibilities are involved [26,27,28]. While this could be interpreted positively as a form of algorithmic neutrality, it also raises concerns about whether LLMs fail to account for socially relevant mitigating circumstances.
Such neutrality might reflect the lack of learned socio-legal context in model training rather than a principled commitment to justice. Legal philosophy distinguishes between formal equality (equal treatment) and substantive equality (equal opportunity and fairness), and our findings suggest LLMs lean toward the former. This raises questions about fairness in algorithmic justice; is treating everyone the same always just, especially in systems where certain groups face structural disadvantages?

4.2. Family Status and the Ethical Role of Mitigation

While statistically significant, the correlation between the number of children and sentencing (Spearman r = 0.159 ) in LLaMA is weak in absolute terms. In practical terms, the average sentence increases from 5.28 to 5.90 months across a family size range of 0–5 children, representing a shift of less than one month, with all medians remaining constant. Such differences may not substantially affect real-world sentencing outcomes if applied in judicial practice. However, even minor but consistent shifts can accumulate across populations and reveal underlying patterns in the model’s learned behavior, meriting attention from legal and ethical perspectives.
LLaMA’s weak but statistically significant increase in sentence length with the number of children raises normative questions. In traditional judicial systems, parenthood is often seen as a mitigating factor, linked to potential social harm caused by imprisonment of caregivers [29,30]. Yet in our results, LLaMA appears to assign slightly higher sentences as the number of children increases. This could be due to learned biases from training data or the model’s misinterpretation of family status as increasing moral responsibility or the severity of betrayal to societal norms.
Meanwhile, Mixtral demonstrated no systematic variation in sentencing across family statuses. While this might suggest greater consistency, it also points to an insensitivity to nuanced contexts, potentially undermining principles of proportionality and individualization central to modern penal theory [31].

4.3. Model Divergence and Implications for Legal AI

The contrast between LLaMA and Mixtral is particularly informative. LLaMA’s outputs suggest a more responsive, albeit inconsistent treatment of contextual variables, whereas Mixtral operates with broader variability and apparent insensitivity to socio-legal cues. This divergence raises critical questions about the sources of these models’ behaviors. Are the observed patterns reflections of biases in pretraining corpora, differences in fine-tuning data, or the underlying architecture itself? This matter is further discussed in the Future Work section.
The model-specific behaviors align with broader concerns in the field of AI ethics, especially regarding opacity and accountability [32]. Without transparency into why an LLM selects a specific sentence, it is impossible to ensure that its reasoning aligns with legal standards or democratic values. The opacity of AI systems can erode public trust, as people are unable to see how decisions are made, leading to skepticism and resistance to AI adoption [33,34].

4.4. Toward Normative-Aligned AI in Judicial Settings

This study adds to the growing body of evidence suggesting that general-purpose LLMs, when used uncritically, do not reliably replicate the normative underpinnings of human legal systems. They may encode patterns that appear statistically valid but remain ethically or legally unsound.
For AI to be responsibly integrated into judicial decision making, future models must incorporate legally binding texts (statutes, precedents, sentencing guidelines) and possibly engage with frameworks like legal realism or restorative justice. Involving legal scholars and ethicists in model development is imperative to ensure that outputs are not only data-driven but also normatively coherent.
The subtlety of these effects highlights an important challenge in assessing algorithmic fairness; models can exhibit statistically detectable but normatively ambiguous behaviors. From a policy perspective, the mere presence of small but consistent disparities, particularly in sentencing, warrants scrutiny, not because they necessarily result in individual injustices, but they may reflect unexamined assumptions within the model’s training data. Furthermore, even small differences, when scaled across thousands of cases, may lead to systemic disparities that accumulate over time, bringing concerns about bias at scale.

5. Conclusions

This study investigated how large language models, specifically LLaMA and Mixtral, respond to abstracted criminal case descriptions involving theft, focusing on whether these models exhibit bias or normatively grounded reasoning in their sentencing decisions. By systematically varying case details (e.g., defendant gender, number of children, theft amount), we conducted a quantitative comparison of sentencing patterns across 600 generated outputs. We found that LLaMA adjusts sentencing based on certain morally and legally relevant variables such as increasing penalties for higher theft amounts and showing slight modulation based on family status, while Mixtral demonstrated weaker and more erratic behavior. This divergence suggests that “AI judges” are not a uniform category, but model-specific systems whose outputs depend heavily on architecture, training data, and reasoning structure.
Importantly, both models avoided explicit gender bias, but sentence variability and internal inconsistencies raise concerns about fairness, especially in high-stakes settings. These findings suggest that LLMs may weakly approximate human judicial intuitions, but their outputs remain fragile and highly context-dependent. Theoretically, our findings engage with debates in legal philosophy (e.g., Dworkin vs. Posner) about principled decision making versus outcome prediction. Practically, this study provides a framework for evaluating LLMs as legal decision support tools in a systematic and interpretable way, with potential value to developers, legal theorists, ethicists, and policymakers.
Importantly, the relevance of the EU Artificial Intelligence Act cannot be overstated. Under this regulatory framework, AI systems intended to influence judicial decision making are classified as “high-risk” and must meet stringent requirements, including risk assessment, explainability, and safeguards against fundamental rights violations. Our results, highlighting inconsistency, occasional normative failure, and opacity in model reasoning underscore how current LLMs would struggle to meet these standards in real-world deployments. Therefore, our methodology contributes to an emerging toolkit for stress-testing such systems before their use in legally consequential settings.
Overall, we argue that assessing LLMs for legal applications requires more than benchmark accuracy or plausibility. It demands interdisciplinary scrutiny combining statistical rigor, legal understanding, regulatory awareness, and ethical analysis. Without such care, there is a real danger that algorithmic systems will replicate or even amplify the most ambiguous features of human judgment without transparency or accountability and in ways that may fall short of upcoming legal requirements.

5.1. Limitations

While the aim is to probe internal mechanisms of LLaMA and Mixtral, such as attention patterns or token-level attributions, this was not feasible due to restricted API access and model size. Full interpretability would require running the models locally, which exceeds our available resources, but is planned in future works.
This study uses carefully constructed case descriptions rather than real-world sentencing records. In the Polish legal system, there are no official templates for justifying sentencing decisions, and written justifications vary across individual judges and courts. While the text was consulted with a legal practitioner to ensure the plausibility of our case formulations, our reliance on artificial but controlled prompts limits ecological validity.
Another important limitation concerns the practical significance of the statistically significant effects reported in this study. Although some results such as the correlation between family size and sentence length are statistically robust, the absolute magnitude of variation in sentences is modest. This suggests that while the models display discernible patterns, they may not always translate into materially impactful differences in individual sentencing decisions.
Both LLaMA and Mixtral are pretrained on English-dominant corpora, which raises potential concerns about translation bias. Recent studies of multilingual LLMs, including LLaMA 2, have documented an “English pivot” effect, where intermediate representations transiently shift toward English, even when processing non-English input [35]. Furthermore, uneven multilingual training data distributions are known to reduce performance and increase bias in less-resourced languages, including Polish [36]. Although Mixtral has demonstrated strong results in several European languages, its specific behavior in Polish remains understudied [37].

5.2. Future Work

A possible future work may expand this analysis to additional LLMs and legal jurisdictions, incorporating structured legal texts (e.g., national penal codes) and investigating explainability methods that might clarify the internal logic of model-generated sentences. Studying how LLMs behave in diverse civil law systems such as German, French, or Japanese criminal law will be essential to assess the cross-jurisdictional consistency of normative reasoning and bias. We view this as an opportunity for collaborative, interdisciplinary research with legal scholars from multiple countries. The goal is to contribute to a multidisciplinary understanding of how LLMs may and may not serve as reliable participants in legal reasoning.
Future research may also explore the integration of anonymized, real-world sentencing texts, where available and ethically permissible, to assess whether similar biases emerge in less controlled, more diverse textual contexts. Additionally, comparing how LLMs respond to both synthetic and authentic court materials could offer further insights into their normative alignment and generalization ability in legal contexts.
Another possible extension can incorporate practical threshold analyses, such as examining whether changes in model output would alter the legal category or severity of punishment under Polish law. Additionally, integrating feedback from legal practitioners or sentencing experts could help contextualize whether these output shifts would be meaningful in real-world judicial contexts.
Regarding the potential bias in language translations, future studies should possibly:
  • Compare sentencing prompts in both Polish and English to assess pivot-language effects.
  • Fine-tune models on Polish legal text to mitigate language bias.
  • Analyze internal representations to detect and correct multilingual distortions.
Another important avenue for future investigation is expanding the scope beyond theft offenses and a limited set of variables. While this study prioritized interpretability and depth by focusing on controlled manipulations (gender, number of children, and theft value), further research could explore whether similar normative biases arise in more complex or severe cases, such as violent crimes or fraud. Moreover, incorporating additional socio-demographic variables such as ethnicity, income level, or prior criminal history would allow for a broader and more nuanced mapping of LLM behavior. However, such extensions also require careful prompt engineering and ethical safeguards to avoid confounding effects and maintain clarity in analysis.

Author Contributions

Conceptualization, K.S.; methodology, K.S.; software, K.S.; validation, K.S., R.K. and A.K.; formal analysis, K.S.; investigation, K.S.; resources, K.S.; data curation, K.S.; writing—original draft preparation, K.S.; writing—review and editing, K.S., R.K. and A.K.; visualization, R.K.; supervision, R.K. and A.K.; project administration, K.S.; funding acquisition. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The data and code supporting the findings of this study are available from the corresponding author upon reasonable request.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Abdel Samee, N.; Alabdulhafith, M.; Muhammad Ahmed Hassan Shah, S.; Rizwan, A. JusticeAI: A Large Language Models Inspired Collaborative and Cross-Domain Multimodal System for Automatic Judicial Rulings in Smart Courts. IEEE Access 2024, 12, 173091–173107. [Google Scholar] [CrossRef]
  2. Andriati, S.L.; Rizki, I.K.; Malian, A.N.B.M. Justice on Trial: How Artificial Intelligence is Reshaping Judicial Decision-Making. J. Indones. Leg. Stud. 2024, 9, 909–942. [Google Scholar] [CrossRef]
  3. Raghav, A.; Janjua, L.R.; Lal, S.; Arora, M.K.; Hammouch, H. Artificial Intelligence for Strengthening the Rule of Law and Justice Delivery System. In Artificial Intelligence in Peace, Justice, and Strong Institutions; IGI Global: Abingdon, UK, 2025; pp. 47–66. [Google Scholar] [CrossRef]
  4. Zambrano, G. Case Law as Data: Prompt Engineering Strategies for Case Outcome Extraction with Large Language Models in a Zero-Shot Setting. Law Technol. Humans 2024, 6, 80–101. [Google Scholar] [CrossRef]
  5. Nigam, S.; Sharma, A.; Khanna, D.; Shallum, N.; Ghosh, K.; Bhattacharya, A. Legal Judgment Reimagined: PredEx and the Rise of Intelligent AI Interpretation in Indian Courts. In Findings of the Association for Computational Linguistics ACL 2024; Association for Computational Linguistics: Bangkok, Thailand, 2024; pp. 4296–4315. [Google Scholar] [CrossRef]
  6. Regulation (EU) 2024/1689 of the European Parliament and of the Council of 13 June 2024 laying down harmonised rules on artificial intelligence and amending Regulations (EC) No 300/2008, (EU) No 167/2013, (EU) No 168/2013, (EU) 2018/858, (EU) 2018/1139 and (EU) 2019/2144 and Directives 2014/90/EU, (EU) 2016/797 and (EU) 2020/1828 (Artificial Intelligence Act). Off. J. Eur. Union 2024, 202, 1–160. Available online: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32024R1689 (accessed on 1 August 2025).
  7. Carnat, I. Addressing the risks of generative AI for the judiciary: The accountability framework(s) under the EU AI Act. Comput. Law Secur. Rev. 2024, 55, 106067. [Google Scholar] [CrossRef]
  8. Niriella, M.A.D.S.J.S. Artificial Intelligence and Sentencing Practices: Challenges and Opportunities for Fairness and Justice in the Criminal Justice System in Sri Lanka. Int. Ann. Criminol. 2025, 1–51. [Google Scholar] [CrossRef]
  9. Aguilar Cabrera, D. La inteligencia artificial en la justicia: Protocolos para la presentación y la valoración de prueba digital obtenida mediante IA. Revista Oficial del Poder Judicial Órgano de Investigación de la Corte Suprema de Justicia de la República del Perú 2024, 16, 475–497. [Google Scholar] [CrossRef]
  10. Thomas, A. Exploring the Power of AI-Driven Decision Making in the Judicial Domain: Case Studies, Benefits, Challenges, and Solutions. In Using Traditional Design Methods to Enhance AI-Driven Decision Making; IGI Global: Abingdon, UK, 2024; pp. 337–351. [Google Scholar] [CrossRef]
  11. Simmons, G. Moral Mimicry: Large Language Models Produce Moral Rationalizations Tailored to Political Identity. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 4: Student Research Workshop); Association for Computational Linguistics: Bangkok, Thailand, 2023. [Google Scholar] [CrossRef]
  12. Gallegos, I.O.; Rossi, R.A.; Barrow, J.; Tanjim, M.M.; Kim, S.; Dernoncourt, F.; Yu, T.; Zhang, R.; Ahmed, N.K. Bias and Fairness in Large Language Models: A Survey. Comput. Linguist. 2024, 50, 1097–1179. [Google Scholar] [CrossRef]
  13. Torres, N.; Ulloa, C.; Araya, I.; Ayala, M.; Jara, S. Injecting Bias through Prompts: Analyzing the Influence of Language on LLMs. In Proceedings of the 2024 43rd International Conference of the Chilean Computer Science Society (SCCC), Temuco, Chile, 28–30 October 2024; pp. 1–8. [Google Scholar] [CrossRef]
  14. Liu, J.Z.; Li, X. How do judges use large language models? Evidence from Shenzhen. J. Leg. Anal. 2024, 16, 235–262. [Google Scholar] [CrossRef]
  15. Singh, D.; Kumar, K.I.P.; Nijhawan, G.; Veena, C.; Rajalakshmi, B.; Geetha, B.T. Ensuring Transparency and Fairness in AI DecisionMaking Processes Influenced by large language Models. In Proceedings of the 2024 IEEE 13th International Conference on Communication Systems and Network Technologies (CSNT), Jabalpur, India, 6–7 April 2024; pp. 987–994. [Google Scholar] [CrossRef]
  16. Kamruzzaman, M.; Shovon, M.M.I.; Kim, G.L. Investigating Subtler Biases in LLMs: Ageism, Beauty, Institutional, and Nationality Bias in Generative Models. arXiv 2023, arXiv:2309.08902v2. [Google Scholar] [CrossRef]
  17. Zatz, M.S. The Changing Forms of Racial/Ethnic Biases in Sentencing. J. Res. Crime Delinq. 1987, 24, 69–92. [Google Scholar] [CrossRef]
  18. Ye, J.; Wang, Y.; Huang, Y.; Chen, D.; Zhang, Q.; Moniz, N.; Gao, T.; Geyer, W.; Huang, C.; Chen, P.Y.; et al. Justice or Prejudice? Quantifying Biases in LLM-as-a-Judge. arXiv 2024, arXiv:2410.02736. [Google Scholar] [CrossRef]
  19. Bai, X.; Wang, A.; Sucholutsky, I.; Griffiths, T.L. Measuring Implicit Bias in Explicitly Unbiased Large Language Models. arXiv 2024, arXiv:2402.04105. [Google Scholar] [CrossRef]
  20. Dworkin, R. Taking Rights Seriously; Harvard University Press: Cambridge, MA, USA, 1977. [Google Scholar]
  21. Posner, R.A. How Judges Think; Harvard University Press: Cambridge, MA, USA, 2008. [Google Scholar]
  22. Park, Y. Optimal two-stage group sequential designs based on Mann-Whitney-Wilcoxon test. PLoS ONE 2025, 20, e0318211. [Google Scholar] [CrossRef]
  23. Ostertagová, E.; Ostertag, O.; Kováč, J. Methodology and Application of the Kruskal-Wallis Test. Appl. Mech. Mater. 2014, 611, 115–120. [Google Scholar] [CrossRef]
  24. Fisher, R.A. Statistical Methods for Research Workers. In Breakthroughs in Statistics; Springer: New York, NY, USA, 1992; pp. 66–70. [Google Scholar] [CrossRef]
  25. Spearman, C. The Proof and Measurement of Association between Two Things. Am. J. Psychol. 1904, 15, 72. [Google Scholar] [CrossRef]
  26. Holland, M.M.; Prohaska, A. Gender Effects Across Place: A Multilevel Investigation of Gender, Race/Ethnicity, and Region in Sentencing. Race Justice 2018, 11, 91–112. [Google Scholar] [CrossRef]
  27. Holmes, B.; D’Amato, C.; Holmes, S.T. The Offense-Specific Nature of Gender and Familial Responsibility in United States Federal Sentencing, 2010–2016. Crim. Justice Policy Rev. 2021, 33, 399–428. [Google Scholar] [CrossRef]
  28. Van Slyke, S.R.; Bales, W.D. Gender dynamics in the sentencing of white-collar offenders. Crim. Justice Stud. 2012, 26, 168–196. [Google Scholar] [CrossRef]
  29. Minson, S. Explanation 3: Sentencers Are Not Permitted, or Are Unable, to Consider the Welfare of Children of Defendant Mothers. In Maternal Sentencing and the Rights of the Child; Springer International Publishing: Berlin/Heidelberg, Germany, 2019; pp. 135–161. [Google Scholar] [CrossRef]
  30. Minson, S. The Importance of Motherhood in Sentencing Decisions. In Mothering from the Inside; Emerald Publishing Limited: Amsterdam, The Netherlands, 2020; pp. 13–30. [Google Scholar] [CrossRef]
  31. Malila, I.S. Modulating and Limiting Punishment through the Application of the Proportionality Principle: A Perspective from Botswana. Nord. J. Hum. Rights 2019, 37, 123–142. [Google Scholar] [CrossRef]
  32. Chen, C.; Chekam, G.A. Algorithms and Media Ethics in the AI Age. In Handbook of Global Media Ethics; Springer International Publishing: Berlin/Heidelberg, Germany, 2021; pp. 301–328. [Google Scholar] [CrossRef]
  33. Dirgová Luptáková, I.; Pospíchal, J.; Huraj, L. Beyond Code and Algorithms: Navigating Ethical Complexities in Artificial Intelligence. In Software Engineering Methods in Systems and Network Systems; Springer Nature: Cham, Switzerland, 2024; pp. 316–332. [Google Scholar] [CrossRef]
  34. Cheong, B.C. Transparency and accountability in AI systems: Safeguarding wellbeing in the age of algorithmic decision-making. Front. Hum. Dyn. 2024, 6, 1421273. [Google Scholar] [CrossRef]
  35. Wendler, C.; Veselovsky, V.; Monea, G.; West, R. Do Llamas Work in English? On the Latent Language of Multilingual Transformers. arXiv 2024, arXiv:2402.10588. [Google Scholar] [CrossRef]
  36. Li, Z.; Shi, Y.; Liu, Z.; Yang, F.; Payani, A.; Liu, N.; Du, M. Language Ranker: A Metric for Quantifying LLM Performance Across High and Low-Resource Languages. arXiv 2024, arXiv:2404.11553. [Google Scholar] [CrossRef]
  37. Jiang, A.Q.; Sablayrolles, A.; Roux, A.; Mensch, A.; Savary, B.; Bamford, C.; Chaplot, D.S.; Casas, D.d.l.; Hanna, E.B.; Bressand, F.; et al. Mixtral of Experts. arXiv 2024, arXiv:2401.04088. [Google Scholar] [CrossRef]
Figure 1. Mean sentence lengths with 95% confidence intervals (CIs) across different numbers of children. The plot visualizes the average sentence imposed by the LLM and its associated uncertainty using error bars.
Figure 1. Mean sentence lengths with 95% confidence intervals (CIs) across different numbers of children. The plot visualizes the average sentence imposed by the LLM and its associated uncertainty using error bars.
Applsci 15 08860 g001
Figure 2. Box showing the distribution of sentence lengths and suspended sentence lengths issued by the Mixtral across different numbers of children (from 0 to 5). Each box displays the interquartile range (IQR), with the central line representing the median. Individual data points are overlaid to indicate variability within each group.
Figure 2. Box showing the distribution of sentence lengths and suspended sentence lengths issued by the Mixtral across different numbers of children (from 0 to 5). Each box displays the interquartile range (IQR), with the central line representing the median. Individual data points are overlaid to indicate variability within each group.
Applsci 15 08860 g002
Figure 3. Violin plot showing the distribution of sentence lengths (in months) generated by LLaMA in relation to the value of the stolen item (in PLN).
Figure 3. Violin plot showing the distribution of sentence lengths (in months) generated by LLaMA in relation to the value of the stolen item (in PLN).
Applsci 15 08860 g003
Figure 4. Mean sentence lengths with 95% confidence intervals (CIs) across different value of the stolen item. The plot visualizes the average sentence imposed by the LLM and its associated uncertainty using error bars.
Figure 4. Mean sentence lengths with 95% confidence intervals (CIs) across different value of the stolen item. The plot visualizes the average sentence imposed by the LLM and its associated uncertainty using error bars.
Applsci 15 08860 g004
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Struniawski, K.; Kozera, R.; Konopka, A. Analyzing LLM Sentencing Variability in Theft Indictments Across Gender, Family Status and the Value of the Stolen Item. Appl. Sci. 2025, 15, 8860. https://doi.org/10.3390/app15168860

AMA Style

Struniawski K, Kozera R, Konopka A. Analyzing LLM Sentencing Variability in Theft Indictments Across Gender, Family Status and the Value of the Stolen Item. Applied Sciences. 2025; 15(16):8860. https://doi.org/10.3390/app15168860

Chicago/Turabian Style

Struniawski, Karol, Ryszard Kozera, and Aleksandra Konopka. 2025. "Analyzing LLM Sentencing Variability in Theft Indictments Across Gender, Family Status and the Value of the Stolen Item" Applied Sciences 15, no. 16: 8860. https://doi.org/10.3390/app15168860

APA Style

Struniawski, K., Kozera, R., & Konopka, A. (2025). Analyzing LLM Sentencing Variability in Theft Indictments Across Gender, Family Status and the Value of the Stolen Item. Applied Sciences, 15(16), 8860. https://doi.org/10.3390/app15168860

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop