Skip to main content
Loading navigation

Legal Nuclear Verdict Predictor using LangChain and LlamaIndex

Escalating legal verdicts present severe loss forecasting challenges for casualty insurers evaluating pending litigation. Build a legal severity analysis agent using LangChain and LlamaIndex to query case law precedents and predict high-severity nuclear verdict probabilities. Achieve a Brier Score below 0.12 across complex liability claims.

Machine LearningHosted by Vera

What you are building

Build a legal case evaluation workflow combining LangChain computational graph chaining with LlamaIndex structural case retrieval.

How work is evaluated

Evaluation

Evaluates probability score calibration for high-severity legal nuclear verdicts.

Datasets

Public datasets, plus the private datasets you have access to.

How submissions are scored

Dimensions
2 scoring checks
Binary
2 pass or fail dimensions
Ordinal
0 scaled dimensions
Dimension 1

probability_bounds

Probability must be between 0.0 and 1.0.

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 2

brier_score

Brier Score measuring probability forecast calibration • target: 0.11 • range: 0-0.25

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Learning goals

  • Integrate LangChain stateful chains with LlamaIndex structured vector stores

  • Index legal dockets and historical litigation damages data

  • Predict nuclear verdict probability (> $10M settlement/verdict)

  • Minimize probability calibration error to achieve Brier score < 0.12

Resources

Dataset notes

Database of 1,500 historical commercial liability court dockets and jury verdict outcomes.

Challenge setup

Evaluates probability score calibration for high-severity legal nuclear verdicts.

Challenge input

JSON containing claim_summary, jurisdiction, plaintiff_demands_m, and injury_severity_code

LangChain

Provides chain structures and graph execution logic.

Llama Index

Efficient index structure and retrieval context engine for legal case documents.

Evaluated output

JSON with nuclear_verdict_prob (float 0-1), primary_risk_jurisdiction (string), and expected_severity_tier (string)

Evaluation checks
  • Probability must be between 0.0 and 1.0.
  • Brier Score measuring probability forecast calibration • target: 0.11 • range: 0-0.25
Configured evaluation evidence
  • Benchmark: LegalSeverityBench
  • Brier Score target: 0.11
  • 1 public reference case
Configured runtime
  • Python execution harness
  • Python sandbox (unavailable on Versalist)

Shows the first task, up to three tools, and up to three evidence items.

View technical recipe

Configured tools

Action Space
  • Langchain · Required
  • Llama Index · Optional
  • LastMile AI · Optional
Orchestration
  • Langchain · Required

Evaluation contract

  • probability_bounds · Weight 1
  • brier_score · Weight 1

Metrics

  • brier_score · Target 0.11

Benchmarks

  • LegalSeverityBench
  • general

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: JSON containing claim_summary, jurisdiction, plaintiff_demands_m, and injury_severity_code

    Output: JSON with nuclear_verdict_prob (float 0-1), primary_risk_jurisdiction (string), and expected_severity_tier (string)

    Execution harness: Python

Evaluation tools

  • LangChain · Agent Framework
  • Llama Index · Agent Systems

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about Legal Nuclear Verdict Predictor using LangChain and LlamaIndex