← All projects
Local LLMsNLPPythonReactLegal Tech

Ratio: making trial records easier to review

Local language models, text alignment, and a review workspace for reading trial-monitoring notes alongside court documents. Built to help lawyers move from an observation to the evidence behind it.

TrialWatch FairTrial AI Hackathon · Columbia Law School · Supported by Microsoft · October 2026

Our team received second place and the Best Innovation Prize.

The aim

Before evaluating a trial, a lawyer has to reconstruct its story from long notes, scattered dates, and documents written by different people. We wanted to make that first pass easier: bring the relevant passages together, surface gaps worth following up, and keep each observation close to its source.

Confidential records also shaped the design. Ratio runs on one laptop, with a local model and on-device OCR, so case documents can be read and reviewed without sending them to a cloud service.

The setup

The pipeline turns documents into a structured case record before running the checks. That record connects dates, arguments, and quoted passages to their originals; both interfaces read from the same Python engine. The stack follows the work the reviewer needs to do at each step.

Language model
Qwen via Ollama — extract events and arguments locally, as quotes from the record
Analysis
Python — align source passages, measure intervals, and compare court reasoning
Case storage
SQLite — retain documents, source spans, and the structured case record
Review interface
React workspace + Streamlit analysis views — read evidence alongside findings

A finding, with its source

The workspace keeps the case facts and the supporting passages together. In the short demo below, open an observation, read its highlighted source, and record a review decision.

Ratio's court case workspace showing the synthetic Daro Venn matter and source links for its charge and penalties.
The full workspace, shown with a fictional case. Each case fact opens the passage it came from.

Republic of Calderra v. Daro Venn

Synthetic case · Precomputed examples · No model runs in this demo

Rights coverage · Article 14(3)(b)

Hearing 1 · 2 June 2025

Ms. Brask told the court that she had received the 900-page case file only three days before this hearing and asked for an adjournment of two weeks to prepare the defence. The presiding judge refused the request and ordered the trial to continue.

The finding opens the exact passage supporting it. The reviewing lawyer decides what this evidence establishes.

Choose a finding to inspect its source.

A short walkthrough using exact excerpts from the project's fictional demo record. Review decisions stay in this page and reset on reload. The full application adds document uploads, local analysis, comparison views, and report export.

The hosted preview uses synthetic examples. Document uploads and live model analysis run in the local application.

The design choices

  1. 1

    Make the source part of the finding.

    Each observation carries the exact quote and its location in the document. The passage is checked again before display, so a reviewer can trace the claim back to the record.

  2. 2

    Give uncertainty a place in the workflow.

    If the notes never mention an interpreter, Ratio asks the monitor to clarify. An incomplete record should leave a question open.

  3. 3

    Keep extraction and evaluation separate.

    The model reads and quotes; code handles dates and comparisons; the lawyer decides what the evidence establishes. Review decisions and their sources carry through to the report draft.

We tested the pipeline against a synthetic case with known issues and deliberately misleading passages. Broader evaluation on published TrialWatch reports and legal review of the rubric remain next steps.

Built with Emeric Chang, Hardik Kafle, and Sahil Kharel.

← Back to all projects