Plausible is not provable
AI for Legal Work
When it comes to legal work, AI is promising both - great time savings processing typically long and well-structured content, and great risk. The crux: many AI models produce fluent answers, but the less common the topic, the more they also hallucinate, inventing things that don't reflect reality - and present those hallucinations with confidence. Thus, in a legal context, an answer without a checkable source is not necessarily a time saver, it can be a serious liability.
Retrieval Driven Generation (RDG)
In standard retrieval augmented generation (RAG), retrieval augments the answer; and that's typically exactly the problem we face in areas where coverage is thin. This is why we have coined the term "Retrieval Driven Generation". In RDG, retrieval drives everything: rights are checked first, only permitted sources are searched, the hits are condensed into core legal statements, and only then the language model writes an answer. If no source is found, no claim is made, and it's openly stated.
“What AI can’t see can't make it hallucinate.”
RDG design principle
We have first implemented this concept in German-speaking legal tools, where legal language is full of complex compounds traditional language models don't like and understand less well. Other languages will be easier.
How our legal GenAI framework operates
Rights before retrieval
Access is checked before the search runs. What the model doesn't see is not searched, not seen and not included in the answer, ensuring confidentiality.
Search that speaks "law"
A strong hybrid retrieval engine built on semantic search combined with a full German language dictionary, including compounds and inflections.
Anchored in time
Answers can be tied to their sources and to a legal snapshot, allowing for comparisons of law changes over time, or reviewing old cases under the right temporal lens.
Local and safe
Retrieval-driven systems typically don't need large language models operating in the cloud. If everything is local, open-source and under your control, most risks go away.
The search space is defined before the first query runs: roles, files and source groups decide what can be found and what cannot. A document outside the user's permission levels never enters the model's context, which is why it cannot surface in any answer of unauthorized users. This is important for keeping specific client data within specific client teams.
Language models are built for English mainly, other languages are underrepresented. German for example is under 6% of what most models learn from, and many legal compounds models have barely seen. Our retrieval layer finds source content through a full German dictionary, enriched with legal synonyms. Typically, German inflections are handled using lemmas (dictionary stems) that cut off parts to normalize words. This fragile concept has only limited accuracy. Our search engine knows every inflected form of every German word and is able to match it in your documents.
Retrieved passages are condensed into core legal statements instead of raw text dumps, and every answer is anchored to its relevant period. If a law changes, the impact of that law change will be taken into account based on what is relevant for a question. And before an answer is shown, data is validated before it reaches you. When retrieval comes back empty, the system says so.
The whole stack is hosted where you decide. Nothing is sent to an external API, and no document or query leaves your infrastructure. The models are open-source and stable, chosen for predictable behaviour rather than for whatever shipped most recently, and the framework also runs Europe-built Mistral models where a European supply chain matters.
The hardware requirement is modest. A small GPU server is enough, and it can sit on your own premises or as dedicated hardware in a data centre. Either way the machine is yours alone, so there is no shared tenancy and no third party anywhere in the retrieval path.
Key Benefits
With no data transferred to the cloud, most of the complex data security problems for confidential client information disappears - it is reduced to what's required anyway to run the local IT infrastructure.
On top of that, cost is predictable, there are no sudden surprises if token budgets are exhausted or LLM suppliers raise their rates.
We have built AI that follows the RDG principle for the first time in AIlexy, a locally hosted legal retrieval solution for German law context.