Skip to content
Back to case studies
·10 weeks

Internal RAG knowledge base for a Hungarian law firm · on-prem, 200+ lawyers, 0 data incidents

An internal RAG for a Hungarian law firm · 40k legal documents indexed, 200+ lawyers using daily, strict per-user access controls, zero data incidents.

THE PROBLEM

[1/3]

  • 01Partner knowledge was trapped in people's heads · years-long tenure, slow transfer.
  • 02Legal privilege + client confidentiality couldn't tolerate a generic LLM.
  • 03Per-case access control · junior lawyers shouldn't see senior-only documents.
  • 04Magyar legal terminology (with archaic phrasing) isn't a default LLM strength.

THE SOLUTION

[2/3]

  • Claude Opus with strict refusal behaviour on out-of-scope queries.
  • Per-case RBAC enforced at retrieval layer · pgvector index segmented + RLS.
  • Custom Hungarian legal-terminology embedding fine-tune (LoRA on a 1B base).
  • On-prem deployment · no document leaves the firm's VPC.
  • Citation-mandatory output format · every answer links back to source documents.

Technologies

Claude OpuspgvectorNext.jsPostgres RLSVercel Edge

THE OUTCOME

[3/3]

  • 0140,000 documents indexed, 200+ lawyers using daily.
  • 02Average junior-lawyer research time on a case: -58%.
  • 03Zero data incidents in 8 months.
  • 04Partner time saved on knowledge transfer: ~15h/week across the firm.

Let's get started.

Send an email or book a 30-minute call.