A new generation Chatbot serving the government and its citizens

Thanks to the 2021 National Recovery and Resilience Plan (NRRP) bill, the government had to plan how to address queries from the public and local authorities regarding the bill. The basic idea was around a “Virtual Assistant Chatbot”, open source preferably.

To assist with this, Formez PA – a center for assistance, studies, and training for the public sector modernization – has launched the project “Linea Amica Digitale”. Moreover, the project was later broadened to also encompass the management of the NRRP funds. Now, the main goal of the project was to come up with an integrated set of tools to manage funding applications and support requests.

A need to meet: integrate virtual assistant chatbot open source with a human touch

In the smartphone-dominance era, a highly innovative tool is the right approach. You’ll have to combine the need for an instant messaging app with the possibility of a web portal. Not only that but the latest gen AI chatbot, too.

The latter is to provide a first level of support, as a first point of contact for citizens and public sector users. However, a chatbot’s limitations are well known in terms of not being able to meet all requests for support fully. Thus you’ll need a second level of support. This is when qualified human personnel intervenes to solve more complex issues.

This type of technology is both complex and expensive mainly because current AI technologies present themselves as self-consistent. Instead of being complementary to the assistance provided by human operators, they tend to be self-sufficient.

Hence a high cost of integration between AI and “human” support platforms. In addition to monetary costs, there are costs in terms of time development, with negative repercussions on time to market. However, this wasn’t compatible with the Formez PA’s urgent need to enable support at a tight deadline.

Unity is strength: partner up with AI-based solution providers

To meet the Formez PA’s needs, S3C – a company specializing in systems and services for multi-channel communication – launched technological scouting in search of virtual assistant chatbot open source solutions on the market. The company was already the Knowledge Base solution supplier for Linea Amica Digitale, based on the open-source technology Elasticsearch.
The aim was therefore to create an integrated communication platform to access the following services on the portal lineaamica.gov.it:

  • Featured news
  • FAQs
  • Knowledge base
  • Chatbot
  • Live chat with human agents
  • Web ticketing

Not only these tools had to be integrated with each other, but with the CRM, too. The latter is the system used by back-office staff to track and manage requests from end users.
Importantly, there is a need for comprehensive reports to monitor the service quality, including the user satisfaction rate.

Live chat with the virtual assistant chatbot open source: Tiledesk

Being a 100% Open Source platform with a live chat that combines chatbots and humans, Tiledesk was the right choice. Tiledesk focuses on end-user satisfaction by offering an AI + Humans service natively. The AI-powered Chatbots deflect conversations to the support service operators, when necessary.

Tiledesk is a SaaS platform (Software-as-a-Service), available open source for both cloud and on-premise installation. The AI-Human model enables you to draw a conversational “flow” with many participants. From chatbots (AI) to humans to end users. The goal is to maximize customer service satisfaction.

Virtual assistant chatbot open source. Definition

The term “chatbot” describes software that is able to deliver specific application functionality. It responds to user requests both through natural language (AI decoded) and through interactive elements (buttons & multimedia).

Tiledesk live chat widget

The chatbot allows the end user to explicitly “call” an operator to solve the problem thanks to its training. If the chatbot doesn’t provide an adequate response to the user, the conversation itself will be forwarded to the operators.

Why choose Tiledesk to have a virtual assistant chatbot open source?

The choice to adopt the Tiledesk technology to manage the human-chatbot interaction entails the following:

  • The Chatbot integration with technologies NLP / NLU for rich and natural conversation experiences, including chats and operators.
  • Links, videos, images, and text as responses.
  • The Chatbot’s links/interactions integration with external systems such as ticketing.
  • The Open Source distribution complies with AGID guidelines on the reuse of software in solutions for the government.
  • The availability of the software in SAAS mode.

Thanks to these features and the flexibility of the S3Net CRM product, the solution was released in about a month.

What can better testify to Tiledesk’s quality than the fact that other public sector players have adopted it? In both national (Unisalento) e international contexts (University of Valencia).

Tiedesk AI technology. Description

The Tiledesk chatbot is trained with Machine Learning techniques based on a text pre-processing pipeline. It can recognize and train a model through classification algorithms.
In particular, some of the defined pipelines are:

  • Uncomplicated domain. The pre-processing text, via word embedding and training of a neural network, Feed Forward, is implemented with PyTorch and EmbeddingBag input layer type to adapt to variable text length. This simple pipe shows in its vocabulary not only the text but also all the special characters that the user intends to use to train the model (emoji, punctuation, special characters).
  • Medium complexity domain. The pre-processing text with NLP techniques (Using Spacy) to obtain tokens, remove stop words and possibly apply techniques of stemming, n-gram, etc. The classification model is created from a neural network Feed Forward, but can also be configured to use a recurrent network like LSTM. In this case, it is necessary to specify the language used to allow the use of libraries in the appropriate language.
  • High complexity domain. The pre-processing and the creation of the model happen through the use of pre-trained models (BERT, GPT, etc.) which fine-tuning is carried out in order to adapt them to the specific domain. In this case, in addition to the language, it is also necessary to determine which model to fine-tune.

Aside from these, there are many combinations of pre-processing and test preparation techniques and classification models that can be configured and adopted. Only the need for a certain level of accuracy can determine which pipeline is suitable for the reference context.

Our choice

Within LineaAmica we have chosen to use the spacy library that provides a pre-added word embedding. This approach has proved very useful in this context since it already codifies linguistic knowledge (Italian). No need to have a high starting data set for training (necessary for a neural network). For example, in a question like: “Who can I turn to for PNRR advice” the model considers the words “advice” and “support” similar, so it is able to encode the end-user questions. This feature is obtained using pre-added models since with only statistical techniques it is not possible. In fact, a technique used is to directly ask for a list of synonyms. During the training, the created phrases replace the synonyms in the original phrase.
These pre-training sets are especially useful when you don’t have sufficiently large training data.

As an alternative, you could directly use PyTorch to create the word-embedding template.
In the future, with the increase in the questions/answers volume, it will be possible to use an LSTM network without pre-training, that is not linked to a specific language. The aim is always to improve the accuracy of the classification.
The AI technology used by Tiledesk is available at the following GitHub repository: https://github.com/Tiledesk/tiledesk-ai

Open source license

Like all other components of the Tiledesk solution, this component is open-source and is available with an MIT license.
Unlike the other components of the Tiledesk solution, this AI technology is completely decoupled from the rest of the solution. Therefore, other developers can:

  • contribute to the project through pull requests;
  • reuse this technology within other projects, following the rules of an MIT license.

The conversational solution implemented by LineaAmica is fully aligned with current standards for customer service delivery. Reuse is simplified by the open-source availability of the components used as Tiledesk and Elasticsearch.
Obviously, the training data is highly vertical and has a low reuse rate in different contexts. So if the goal is to make a chatbot “welcoming” and “performing”, the realization plan starts from an analysis of the starting dataset or its availability “in progress”.

The advantages of a conversational solution

The availability of experienced staff able to train the chatbot over time increases its reliability.
It is also crucial to consider, in the case of human AI+ conversational support solutions, the availability and cost of the human personnel needed to provide support.
Suppose you already have an organized Knowledge Base. In that case, the solution can use the Elasticsearch indexing engine to provide a first level of support. It’ll deliver the search results in a conversational form, overcoming in the first instance the absence of a trained chatbot.
Finally, the latest chatbots offer, among other things, a conversational menu that can help the user to orient themselves within the knowledge base. without the NLP training.

Menu conversazionale con bottoni per rispondere alle domande più frequenti

Conversational menus

The “Conversational Menus” help to model a chatbot that minimizes the use of NLP technologies (requiring training and substantial data) in favor of menus that orient the user toward the solution. This type of solution is certainly interesting for those who want to provide their citizens with a tool to navigate the services offered by the government using modern instant messaging paradigms.
In addition, applications can be made to connect directly to modules already present in the Public sector, perhaps using web services e-gov already available.
This option allows for an improved experience for the citizen-user, who sees in the conversation the new service center, that is, an always available “office”.

In the conversation, in addition to finding answers to their questions, the citizen is also able to enjoy “sub-component” applications that can meet focused needs, while remaining within the flow of messages of support. Not to forget all the advantages such as conversation historicization, the possibility of human handoff, etc.).

Would you also like to learn more about the benefits of adopting open-source solutions? You can read the dedicated article on the Tiledesk blog.
Finally, read more about the catalog of open-source software available to the Government Administration.

Jovana Ugrinic
Jovana Ugrinic
From a legal background to being a newbie in the AI world. Content creator and language aficionado. Effortlessly bad singer.

Leave a Reply