Inspiration

Our journey began with a mission - a mission to make legal information accessible, understandable, and empowering for everyone. At the core of our vision are the UN SDGs 4: Quality Education, and 16: Peace, Justice, and Strong Institutions.

In a world inundated with legal jargon and intricate documents, understanding the law should not be a privilege reserved for a select few. It should be a right, accessible to all. With this ethos in mind, we set out to create an innovative solution that not only fosters education but also contributes to building a just and peaceful society.

Our commitment to SDG 4 is reflected in our app's capability to provide quality legal education. By breaking down lengthy legal texts into easily digestible snippets, we enable users to comprehend complex information effortlessly. Whether you're a student studying law, a professional navigating contracts, or an individual seeking legal clarity, Legal Questioner ensures that everyone can access the knowledge they need. Furthermore, our dedication to SDG 16 is evident in our pursuit of creating strong and transparent legal institutions. We understand that access to clear and concise legal information is crucial for fostering justice and maintaining peace within any society. Through our AI-powered app, we aim to bridge the information gap, empowering individuals to make informed decisions and contribute to a fair and just legal system.

As a testament to our commitment and innovation, we proudly present Legal Questioner, developed in just 24 hours for the GDSC Solutions Challenge Hackathon at McMaster University. The rapid development showcases not only our team's dedication but also the transformative potential of technology in addressing societal challenges.

Join us on this journey towards a more informed, educated, and just world. With Legal Questioner, legal clarity is just a click away.

What it does

We make the process of searching and understanding legal documents simple. All you have to do is ask your question in the LQ search bar, and we'll run through a database of legal documents finding the ones most relevant to you, and, by leveraging the power of Google's Gemini AI, present a high level summary of their contents to find a solution to your problem.

To provide sources to our claims, and to encourage deeper understanding and further learning of the material, we'll give you the list of legal documents that we used to formulate our summary, that you can then peruse at your leisure.

How we built it

The backend server was built using Java Spring and Google's Java SDK. We a plain text version of a legal document that we can query using in-built PostgreSQL vector-based search tools. The server also provides a hook into Google Clouds Java API that we can use to query Gemini. By providing it with the question and the relevant documents that we found, the service formulates a Gemini query that asks Gemini to solve the question by summarizing the legalese documents.

The frontend site is built with React.js and Tailwind CSS. It provides a clean interface for the user to ask their question, and queries our backend to get the AI summary and relevant documents. We implemented the Axios library to facilitate the API requests between the backed and the generative Gemini AI on GCP.

Challenges we ran into

None of us were familiar with Google Cloud Platform or Gemini's API before working on this app. We ended spending a significant amount of time figuring out how to work with it, specifically on the complexities of authenticating our request to Gemini, and how we would parse the important sections of its response, since it returned a JSON string that had to be deserialized.

We also ran into issues with asynchronous API requests in Axios not populating our Gemini query, which we resolved through clever use of React's useState hooks to call the function only when we had guaranteed that we had all of our state objects populated.

Accomplishments that we're proud of

Our biggest has to be overcoming the complexities of Google Cloud, establishing a fully operational Gemini API. We methodically tackled each obstacle, ultimately achieving success in our pursuit. Furthermore, we learned a lot about React, diving into its intricacies and complexities. This endeavor was marked by meticulous study and diligent practice, resulting in a deepened understanding and heightened proficiency in the framework. In parallel, we learned a ton about Tailwind and Axios, technologies we knew nothing about, and learned how to wield them to design a fantastic looking UI!

What we learned

We learned a ton about navigating the GCP console and how to use the Google Cloud's SDK effectively. In React, we tackled asynchronous API requests, ensuring smooth a user experience and a fluid UI. Simultaneously, we set up a functional web server in Spring Boot. And we learned how to effectively manage learning and working with all this while still keeping on track and staying on time.

What's next for Legal Questioner

  • We want to deploy our project to Google Cloud, allowing anyone, anywhere to run it.
  • We want to apply natural language processing (NLP) AI models to the user's initial question, making the search even more accurate and allowing for a broader style of questioning.
  • We want to implement user authentication (maybe with Firebase?), so that we can provide a way to persistently save and retrieve your question history for future reference.
Share this project:

Updates