Inspiration
When have you last signed a legal contract - and you didn't understand exactly what was inside? People don't like reading legal contracts as they are complex, time-consuming and very boring! What if you didn't need to read them, but still knew all about the important clauses inside?
What it does
Our AI-based contract checker uses ML technology to automatically identify rights and duties in the contract, highlight them and translate into every-day language.
How we built it
Microsoft kindly provided us with limited free credits for Azure cloud services to host our project. Our backend was created using Python’s Flask framework, which was automatically deployed to Azure using a hook. The ML models were also running on Azure’s resources. For the frontend we used HTML, CSS and Javascript. Regarding the ML models, to save time and compensate for the lack of training data, we started off by pretrained models (spacy, RoBERTa, and transformer j1-jumbo from AI21.com).
Challenges we ran into
From a technical point of view we faced a lack of information regarding how to set up some of the solutions that we were planning to use, like finding the right input to the RoBERTa model. Furthermore, the transformers we decided to use, have a limit of tokens, which added additional complexity to develop the final approach. From a data perspective, getting the necessary amount and the right type of legal contracts to train the ML model was not easy. Also, we scraped executive employment contracts used by rather big companies which was the reason why the model was trained with highly complex legal language instead of every-day contracts.
Accomplishments that we're proud of
We were able to quickly integrate the end-to-end prototype solution that is integrated on the azure. We enjoyed reading funny simplifications of some clauses generated by the jumbo transformer from AI21.com. In contrast to other existing ML models targeting the legal industry, we have chosen a new approach, the functional one, which is a lot harder as it goes beyond the meaning of a word. We chose it, because we love the challenge and believe that it can become a more universal solution than all the existent ones.
What we learned
Overall, we learned that iterative development is the best way to complete a project at a hackathon, and an MVP should be created first. Few times we wanted to explore the topic from different angles, but limited time helped us to understand that the simplest solutions should be prioritized. Personally, some of us developed new UI skills by deepening in the world of CSS and HTML, while others gained a better understanding of parsing algorithms and NLP models such as spacy or RoBERTa.
What's next for Contract Assistant
In terms of technical goals we would like to finalize the solution by retraining models on our labelled dataset and further extend the dataset by adding more categories, for example: whether the right is monetary or not. Furthermore, we consider building a library of contracts for users in order to allow them to compare different contracts. Related to this, contracts could be evaluated by another ML model to summarize overall scores on how safe or risky they are for employees.
Built With
- ai21.com
- azure
- bash
- css
- docker
- flask
- html
- javascript
- natural-language-processing
- python
- roberta
- spacy
- stanford-parser
- transformers


Log in or sign up for Devpost to join the conversation.