Inspiration

Do you know your Senators? Representatives in the House? Chances are, you probably don't. In our current Political Dynamic, Congress has an abysmal approval rate of around 30%. This distrust often stems from a lack of transparency about what goes on every day in Congress. Americans want to have a window into our democracy. That's why, today, we are presenting Consensi: The website that will help you become a better citizen.

What it does

Consensi presents all current legislation in Congress and utilizes AI-powered tools so that complicated Congressional jargon can be simplified for everyone. We do this through Consensi's neat and intuitive For You Page, highlighting the user's most interested topics in rows and the associated bills with each of them. Users can then further click on each bill to get a simplified summary of it, chat with an LLM about further questions about it, show their support or lack of support for it, and also have the option to connect with their representative to voice their opinion. On the other side, representatives can use Consensi to view the demographic info of voters who support the bill, allowing them to stay informed of their constituents' desires.

How we built it

We used the Congressional API to query all the information about the bills of the current Congress and reformatted the text into a readable format. We then ran this information through the Hugging Face model: facebook/bart-large-mnli, which is a BART Model that is trained using zero-shot classification. This model gave us the advantage in that: You can introduce new labels at test time by just phrasing them as hypotheses - no retraining needed. All this information was saved to a central Supabase database that stores all user, bill, and demographic information. We used a Typescript backend to quickly query and send all the data to the user in the front end. The front end was built using React and TailwindCSS, providing a responsive and modern interface for users to explore legislative data interactively. Each bill entry dynamically displays key metadata such as sponsors, subjects, and recent actions, along with the model-generated topic classifications. We also integrated filtering and search functionalities, allowing users to browse bills by category (e.g., Healthcare, Economy, Civil Rights) or by individual members of Congress.

Challenges we ran into

A challenge we ran into was getting the full text of the bills. The Congressional API does not provide that information on its own, so we had to create the link to the bill from the information we had and get the text from that. We also had to clean and reformat the text so it didn’t have tags in it. Ensuring that our text would be queried fully clean took quite a bit of time, as we did not want any noise to throw off our classification. Another challenge we ran into was implementing the chatbot that allowed you to ask questions about the bill. It was quite a fun challenge to implement my own Chatbot interface and ensure the RAG capabilities worked for the appropriate Bill.

Accomplishments that we're proud of

We’re proud of how many robust features we were able to implement in such a short amount of time. We built our own classification system to efficiently categorize otherwise disorganized bills, making it easy to see what each bill affects, while not relying on any outside model or API. We are proud of our system of endorsements and opposition, as this makes communication and transparency go both ways. Not only can average citizens see what the government is planning, but those in power can see what their constituents support, allowing them to better respond to their needs. Finally, we are proud of our sleek and easy-to-use UI. It presents information in an appealing and informative way. It doesn’t oversimplify the bills, but rather allows people to truly understand them without having to struggle through dense legal language.

What we learned

From this project, we learned a ton about databases and how to organize them so that all the information we need is easily accessible. We had used other databases before, but not Supabase specifically, so we learned how to work within its ecosystem and read up on its documentation. We also used OpenRouter for the first time. It allowed us to really easily change what model we were using, which was great when we decided that Gemini would be a better model for our purposes than Claude. Learning effective version control also proved very challenging but rewarding. We all had experience with git before, but we had to deal with a lot of merge conflicts, especially when multiple members were working on the same files or pushing large feature updates simultaneously. Through this, we learned the importance of clear branching strategies, frequent commits, and detailed pull request reviews to maintain a clean and functional codebase.

What's next for Consensi

We hope that this is just the beginning for Consensi. We are going to try and connect this tool with academics at UMass who can help us shape this tool into something lasting. If we can continue this project in the future, one idea I would be interested in implementing is LLM-powered bill searching through the usage of MCP tools that utilize the embedding search.

Built With

Share this project:

Updates