> For the complete documentation index, see [llms.txt](https://emory.gitbook.io/conversational-ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://emory.gitbook.io/conversational-ai/1.-exploration/1.1.-overview.md).

# 1.1. Overview

Explain components, properties, scopes, techniques, and assessments of dialogue systems.

## Components

### Genre

* **Conversation**: interactive communication between two or more people.
* **Dialogue**: a conversation, often between two people, with a specific goal in mind.

> **Dialog**: a window that appears on a screen in computing contexts (e.g., dialog box).

### Application

* **Dialogue System**: a computer system that interacts with humans in natural language.
* **Conversational Agent**: a dialogue system that interprets and responds to user statements.
* **Virtual Assistant**: a dialogue system that performs tasks or services for user requests.
* **Chatbot**: a dialogue system that simulates and processes human conversation.

{% hint style="info" %}
Chatbots are typically understood to follow pre-defined dialogue flows for open-domain conversations without using sophisticated artificial intelligence technology.
{% endhint %}

### Intelligence

* **Dialogue Management**: a process of controlling the state and flow of the dialogue to conduct contextual communications.
* **Conversational AI**: a type of Artificial Intelligence (AI) for a dialogue system to understand user inputs and respond properly to them, often processed by machine learning models.

{% tabs %}
{% tab title="Discussion" %}

1. What are examples of dialogue systems currently used in practical applications?
2. Are there applications that would greatly benefit from adopting dialogue systems?
   {% endtab %}
   {% endtabs %}

## Properties

### Unit

* **Turn**: a single contribution from one speaker to the dialogue.
* **Utterance**: a natural unit of speech bounded by breaths or pauses.

{% hint style="info" %}
For a text-based conversation, each turn is often considered an utterance.
{% endhint %}

### Context

* **Speech Act**: the action, either explicitly or implicitly, expressed by an utterance (e.g., answering, advising, greeting; see [Switchboard Dialog Act Corpus](https://github.com/cgpotts/swda)).
* **Intent**: the user's goal expressed by an utterance within the context of a conversation (e.g., making an appointment, requesting information).
* **Topic**: the matter dealt with in an utterance (e.g., movie, family, midterm).

{% hint style="info" %}
It is possible that one utterance expresses multiple speech acts and intents and also deals with various topics.
{% endhint %}

{% tabs %}
{% tab title="Exercise" %}
Classify each of the following utterances from Friends S1E1 using the dialogue acts:\
<http://compprag.christopherpotts.net/swda.html>

> **Ross**: Hi.
>
> **Joey**: This guy says hello, I wanna kill myself.
>
> **Monica**: Are you okay, sweetie?
>
> **Ross**: I just feel like someone reached down my throat, grabbed my small intestine, pulled it out of my mouth and tied it around my neck...
>
> **Chandler**: Cookie?
>
> **Monica**: Carol moved her stuff out today.&#x20;
>
> **Joey**: Ohh.
>
> **Monica**: Let me get you some coffee.
>
> **Ross**: Thanks.
> {% endtab %}
> {% endtabs %}

## Scopes

### Task-oriented

Task-oriented dialogue systems have specific tasks to be accomplished:

* [The Second Dialog State Tracking Challenge](https://aclanthology.org/W14-4337/), Henderson et al., SIGDIAL, 2014 ([dataset](https://github.com/matthen/dstc)).
* [Conditional Generation and Snapshot Learning in Neural Dialogue Systems](https://aclanthology.org/D16-1233/), Wen et al., EMNLP 2016 ([dataset](https://www.repository.cam.ac.uk/handle/1810/260970)).
* [Learning End-to-End Goal-Oriented Dialog](https://openreview.net/forum?id=S1Bb3D5gg), Bordes et al., ICLR, 2017 ([dataset](https://github.com/perezjln/dstc6-goal-oriented-end-to-end/blob/master/docs/Goal_Oriented_End_To_End_Dialog-Facebook-XRX.pdf)).
* [Key-Value Retrieval Networks for Task-Oriented Dialogue](https://aclanthology.org/W17-5506/), Eric et al., SIGDIAL, 2017 ([dataset](https://nlp.stanford.edu/blog/a-new-multi-turn-multi-domain-task-oriented-dialogue-dataset/)).
* [MultiWOZ - A Large-Scale Multi-Domain Wizard-of-Oz Dataset for Task-Oriented Dialogue Modelling](https://aclanthology.org/D18-1547/), Budzianowski et al., EMNLP, 2018 ([dataset](https://github.com/budzianowski/multiwoz)).
* [Entity-Consistent End-to-end Task-Oriented Dialogue System with KB Retriever](https://aclanthology.org/D19-1013/), Qin et al., EMNLP, 2019 ([dataset](https://github.com/yizhen20133868/Retriever-Dialogue)).
* [Towards Scalable Multi-domain Conversational Agents: The Schema-Guided Dialogue Dataset](https://arxiv.org/abs/1909.05855), Rastogi et al., AAAI, 2020 ([dataset](https://github.com/google-research-datasets/dstc8-schema-guided-dialogue)).

### Open-domain

Open-domain dialogue systems aim to talk about any topics without specific end goals:

* [Alexa Prize Socialbot Grand Challenge](https://www.amazon.science/alexa-prize/socialbot-grand-challenge) ([Emora demo](https://youtu.be/TYh9ZeG37zs))
* [Meta BlenderBot](https://parl.ai/projects/bb3/) ([demo](https://blenderbot.ai))
* [OpenAI ChatGPT](https://openai.com/blog/chatgpt/) ([demo](https://chat.openai.com/); requires login)
* [Google LaMDA](https://blog.google/technology/ai/lamda/) ([article](https://www.washingtonpost.com/technology/2022/06/11/google-ai-lamda-blake-lemoine/); [interview](https://s3.documentcloud.org/documents/22058315/is-lamda-sentient-an-interview.pdf))

{% tabs %}
{% tab title="Exercise" %}

1. What kind of tasks are presented in the above task-oriented datasets?
2. Try the demos of BlenderBot and ChatGPT. What are their limitations?
3. What are the challenges in building task-oriented vs. open-domain dialogue systems?
   {% endtab %}
   {% endtabs %}

## Techniques

### State Machine

A dialogue flow can be designed into a fine-state machine. Most commercial dialogue systems take this approach because it gives greater control over how the systems behave. Several platforms are available to facilitate the development of state machine-based dialogue systems:

* [Amazon Lex](https://aws.amazon.com/lex/)
* [Google Dialogflow](https://cloud.google.com/dialogflow)
* [IBM Watson Assistant](https://www.ibm.com/products/watson-assistant)
* [Microsoft Azure Bot Service](https://azure.microsoft.com/en-us/products/bot-services)
* [Emora STDM](/conversational-ai/2.-dialogue-graph/2.1.-emora-stdm.md)

### End-to-End

Recent researches focus on developing end-to-end dialogue systems using sequence-to-sequence (S2S) models, which is a type of encoder-decoder model:

* [Sequence to Sequence Learning with Neural Networks](https://papers.nips.cc/paper/2014/hash/a14ac55a4f27472c5d894ec1c3c743d2-Abstract.html), Sutskever et al., NeurIPS, 2014.

The current state-of-the-art S2S models use transformers such as BERT as their encoders:

* [Attention is All you Need](https://papers.nips.cc/paper/2017/hash/3f5ee243547dee91fbd053c1c4a845aa-Abstract.html), Vaswani et al., NeurIPS, 2017.
* [BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding](https://aclanthology.org/N19-1423/), Devlin et al., NAACL, 2019.

Three of the [open-domain dialogue systems](#open-domain) above, Meta BlenderBot, OpenAI ChatGPT, and Google LaMDA, are end-to-end systems based on S2S models.

{% hint style="info" %}
Implementing an end-to-end system is beyond the scope of this course. Thus, we will use the state machine approach to develop dialogue systems, starting from [Chapter 2](/conversational-ai/2.-dialogue-graph.md).
{% endhint %}

## Assessments

The primary objective of both task-oriented and open-domain dialogue systems is to satisfy users by communicating with them. For task-oriented, users are generally satisfied if the tasks are accomplished efficiently. For open-domain, however, user satisfaction is often highly subjective, so proper conversational analysis may need to be involved.

* [Towards Unified Dialogue System Evaluation: A Comprehensive Analysis of Current Evaluation Protocols](https://aclanthology.org/2020.sigdial-1.29/), Finch and Choi, SIGDIAL, 2020.
* [Report from the NSF Future Directions Workshop on Automatic Evaluation of Dialog: Research Directions and Challenges](https://arxiv.org/abs/2203.10012), Mehri et al., arXiv, 2022.
* [Don't Forget Your ABC's: Evaluating the State-of-the-Art in Chat-Oriented Dialogue Systems](https://arxiv.org/abs/2212.09180), Finch et al., arXiv, 2022.
