Fulfilling our purpose of making government information accessible to everyone
In November 2016, we were fortunate enough to be chosen as the partner for the first-ever Gov.sg Messenger bot. As fellow Singaporeans, we personally believed it could be a great way to bring information to peers and foreign friends alike, making it easy and accessible for them to stay connected and be heard.
In this post, we want to share some of the details of how we brainstormed, created, optimised and launched this Facebook Messenger bot with the wonderful team at Ministry of Communications and Information (MCI). We hope that you’ll like the bot as much as we do, so this is the behind-the-scenes cut of how it came about! Also, if you like it a lot, we’re hiring :)
The planning process
1. Start with objectives
As with any chatbot, the most important first step is to determine the objectives for building the bot. For MCI, the reason for the bot’s existence was to make information easier to consume and access for more citizens.
As such, the overarching user experience direction was to include sources of information that could be useful on a daily or weekly basis, or would be extremely useful to have at a snap.
2. Working out the features
Based on this original set of requirements from MCI, we got to work defining some of the main features and functionalities that the bot should have in order to fulfill the objectives. We sketched out a few ideas and thought of how everything fit together.
It’s important to note that these tend to change over time, so the first draft is just a quick overview to get started on working on the bot. MCI was really flexible with ideas too, and that gave us a lot of space to experiment and dream up ideas.
3. Determining the tone
As the Facebook page that the bot would be housed in interacts with citizens and foreign friends alike, it has to portray our friendly Singaporean image (and sassiness) while still being professional and courteous. We developed a range of different tones and personalities, and culled them down until we found the one that could best fit the bot.
4. Drawing the dialog flow
One of our standard signature ways of building dialog is in a dialog flow map. We plot out all the functionality and dialog branches in a map and write out the initial cut of what the bot would say. This way, we got a feel for how the bot would function and what it might possibly say to the user.
We also discussed this map with the MCI team, and debated on the functionality and design of the bot until everyone was happy with the vision of the bot.
5. Set up technical infrastructure
A detailed technical discussion on building and managing bot infrastructure would probably take another few blog posts, but at a high level, the bot runs on Azure in a secure and scalable hosting environment. Each of our clients’ bots has its own separate code base, servers, networking gears, and so on. This is to keep everything private to each client, as part of our enterprise-grade promise to them.
By the end of this planning process, we already had a working demo of the bot with the main bulk of the functions in place.
Building the bot
As you’re probably used to hearing by now, the devil is in the details. Anyone could build a scrappy little bot if they wanted, but to build a robust bot with well-thought-out details based on tried-and-tested methods, natural language processing, information retrieval, and machine learning, coupled with enterprise-grade infrastructure and scaling, definitely requires more time and experience. We put everything that we had learnt in designing, writing, and building, bots into the gov.sg bot, and here are the features you’ll see:
While we started with a more generic welcome message, we decided to move it towards a purpose-driven onboarding flow in the middle of development. The reason is that some of the users who talk to the gov.sg Facebook Page are actually looking for information only, and would focus on asking questions.
As such, we segmented incoming users by those who were looking to ask questions (see Ask a question below), and those who were actually here to engage with the bot and browse around for interesting information.
Bot menu cards need to have interesting images, and logically ordered content in each. It is a classic case of information architecture in user experience design, where you have to figure out what makes each piece coherent in the overall story.
For the gov.sg bot, largely an informational bot, each of the cards serve a different shade of this purpose: Consuming content (news and videos), information seeking (look for people in Government), focused exploring (current affairs and happenings), news verifying (official sources) and providing information (feedback and preferences).
To help citizens access latest content relevant to them on the bot, the Latest News section is updated daily with content from gov.sg news, Facebook posts, and YouTube videos. Users can subscribe to it, with finer-grained preferences that allow them to control how often they get content — daily, only on weekdays, or once a week.
An interesting take can be found in the “Read it here” function, where users can listen to a dynamically generated voice clip that reads the news by the page aloud. It’s great for commuting, and for people who prefer hearing (rather than reading) the news. We think this could be really useful for parents teaching younger children to read, listen and speak formal content, too.
The Singapore government produces lots of video content regularly, and most of them are very interesting for lots of citizens, if they had the chance to see them. Hence, increasing discoverability of this content and making them more visible to users is a key reason for putting this video content upfront, together with other news content that users may be interested in.
To streamline the experience of watching these videos, they are shown in a half-screen slide-up that improve the native experience of watching videos without bringing the user out of the Messenger context.
Ask a question
As one of the goals is to help users find content easier, we integrated sites across the government so that one search on the gov.sg bot can surface information from multiple sources.
We used a list design, so that users can choose the most relevant result/site to them when asking a question. Since each government organisation keeps its own site as updated as possible, the bot is able to help citizens and visitors find the best source of information across all of them effectively.
Responding to questions comes down to the indexing, organising and retrieval of information from these large corpora of sites and links and matching it to the query. This will be a part of the bot where ongoing optimisation will improve results over time. This function was made to help users search for information before they have to ask someone for help, and to save them the trouble of having to navigate out of Messenger when looking for said information.
As it’s imperative that people can find ministries, government organisations and officials who serve them, the Directory function enables users to connect to them more quickly. There are a few ways to get to the information, all of which were designed to help users find what they need efficiently.
First, there are quick replies with the most-searched organisations that users already look for, including MHA, MOE, MOM, MCI, and so on, based on past data. These put the top information at the users’ fingertips. Following that, users can either find organisations by their acronyms, such as NRF, or by searching for a related term, for example “library” for National Library Board.
From there, you can search for related eServices that you need. For example, maybe you’re looking for ICA so that you can renew your passport online. By choosing this eServices option for ICA, you’ll find the APPLES service right there.
Then there is the search for officers, which requires finer interpretation to disambiguate between similar names from different departments. The bot tries to clarify the name of the person you’re trying to reach, and suggests based on the name you type.
Not only can you pull up the website information, in almost all cases you can simply hit a button to call, or find the address and navigate to it directly. Now you can find your MP even faster. Talk about convenience
To highlight current issues in Singapore that people may be most concerned about, 5 microsites are brought up prominently so that people who are interested can go to the microsite to explore and understand these issues in more detail.
An interesting use for this in unusual situations, for example, would be providing haze information from NEA at a tap within Messenger — it would be a breeze to keep going to the gov.sg bot and clicking on that button instead of searching for it and having to go through the NEA site.
To add an additional element to the bot, we decided to pull in upcoming events and features that people would find interesting around Singapore. This would be useful for visitors to Singapore, and for Singaporeans to rediscover interesting things happening around them in the country.
It’s easy to find events and happenings based on your interest, and you can load more events by simply navigating through attractive images that also aim to give you more descriptions and the event venue when you choose to see more details.
Often, it is necessary to find accurate information on things happening in a country, and gov.sg happens to have a very well-updated page with press releases and speeches — an affirmation of just how organised our government is, really. (Trust us — we’ve lived overseas for some time )
However, the issue was that most of these also tend to be PDFs or sound clips. Hence, the interface is simple and brings up a short description of the press releases, bringing a user to the web page to download these media if that’s something that they are truly interested in. Otherwise, just reading the headlines gives you a pretty good sense of what’s going on and serves as a secondary source of formal news on top of the news articles being served to the user daily.
Further, to bring another excellent resource more easily to users, we bring up the Government Terms Translator page up within the window so that users can type quickly into the big search box on the page.
This is one of the unique points of Messenger bots: sometimes, the best way to show information is in the bot, but sometimes, it simply directs the user to the best possible way to interact with an interface. The balancing act between too much of either is one of the other things that experience and previous deployments can help inform, much like how a designer knows when an UI element might work and when it might not.
Of course, no proper bot that takes its mission seriously should be without a feedback mechanism. Especially as one that aims to help its citizens and visitors, the bot tries to collect the most salient information for feedback. Here, effort has also been put in to suggest the top feedback topics, so that users may choose those feedback topics quickly.
Building a feedback form in a bot can be hard, because you don’t want to impose hard coded words too much (like for example “You have to type ‘Stop Feedback’ when you are done typing”) or collect feedback from only one response (people usually type more than one message at a time in a chat conversation), though sadly many bots do this.
It’s also really easy to manage subscription preferences, and users have various options in frequency that they can choose from. Over time, these may be extended to include other preferences (maybe even what kind of voice you want narrating your latest content).
Behind the scenes
For the administrators of bots, there are often many things that they would like to control and manage on the back end to make everything run smoothly for users. Hence, KeyReply also has a backend dashboard that allows for fine-grained management of content, broadcasting, feedback and analytics, and other proprietary elements to help improve and upkeep the bot over time.
Across the bot, there are various areas where machine learning plays a role: personalisation of content, increasing accuracy of general search and directory search, and suggested quick options. As the bot ramps up in adoption, there will be more data that will be useful in training and further improving the performance of these functions. These improvements will create a better and more optimised experience for users.
Natural language processing
Other interesting backend processes include parsing, stemming, information retrieval tasks, and even handling localised words. As it’s not exactly a chatty bot, there is less of a need to make the bot say chatty things, but rather to improve the accuracy of its suggestions, focusing the scope a lot more.
There are also some easter eggs hidden here and there… But it wouldn’t be fun if we told you what and where, right? Maybe weather… or haze?
There are various things that we test for as part of our Quality Assurance processes at KeyReply (we detail some of these in our ebook, if you’re interested in learning more). For bots, we start with testing functionalities, dialog flows, sequential steps, buttons, and information sources.
Following that, there are other parts which most likely require tuning, including edge cases and fallback messages. Here, you want to humanise the bot and make it more palatable when it is unable to comprehend or execute what the user expects.
As a well-built bot is essentially a big project in itself, it also requires rigorous procedures and a lot of discussion and back-and-forth with all stakeholders involved. The MCI team was extremely responsive and that helped to make the process more efficient, meaning the bot could pass through testing and get to a production-ready bot much faster.
After all internal testers are happy, it’s important to get another round of organisational testers to ensure that everything is clear, self-explanatory and good to go.
Planning and executing a bot launch
Beyond building the bot, having a robust strategy behind launching and getting adoption of the bot is imperative to the success of the bot. There are a few aspects of planning that can help in the launch: current channels, advertising formats, and dedicated campaign optimisation based on bot performance.
Putting the bot on current channels (like the website or social media) and promoting it on existing channels like email lists or press releases can be a simple but effective way to get early adoption.
Following that, choosing the right ad format, such as the new Messenger “Message Us” ad format can be useful in getting the next bump in adoption.
The ongoing process of optimisation will then determine the ultimate success of the bot; by observing the adoption and usage of the bot over time, improvements to the bot functions and onboarding can be planned. This will be a huge focus for us next, by pairing quantitative bot analytics with unstructured text data and the machine learning data to continue pushing the bot to improve and become even more useful for citizens and visitors alike.
Try it out yourself
Now that you know the ins and outs of the bot building process, and the list of features and why they were made that way, go try the bot out! We’d love to hear your feedback and suggestions, and promise to take them seriously in the next few bot iterations.
If you work at a government department you feel could benefit greatly from better government-citizen relationships too, manage an enterprise marketing team, or are part of a creative agency, let’s talk about how we can work together to deliver more exceptional experiences.