SmartContract: Intelligent Contract Document Analysis with LLM
Jun 12, 2023
Image by (pexels)
Contract is an intense document with up to 100 pages long and usually a difficult read. As these documents are created manually by a human, there can be inconsistency even within the same document. Each issuing company has a different format for a contract which makes it even more of a challenge to analyse.
Seeai worked on developing a technology that can process long policy and automatically analyse it.
Seeai developed an analysis pipelined that consists of three stages.
The OCR stage was powered by Microsoft's AI Document Intelligence. Azure AI Document Intelligence is a cloud-based Azure AI service that enables you to build intelligent document processing solutions. This allowed us to utilise a scalable OCR solution that can process large documents.
After the content has been extracted from the document, the text had to be re-structured into a standardised format to compare policies across companies. The standardisation component was built with Large Language Model provided by OpenAI. For each policy section it would ingest a raw text and output a JSON with they key information.
Once the contract document has been converted into a data rich JSON, it is analysed and compared with other policy in the same format.
All of these has been wrapped a REST API, hosted on Azure. The user interface was developed with Nuxt3 where a user can drag and drop their contract document which would be sent to the server and return the analysis result.
LLM: Azure OpenAI
OCR: Azure AI Document Intelligence