AI Assistant for Due Diligence

Last Updated: May 2023

Introduction

Welcome to the AI assistant for due diligence demo. In 1-2 years (if not much earlier), I expect everyone will run personalized AI assistants either directly, or indirectly via other applications and tools, in their browser and smartphone. Imho, this will lead to profound change in work behaviours: you won't need to use search, nor access data from sites or vendors directly; whilst on your desktop, Microsoft's Prometheus model, which was built with the help of OpenAI, has already transformed web searches and is currently being applied to Powerpoint, Excel, and Word. You won't need to create slides or write reports, AI assistants will do this for you. There is always risk associated with new technology adoption and AI is no different. But it is necessary to embrace AI in order to understand the risks and how to mitigate them. Sitting back and waiting simply means missing the boat.

In this demo I use different AI methods, both open and closed. Closed AI involves using models like GPT4, OpenAI's current state-of-the-art Large Language Model (LLM), to obtain information in a carefully controlled manner. Fine-tuning an open-source LLM, such as Meta's LLaMA or Stanford's Alpaca, offers yet more security still and is a great way to tailor models to suit specific business requirements, such as due diligence. This demo therefore also involves a fine-tuned Falcon. I want to emphasize how fast AI is moving: none of these models existed 4 months ago and I built this demo in 2 weeks whilst on holiday.

User Guide

Building and training a GPT

This AI assistant is a composite of several AI applications and a variety of HTML and JavaScript-based React components. Each of the AI applications is architected as a microservice, functioning independently while also forming part of an extensible integrated ecosystem.

The front end uses React for routing, state management, AJAX requests, and UI. A Flask app serves as an API to the React frontend. Best practices are strictly followed for both client-side (React) and server-side (Flask) security.

I use various approaches to leveraging closed and pretrained LLMs, including in-context learning, finetuning, parameter-efficient finetuning, and quantization. I also use several ways to engineer prompts to get responses from models that best fit the specific requirement of due diligence. Few-shot approaches provide the model with a handful of examples to guide its output. An instruction element focuses on the task definition and influences the model's output through specificity, clarity, and context.

Continue reading ...

Image prompt: Fine-tuning a fluorescent model whilst bathed in neon. Model: SDXL

Demo

Below I show how the AI due diligence assistant is easily incorporated into day to day work. Here it is an embedded microservice in the webpage, but we can just as easily install the AI assistant as a Chrome extension or plugin. To use it, enter a company name, select 'Due Diligence' as your AI-assistant (this is the default for this demo and the button should be green), wait for up to 2 minutes while the model does its work, copy and paste the response into a report and/or send it to yourself via email.

AI assistant for due diligence