~ portfolio

Satvik Sawhney

software engineer

loading000%
case studylive

Saboot.

Indian legal documents in plain language · a quote is "verified" only when code finds it in your file

“A legal explainer is only useful if you can trust the quotes. So Saboot can't call a quote verified unless it's actually in your document.”
01the problem

Language models paraphrase. In legal text a paraphrase that sounds like a quote is dangerous: the clause you think protects you may not say that at all.

02the approach

Make "verified" a type, not an adjective. A quote is a branded type that only verify() can produce, and verify() only succeeds when server code finds that exact text in the uploaded document. Everything else is labelled as an interpretation.

03decisions i made

The choices that mattered, with the reasoning at the time.

  1. One door to "verified"

    Because only verify() can mint the branded type, no code path — including a model output — can display an unchecked quote as verified.

    decision · 01
  2. Scans stay approximate

    OCR'd documents can't be matched exactly, so schema guards and Postgres triggers cap them at "approximate" instead of pretending.

    decision · 02
04what happened

Live at saboot.vercel.app with about 4,200 tests across 400 files and a five-tier fallback across Gemini and Gemma 4.

tests
~4,200
ways to mint "verified"
1
stack
Next.js 16TypeScriptPostgreSQLSupabaseGeminiGemma 4
Saboot — Satvik Sawhney