Beyond the Chatbot: AI-Powered Solutions for Cities
City AI Connection is a series of posts on emerging ideas in artificial intelligence, with a focus on government application. These articles are initially shared exclusively with the City AI Connect community and subsequently with a broader audience via the Bloomberg Center for Government Excellence at Johns Hopkins University website, govex.jhu.edu. City AI Connect is a global learning community and digital platform for cities to trial and advance the usage of generative artificial intelligence to improve public services. The community is open exclusively to local government employees. To join, visit cityaiconnect.jhu.edu.
By Laila Sorurbakhsh
Since the launch of OpenAI’s ChatGPT in November 2022, organizations across the globe have been investigating how to leverage AI’s power to simplify, streamline, and, to an extent, automate their work. Cities have done the same, though the public-facing aspect of city work necessitates some additional precautions when using AI to ensure the principles of safety, security, and privacy are upheld. As a result, cities have largely taken a service-oriented approach to adopting AI tools, particularly large language model-powered chatbots, to serve their residents in a way that increases the scale of such efforts without compromising security and transparency.
Buenos Aires, one of the first cities to join the Bloomberg Philanthropies City Data Alliance, pioneered the use of AI chatbots to boost service delivery, launching its “Boti” helper in 2019, and Washington DC, another city in the Alliance, released a similar chatbot last year. More recently, Denver launched “Sunny,” an AI-powered chatbot designed to answer residents’ questions on non-emergency matters, in February 2024. Powered by Citibot (a third party vendor), Sunny is present on every page of the city website. Its invitation, “Let’s Chat,” is translated into four languages, not only reflecting the city’s diverse population but also its inclusivity in considering the varying needs of its primary users.
According to Laura Dunwoody, Denver’s Director for Resident Experience, Sunny was originally developed to quickly answer residents’ questions. Often, if residents are looking for information about a particular service or form, it takes some hunting to navigate to the correct webpage. With Sunny, instead of spending time searching for answers (which often requires reading through hefty materials to locate the correct form or reference), residents can quickly access what they need within a prompt or two.
Alberto Antenangeli, a Senior Lead Data Architect for a consulting company, describes this feature of Sunny as “retrieval augmented generation.” For this attribute to work for a city, the chatbot must be trained with very specific city-based content as opposed to a general knowledge base, such as the one ChatGPT uses. Otherwise, as residents ask questions, the chatbot may pull information from other cities’ webpages or other sources that are not relevant to that resident’s particular city.
In addition to gleaning tailored-to-prompt information for residents, Sunny can also serve as an intake point for residents to upload pictures and report things relevant to city officials, such as unfilled potholes. Antenangeli describes this second type of service Sunny provides as “call center automation”. With this feature, the chatbots are not only creating a dialogue with the user and pulling information for them, but also extracting necessary information from users to help them fill out forms, file reports, or process documents. Here, the paradigm from retrieval augmented generation, where the user is in charge of the direction of the conversation, is now shifted to the chatbot who drives the conversation toward getting from the user the information it needs to fill the document or report.
Necessarily, in both use cases, a fair amount of safeguarding needs to occur in order for the chatbots to be ready for the public. Dunwoody describes a tactic her team used known as “red-teaming,” where testers ask the bot sensitive or even “inappropriate” questions in an attempt to “break the bot.” When the team catches responses that are unprofessional, inaccurate, or inappropriate, they can go back and build in guardrails to ensure it doesn’t occur in real time. Antenangeli believes this is where “prompt engineering” can help: with some specialized instruction, chatbots can be safeguarded not to be “jail-broken,” or opened up to the general knowledge base as they retrieve information for users.
Both Dunwoody and Antenangeli agree that generative AI has potential for use beyond retrieval augmentation and call center automation. In fact, Antenangeli argues that with the appropriate amount of safeguarding in place, AI chatbots could eventually be utilized to aid policy implementation and compliance. For example, if users ask the chatbots about current policies around zoning or building regulations, the chatbot could digest large amounts of policy, summarize them, and extract regulations pertinent to the user. “You can parse policies and extract obligations pertaining to those policies,” says Antenangeli. “AI can help with that,” so long as there is an ethical and responsible framework for AI development in place.
In addition to safeguarding data from unauthorized access or masking sensitive information from public use, Antenangeli adds that AI tools should be primarily used as “productivity companions” and that even in those cases, “you have to clearly communicate where the AI is being used” so that there is always a traceable line from the AI tool to the output. Even still, Antenangeli says that there should always be a “human in the loop” to continuously check the AI-generated responses to optimize the prompts and improve quality. “Since in the end this is all a statistical process, there is always a chance you’re going to get incorrect results,” explains Antenangeli.
Still, the promise of using generative AI towards city-specific solutions remains an exciting innovation. Regarding Sunny, Dunwoody acknowledges that while it is still relatively new and still in its nascent stage, the power of using AI continues to grow and improve within her city. “Just know that this is the worst it’s ever gonna be, and it’s already very good,” says Dunwoody. “It’s only gonna get better from here!”
Laila Sorurbakhsh, PhD is the Director of GovEx Academy.