- The paper introduces Soppia, a framework that uses structured prompting to quantitatively assess non-pecuniary damages in personal injury cases.
- The paper details a calibrated scoring system with dual logic and weighted criteria to reduce judicial inconsistency.
- The paper demonstrates how transparent, auditable AI-driven analysis supports fair, replicable legal decision-making.
Soppia: Structured Prompting for Proportional Assessment of Non-Pecuniary Damages
Introduction
The Soppia framework presents a systematic approach for the proportional assessment of non-pecuniary damages in personal injury cases, specifically targeting the persistent challenge of judicial inconsistency in quantifying subjective harms such as pain, suffering, and emotional distress. By operationalizing the multi-criteria analysis mandated by Brazilian labor law (CLT, Art. 223-G), Soppia leverages structured prompting and LLMs to produce transparent, auditable, and replicable legal reasoning. The framework is designed to reduce "noise" in judicial decision-making, enhance explainability, and facilitate the uniform application of legislative intent.
Theoretical Foundations
Soppia is grounded in three principal domains: decision theory, explainable AI (XAI), and prompt engineering. The framework directly addresses undesirable variability in judicial outcomes, as conceptualized by Kahneman et al. (2021), by decomposing complex legal assessments into discrete, explicitly weighted criteria. The emphasis on interpretable models, as advocated by Rudin (2019), ensures that the AI's output is not a black-box prediction but a stepwise, human-understandable justification. The structured prompt design translates statutory requirements into a formalized instruction set for LLMs, aligning computational reasoning with normative legal analysis.
Methodological Structure
Criteria Identification and Definition
Soppia's methodology begins with the explicit identification of legally relevant criteria. In the Brazilian context, twelve criteria from CLT Art. 223-G are used, encompassing factors such as the nature of the violated legal interest, intensity of suffering, possibility of recovery, social repercussions, duration of effects, circumstances of the offense, degree of fault, retraction, mitigation efforts, forgiveness, economic situation, and publicity.
Calibrated Scoring and Dual Logic
Each criterion is scored on a 1–5 scale, with a dual-logic system ensuring that aggravating and mitigating factors are correctly modeled. Direct logic applies to criteria where higher scores indicate greater severity; inverse logic is used for mitigating factors, where lower presence increases the score. This approach maintains monotonicity in the relationship between the score and the recommended compensation.
Weighting Mechanism
Criteria are assigned weights reflecting their relative legal importance, ranging from 0.5× to 2.5×. For example, the possibility of recovery (Criterion III) is weighted at 2.5× due to its decisive impact on the long-term consequences of injury, while publicity (Criterion XII) is weighted at 0.5×, reflecting its generally lower relevance. The final score is the sum of weighted criterion scores, providing a quantitative basis for classification.
Classification and Adjustment
The total weighted score is mapped to four severity categories: Mild, Medium, Severe, and Very Severe, each associated with a compensation range expressed as a multiple of the victim's salary. Fine-tuning within these ranges is performed based on the score's position, allowing for proportional recommendations.
Implementation and Replicability
The Soppia framework is implemented as a structured prompt for LLMs, with open-source resources available at https://github.com/jaa41/soppia-framework. The prompt guides the AI through:
- Case information intake
- Criterion-by-criterion analysis, scoring, and justification
- Weighted score calculation
- Severity classification
- Compensation range suggestion
- Generation of a comprehensive justification report
This process ensures transparency and reproducibility, with outputs suitable for judicial decisions, legal arguments, risk management, and academic analysis. The framework is jurisdiction-agnostic; criteria and weights can be adapted to local legal standards, enabling broad applicability across legal domains.
Practical and Theoretical Implications
Soppia directly addresses the judicial demand for explainable AI, providing a transparent and auditable methodology for high-stakes legal decisions. The framework institutionalizes decision hygiene, reducing noise and bias while preserving human oversight. Its modular design allows for adaptation to other areas of law, such as consumer or environmental protection, by substituting relevant criteria and recalibrating weights.
The framework's reliance on structured prompting and interpretable outputs aligns with contemporary requirements for fairness auditing and bias mitigation in legal AI systems. However, its effectiveness is contingent on the quality of input data and the appropriateness of the criteria and weights for the specific legal context. The system does not supplant judicial discretion but augments it, offering a robust starting point for adversarial debate and individualized analysis.
Future Directions
Potential future developments include integration with automated evidence extraction, dynamic calibration of weights based on empirical case law analysis, and expansion to multi-jurisdictional legal systems. Further research may focus on the empirical validation of the framework's impact on judicial consistency and fairness, as well as the development of domain-specific adaptations for other branches of law.
Conclusion
Soppia constitutes a methodological advance in the application of AI to legal reasoning, providing a structured, explainable, and replicable framework for the proportional assessment of non-pecuniary damages. By formalizing the multi-criteria analysis required by law and embedding it within a transparent prompting architecture, Soppia enhances consistency, predictability, and fairness in judicial decision-making. Its adaptability and open-source implementation position it as a foundational tool for the responsible integration of AI into the legal profession, ensuring that technological progress remains aligned with the principles of justice.