<!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>An Approach Towards Ethical Chatbots in Customer Service</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Abeer Dyoub</string-name>
          <email>Abeer.Dyoub@graduate.univaq.it</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Stefania Costantini</string-name>
          <email>Stefania.Costantini@univaq.it</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Francesca A. Lisi</string-name>
          <email>FrancescaAlessandra.Lisi@uniba.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Dipartimento di Informatica &amp; Centro Interdipartimentale di Logica e Applicazioni (CILA) Universita` degli Studi di Bari “Aldo Moro”</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Dipartimento di Ingegneria e Scienze dell'Informazione e Matematica Universita` degli Studi dell'Aquila</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Chatbot is an artificial intelligent software which can simulate a conversation with a user in natural language via auditory or textual methods. Businesses are rapidly moving towards the need for chatbots. However chatbots raise many ethical concerns. To ensure that they behave ethically, their behavior should be guided by the codes of ethics and conduct of their company.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>Chatbots are some of the industry’s newest tools designed to simplify the interaction
between humans and computers. They are typically used in dialogue systems for
various practical purposes including customer service or information acquisition. They are
often described as one of the most advanced and promising expressions of interactions
between humans and machines.</p>
      <p>
        Machine ethics [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] is a new evolving field concerned with the moral behavior of
artificial intelligent machines. The problem of adopting ethical approach to AI has been
attracting a lot of attention in the last few years, see e.g. [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. Unethical AI and bots are
big concern for many consumers. Businesses who recently deployed a chatbot or are
in the process of designing one should think carefully about the ethical considerations
for their bots. The chatbot should be built on ethical foundations, because its behavior
influence the company’s image, and unethical behavior will lead to mistrust from client
side. Ethics improves the quality of service and promotes good relationships. When
building the chatbot, the company should determine the exact purpose and the business
value of the chatbot. A company might have different chatbots for different purposes.
But a customer service chatbot can only be ethical if it meets the needs of the customer
while of course maintaining the company’s rules. Building trust between humans and
machines is just like building trust between humans. Brands can build trust by being
transparent, aligning expectations to reality, learning from mistakes and continually
correcting them, and listening to customer feedback.
      </p>
      <p>In conclusion, ethics should be a core consideration of any action taken by a
company. With chatbots still in a stage or relative infancy, the discovery of new ethical
issues is likely to continue. Companies should continue to learn from these emerging
cases and build their guiding principles and ethical standards. Finally it is crucial to
maintain transparency with customers especially if there is a doubt.</p>
      <p>
        However, enforcing codes of conduct and ethics is not an easy task. These codes
being mostly abstract and general rules e.g. confidentiality, accountability, honesty,
inclusiveness, empathy, fidelity, etc., they are quite difficult to apply. Moreover, abstract
principles such as these contain open textured terms ([
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]) that cover a wide range of
specific situations. Their meaning may change according to the context, furthermore
they are subject to interpretations. Thus, there is an implementation problem from the
computational point of view. It is difficult to use deductive logic to address such a
problem ([
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]). It is impossible for experts to define finer detailed rules to cover all
possible situations. Codes of ethics in their abstract form are very difficult to apply in
real situations [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
      </p>
      <p>
        To equip our chatbot with ethical reasoning capabilities, we propose an approach
that combines both Answer Set Programming (ASP) and Inductive Logic Programming
(ILP) for defining and generating the detailed ethical rules that cover all real world
situations from interactions with customers over time. We use ASP for ethical knowledge
representation and reasoning. ILP is used to generate The missing ASP rules needed for
future ethical reasoning. Ethical reasoning is a form of commonsense reasoning.
Ethical rules normally have exceptions like many other rules in real life. Nonmonotonic
logic can effectivelly express exceptions which are represented using NAF
(NegationAs-Failure). ASP provides an elegant mechanism for handling negation in logic
programming (see, e.g., [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] for an overview of ASP and its applications). ILP [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] doesnot
require huge amounts of training examples such as other statistical methods and
produce interpretable results, that means a set of rules which can be analyzed and adjusted
if necessary. These characteristics render ILP a suitable and promising technique for
implementing machine ethics, where scarcity of examples is one of the main challenges.
      </p>
      <p>
        ILP was used in [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], and [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] to learn rules to help decide between two or more
available actions based on a set of involved ethical prima facie duties. Their approach can
be used to choose the most ethical action when there are specific clear ethical duties
involved and to do so we need to assign weights of importance (priority) to these duties
for each available action, then the system computes the weighted sum for each action,
and the one with highest weighted sum is the best action to do. In this approach it is
not really clear the basis of assigning weights to duties(we doubt whether we can really
quantify the importance of ethical duties on a grade from 2 to -2 as done in their work),
then it is not clear whether the generated rules can be refined incrementally over time.
Several previous works have suggested the use of either ASP (see, e.g., [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]) or ILP
(mentioned above) for programming ethical AI agents. We think that an approach
combining the two would have a greater potential than previous proposals.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Proposed Approach</title>
      <p>
        To have detailed rules in place for guiding the behavior of the online customer service
chatbot, and prevent violations of the company’s ethical codes, we propose an approach
for generating these detailed rules from interactions with customers. So, the new codes
of ethics are a combination of the existing clear codes (those that give a clear
evaluation procedure that can be deductively encoded using ASP) and the newly generated
ones. The approach uses ASP Language as the knowledge representation and reasoning
language. ASP is used to represent the domain knowledge, the ontology of the domain,
and scenarios information. Rules required for ethical reasoning and evaluation of the
agent behavior in a certain scenario are learned incrementally overtime using ILED
Algorithm [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. Figure 1 represent the structure of our system 3. The system works
as follows: when a client contacts the customer service chatbot posing a question, the
chatbot agent will form the answer. This answer and before it is given to the client pass
through an ethical evaluation layer where the text is first translated into ASP syntax,
basically each sentence is translated into an ASP predicate. These predicates or facts
about the answer text are used by the ethical evaluation module to reason about the
answer, and give the result to the ethical monitoring module which will notify the chatbot
if there is something unethical in the answer. If the needed rules to give the ethical
evaluation are not found in the ethical monitoring Knowledge Base (KB), then the ethical
evaluation module initiates a learning task to generate the needed rule/rules which will
be added to the ethical monitoring KB.
      </p>
      <p>The inputs to the system are: I) the background knowledge representing the domain
knowledge; II)a set of examples, each example is a tuple containing a set of facts
describing the current case along with an ethical evaluation of the case by domain experts
and ethicists; III) a set of mode declarations for restricting the hypothesis search space.
The system remembers the facts about the narratives and the annotations given to it by
the user, and learns to form hypotheses that are consistent with the evaluation given by
the user of the responses to the given requests.</p>
      <p>To summarize the idea of our approach, let us consider the following two scenarios:
case1: one scenario related to ethical/unethical use of sensitive slogans like
environmentally friendly to manipulate customers.
case2: this scenario is related to unethical use of fear tactics in marketing to
emotionally provoke customers to buy certain products. Like saying that only two pieces left of
3 We concentrate in this abstract on the ethical reasoning and learning (Ethical Evaluation
Module)
the product in the stock trying to stimulate the fear emotions of the customer to provoke
him/her to take decision on the spot. This would be a violation of ’Honesty’.</p>
      <p>We can form an ILP task ILP (B; "; M ) for our case study, where B is the
background knowledge, " is a database of examples (both positive and negative), storing
examples presented overtime, initially " = . And M is The mode declarations(Table 1).</p>
      <p>
        With each new arriving case, the agent will revise the running hypothesis if needed,
i.e. if it does not cover the current arriving window. Arriving to learn at the end and after
few examples the required ethical rules H shown below. For more details the reader can
refer our previous works [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
      </p>
      <p>H =
8unethical(X1)
&gt;
&lt;</p>
      <p>unethical(X1)
&gt;
:
3</p>
    </sec>
    <sec id="sec-3">
      <title>Conclusion</title>
      <p>answer(X1); unrelevant(X1); sensitiveSlogan(X1):
answer(X1);
unrelevant(X1); stimulateF earEmotions(X1):
In this work we proposed an approach to implement ethical chatbots in customer
service. However, this approach is general enough and can be used to generate ethical
rules for chatbots in any domain (and/or elaborate existing ones) and does cope with
the changes of ethics over time because of the use of non-monotonic logic and
incremental learning.</p>
      <p>Our approach Combines ASP with ILP for modeling ethical agents which provides
many advantages, among them:
– increasing the reasoning capability of our agent;
– promoting the adoption of hybrid strategy that allow both top-down design and
bottom-up learning via context sensitive adaptation of models of ethical behavior;
– allowing the generation of rules with valuable expressive and explanatory power
which equips our agent with the capacity to give an ethical evaluation and
explain the reasons behind this evaluation. In other words, our method supports
transparency and accountability of such models, which facilitates instilling confidence
and trust in our agent.</p>
      <p>Furthermore, in our opinion and for the sake of transparency, ethical behavior of
chatbots should be guided by explicit ethical rules determined by competent judges or
ethicists or through consensus of ethicists. Our approach provides support for developing
these ethical rules. Finally, it is worth mentioning that we are working on an
implementation of this system in terms of Multi Agent System.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Anderson</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Anderson</surname>
            ,
            <given-names>S.L.</given-names>
          </string-name>
          :
          <article-title>ETHEL: toward a principled ethical eldercare system</article-title>
          . In:
          <article-title>AI in Eldercare: New Solutions to Old Problems, Papers from the 2008 AAAI Fall Symposium</article-title>
          , Arlington, Virginia, USA, November 7-
          <issue>9</issue>
          ,
          <year>2008</year>
          .
          <source>AAAI Technical Report</source>
          , vol.
          <source>FS-08- 02</source>
          , pp.
          <fpage>4</fpage>
          -
          <lpage>11</lpage>
          . AAAI (
          <year>2008</year>
          ), http://www.aaai.org/Library/Symposia/Fall/ fs08-
          <fpage>02</fpage>
          .php
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Anderson</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Anderson</surname>
            ,
            <given-names>S.L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Armen</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          : Medethex:
          <article-title>Toward a medical ethics advisor</article-title>
          . In: Caring Machines:
          <article-title>AI in Eldercare, Papers from the 2005 AAAI Fall Symposium</article-title>
          , Arlington, Virginia, USA, November 4-
          <issue>6</issue>
          ,
          <year>2005</year>
          .
          <source>AAAI Technical Report</source>
          , vol.
          <source>FS-05-02</source>
          , pp.
          <fpage>9</fpage>
          -
          <lpage>16</lpage>
          . AAAI Press (
          <year>2005</year>
          ), https://www.aaai.org/Library/Symposia/Fall/ fs05-
          <fpage>02</fpage>
          .php
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Dyoub</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Costantini</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gasperis</surname>
          </string-name>
          , G.D.:
          <article-title>Answer set programming and agents</article-title>
          .
          <source>Knowledge Eng. Review</source>
          <volume>33</volume>
          ,
          <issue>e19</issue>
          (
          <year>2018</year>
          ). https://doi.org/10.1017/S0269888918000164
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Dyoub</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Costantini</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lisi</surname>
            ,
            <given-names>F.A.</given-names>
          </string-name>
          :
          <article-title>Learning Answer Set Programming Rules for Ethical Machines</article-title>
          .
          <source>In: Proceedings of the Thirty Fourth Italian Conference on Computational LogicCILC</source>
          , June 19-21,
          <year>2019</year>
          , Trieste, Italy. CEUR-WS.org (
          <year>2019</year>
          ), http://ceur-ws.
          <source>org/</source>
          Vol-
          <volume>2396</volume>
          /
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Dyoub</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Costantini</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lisi</surname>
            ,
            <given-names>F.A.</given-names>
          </string-name>
          :
          <article-title>Towards an ILP Application in Machine Ethics</article-title>
          .
          <source>In: Proceedings of the 29th International Conference on Inductive Logic Programming - ILP2019, Sep 3-5</source>
          ,
          <year>2019</year>
          , Plovdiv, Bulgaria. Springer (
          <year>2019</year>
          ), to appear
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Ganascia</surname>
            ,
            <given-names>J.G.</given-names>
          </string-name>
          :
          <article-title>Modelling ethical rules of lying with answer set programming</article-title>
          .
          <source>Ethics and information technology 9</source>
          (
          <issue>1</issue>
          ),
          <fpage>39</fpage>
          -
          <lpage>47</lpage>
          (
          <year>2007</year>
          ). https://doi.org/10.1007/s10676-006-9134-y
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Gardner</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          v.d.L.:
          <article-title>An artificial intelligence approach to legal reasoning</article-title>
          . MIT Press (
          <year>1987</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>High-Level Expert</surname>
          </string-name>
          Group on Artificial Intelligence:
          <article-title>Draft ethics guidelines for trustworthy AI</article-title>
          . European Commission,
          <string-name>
            <surname>Brussel</surname>
          </string-name>
          (
          <year>2018</year>
          ), https://ec.europa.eu/digital-singlemarket/en/news/draft
          <article-title>-ethics-guidelines-trustworthy-ai</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Jonsen</surname>
            ,
            <given-names>A.R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Toulmin</surname>
            ,
            <given-names>S.E.</given-names>
          </string-name>
          :
          <article-title>The abuse of casuistry: A history of moral reasoning</article-title>
          . Berkeley: Univ of California Press (
          <year>1988</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Katzouris</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Artikis</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Paliouras</surname>
          </string-name>
          , G.:
          <article-title>Incremental learning of event definitions with inductive logic programming</article-title>
          .
          <source>Machine Learning</source>
          <volume>100</volume>
          (
          <issue>2-3</issue>
          ),
          <fpage>555</fpage>
          -
          <lpage>585</lpage>
          (
          <year>2015</year>
          ). https://doi.org/10.1007/s10994-015-5512-1
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Moor</surname>
            ,
            <given-names>J.H.</given-names>
          </string-name>
          :
          <article-title>The nature, importance, and difficulty of machine ethics</article-title>
          .
          <source>IEEE intelligent systems 21(4)</source>
          ,
          <fpage>18</fpage>
          -
          <lpage>21</lpage>
          (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Muggleton</surname>
            ,
            <given-names>S.:</given-names>
          </string-name>
          <article-title>Inductive logic programming</article-title>
          .
          <source>New generation computing 8(4)</source>
          ,
          <fpage>295</fpage>
          -
          <lpage>318</lpage>
          (
          <year>1991</year>
          ). https://doi.org/10.1007/BF03037089
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Toulmin</surname>
            ,
            <given-names>S.E.</given-names>
          </string-name>
          :
          <article-title>The uses of argument</article-title>
          . Cambridge university press (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>