← All workCH.03 · 2025
LawEasy
Local-first legal RAG that runs fully offline in 16 GB and cites what it says.
A legal research assistant that never leaves the machine. LawEasy parses messy legal PDFs, retrieves the right passages with hybrid search and answers with a fine-tuned local model. Three separate layers guard against hallucinated law.
Approach
- OCR-aware PDF parsing, so scanned judgments and clean digital filings both make it into the index.
- Hybrid retrieval: BM25 keyword search fused with dense vectors in ChromaDB, re-ranked with MMR for diversity.
- Llama-3-8B fine-tuned with QLoRA and served locally through Ollama; the whole stack fits in 16 GB, fully offline.
- Layer 1, relevance gating: low-relevance retrievals are refused instead of being answered.
- Layer 2, grounded prompting: the model may only answer from retrieved context.
- Layer 3, post-hoc citation checks: every cited passage is verified against the source.
- Covered by 30+ automated tests.