Inspiration

Early in January of 2025, one of Relay's hackers attended a talk by Justin Jones, a Tennessee state representative, activist, and the house's second youngest member. He spoke of the high volume of unstructured government data in the form of televised legislative meetings, and how citizens often missed out on important messaging and local insights due to the sheer volume of information to process, not covered by national media. Piecing this experience together with insights from a former Congressional intern, the team developed Relay as a tool to democratize information on local and state government proceedings and reduce political polarization by providing feeds personalized to what users state they care about geographically closest to them.

What it does

Relay, with a multimodal knowledge base consisting of over 2 million pages and 10,000+ hours of legislative videos at the state level (MVP adapted to Vermont), allows Vermont citizens to see how all legislative proceedings affect them, converse with Relay’s RAG chatbot to better understand state initiatives on specific topics that interest them, and receive automated email alerts based on new provisions that impact them specifically.

How we built it

We used Vercel in TypeScript for frontend and PostgresSQL database hosting, FastAPI in Python for connecting to AI agents designed with LangGraph tooling with a rag system developed using LangChain. We used git and GitHub for collaboration, managing multiple branches, forks, files, and separate repositories at the same time while staying on the same page. While AI tools were used to generate scraping algorithms and UI templates, we had to handle lots of debugging, feature design, and idea generation by ourselves—gaining a deeper understanding of our stack in the process.

Challenges we ran into

  • There was no readily available API for lots of government sources, so custom scraping tools had to be handwritten and tricks had to be found to respect the websites’ IP rate limits.
  • Dedalus Labs’ API for creating AI agents wasn’t robust enough to set custom output types and customize tool workflows, so we had to pivot to use a combination of LangGraph and Dedalus Labs to build all our agents.
  • Vercel’s hosting service supported only a limited number of collaborators, so local hosting had to be set up, and database operations could only be managed by one person, so we learned to effectively delegate and work around tasks.
  • The RAG system wasn’t sufficiently expedient for generating new articles instantly, so we had to implement a pre-loading caching system as an efficient work-around.
  • Challenges with data alignment and removing redundancy as many government documents overlap in content but differ in formatting.

Accomplishments that we're proud of

Created a responsive Vercel webpage with user authentication, database integration, and connected backend data pipelines using FastAPI. Developed a working RAG chatbot consisting of data from 10,000+ pages and 4,000+ video transcriptions to accurately answer user queries. The chatbot was embedded into the webpage and also provided Successfully built an end-to-end multimodal RAG system. Deployed a multi-agent swarm with Dedalus Lab AI agents to determine which users should be alerted based on new legislative proceedings. In response to rate limits, we utilized Python multithreading to enable better agent efficiency. Had a fully functioning pipeline to answer user queries, automatically generate feed content, scrape and encode data, and manage user experiences.

What we learned

  • We learned the importance of data preprocessing and vectorization and embedding quality in improving RAG performance.
  • We learned the importance of maintaining a clean Github repository. Conflicting commits initially caused problems, so we tried to focus on maintaining individual branches and proper code reviews.
  • More broadly, we learned how to delegate tasks between the frontend and backend much more intelligently. Connecting parts between the frontend and backend was difficult, but we persevered through bugs and got through it. -Hackathons are SUPER fun!!

What's next for Relay

We imagine Relay as providing scalable infrastructure for the future of democracy. We plan on expanding to all states beyond Vermont, adding customization relating to school board and municipal meetings to provide equal coverage for urban, rural, remote areas (both happen to be recorded but are even more inaccessible to citizens than state-level proceedings) and creating a version to help government clerks save hundreds of hours. We hope to become all Americans’ first stop for anything related to current events, and perhaps even provide room for anonymous polling on certain legislative topics.

Built With

Share this project:

Updates