Ontario Severance
https://www.ontarioseverance.caFull-stack RAG platform for Ontario employment law, designed, built, and operated solo
Founder & Sole Engineer — David Dieppois
Ontario Severance is a production LLM application that answers employment law questions for Ontario workers from 6,400+ real court decisions and Ontario legislation. Designed, built, and operated solo: architecture, backend, frontend, data pipeline, cloud infrastructure, CI/CD, security, and LLM evaluation.
- Severance Calculator
- AI Chat
- Document Review
- Court Cases
- Find a Lawyer
- Topics & News
RAG over court decisions and legislation with BigQuery vector search and Gemini on Vertex AI, streamed over server-sent events with citations. Parallel retrieval, a history token budget, bounded retries, and automatic model fallback. Time to first word cut from 8–19 s to 1.5–2.9 s by tuning the model's thinking level.
Deterministic statutory calculations in Java (Ontario ESA and Canada Labour Code) combined with an LLM estimate grounded in comparable decisions, returned as structured JSON and checked by a second review pass. Results stream progressively: the statutory minimum appears at once, where the page used to show nothing for a median 29.5 s.
Uploads (PDF, Word, photos) are read into 29 structured fields with a JSON-schema model call. Every quoted passage is verified against the document's own text (PDF text layer or Cloud Vision OCR), and all arithmetic is done in code, never by the model. 259 of 262 facts read correctly on the evaluation set.
Screened over 105,000 Ontario court decisions from the CanLII API with a multi-stage filter and locally hosted Qwen models (14B and 35B) on llama.cpp, avoiding per-call API cost at that volume. Output: 6,400+ summarized, embedded, and keyword-tagged employment decisions. A prompt audit against a hand-labelled set raised the share of employment cases the LLM stage keeps from 64% to 87%.
Quality suites run fixed profiles against live models with rule-based evaluators and a blind model-judged comparison, used to choose models, prompts, and thinking levels. Grounding checks drop values the source does not support, alongside prompt-injection handling and an off-topic gate calibrated on 101 queries that answers without a model call.
About 6,700 statically prerendered pages (Angular SSG with hydration) on Firebase Hosting, with the API on Cloud Run. GitHub Actions deploys are keyless (Workload Identity Federation), with build and deploy isolated in separate jobs and actions pinned to commit SHAs. Firebase App Check, distributed rate limits, and a strict CSP.
Tech Stack: Java 25 • Spring Boot 4 • Spring AI • Angular 22 • TypeScript • Gemini on Vertex AI • BigQuery vector search • Firestore • Cloud Run • Firebase • GitHub Actions • CanLII API

