LEGAL-TECH · LLM PIPELINE
Vindex.PI
A multi-model LLM pipeline that verifies 1M+ intellectual-property records against scanned legal bulletins — built around trust, not just extraction.
Venezuelan IP law firms track trademark and patent cases against the official SAPI bulletin — a scanned PDF with irrevocable 15–30 day legal deadlines. Miss the window and the client loses their trademark rights permanently. The incumbent, a 2008 Windows desktop tool, had no integration, no alerts, no multi-user access. Tracking was manual, against hundreds of pages of PDF.
I built a multi-tenant SaaS that ingests the bulletin, extracts every entry, verifies the extraction with a layered LLM pipeline, certifies quality through automated gates, and links results to each firm’s portfolio with deadline alerts. The core engineering challenge was trust: legal data that is 90% correct is useless, because the 10% error is exactly where a client loses their rights. So the system is built around verification, not just extraction.
A multi-model pipeline, each model in a distinct role
- Groq + Llama 4 Scout (Vision) — OCR for scanned PDFs; fallback when text coverage drops below 20%.
- Gemini 2.5 Flash (1M context) — full-tome verification: confirms what was extracted, detects what was omitted, classifies tome content.
- Claude (multimodal) — recovery and final verification on image-only PDFs.
Model choice was empirical, not vendor preference: I benchmarked Claude multimodal at 92% match-rate vs 33% for Gemini Haiku on multi-column OCR, and the data justified the cost of using Claude on image-only bulletins. Documented, reproducible engineering judgment.
Agent orchestration for phantom recovery
When a bulletin has 10–60% of entries missing an owner, I send chunks of 140–200 “phantom” entries to 3 parallel Claude sub-agents, each reading the referenced PDF pages and returning structured JSON, converted to SQL and applied to production. Validated on one bulletin: 873K tokens, 17 minutes, 50/50 with no false positives.
I also documented an anti-pattern: sub-agents over a visual PDF produce hallucinated failures (3/3 false positives); the reliable method is pdftotext + sub-agent over plain text. Knowing when an LLM lies is the real skill.
Automated quality gates
A 15-gate Python certification system every bulletin must pass before it reaches a client. Gates cross-check totals against the source PDF, sample 300 random entries and verify name / owner / class on the referenced page (95% blocking threshold), and cross-check against the client’s own ground-truth spreadsheet. No component validates itself — the metric that approves an area lives outside that area.
Results
- 1,000,000+ entries processed and stored; 188 bulletins (2017–2026).
- Anomalous-name records −92.7% (90K → 6,583); invalid-class records −99.9% (1,538 → 2).
- Client portfolio coverage 98% verified against ground truth.
- Live in production, paying client. 771 commits · 71 API routes · 14 core services.
This is not an LLM wrapped around an API. It’s a production verification system: multiple models in distinct roles, parallel agent orchestration with cross-validated ownership, automated gates that test against client ground truth, and documented judgment about when models hallucinate. The difference between using AI and engineering with it.