A generative AI-based legal advice tool for small businesses in distress

Research output: Contribution to journalArticlepeer-review

Abstract

We developed and tested the performance of a retrieval augmented generation (RAG) system for answering legal queries related to corporate insolvency in England and Wales. The Insolvency Bot relies on open-source legal information and HMRC forms to provide sound responses to a user’s query focusing on insolvency matters regulated by English law. We evaluated our bot head-to-head on an unseen test set against the unmodified versions of large language models (LLMs) gpt-3.5-turbo, gpt-4, or gpt-4o with a mark scheme similar to those used in examinations in law schools. The Insolvency Bot outperformed each unmodified LLM (p = 0.05%). An additional user experience survey suggested the need for creating two versions of the bot, one for lay people who expect practical and actionable advice and another for professionals with the relevant legal authorities. Our legal chatbot demonstrates the benefits of combining a generative AI system with a trusted knowledge base and shows future promise to cover cross-jurisdictional and insolvency-related queries and could be further improved in its technical architecture.
Original languageEnglish
JournalJournal of International and Comparative Law
Publication statusSubmitted - 10 Mar 2025

Keywords

  • legal technology
  • Large language models (LLMs)
  • vector index
  • prompt engineering
  • Natural language processing
  • insolvency law
  • Chatbot
  • retrieval augmented generation (RAG)

Cite this