Flagship legal AI case study

EmployODR: explainable AI for employment-law pathways.

A research prototype that combines conversational context gathering, curated legal data, retrieval-augmented generation and interactive visual explanations to recommend relevant online dispute-resolution tools.

Technical leadReactJSPythonOpenAI APIRAGVisual analytics
EmployODR system illustration showing conversation, legal mapping, scoring and dispute-resolution pathways

The challenge

People experiencing an employment problem often face fragmented information, unfamiliar terminology, strict time limits and a confusing range of possible services. A generic chatbot can produce fluent text, but legal information requires jurisdictional grounding, careful triage and transparent limits.

The project asked a practical research question: could a carefully constrained large-language-model system gather enough context to identify relevant employment-law issues and signpost a user toward appropriate online dispute-resolution options?

My role

I led much of the prototype’s technical delivery within a small interdisciplinary team. My work covered the web interface, OpenAI integration, retrieval and classification workflow, visual explanations, interaction design, workshop support, iteration and technical documentation.

Conversation design

Structured the system to ask targeted follow-up questions rather than answer legal questions directly.

Grounded retrieval

Combined curated legal context, ODR metadata and predefined employment-law categories with LLM generation.

Explainability

Designed dynamic node-link pathways, relevance-weighted relationships, contextual panels and comparative charts.

Evaluation

Supported two in-person workshops and refined the interface and RAG system from expert feedback.

System architecture

The ReactJS frontend communicates with the OpenAI API and a curated retrieval workflow. A custom Python process derived categories from thousands of employment-law frequently asked questions. These categories help identify the user’s issue, prompt for missing context and influence the ranking of eight dispute-resolution tools.

The LLM is deliberately constrained. During the triage phase, it asks questions to gather context. The system then produces a structured summary, identifies potentially relevant legal areas, suggests onward pathways and ranks tools using factors such as relevance, cost and accessibility.

Visual explanation layer

Text alone is not enough when users need to understand how a recommendation was reached. The explanatory layer maps the user’s issue to legal categories and possible tools. It uses progressive disclosure: visual detail is available when requested, allowing users to inspect reasoning without overwhelming the initial conversation.

  • Dynamic pathway maps show how issues are classified.
  • Weighted relationships expose recommendation relevance.
  • Radar charts compare cost, accessibility and relevance.
  • Context panels provide plain-language detail and source-oriented explanations.

Testing and iteration

Two in-person workshops examined legal accuracy and usability. Participants included solicitors acting for employees and employers, Citizens Advice advisers, law-centre and university-clinic advisers, and dispute-resolution practitioners.

Feedback led to refinements in plain English, empathetic interaction, timing and employment-status questions, jurisdictional accuracy, information layering and the distinction between legal information and regulated legal advice.

Expert testing found encouraging accuracy in assessing the legal issues present in scenarios supplied by employment-law specialists, despite the prototype being delivered under significant time and resource constraints.

Summary of the Law Society’s 21st Century Justice report discussion of the project

Responsible AI lessons

The project demonstrated that useful legal AI is not simply a matter of connecting a model to a chat window. Accuracy required curated data, constrained interaction, domain expertise, iterative testing and clear communication of limitations.

  • Generative AI can support gateway and triage work, but cannot replace holistic human advice.
  • Legal sources and categories require ongoing human curation.
  • Common-law reasoning and changing legislation remain difficult areas.
  • Explanations and pathways can improve user understanding and trust.
  • Human referral routes must remain available.

Impact

EmployODR produced peer-reviewed workshop and visualisation outputs, informed policy-facing work on digital justice, and was highlighted by the Law Society as evidence of AI’s potential to address unmet legal need at relatively low cost. The work now informs broader research on scalable visual legal guidance and explainable systems for regulated domains.