How GovTech developed a OneService chatbot to report municipal points


When the Municipal Services Office (MSO) was founded in 2014, it was billed as a one-stop shop for people who could provide feedback on everyday issues such as defective hallway lights, leaky covered sidewalks, and polluted public areas.

The OneService app was launched the next year to receive digital feedback.

OneService-App / Image source: MSO

In line with MSO’s vision of continuously improving their services and pushing the technical boundaries for capturing community issues in other ways, MSO partnered with GovTech to develop the OneService chatbot for WhatsApp and Telegram.

This allows citizens to easily file a case and provide additional, vital information about the complaint via popular social messaging apps like WhatsApp and Telegram. Driven by machine learning, the chatbot would be able to:

1) Automatically identify the type of complaint and classify it into the appropriate category (homicide, illegal parking, etc.),

2) Extract the relevant details of the incident that requires attention (location, address, point of interest, time of occurrence, etc.), fill out the feedback template and ask the user to review and provide additional details.

3) And identify the correct government agency that should take action (NEA, NParks, LTA etc) and forward the case.

How did the Virtual Intelligent Chat Assistant (VICA) team from the Moments of Life Division and the GovText team from the Data Science and Artificial Intelligence Division work together to create a chatbot that can hold a conversation?

Identify the case type

With the OneService app, which has been up and running since 2015, MSO has collected a significant amount of feedback from the public.

Each time a case is investigated, an officer marks a case with its corresponding case type and this information is stored in the database. Since the feedback transmitted via the chatbot is similar to that transmitted via the app, the data from the app can be used to train the chatbot’s case type categorizer.

Essentially, this means that the categorizer is fed both the feedback text and the case type of each case so that it learns to associate certain words and patterns in the text with the corresponding case type.

Based on his experience, the case type categorizer searches for relevant words and patterns in order to use the feedback text to make the best possible assessment of which case type should be correct.

Armed with over 160,000 cases of OneService app data spanning two years, the teams tried different natural language processing techniques (the area of ​​getting computers to understand human language) and managed to create a categorizer that did the right one Case type can correctly predict 80 percent of the time.

They then extracted the key case details and pre-filled the case form for the user.

“This is more difficult because, unlike the case type, we didn’t have any labeled keywords because the MSO staff didn’t have to name the keywords in their work process,” said GovTech.

“So we put an annotation framework in place and asked our MSO colleagues to help us put labels on the words in the feedback text that represent the types of important information needed to resolve a case, such as Incident date and time, landmarks and addresses. “

In total, they labeled text from 5,600 cases, which resulted in these comments.

Image source: GovTech
Image source: GovTech

They used these prepared examples to train a case detail recognizer that can identify the various types of key information with an accuracy of 85 percent.

At this stage, they are able to automatically identify the type of complaint, extract the relevant details, fill out the feedback template and prompt the user to add any missing information.

Identify the appropriate agency

After the case was successfully submitted by the user, the right agency to handle the case had to be found.

As you may already know, municipal services are overseen by multiple agencies, so it may not always be easy or easy for the OneService chatbot to activate the correct process.

For this step, in addition to the feedback text and the case type (automatically marked and then verified by the user), you use the images and geolocation submitted by the user.

But why didn’t they just use the images and geolocation to identify the case type?

GovTech argued that while this additional data helped increase the accuracy of case type detection by two to three percent, the relatively small gain in predictive performance did not justify the additional time it took to generate the predicted case type.

“After all, we don’t want the user to wait too long to talk to the chatbot,” he added.

In the agency identification phase, however, the user is no longer involved and can afford to take more time to process the geolocation and image data.

Geolocations play an important role in identifying the right agency, as some types of cases can be handled by more than one agency based on the case description alone. Therefore, the agency assigned would depend on which country of the agency an incident occurred in or to which it is closest.

For example, if a tree pruning case is reported within a housing estate, the nearest city administration is commissioned to deal with the case. If, however, a similar case occurs in a park (e.g. West Coast Park), NParks are commissioned to deal with the case instead.

On user-submitted images, the teams used an appeal detection model to search for cigarette butts, lampposts, ceiling lights, and other items often associated with community issues.

“We do this because the probability that certain authorities will process a case increases if certain objects are present in the pictures (e.g. trees / bushes -> NPARKs, cigarette butts -> NEA). By combining these new data points, we can correctly route cases to the correct agency 85 percent of the time, ”said GovTech.

Now in the beta launch phase

Oneservice chatbotImage source: GovTech

After the OneService Chatbot had made some optimizations based on the feedback from a completed test with a small part of the public, it was started as a “beta” and will be available on WhatsApp and Telegram from July 2021.

Residents can start a conversation with the chatbot by sending “Hello” to +65 9821 9004 (WhatsApp) or @OneServiceSG Bot (telegram).

If you’re creative, you can also take part in the Chatbot Design Contest, which will help determine the chatbot’s avatar and “personality” for its official launch. You can find more information about the competition here.

This article first appeared on GovTech. You can also get byte-sized (geddit?) Tech stories from GovTech Here.

Featured image: MSO / GovTech




We don’t spam! Read our privacy policy for more info.

Leave A Reply

Your email address will not be published.