Inspiration
The inspiration came from the fact that we have elections soon. Since any of the politicians running are current MPs, we considered it was a good idea to help people understand the impact of their decisions on their lives.
What it does
A user can visit our website and look for the MP of their interest. Once they find the profile of the MP, they will be able to see all the bills and how they votes for each bill.
Upon selecting a bill of their interest, users will see a short summary of what the bill contained and also have the option to interact with a chatbot grounded on the text of each bill to allow users to ask any questions they might have about it.
How we built it
We used Generative AI to help us process large amounts of data. Upon leveraging some basic information provided by the Parliament in the form of JSON and XML files, we scrapped information from LegisINFO and the website of Parliament to allow us to download the PDFs of each bill and gather information about how each MP voted on any given bill.
Once we had the PDF of the bill available, we leveraged Google Cloud Storage to host the files. With the files hosted in the cloud, we were to use Google Gemini's API to fetch the information in the bill, provide a summary of its content, and classify it into a set of given categories.
We also implemented Gemini to create the chatbot grounded on the PDF to allow users to discover more about the proposed laws.
Challenges we ran into
The hardest part of the project was creating the right logic to scrap the content in the website. Because of the way data is structured in the site, we needed to scrap multiple pages looking for specific redirects that would eventually take us to our final destination.
Since the formatting of the HTML contents would changed based on how long ago the bill was published and whether it was first proposed by the senate or the chamber of commons, structuring the right HTTPS requests and RegEx patterns took a lot of trial and error.
Accomplishments that we're proud of
1) We are proud of completing a project in our first hackathon 2) We are proud of setting up a well structured backend to handle a lot of complex data 3) We are proud of using Generative AI for a positive impact, strengthening democracy by making accountability easier 4) We are proud of creating a way for people to ask their questions about laws. Instead of reading hundreds of pages you can ask questions to a friendly chatbot.
What we learned
- A lot of RegEx
- How different prompts affect the outputs of the model
- The intricacies of developing a website
- How NoSQL databases work
- Management of cloud projects: setting IAM roles, billing accounts, etc.
What's next for TrustMP
We want to finalize building our database (We have a lot of bills to process!) and make sure our website is responsive and adding additional visualization features to the site. We would love to fully deploy the project in the near future.


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