Skip to content
All case studies

Case study

Erstatnings-Assistance.dk: An autonomous legal-tech agent

Architecting and building a complete, end-to-end AI product featuring a RAG workflow, a stateful agent, and an "AI unit test" framework for reliability.

Client
Jutland-AI (own product)
Period
2025–2026
Role
Founder, architect & developer

1 min read

Autonomous agentRAGLegal-techAI unit testsPythonPostgreSQL RLSMulti-agent AILangGraph

Simplifying complex legal research

Legal professionals and non-specialists often spend hours sifting through vast document corpora to find precedents and build case strategies. My goal was to create an autonomous AI agent for the legal-tech product www.Erstatnings-Assistance.dk that could dramatically reduce this time while discovering additional relevant precedents.

A stateful, autonomous RAG agent

I architected and built a fully autonomous AI agent that analyzes a 40,000-document corpus using a Retrieval-Augmented Generation (RAG) workflow. This allows the agent to accurately reason upon information without costly fine-tuning. A key architectural feature is its ability to maintain a state of its search history to avoid redundant processing and logical loops.

The impact was immediate: a complex precedent search process that typically took legal professionals hours was reduced to mere minutes.

Ensuring reliability with "AI unit tests"

To ensure reliability for a non-deterministic system, I established a robust, containerized (Docker) MLOps workflow. This includes a full regression testing suite with "AI unit tests" that verify the agent's behavior against entire conversations. This directly addresses the critical business need for trustworthy and predictable AI, delivering a system where behavior is predictable and verifiable, a critical requirement for gaining customer trust and adoption.

Building for trust: Privacy-by-design

From its inception, the platform was architected for enterprise-grade security and data privacy. I implemented PostgreSQL's row-level security (RLS) to ensure robust GDPR compliance and the protection of highly sensitive user data. This ensured the product met stringent GDPR requirements from day one, demonstrating a commitment to responsible, secure AI systems, a critical differentiator in regulated industries.

Have a complex product that needs to reach the finish line?