We are pleased to announce the publication of our paper A generative AI-based legal advice tool for small businesses in distress, in collaboration with an interdisciplinary team based in the UK and Hungary.
This paper describes the development and evaluation of the Insolvency Bot, a legal chatbot designed to provide reliable advice on corporate insolvency in England and Wales for small business owners.
We used Retrieval Augmented Generation (RAG) to enhance large language models with a curated knowledge base of 6,000 legal texts, including statutes, HMRC forms, and case law.
Thomas Wood, the director of Fast Data Science, was responsible for building the system in Python and implementing the machine learning models and vector embeddings that allow the bot to retrieve relevant legal information. Fast Data Science hosts the live version of the tool on our website at https://fastdatascience.com/insolvency
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.
More information: https://pure.royalholloway.ac.uk/en/publications/a-generative-ai-based-legal-advice-tool-for-small-businesses-in-d/
Ready to take the next step in your NLP journey? Connect with top employers seeking talent in natural language processing. Discover your dream job!
Find Your Dream JobMany companies and organisations have large datasets that are stored in a very unstructured format. For example, you could work for a US based healthcare provider or insurer and have patient records stored in a free text format such as HL7 files or PDFs. A building regulator, land registry, or mortgage provider may have texts and accompanying diagrams from thousands of building inspections or land title deeds. A patent attorney’s office may have records of patent applications in PDF format.

On 20 May, I attended the Expert Witness Conference in Dublin, Ireland, organised by La Touche Training. It was an eye opening event with a mixture of lawyers and expert witnesses in different fields from Ireland and abroad. The event was chaired by Mr Justice Michael Peart, with a keynote address by the Honourable Mr Justice David Barniville, President of the High Court of Ireland.

Fast Data Science at Ireland’s Expert Witness Conference on 20 May 2026 in Dublin Links to guidance on legal AI issued by legal authorities and other organisations Official guidance UK: Artificial Intelligence (AI) Guidance for Judicial Office Holders, 31 October 2025. https://www.judiciary.uk/wp-content/uploads/2025/10/Artificial-Intelligence-AI-Guidance-for-Judicial-Office-Holders-2.pdf
What we can do for you