2Xplain, a Legal AI Chatbot

2Xplain, a Legal AI Chatbot

2Xplain is an interesting partner of us. They came to us with hundreds of legal PDF documents, in addition to a proprietary and custom API. This was the foundation for all regulations and laws in Holland related to employment laws, and they wanted a Dutch AI chatbot answering questions for their users.

Their users are HR, accounting, and legal employees for Dutch companies, needing help and guidance in their jobs. 2Xplain's business model is providing cognitive assistance to these in return for a monthly subscription fee. It could be argued they're a SaaS company, delivering legal services, having built their product on top of AINIRO's AI chatbot - Which for us was a very interesting case study of our technology.

2Xplain created and implemented a Legal AI assistant based upon AINIRO's technology 😎

The Dutch AI chatbot

2Xplain had several unique problems. Most importantly, the chatbot had to answer questions exclusively in Dutch. This made it more difficult for us to QA test the chatbot ourselves, but 2Xplain had lots of internal expertise in their field, allowing them to QA test it extensively themselves.

2Xplain's Dutch AI Chatbot

I want to emphasise that we can deliver AI chatbots that works in 90+ languages. Our technology, and our process, works best with English due to this being our native language and the base language of OpenAI - But it also works perfectly well for other languages - In particular larger languages such as Spanish, French, German, and Dutch.

If you chose to create a non-English chatbot, it becomes more difficult for us to QA test it - But if you've got internal resources here to help out, we're perfectly fine delivering chatbots to you in any of the 90+ languages OpenAI supports.

AI Hallucinations

The second unique problem was the requirement to accuracy. When you're dealing with legal services you simply can't mess around - So the chatbot had to be 100% accurate, and if it doesn't know the answer, it should avoid providing an answer. With AI and LLMs it's impossible to guarantee 100% accuracy, but by using our own proprietary technology, we were able to reduce AI hallucinations down to a level where 2Xplain were satisfied.

The Dutch AI chatbot with citations

Citations

The third problem was citations. Their requirements for citations was also somewhat unique. Parts of their data was taken from a proprietary API that was the foundation for their knowledge bank, and parts of their data originated from PDF documents. The citations for data fetched from their API was easily fixed, by dynamically creating a link during import that would end up producing a hyperlink to a page in their CMS where the data was published. This allowed the AI chatbot to produce citations such as; "This information was taken from the following page" - For then to provide a hyperlink to whatever page the data was published at.

The citations towards their PDF files was a bit trickier. Their PDF files were often hundreds of pages, and contained a lot of information irrelevant to answering whatever question was being answered, so we couldn't simply provide a reference to the PDF file itself - We also needed to preserve the page number from where the information was taken from inside the PDF file.

Some of these PDF files contained information about dozens of laws and regulations, over hundreds of pages, and if asked a question about one of these laws, the chatbot needed to provide a reference to what page number in the PDF it found the answer to the user's question. We fixed this by implementing a feature in our PDF import function that allows users to preserve page numbers, and inject these into each individual training snippet created during import.

Citations to page numbers in PDF files

This process of providing extremely accurate and highly valuable citations, increased the security aspects of the AI chatbot a lot. The reasons are because employees could then verify the chatbot's answers themselves, by looking up specific laws and regulations, from the sources published by the Dutch government in their PDF files themselves.

When clicking a citation hyperlink leading to a PDF file, the file will automatically download, and the user can rapidly scroll to the relevant page number to read the information to verify the chatbot's answer.

This feature is a somewhat unique feature with our technology, and something we can deliver securely due to our base technology, providing each AI chatbot with a private and protected file system, based upon Magic Cloud.

When dealing with legal AI you simply can't mess around!

White labelling

The final touch was that 2Xplain didn't want to inform their users who had created and delivered the AI chatbot, they wanted their users to understand the chatbot was delivered by them, based upon their proprietary data. If you look carefully at the first screenshot above, it says; "Delivered by 2Xplain" and not AINIRO.

In addition, they wanted their own theme and feel. Both of these requests were easily handled by us, since the theming foundation of the AI chatbot allows our users to create their own theme entirely from scratch, based upon their own colouring scheme, using their own fonts, etc.

About 25% of our partners are very sensitive about things such as fonts, font-sizes, the size of the window, colouring schemes, icons, etc. For these it's easy to start out with one of our "base themes", and either have us adjust it according to their requirements, or have their own internal resources modify these. 2Xplain chose the latter, but we could also have helped them in this process if needed.

Wrapping up

Delivering a legal AI chatbot is no joke. The requirement to accuracy easily becomes 100x as high as when we're delivering sales assistants. This made the project very challenging for us, but also very rewarding. We spent an immense amount of energy on helping 2Xplain out with this, and we are very proud of the result. But this is our job, and arguably "the AINIRO difference" you might say.

We don't have "clients", we look at our clients as our partners, and we're there to help our partners, all the way until they're happy with the result

Some of the AI chatbots we've delivered required dozens and sometimes hundreds of hours of customisation. We pride ourselves in being able to deliver such chatbots, and we see ourselves more like a partner of our clients than a traditional customer/vendor relationship dictates.

2Xplain was easily one of our most challenging AI chatbots. It took a total of 6 months to deliver 2Xplain's AI chatbot, but we were always there, helping 2Xplain and guiding them in their process. And we are super jazzed about the final result. If you are interested in hearing how we can help you with your AI initiatives, we would love to hear from you.

Thomas Hansen

Thomas Hansen I am the CEO and Founder of AINIRO.IO, Ltd. I am a software developer with more than 25 years of experience. I write about Machine Learning, AI, and how to help organizations adopt said technologies. You can follow me on LinkedIn if you want to read more of what I write.

Published 2. Jul 2024