Kingston Pulse: Revolutionizing Civic Engagement through AI 🎥 Video Demo Watch the Kingston Pulse Demo on YouTube
The Inspiration The genesis of Kingston Pulse began during a particularly harsh winter walk through downtown Kingston. I noticed that while our city offers incredible services—from snow removal tracking to heritage site tours—the accessibility of this information was buried under layers of legacy web interfaces and fragmented PDFs. My inspiration was simple: What if the city had a brain that could not only answer questions but anticipate needs?
I wanted to bridge the gap between the Mayor's Office and the daily lives of students at Queen's and long-term residents alike. The goal was to build a tool that feels less like a search engine and more like a helpful local who knows every street corner and by-law.
How We Built It We engineered Kingston Pulse using a hybrid architecture that leverages the best of modern AI. At its core, we used the AWS Track infrastructure, deploying a scalable backend on AWS Lambda to handle erratic traffic spikes during city emergencies.
For the "memory" component, we integrated Backboard.io. This was crucial for creating a personalized experience. Instead of treating every interaction as a fresh start, Kingston Pulse remembers if a user previously asked about "bus routes near Princess St" and can provide contextual follow-ups if there are delays in that specific area.
The technical backbone relies on a sophisticated RAG (Retrieval-Augmented Generation) pipeline. We vectorized thousands of pages of Kingston city council minutes and infrastructure reports. To ensure accuracy, we implemented a semantic routing layer: ext{Sim}(Q, D) = rac{ec{V}_Q cdot ec{V}_D}{|ec{V}_Q| |ec{V}_D|} This cosine similarity calculation allows us to retrieve the most relevant "ground truth" before the LLM generates a response, drastically reducing hallucinations.
Challenges We Faced The road to a functional prototype was far from smooth. The biggest hurdle was Data Cleanliness. Many city documents were scanned PDFs from the early 90s. The OCR (Optical Character Recognition) quality was abysmal, leading to "noisy" vectors. We had to build a custom preprocessing script using Python's re module to clean the text, handling weird characters and broken sentences.
Another challenge was Mitigating Hallucination in legal contexts. We couldn't have the AI giving incorrect advice about parking fines or zoning laws. We solved this by implementing a "Strict Mode" that triggers a fallback to human-written summaries if the confidence score of the retrieved document is below a threshold T < 0.85 T<0.85.
What We Learned This project was a masterclass in Enterprise-Grade AI. I learned that building a chatbot is easy, but building a reliable civic tool is incredibly difficult. I gained deep experience in:
Vector Database Optimization: Learning how chunking strategies (e.g., recursive character splitting) affect retrieval quality. Prompt Engineering for Public Service: Crafting system instructions that balance being helpful with maintaining a professional, neutral "City Hall" tone. Cloud Orchestration: Using AWS CDK to manage infrastructure as code, ensuring our deployment was repeatable and secure. Most importantly, I learned the value of User-Centric Design. Technical complexity means nothing if a grandmother can't use the app to find out when her recycling is being picked up.
The Impact Kingston Pulse isn't just an app; it's a blueprint for the future of the Mayor's Innovation Track. By centralizing our city's intelligence, we can reduce the load on 311 call centers and empower citizens with real-time, actionable data. Our future roadmap includes integrating real-time IoT sensors from Kingston's traffic lights to provide live congestion alerts, calculated using: ext{Congestion Index} = sum_{i=1}^{n} rac{ ext{WaitTime}_i}{ ext{Baseline}_i}
We are excited to present this at City Hall and show how AI can make Kingston the smartest small city in the world.
Built With
- css
- flask
- geminiapi
- python
- react
- typescript
Log in or sign up for Devpost to join the conversation.