<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>DemaBot: a Tool to Automatically Generate Decision-Support Chatbots.</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Bedilia Estrada-Torres</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Adela del-Río-Ortega</string-name>
          <email>adeladelrio@us.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Manuel Resinas</string-name>
          <email>resinas@us.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>SCORE Lab, I3US Institute. Universidad de Sevilla</institution>
          ,
          <addr-line>Seville</addr-line>
          ,
          <country country="ES">Spain</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Universidad de Sevilla</institution>
          ,
          <addr-line>Seville</addr-line>
          ,
          <country country="ES">Spain</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>This article presents DemaBot: a low-code solution to create chatbots designed to automate decisionmaking. Examples of these chatbots range from COVID-19 screening to first-line incident support, amongst others. Using DemaBot, the developer only needs to model the decision that the chatbot will automate using DMN and, optionally, customize the utterances that the chatbot will use to interact with the user. From this information, DemaBot generates automatically the complete set of components that implement a ready-to-use chatbot. Furthermore, it provides help to guide users during the conversation, and optimizes the conversation flow, being able to recognize several parameters in a single turn and asking only for those that are indispensable for the decision.</p>
      </abstract>
      <kwd-group>
        <kwd>Decisions-support chatbot</kwd>
        <kwd>DMN</kwd>
        <kwd>Natural language understanding</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        In recent years, a large number of organizations have implemented virtual assistants that provide
information, solve doubts or help in the achievement of a specific task [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Often these virtual
assistants take the form of chatting bots, also known as chatbots, which are tools designed
to interact with users through friendly conversations using natural language in a way that
simulates interaction with a human [
        <xref ref-type="bibr" rid="ref1 ref2">2, 1</xref>
        ], and in some scenarios, they can act as teammates of
human workers in a collaborative way in complex processes [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>
        Although chatbot development platforms have abstracted away many details related to the
natural language processing of a chatbot through the automated recognition of user intents
and have provided a framework in which the conversation flow can be defined, a chatbot
developer is still required to implement a specific conversation flow, to deal with many
lowlevel details about parameters or entities, to provide a set of training phrases for each of the
conversation steps, and to provide a generic set of fallback options that guides users who do
(M. Resinas)
https://personal.us.es/iestrada/ (B. Estrada-Torres)
© 2021 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0).
not know the capabilities the chatbot has, amongst others. Implementing these tasks is usually
time-consuming and error-prone even for simple chatbots [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>
        In this paper, we focus on decision-support chatbots, which can be defined as task-oriented
chatbots whose purpose is to help or guide users to make decisions. DemaBot is a web tool that
provides a low-code solution to create decision-support chatbots1,2,3. To this end, the developer
only needs to model the decision that the chatbot will automate using a DMN [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] model. DMN
(Decision Model and Notation) is a standard that provides constructors for modeling decisions
and decoupling them from process models. Based on the DMN model, DemaBot generates
automatically a ready-to-use chatbot, thus reducing the implementation time of a chatbot and
the possibility of implementation errors. The generated chatbot leverages the natural language
understanding (NLU) platform, Dialogflow 4. DemaBot also optimizes the conversation flow
with the user to recognize several parameters in a single conversation turn and asks only for
the parameters essential to make the decision, automatically generates training phrases using a
dataset generator for NLU models, provides help phrases to guide users if necessary, and allows
customization of questions and answers.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. DemaBot Architecture</title>
      <p>
        Before introducing the DemaBot architecture, we introduce DMN decision tables and NLU
chatbots. A DMN decision table, shown in Fig. 1a, “is a tabular representation of decision logic,
based on a discretization of the possible values of the inputs of a decision, and organized into
rules that map discretized input values onto discrete output values”[
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. A NLU chatbot, also
known as agent, contains a recognition engine that matches user inputs with intentions (intents)
during a conversation turn. It also contains an execution component capable of executing
actions for each intent, such as responses to the user. Intents are defined through training
phrases, which are input examples that allow the recognition engine to identify the diferent
phrases that a user can utilize to express an intention. In each training phrase, concrete values
can be recognized. These values are called parameters. The type of the parameters is defined by
a specific structure called entity, which determines how data from a user input is extracted. NLU
platforms provide predefined entities that match many common types of data like numbers,
dates, e-mail addresses, etc. but also allow custom entities to be defined for enumerated values.
A custom entity is composed of a set of entries. Each entry is made up of a reference value and
a set of synonyms for that reference. These components are reflected in Fig. 1b.
      </p>
      <p>The DemaBot architecture consists of 3 modules illustrated in Fig. 2:
• Chatbot Designer supports the definition of the inputs of DemaBot, which are a DMN
ifle containing a DMN model, and configuration parameters including the customization
of the chatbot conversation and the credentials file associated with a Dialogflow project
where the generated chatbot components will be stored. Chatbot designer provides 3
1Tool is available at: http://resisa01.us.es
2Tutorial available at: https://bit.ly/2SRZ0TY
3Screencasts is available at: https://youtu.be/kP3X5gxkCSU
4DialogFlow: https://dialogflow.cloud.google.com/
(a) DMN decision table</p>
      <p>(b) Interaction between NLU chatbot components
functionalities: (i) the DMN editor integrated with Camunda5 from which a DMN model (a
decision table or a hierarchical structure of decision tables) can be generated, or an existing
DMN file can be imported; (ii) the possibility to customize the chatbot conversation by
configuring the questions and answers concerning an input in a conversation turn, and
(iii) the generation of the chatbot, which requires loading the credentials file and providing
the project ID.
• Engine. At design time, this module processes the inputs received from the Designer
and interacts with Dialogflow to generate and store all the chatbot components. Engine
also connects with Chatito6 to build the phrases that will train the generated chatbot. At
runtime, Engine interacts with the Interface module and analyzes the inputs received from
the user to optimize the conversation. Engine has three submodules described below.
(i) DMN component extractor and classifier submodule identifies the DMN components
(decisions, rules, inputs and outputs) and classifies the expected values and types for each
component from the DMN file . At design time, this data, the credentials file and the project
ID are sent to the Component mapper and generator. At run time, the data is sent to the
Conversation optimizer.
(ii) Component mapper and generator submodule receives the classified DMN elements
and identifies the chatbot components to automatically generate for each of them, so it
has a generator for each component. Entities generator creates an entity for each type of
attribute not supported by the platform; Intents generator creates an intent for each DMN
input, as well as generating help intents to give additional information to the user, for
example the list of decisions available to be made, or the types of values expected for an
input; Actions generator specifies the actions to be performed, including the responses to
be sent to the user; Multiple decision manager establishes relationships between decision
tables in hierarchical structures when the output of one table is the input of another;
and Training phrases generator uses the Chatito engine to build training phrases that will
help the user interact with the chatbot. These phrases are automatically generated using
the parameters extracted from the DMN file and optionally, from user-defined phrase
configuration parameters.</p>
      <p>(iii) Conversation optimizer submodule interacts with the extractor and classifier
submod5https://camunda.com/
6Chatito is available at: https://rodrigopivi.github.io/Chatito/
ule at runtime to communicate with the Dialogflow platform to recognize the intents,
parameters and entities from the user utterances. It analyzes the information provided
by DialogFlow to identify the required inputs to make a decision. It also applies an
optimization algorithm to ask for input values only if the input is required depending on
the values captured so far, and recognizes several parameters (inputs) received in a single
user message, thus minimizing the number of interactions to produce the decision.
• Chatbot interface provides an environment for the communication between the user
and the generated chatbot. It communicates with the Conversation optimizer to minimize
conversation turns with the user. The chatbot interface can also be used as a chatbot test
web environment to check the behavior of the chatbot while designing the model.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Maturity</title>
      <p>
        DemaBot is the result of several iterations derived from its use in diferent scenarios and
feedback of a set of pilot users. DemaBot’s first version focused on the semi-automatic components
generation of a fully functional chatbot. It was tested and validated with a set of 17 IT
professionals with a scenario based on bank credit decision making. The participants identified the
importance of the tool, and also helped to identify areas for improvement such as: the fully
automatic generation of all components, the inclusion of hierarchical decision tables definition,
the improvement of the definition of help intents to guide the user in the interaction with the
chatbot, the optimization of aspects of the conversation so that unnecessary questions are not
asked to make a decision. We considered these suggestions and are included in the current
version. This version has been successfully applied to two scenarios. The first scenario helps
to choose the best design pattern for building Trello boards based on characteristics of the
domain [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. The second scenario seeks to build a dashboard showing the results of process
performance indicators according to the characteristics of these indicators based on a decision
tree proposed in [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. In a Master’s Thesis [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] at the University of Seville, a chatbot based on a
part of this decision tree was implemented manually, consuming more than 50 hours of work,
while with DemaBot it was done in less than an hour.
      </p>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusions and Future Work</title>
      <p>This paper presented DemaBot, a web tool for the automatic generation of fully functional
decision-support chatbots from DMN models. The automatic generation reduces the possibility
of introducing errors during the chatbot construction, as well as drastically reducing the time
required for its generation. In addition, DemaBot provides additional features such as the
automatic generation of user help responses, the automatic generation of training phrases
for the chatbot and the optional configuration of phrases to interact with the user, as well
as optimizing user interactions to try to minimize conversational turns and identify multiple
inputs in a phrase. As future work we want to address multi-user interaction in conversational
turns for decision making as well as its integration with other collaborative tools.</p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgments</title>
      <p>This work has been partially supported by projects RTI2018-101204-B-C22 (MCI/AEI/FEDER,
UE) and P18-FR-2895 (Junta de Andalucía/FEDER, UE).</p>
      <p>We would like to thank Alejandro Gómez Caballero, member of the development team of the
ISA group, for his support in the development of DemaBot.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>S.</given-names>
            <surname>Valtolina</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B. R.</given-names>
            <surname>Barricelli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. D.</given-names>
            <surname>Gaetano</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Diliberto</surname>
          </string-name>
          ,
          <article-title>Chatbots and conversational interfaces: Three domains of use</article-title>
          ,
          <source>in: Fifth International Workshop on Cultures of Participation in the Digital Age</source>
          , volume
          <volume>2101</volume>
          <source>of CEUR Workshop Proceedings</source>
          ,
          <year>2018</year>
          , pp.
          <fpage>62</fpage>
          -
          <lpage>70</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>S.</given-names>
            <surname>Hussain</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O. A.</given-names>
            <surname>Sianaki</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Ababneh</surname>
          </string-name>
          ,
          <string-name>
            <surname>A</surname>
          </string-name>
          <article-title>Survey on Conversational Agents/Chatbots Classification and Design Techniques</article-title>
          ,
          <source>in: Workshops of the 33rd International Conference on Advanced Information Networking and Applications</source>
          , volume
          <volume>927</volume>
          ,
          <year>2019</year>
          , pp.
          <fpage>946</fpage>
          -
          <lpage>956</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>I.</given-names>
            <surname>Seeber</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E. A. C.</given-names>
            <surname>Bittner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. O.</given-names>
            <surname>Briggs</surname>
          </string-name>
          , et al.,
          <article-title>Machines as teammates: A research agenda on ai in team collaboration</article-title>
          ,
          <source>Information &amp; Management</source>
          <volume>57</volume>
          (
          <year>2020</year>
          )
          <fpage>103174</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>G.</given-names>
            <surname>Daniel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Cabot</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Deruelle</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          <article-title>Derras, Multi-platform Chatbot Modeling and Deployment with the Jarvis Framework</article-title>
          ,
          <source>in: 31st Int. Conf. on Advanced Information Systems Engineering (CAiSE</source>
          <year>2019</year>
          ), volume
          <volume>11483</volume>
          <source>of LNCS</source>
          , Springer,
          <year>2019</year>
          , pp.
          <fpage>177</fpage>
          -
          <lpage>193</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>I. Object</given-names>
            <surname>Management</surname>
          </string-name>
          <string-name>
            <surname>Group</surname>
          </string-name>
          ,
          <article-title>Decision Model and Notation (DMN) specification</article-title>
          .
          <source>V1</source>
          .3, https://www.omg.org/spec/DMN,
          <year>2019</year>
          . Accessed:
          <fpage>03</fpage>
          -
          <lpage>03</lpage>
          -
          <year>2021</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>J.</given-names>
            <surname>Peña</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Bravo</surname>
          </string-name>
          ,
          <string-name>
            <surname>A.</surname>
          </string-name>
          <article-title>del-Río-</article-title>
          <string-name>
            <surname>Ortega</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Resinas</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Ruiz-Cortés</surname>
          </string-name>
          ,
          <article-title>Design patterns for boardbased collaborative work management tools</article-title>
          ,
          <source>in: 33rd Int. Conf. Advanced Information Systems Engineering (CAiSE</source>
          <year>2021</year>
          ), volume
          <volume>12751</volume>
          <source>of LNCS</source>
          , Springer,
          <year>2021</year>
          , pp.
          <fpage>177</fpage>
          -
          <lpage>192</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Ü.</given-names>
            <surname>Aksu</surname>
          </string-name>
          ,
          <string-name>
            <surname>A.</surname>
          </string-name>
          <article-title>del-Río-</article-title>
          <string-name>
            <surname>Ortega</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Resinas</surname>
            ,
            <given-names>H. A.</given-names>
          </string-name>
          <string-name>
            <surname>Reijers</surname>
          </string-name>
          ,
          <article-title>An approach for the automated generation of engaging dashboards</article-title>
          ,
          <source>in: OTM</source>
          , volume
          <volume>11877</volume>
          <source>of LNCS</source>
          ,
          <year>2019</year>
          , pp.
          <fpage>363</fpage>
          -
          <lpage>384</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>M. D.</given-names>
            <surname>Gil</surname>
          </string-name>
          , Chatbots para cuadros de mando,
          <source>Master's thesis</source>
          , E.
          <source>T.S.I. Informática</source>
          ,
          <year>2020</year>
          . Webhook Dialogflow: https://github.com/MrManoloDG/friday-chatbot.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>