- 01The setup
- 02Index what people search for, not the whole document
- 03Keyword arm: RUM instead of GIN
- 04Vector arm: HNSW on halfvec
- 05Filtered vector search needs a literal
Hybrid search in Postgres without pg_search
Lovguiden searches 1.45 million chunks of Danish case law with keyword search, vector search and trigram matching in one SQL function on hosted Supabase. This is how it is built, and what we changed after a year in production.
- Automation
How Lovguiden's data sources repair themselves
Public websites change without warning. Lovguiden's data collection is built to notice when that happens, let an AI agent diagnose the fault, and test the fix against the live source before it is applied.
Related: Automation on Lovguiden - Legal AI
Why every AI reference is checked before it is shown
Lovguiden's users are lawyers, accountants and public servants, whose work has consequences when it is wrong. The AI assistant is built around one rule: if it can't be sourced, it isn't said.
Related: Lovguiden case study · Lovguiden AI - MCP
Danish law inside Claude and ChatGPT
Lovguiden's MCP server gives AI tools direct access to Danish legislation, case law and parliamentary data through 35 tools. A REST API serves companies that build their own products on the same data.
Related: Lovguiden case study · MCP & API - Open source
SupaChat gets its own website
SupaChat, the open-source AI chat starter built on the same foundations as Lovguiden, now has a home at supa-chat.dev, with a live demo and an overview of everything included.
Related: SupaChat case study
The same approach, for other businesses.
A short description of the task is enough to start the conversation.
- 01The taskThe recurring work that takes too long.
- 02How it is handled todayWho does it, and with which tools or sources.
- 03How oftenDaily, weekly, or every time a document arrives.
The email button opens a draft with these three prompts in place.