From Lab to Life · Essay

Why I Ditched RAG Pipelines for 1M Token Context Windows

Moj AI Journey: Three Architectures, One Solution: Building AI for Legal Documents

Published
21 January 2026
Author
Tali Režun
Topics
Legal AI

An 18-month build of a legal-document AI for Slovenian building legislation (Moj AI). Traditional RAG with Docling and LangChain capped out at 80% accuracy and 20% hallucination. The breakthrough was a Gemini 2.5 Flash 1M-token context window plus a metadata-based "Librarian" that injects whole documents, with a Lightning Mode (5–30 s) and a Frontier Mode (analysis plus web search). App: mojai.xyz.