Inspiration
Humans are supposed to pursue Art and machines are supposed to do the repetitive jobs is what we believe in. Businesses , legal organizations have to deal with a huge number of contracts daily and It is pretty hard for a novice to understand the context of these complicated documents, at least we cant. If you are like us, Don't worry we got you!
What it does
It segregates the content into clauses and subclauses. It also extracts the key points from the document and when provided with a template, It checks for any deviations from the template.
How I built it
I have used gemini 1.5 model and streamlit for creating UI. I have utilised llama index for loading the embeddings for the model and the model itself. I created a temporary vector store the context of the contract and extracted the contract from pdf by using PyPDF.
Challenges I ran into
- Rerunning of extractions
- Once we go back to the first page, it was being rerun and the session state was losing the content from memory
- Generated keypoints and clauses should be replaced if contarct file is replaced
Accomplishments that I am proud of
- we were successful in overcoming the above challenges.
- we were able to deploy a fully functioning app
What I learned
- Store the values of the keypoints and clauses in session state and run only if they do not exist
- The functions to be run should be placed in other files and imported such that they will only run on calling and check if there already exists a contract context in session state
- If new file is uploaded pop out the previously generated insights from the session sate
Working on all these made me grow new perspective in handling the data flow and utilisation of session states in web apps.
What's next for AI-Contract-Assistant
- Validating the contract with the user's summary
- Storing multiple contracts in a database
- More effective RAG pipeline


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