Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
This chapter overviews dialogue systems, the technologies behind those systems, and their applications.
Chapter 24: Chatbots and Dialogue Systems, Speech and Language Processing (3rd ed.), Jurafsky and Martin.
This chapter helps you set up the development environment for this course.
Jinho D. Choi
Artificial Intelligence (AI) has advanced to the point that it starts interacting with humans in natural language. This communication ability makes AI an integral part of human society as a collaborator and companion. Thus, it is essential to understand how AI can (and should) be designed to conduct meaningful conversations with humans. The main objectives of this course are:
To discover technical approaches to dialogue systems.
To conceive manifold use cases of dialogue systems.
To study effective ways of Human-Computer Interaction.
To develop a dialogue system using methods in Computational Linguistics.
To comprehend the limitations of your dialogue system through Statistical Analysis.
Students will have individual assignments and work in groups to build end-to-end dialogue systems of their choice. Toward the end of the semester, all teams will present the dialogue systems with live demonstrations.
For Spring 2023, this is selected as a course. Thus, it will include collaborative work with students taking .
Setup a Python programming environment with GitHub and PyCharm.
Install .
Lower versions of Python may not be compatible with this course.
Login to (create an account if you do not have one).
Create a new repository called conversational-ai
and make it private.
From the [Settings]
menu, add the instructors as collaborators of this repository.
Jinho Choi:
Talyn Fan:
Benjamin Ascoli:
Sichang Tu:
Install on your local machine:
The following instructions assume that you have "PyCharm 2022.3.x Professional Edition".
You can get the professional version by applying for an .
Configure your GitHub account:
Go to [Preferences] - [Version Control] - [GitHub]
.
Press [+]
, select Log in via GitHub
, and follow the procedure.
Create a new project:
Press the [Get from VCS]
button on the Welcome
prompt.
Choose [GitHub]
on the left menu, select the conversational-ai
repository, and press [Clone]
(make sure the directory name is conversational-ai
).
Setup an interpreter:
Go to [Preferences] - [Project: conversational-ai] - [Project Interpreter]
.
Click Add Interpreter
and select Add Local Interpreter
.
In the prompted window, choose [Virtualenv Environment]
on the left menu, configure as follows, then press [OK]
:
Environment: New
Location: LOCAL_PATH/conversational-ai/venv
Base interpreter: Python 3.11
Install packages:
Open a terminal by clicking [Terminal]
at the bottom (or go to [View] - [Terminal]
).
If the terminal prompts "Successfully installed ...", the packages are installed on your machine.
Upgrade (if necessary) by entering the following command into the terminal:
Install the (STDM) with the following command:
Spring 2023
Time: MW 2:30PM - 3:45PM
Location: White Hall 112
Jinho Choi Associate Professor of Computer Science Office Hours → MW 4PM - 5:30PM, MSC W302F
Talyn Fan Research Engineer at the Emory NLP Research Lab Office Hours → TuTh 1PM - 2:30PM, MSC W302B (https://emory.zoom.us/j/94134466856)
Benjamin Ascoli Ph.D. student of Computer Science and Informatics Office Hours → MW 11:30AM - 1PM, MSC W302B
Sichang Tu Ph.D. student of Computer Science and Informatics Office Hours → MW 1PM - 2:30PM, MSC W302B
1 + 7 topical quizzes: 55%
3 LINC discussions: 10%
Project proposal: 15%
Final project: 20%
Your work is governed by the Emory Honor Code. Honor code violations (e.g., copies from any source, including colleagues and internet sites) will be referred to the Emory Honor Council.
Excuses for exam absence/rescheduling and other serious personal events (health, family, personal related, etc.) that affect course performance must be accompanied by a letter from the Office of Undergraduate Education.
For every topic, one quiz will be assigned to check if you keep up with the materials.
Quizzes must be submitted individually. Discussions are allowed; however, your work must be original.
Late submissions within a week will be accepted with a grading penalty of 15% and will not be accepted once the solutions are discussed in class.
You will meet with students from IDS 385W - Translation: Who, What, How three times:
02/08 (W): evening (60 mins), 6PM, Atwood 215
03/15 (W): evening (60 mins), 6PM, Atwood 215
04/24 (M): evening (75 mins), 6PM, Atwood 215
For the first two meetings, you will meet in small groups. These meetings will not replace our regular class hours.
For the third meeting, you will present your chatbot to LINC students. This meeting will replace our regular class hours.
You are expected to:
Group a team of 3-4 members.
Give a presentation to propose your idea about the final project.
Write a proposal that illustrates details about your proposed project.
Everyone in each group will receive the same grade for the project proposal.
You are expected to:
Give a presentation about your final project.
Give a demonstration of your system.
Write a final report that illustrates details about your work.
Everyone in each group will receive the same grade for the final project.
Quiz 1: Exploration
Create a PDF file quiz1.pdf
that includes your ideas about the following questions:
What kind of a dialogue system do you want to develop for your team project?
Who will benefit from your dialogue system in what way?
What is the novelty of your dialogue system?
What are the expected challenges in developing your dialogue system?
How do you plan to evaluate your dialogue system?
Provide your ideas in detail, about 100 words (or more) per question.
Group a team of 3-4 members for your project.
Submit quiz1.pdf
to Canvas.
Go to [People → Team Projects] in Canvas and assign your team members to the same group.
Quiz 0: Getting Started
1. Create a package called src
under the conversational-ai
directory.
PyCharm may automatically create the __init__.py
file under src
, which is required for Python to treat the directory as a package, so leave the file as it is.
2. Create the quiz
package under the src
package.
3. Create a python file called quiz0.py
under the quiz
package and copy the code:
If PyCharm prompts you to add quiz0.py
to git, press [Add]
.
4. Run quiz0
by clicking [Run] - [Run 'quiz0']
. An alternative way of running the program is to click the green triangle by the line #26
and select Run 'quiz0'
:
5. Conduct the following two dialogues with the chatbot you just created (S
: system, U
: user):
This is what your directory structure may look like in PyCharm after finishing this assignment:
1. Create the .gitignore
file under the conversational-ai
directory and copy the content:
2. Add the following files to git by right-clicking on them and selecting [Git] - [Add]
:
quiz0.py
.gitignore
Once the files are added to git, they should turn green. If not, restart PyCharm and try to add them again.
3. Commit and push your changes to GitHub:
Right-click on conversational-ai
.
Select [Git] - [Commit Directory]
.
Enter a commit message (e.g., Submit Quiz 0).
Press the [Commit and Push]
button.
Make sure you both commit
and push
, not just commit
.
4. Check if the above files are properly pushed to your GitHub repository.
5. Submit the address of your repository to Canvas.
Introduce Emora State Transition Dialogue Manager.
Emora State Transition Dialogue Manager (STDM) is a dialogue system development framework that seamlessly integrates intent classification, pattern recognition, state machine, and information state approaches to dialogue management and natural language understanding. It supports rapid prototyping and long-term team-based development workflows, catering to a wide range of developer expertise.
Make sure you have the emora_stdm
package installed from the Environment Setup.
Emora STDM: A Versatile Framework for Innovative Dialogue System Development, James D. Finch and Jinho D. Choi, Proceedings of the Annual Meeting of the Special Interest Group on Discourse and Dialogue: System Demonstrations (SIGDIAL:DEMO), 2020.
Discuss project ideas in groups.
Prepare your ideas about the questions in Quiz 1.
You will meet three groups during this class. Each team discussion will last 20 minutes, including the time to find group members:
Find 3-4 people you have not interacted with from your previous group(s).
Discuss your project idea with your group and check if anyone has a similar interest.
Spring 2023
Date | Topic | Assignment |
---|---|---|
Quiz 2: Dialogue Graph
You run a hair salon and recently adopted a dialogue system to take a call from a customer and book a service for the customer:
Your salon provides three services: haircut, hair coloring, and perms. Your system should reject any other service request from the customer:
Your system should understand the following dates: Monday ~ Saturday. The time is always followed by the date with the following format: <number><space><AM|PM>
:
Only the following times and dates are available for the specific services:
Haircut:
Monday 10 AM, 1 PM, 2 PM
Tuesday: 2 PM
Hair coloring:
Wednesday: 10 AM, 11 AM, 1 PM
Thursday: 10 AM, 11 AM
Perms
Friday: 10 AM, 11 AM, 1 PM, 2 PM
Saturday: 10 AM, 2 PM
Thus, your system should not schedule an appointment for any other slots:
Make sure your system does not throw an exception in any situation.
Update the transitions
to design a dialogue flow for the above dialogue system.
Create a PDF file quiz2.pdf
that describes the limitations of your system.
Commit and push quiz2.py
to your GitHub repository.
Submit quiz2.pdf
to Canvas.
A taste of matching strategies provided in Emora STDM.
There is more than one way of expressing "good" or "bad". Let us use a to match multiple expressions per condition by surrounding them with curly brackets:
#4
: matches the input with either 'good'
or 'fantastic'
.
#7
: matches the input with either 'bad'
or 'could be better'
.
The above transitions can handle the following inputs (on top of the cases of good
and bad
):
A phrase can be used for matching, although it needs to match the entire input such that 'could be better'
in #7
does not match an input like "It could be better".
Enter inputs such as "I'm good" or "Pretty bad" and see how the system responds.
It responds with the error statement because the string key (e.g., 'good'
, 'bad'
) does not match the entire input (e.g., "I'm good", "Pretty bad").
If you replace 'bad'
in #7
with 'pretty bad'
, it matches the input "Pretty bad". However, it no longer matches the input "bad".
Currently, STDM does not allow you to insert a single quote ('
) in any condition such that if you replace 'good'
in #4
with 'I\'m good'
, it will throw a runtime error. This bug will be fixed in the next version.
#4
: the keyword 'good'
is surrounded by the square brackets (good
-> [good]
), and matched to any word in the input.
#7
: the keyphrase 'could be better'
is surrounded by the square brackets, and matched to any phrase in the input.
What are the differences between a set and a list in general data structures?
The above transitions yield the following dialogues:
Replace the condition in #4
with '[good, fantastic]'
. Does it respond as expected?
All terms in a list must match some terms in the input sequentially. Thus, by replacing '[good]'
with '[good, fantastic]'
, it no longer understands the inputs "good" or "fantastic":
Instead, it understands the input "good and fantastic" by matching "good" first, then "fantastic" later:
To allow partial matching of multiple expressions, a set can be put in a list:
#4
: the keywords 'good'
and 'fantastic'
are first put in a set for multiple matching and then in a list for partial matching.
#7
: the keyword 'bad'
and the keyphrase 'could be better'
are first put in a set for multiple matching, then in a list for partial matching.
What are the meanings of nesting a set inside a list vs. a list inside a set?
What happens if '[{good, fantastic}]'
in #4
is replaced with '{[good, fantastic]}'
; in other words, put the keywords in a list first, then in a set?
It behaves the same way as the one in Exercise 2.
Keywords or keyphrases delimited by commas in a list are matched sequentially:
#10
: first matches 'how'
, then matches 'you'
sequentially so that "how" must be followed by "you" in the input for this condition to be true.
All terms in the list must be matched sequentially such that the conditions are false for the following cases:
Let us replace 'how'
with '{how, and}'
and 'you'
with '{you, going}'
in #10
:
#10
: first matches ('how'
or 'and'
), then matches ('you'
or 'going'
) sequentially.
What other inputs does the condition in #10
match? Is there any consequence of matching that many expressions?
How does the system respond when the input is "Good, how are you"?
Since both the conditions in #5
and #11
match the input, it randomly chooses one of the responses such that it can nondeterministically generate either of the followings:
Create a multi-turn dialogue flow.
All examples in the previous session are single-turn dialogues, where users get to interact with the system only once. Let us design a multi-turn dialogue:
#5
: after the system says "Glad to ...", it matches the input with those conditions.
#6
: if the condition in #5
is true, the system responds with "I feel superb ...".
The condition in #6
does not come with the default action indicated by an error transition. Let us create an error transition for it:
#10
: prompts the error statement for any other inputs.
Create a python file under the package and copy the code.
Matching the entire input is often too restrictive. Let us use a to allow partial matching:
See for more details.
01/11
01/16
MLK Holiday
01/18
01/23
(Continue)
01/25
01/30
(Continue)
02/01
02/06
(Continue)
02/08
(Continue)
02/13
02/15
(Continue)
02/20
(Continue)
02/22
02/27
(Continue)
03/01
(Continue)
03/06
Spring Break
03/08
Spring Break
03/13
03/15
(Continue)
LINC 2
03/20
(Continue)
03/22
Review
03/27
(Continue)
03/29
(Continue)
04/03
04/05
(Continue)
04/10
(Continue)
04/12
04/17
(Continue)
04/19
(Continue)
Project
04/24
Live Demonstrations
LINC 3
This chapter explains how to improve contextual understanding using Natex.
Create a dialogue flow using state transitions.
Let us create a dictionary called transitions
and name its initial state as start
:
#1
: transitions
is a dictionary.
Add transitions to conduct a single-turn dialogue:
#3
: the system begins the dialogue by saying, "Hello. How are you?".
#4
: the system matches the user input with 'good'
.
#5
: the system responds to the user with "Glad to hear that ..." and recognizes that it is the final state end
.
All keys and values must be in the string type, where literals need to be surrounded by reversed primes (e.g., '`Hello. How are you?`'
).
There are two ways to create a string in Python, using single quotes (e.g., 'Hello'
) and double quotes (e.g., "Hello"
). When you use single quotes, any single quote inside the string needs to be escaped by a backslash (e.g., 'I\'m "good"!'
). Similarly, when you use double quotes, any double quote needs to be escaped (e.g., "I'm \"good\"!"
).
Create the dialogue flow df
that expects the initial state start
and the final state end
, which must match the names of the initial and final states in transitions
:
#1
: the import statement should be on top of the source code (see dialogue_graph.py).
Load the transitions to the dialogue flow df
:
Finally, run the dialogue flow:
Enter inputs such as "good", "Good", or "Good!" (separately) and see how the system responds. Does the system respond differently?
How does the system respond to inputs like "fantastic" or "bad"?
User inputs get automatically lowercased and tokenized before matching. Thus, the system gives the same response to those inputs.
If the input does not match 'good'
exactly, the system throws an error because no exception is currently handled in our code.
Let us add a transition such that it can also handle the input 'bad'
:
#7-9
: a new transition for the 'bad'
condition.
When you load the new transitions and run the dialogue flow, it now gives proper responses to both 'good'
and 'bad'
:
Even with branching, it still throws errors for other inputs. Let us add an error transition to set the default statement for all the other inputs:
#10-12
: an error transition to generate the default response.
Make sure to put a default error statement for every branching; otherwise, it will throw an exception during runtime, which can be detrimental.
#3
: although Python is a dynamically-typed language, it allows you to indicate the type of a variable or a function using typing (since Python 3.5).
Explain components, properties, scopes, techniques, and assessments of dialogue systems.
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).
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.
Chatbots are typically understood to follow pre-defined dialogue flows for open-domain conversations without using sophisticated artificial intelligence technology.
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.
What are examples of dialogue systems currently used in practical applications?
Are there applications that would greatly benefit from adopting dialogue systems?
Turn: a single contribution from one speaker to the dialogue.
Utterance: a natural unit of speech bounded by breaths or pauses.
For a text-based conversation, each turn is often considered an utterance.
Speech Act: the action, either explicitly or implicitly, expressed by an utterance (e.g., answering, advising, greeting; see Switchboard Dialog Act Corpus).
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).
It is possible that one utterance expresses multiple speech acts and intents and also deals with various topics.
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.
Joey: Ohh.
Monica: Let me get you some coffee.
Ross: Thanks.
Task-oriented dialogue systems have specific tasks to be accomplished:
The Second Dialog State Tracking Challenge, Henderson et al., SIGDIAL, 2014 (dataset).
Conditional Generation and Snapshot Learning in Neural Dialogue Systems, Wen et al., EMNLP 2016 (dataset).
Learning End-to-End Goal-Oriented Dialog, Bordes et al., ICLR, 2017 (dataset).
Key-Value Retrieval Networks for Task-Oriented Dialogue, Eric et al., SIGDIAL, 2017 (dataset).
MultiWOZ - A Large-Scale Multi-Domain Wizard-of-Oz Dataset for Task-Oriented Dialogue Modelling, Budzianowski et al., EMNLP, 2018 (dataset).
Entity-Consistent End-to-end Task-Oriented Dialogue System with KB Retriever, Qin et al., EMNLP, 2019 (dataset).
Towards Scalable Multi-domain Conversational Agents: The Schema-Guided Dialogue Dataset, Rastogi et al., AAAI, 2020 (dataset).
Open-domain dialogue systems aim to talk about any topics without specific end goals:
OpenAI ChatGPT (demo; requires login)
What kind of tasks are presented in the above task-oriented datasets?
Try the demos of BlenderBot and ChatGPT. What are their limitations?
What are the challenges in building task-oriented vs. open-domain dialogue systems?
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:
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, 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, Vaswani et al., NeurIPS, 2017.
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding, Devlin et al., NAACL, 2019.
Three of the open-domain dialogue systems above, Meta BlenderBot, OpenAI ChatGPT, and Google LaMDA, are end-to-end systems based on S2S models.
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.
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, Finch and Choi, SIGDIAL, 2020.
Don't Forget Your ABC's: Evaluating the State-of-the-Art in Chat-Oriented Dialogue Systems, Finch et al., arXiv, 2022.
How to use ontologies for matching in Natex.
Let us create a dialogue flow to talk about animals:
For each type of animal, however, the list can be indefinitely long (e.g., there are over 5,400 mammal species). In this case, it is better to use an ontology (e.g., WordNet, FrameNet).
Let us create a JSON file, ontology_animal.json
, containing an ontology of animals:
#2
: the key ontology
is paired with a dictionary as a value.
#3
: the key animal
represents the category, and its subcategories are indicated in the list.
#4-6
: each subcategory, mammal
, reptile
, and amphibian
, has its own subcategory.
#7
: the ontology hierarchy: animal
-> mammal
-> dog
.
Given the ontology, the above transitions can be rewritten as follow:
#4
: matches the key "mammal" as well as its subcategories: "dog", "ape", and "rat".
#5
: matches the key "reptile" as well as its subcategories: "snake" and "lizard".
#6
: matches the key "amphibian" as well as its subcategories: "frog" and "salamander".
Unlike set matching, ontology matching handles plurals (e.g., "frogs").
Although there is no condition specified for the category dog
that includes "golden retriever", there is a condition for its supercategory mammal
(#4
), to which it backs off.
Currently, ontology matching does not handle plurals for compound nouns (e.g., "golden retrievers"), which will be fixed in the following version.
It is possible that a category is mentioned in a non-canonical way; the above conditions do not match "puppy" because it is not introduced as a category in the ontology. In this case, we can specify the aliases as "expressions":
#10
: the key expressions
is paired with a dictionary as a value.
#4
: allows matching "canine" and "puppy" for the dog
category.
Once you load the updated JSON file, it now understands "puppy" as an expression of "dog":
It is possible to match "puppy" by adding the term as a category of "dog" (#7
). However, it would not be a good practice as "puppy" should not be considered a subcategory of "dog".
Values matched by the ontology can also be stored in variables:
#4,7,10
: the matched term gets stored in the variable FAVORITE_ANIMAL
.
#5,8,11
: the system uses the value of FAVORITE_ANIMAL
to generate the response.
The custom ontology must be loaded to the knowledge base of the dialogue flow before it runs:
#1
: loads the ontology in ontology_animal.json
to the knowledge base of df
.
Several matching strategies built in Natex.
Emora STDM supports several ways for interpreting the contexts of user inputs through Natex (Natural Langauge Expression), some of which you already experienced in Matching Strategy.
A literal is what you intend the system to say. A literal is represented by reversed primes (`..`
):
#3
: the system prompts the literal and ends the dialogue.
Natex supports several ways of matching the input with key terms.
The condition is true if the input exactly matches the term. A term is represented as a string and can have more than one token:
#4
: matches the input with 'could be better'
.
#7
: error
is a reserved term indicating the default condition of this conditional branching, similar to the wildcard condition (_
) in a match statement.
The condition is true if the input exactly matches any term in the set. A set is represented by curly brackets ({}
):
#7
: matches the input with either 'good'
or 'not bad'
.
The condition is true if some terms in the input match all terms in the unordered list, regardless of the order. An unordered list is represented by angle brackets (<>
):
#10
: matches the input with both 'very'
and 'good'
in any order.
The condition is true if some terms in the input match all terms in the ordered list, a.k.a. sequence, in the same order. An ordered list is represented by square brackets ([]
):
#13
: matches the input with both 'so'
and 'good'
in that order.
Currently, it matches the input "could be better" with the condition in #4
, but does not match "it could be better" or "could be better for sure", where there are terms other than the ones indicated in the condition.
Update the condition such that it matches all three inputs.
How about matching inputs such as "could be much better" or "could be really better"?
'[could be better]'
'[could be, better]'
The condition is true if all terms in the input exactly match all terms in the rigid sequence in the same order. A rigid sequence is represented by square brackets ([ ]
), where the left bracket is followed by an exclamation mark (!
):
#16
: matches the input with both 'hello'
and 'world'
in that order.
There is no difference between matching a term (e.g., 'hello world'
) and matching a rigid sequence (e.g., '[!hello, world]'
). The rigid sequence is designed specifically for negation, which will be deprecated in the next version.
The condition is true if all terms in the input exactly match all terms in the rigid sequence except for ones that are negated. A negation is represented by a hyphen (-
):
#19
: matches the input with 'aweful'
and zero to many terms prior to it that are not 'not'
.
It is possible to nest conditions for more advanced matching. Let us create a term condition that matches both "so good" and "very good" using a nested set:
#4
: uses a set inside a term.
Does this condition match "good"?
No, because the outer condition uses term matching that requires the whole input to be the same as the condition.
However, it does not match when other terms are included in the input (e.g., "It's so good to be here"). To broaden the matching scope, you can put the condition inside a sequence:
#4
: the term condition is inside the sequence.
What if we want the condition to match the above inputs as well as "fantastic"? You can put the condition under a set and add fantastic
as another term:
#4
: the sequence condition and the new term fantastic
is inside the set.
The above transitions match "Fantastic" but not "It's fantastic". Update the condition such that it can match both inputs.
Put fantastic
under a sequence such that '{[{so, very} good], [fantastic]}'
.
Saving user content can be useful in many ways. Let us consider the following transitions:
Users may feel more engaged if the system says, "I like dogs too" instead of "them". Natex allows you to create a variable to store the matched term. A variable is represented by a string preceded (without spaces) by a dollar sign $
:
#4
: creates a variable FAVORITE_ANIMAL
storing the matched term from the user content.
#5
: uses the value of the variable to generate the follow-up system utterance.
In #5
, two literals, `I like`
and `too!`
surround the variable $FAVORITE_ANIMAL
. If a variable were indicated inside a literal, STDM would throw an error.
Besides #ONT
for checking an ontology, STDM provides several macros useful for dialogue design.
The following example shows a use case of the macro #LEM
that uses the NLTK Lemmatizer to match lemmas of "raining tacos":
#5
: maches the input with the lemma of "rain" or "rainy", then the lemma of "taco".
The #UNX
macro can be used as an alternative to the 'error'
transition, which prepends a short acknowledgment phrase (e.g., "yeah", "sure") to the error statement:
#8
: prepends an acknowledgment phrase to the error statement, "Thanks for sharing" in #8
.
#3,5
: add acknowledgment phrases given the user inputs.
#7
: does not add an acknowledgment phrase when the user input is short.
When the user input contains fewer than three tokens, #UNK
does not add any acknowledgment.
Seldomly, #UNK
gets selected even when conditions in other transitions match the input (due to an STDM bug). If you notice this during testing, assign a very slow score to the #UNK
state to ensure it gets the lowest priority among other branches.
Let us update the above transitions so that it sometimes refuses to sing the same song:
#6
: can be picked if the variable $RAINING_TACOS
equals to the string 'True'
.
#7
: sets $RAINING_TACOS
to 'True'
after prompting the system output.
Once $RAINING_TACOS
is set to 'True'
, STDM randomly picks a statement in #6
or #7
as the system output.
Notice that the #SET
macro only assigns a string value to the variable. It is possible to write a macro to set any variable to an actual boolean value (e.g., True
, False
):
#3-4
: checks if there are two arguments.
#6-8
: retrieves the variable name.
#10-12
: checks if the argument is a proper boolean value.
#14
: stores the boolean value to the variable.
Given MacroSetBool
, the above transitions can be updated as follow:
#6
: is selected if $RAINING_TACOS
is True
.
#0
: sets the variable $RAINING_TACOS
to the boolean value True
.
Currently, STDM randomly chooses the statements in #6
and #7
once $RAINING_TACOS
becomes True
. We can write another macro that prompts #7
only for the first time:
Given MacroPlayRainingTacos
, the transitions can be updated as follow:
#7
: is selected if the macro #PLAY_RAINING_TACOS
returns True
.
#17
: adds #PLAY_RAINING_TACOS
to the macro dictionary.
It is possible to make our system actually sings instead of prompting the lyric. Let us first install the VLC package:
Then, import the package and update the MacroPlayRainingTacos
macro to play the MP3 file, resources/raining_tacos.mp3:
#1
: imports the VLC package.
#6
: creates a VLC media player and plays the specified MP3 file.
When you run the above dialogue flow, it now plays the MP3 file and prompts the lyric.
The transitions in Section 4.1 prompt the same time (3PM) upon every request. Let us create a new macro that checks the current (system) time:
#1
: imports the time package.
#5
: retrieves the current time in the specified format using the strftime
method.
#6
: returns the current time using the str.format
method.
The macro MacroTime
can be called to generate the system output:
#11
: calls the TIME
macro to generate the system output displaying the current time.
#22
: adds #TIME
to the macro dictionary.
The transitions in Section 4.1 prompt the same weather (sunny) upon every request. Let us retrieve the latitude and the longitude of the system using Google Maps:
Then, use a web API provided by the National Weather Service to retrieve the grid correlates to the coordinate: https://api.weather.gov/points/33.7904,-84.3266
Look for the forecast
field under properties
: https://api.weather.gov/gridpoints/FFC/52,88/forecast
Write a macro that retrieves the current weather for the grid using another web API:
#1
: imports the json package.
#2
: imports the requests package.
#6
: specifies the forecast URL.
#7
: retrieves the content from the URL in JSON.
#8
: saves the JSON content to a dictionary.
#9
: retrieves forecasts for all supported periods.
#10
: retrieves the forecast for today.
#11
: returns today's forecast.
Finally, update the transitions with the weather macro:
#15
: calls the WEATHER
macro to generate the system output displaying today's weather.
#22
: adds #WEATHER
to the macro dictionary.
The time and the weather retrieved by the above macros are oriented to the system, not the user. It is possible to anticipate the users' location if one's IP address is provided; however, this is not possible unless the user uses a specific device (e.g., Amazon Echo, smartphone) and agrees to send one's private information to our system.
How to use regular expressions for matching in Natex.
Regular expressions provide powerful ways to match strings and beyond:
Chapter 2.1: Regular Expressions, Chapter 2.1, Speech and Language Processing (3rd ed.), Jurafsky and Martin.
Regular Expression HOWTO, Python Documentation
Syntax | Description |
---|---|
Syntax | Description | Non-greedy |
---|---|---|
Several functions are provided in Python to match regular expressions.
Let us create a regular expression that matches "Mr." and "Ms.":
#1
: imports the regular expression library.
#3
: compiles the regular expression into the regex object RE_MR
.
#4
: matches the string "Dr. Choi" with RE_MR
and saves the match object to m
.
A regular expression is represented by r'expression'
where the expression is in a string preceded by the special character r
.
The above code prints None
, indicating that the value of m
is None
, because the regular expression does not match the string.
#1
: since RE_MR
matches the string, m
is a match object.
#3
: true
since m
is a match object.
Currently, no groups are specified in RE_MR:
#1
: returns an empty tuple ()
.
What are the differences between a list and a tuple in Python?
It is possible to group specific patterns using parentheses:
#1
: there are two groups in this regular expression, (M[rs])
and (\.)
.
#3
: returns a tuple of matched substrings ('Ms', '.')
for the two groups in #1
.
#4,5
: return the entire match "Ms.".
#6
: returns "Ms" matched by the first group (M[rs])
.
#7
: returns "." matched by the second group (\.)
.
The above RE_MR
matches "Mr." and "Ms." but not "Mrs." Modify it to match all of them (Hint: use a non-capturing group and |
).
The non-capturing group (?:[rs]|rs)
matches "r", "s", or "rs" such that the first group matches "Mr", "Ms", and "Mrs", respectively.
Since we use the non-capturing group, the following code still prints a tuple of two strings:
What if we use a capturing group instead?
Now, the nested group ([rs]|rs)
is considered the second group such that the match returns a tuple of three strings as follows:
Let us match the following strings with RE_MR
:
#4
: matches "Mr." but not "Ms."
#5
: matches neither "Mr." nor "Mrs."
For s1
, only "Mr." is matched because match()
stops matching after finding the first pattern. For s2
on the other hand, even "Mr." is not matched because match()
requires the pattern to be at the beginning of the string.
To match a pattern anywhere in the string, we need to search for the pattern instead:
search()
returns a match object as match()
does.
search()
still does not return the second substrings, "Ms." and "Mrs.". The following shows how to find all substrings that match the pattern:
findall()
returns a list of tuples where each tuple represents a group of matched results.
Since findall()
returns a list of tuples instead of match objects, there is no definite way of locating the matched results in the original string. To return match objects instead, we need to interactively find the pattern:
#1
: finditer()
returns an iterator that keeps matching the pattern until it no longer finds.
You can use a list comprehension to store the match objects as a list:
#1
: returns a list of all m
(in order) matched by finditer(
).
How is the code above different from the one below?
What are the advantages of using a list comprehension over a for-loop other than it makes the code shorter?
Write regular expressions to match the following cases:
Abbreviation: Dr.
, U.S.A.
Apostrophe: '80
, '90s
, 'cause
Concatenation: don't
, gonna
, cannot
Hyperlink: https://github.com/emory-courses/cs329/
Number: 1/2
, 123-456-7890
, 1,000,000
Unit: $10
, #20
, 5kg
The nesting example in Section 3.1 has a condition as follows (#4
):
Write a regular expression that matches the above condition.
It is possible to use regular expressions for matching in Natex. A regular expression is represented by forward slashes (/../
):
#4
: true
if the entire input matches the regular expression.
You can put the expression in a sequence to allow it a partial match:
#4
: the regular expression is put in a sequence []
.
When used in Natex, all literals in the regular expression (e.g., "so", "good" in #4
) must be lowercase because Natex matches everything in lowercase. The design choice is made because users tend not to follow typical capitalization in a chat interface, whether it is text- or audio-based.
It is possible to store the matched results of a regular expression to variables. A variable in a regular expression is represented by angle brackets (<..>
) inside a capturing group ((?..)
).
The following transitions take the user name and respond with the stored first and last name:
#4
: matches the first name and the last name in order and stores them in the variables FIRSTNAME
and LASTNAME
.
#5
: uses FIRSTNAME
and LASTNAME
in the response.
You aim to create a chatbot that makes a movie or a song recommendation. Your system should conduct dialogue including the following aspects:
Greet with respect to the current time and/or weather.
Ask about the user's name (with a different way of asking each time the user logins).
If it is the first time the system sees the name, then prompt the first-time greeting. Otherwise, greet by asking about its previous recommendation.
Recommend a movie or a song, depending on the user's request. Do not make the same recommendation more than once for each genre.
If the user requests a different recommendation, make another suggestion.
Provide more information about the recommendation upon request.
Here is an example dialogue for a user talking to this chatbot for the first time:
Here is an example dialogue for a user coming back for the second time:
Your chatbot should give an appropriate response to every user response.
Update it to design a dialogue flow for the chatbot.
Create a PDF file quiz4.pdf
that describes the following:
Sample dialogues that your chatbot can conduct.
Explanations of your approach.
Commit and push quiz4.py
to your GitHub repository.
Submit quiz4.pdf
to Canvas.
Quiz 3: Contextual Understanding
Your goal is to create a chatbot that talks about movies. Here is a sample dialogue:
Your chatbot aims to collect user information by asking the following:
The latest movie that the user watched (#3-4
).
A contextualized question regarding the latest movie (#5-6
).
A question regarding the genre of the latest movie (#7-10
).
Your chatbot should give an appropriate response to every user response. For this assignment, you must use all of the following:
Update them to design a dialogue flow for the chatbot.
Create a PDF file quiz3.pdf
that describes the following:
Sample dialogues that your chatbot can conduct.
Explanations of how the ontology, macro(s), and regular expression(s) are used for contextual understanding in your chatbot.
Commit and push quiz3.py
to your GitHub repository.
Submit quiz3.pdf
to Canvas.
Let us create transitions for a virtual agent that handles time, weather, and playing music:
#5
: shows the current time (although it is correct only twice a day at the moment).
#8
: informs the current weather in Sunnyville.
#14
: print the error message and references to the start
state.
Notice that when the user input does not match any of the conditions, it prints the error message and loops back to the start
state.
It is possible to name any transition you create as a state:
#6
: names the state as time
.
#9
: names the state as weather
.
#13
: names the state as play_raining_tacos
.
#17
: references to the play_raining_tacos
state.
State referencing can be abused to create transitions that never end (infinite loop). It is important to design an exit state so you can terminate the conversation without throwing errors:
#6,10,14,17
: loops back to the start
state.
#19-21
: creates an exit state to terminate the dialogue.
What is the main difference between an error
transition and an exit
state?
An error transition defines a default action for uninterpretable user input, whereas an exit state terminates the current session of the dialogue.
Draw a diagram describing the following dialogue flow.
What is the role of MacroWhatElse
?
It is often the case that the user says something out of the topic that the system expects. One way of handling such occasions is by using global transitions that anticipate common cases:
#1-8
: creates global transitions.
#10
: adds the global transitions to the dialogue flow.
Notice that after prompting an output in the global transitions, it will direct to the good
state defined in the regular transitions.
The global transitions are fired whenever the user content matches their conditions, which can cause multiple matching conditions as follow:
#5
: matches the condition in the movie
state.
#5
: matches the condition in the global transition.
Thus, it is recommended to put lower scores on the conditions in global transitions such that local transitions are prioritized over them:
A dialogue flow can be complex when you start adding multiple topics. In this case, you can create a separate transition dictionary for each topic.
Let us create transitions talking about music and movies:
#3
: directs to the music
state.
#4
: directs to the movie
state.
The music
and movie
states can be defined in separate transition dictionaries:
#5
: directs to the start
state.
#8
: directs to the movie
state.
#5
: directs to the start
state.
#8
: directs to the music
state.
Finally, all three transition dictionaries can be loaded to the same dialogue flow:
When the dialogue flow runs, it randomly selects one of the 3 states, music
, movie
, and end
:
#1
: randomly selects the music
state.
#3
: switches to the movie
state when it does not understand the user input.
#5
: switches to the music
state when it does not understand the user input.
#7
: goes back to the start
state when it understands the user input, and randomly selects the movie
state.
#9
: goes back to the start
state when it understands the user input, and randomly selects the music
state.
#11
: goes back to the start
state when it understands the user input, and randomly selects the end
state.
#1
: randomly selects the end
state and terminates the dialogue.
The randomness in the above transitions can be quite annoying because it may end the dialogue immediately after it runs or repeats the same topic over and over. This can be alleviated by using the #GATE
built-in macro:
#3
: puts the music topic to an open gate.
#4
: puts the movie topic to an open gate.
#4
: has no gate to open (so it can be selected at any time).
Once an output is selected, #GATE
closes the door for that output such that it will never be selected again.
It is important to have at least one output with no gate; otherwise, the system will crash unless one of the outputs leads to the end state.
The gating prevents the system from repeating the same topic, but the end
state can still be selected at any time without consuming all the other topics. To ensure that the end
state gets selected last, we use scoring:
#6
: indicates that this is the end
state.
#7
: assigns the score of this state to 0.1
.
By default, all states receive a score of 1; thus, assigning a score below 1 would make that state not selected at all unless there are dynamic scoring changes through macros such as #GATE
.
How to use macro functions for matching in Natex.
The most powerful aspect of Natex is its ability to integrate pattern matching with arbitrary code. This allows you to integrate regular expressions, NLP models, or custom algorithms into Natex.
A macro can be defined by creating a class inheriting the Macro
in STDM and the run
method:
#1
: imports Macro
from STDM.
#2
: imports type hints from the package in Python.
#4
: creates the MacroGetName
class inheriting Macro
.
#5
: overrides the run
method declared in Macro
.
Currently, the run
method returns True
no matter what the input is.
Let us create transitions using this macro. A macro is represented by an alias preceded by the pound sign (#
):
#4
: calls the macro #GET_NAME
that is an alias of MacroGetName
.
#13
: creates a dictionary defining aliases for macros.
#14
: creates an object of MacroGetName
and saves it to the alias GET_NAME
.
To call the macro, we need to add the alias dictionary macros
to the dialogue flow:
#3
: adds all macros defined in macros
to the dialogue flow df
.
The run
method has three parameters:
vars
: is the variable dictionary, maintained by a DialogueFlow
object, where the keys and values are variable names and objects corresponding to their values.
args
: is a list of strings representing arguments specified in the macro call.
Let us modify the run
method to see what ngrams
and vars
give:
#2
: prints the original string of the matched input span before preprocessing.
#3
: prints the input span, preprocessed by STDM and matched by the Natex.
#4
: prints a set of n-grams.
When you interact with the the dialogue flow by running it (df.run()
), it prints the followings:
The raw_text
method returns the original input:
The text
method returns the preprocessed input used to match the Natex:
The ngrams
gives a set of all possible n-grams in text()
:
Finally, the vars
gives a dictionary consisting of both system-level and user-custom variables (no user-custom variables are saved at the moment):
Let us update the run
method that matches the title, first name, and last name in the input and saves them to the variables $TITLE
, $FIRSTNAME
, and $LASTNAME
, respectively:
#2
: creates a regular expression to match the title, first name and last name.
#3
: searches for the span to match.
#4
: returns False
if no match is found.
#6-18
-> exercise.
#20-22
: saves the recognized title, first name, and last name to the corresponding variables.
#24
: returns True
as the regular expression matches the input span.
Given the updated macro, the above transitions can be modified as follow:
#5
: uses the variables $FIRSTNAME
and $LASTNAME
retrieved by the macro to generate the output.
The followings show outputs:
Can macros be mixed with other Natex expressions?
Syntax | Description |
---|---|
Create a Python file under the package.
An covering common movie genres and a branch of movies that you target,
At least one ,
At least one (can be used inside a macro).
Create a Python file under the package.
Create a JSON file under the directory.
#11
: plays the song "".
ngrams
: is a set of strings representing every of the input matched by the Natex.
Although the last name is not recognized, and thus, it leaves a blank in the output, it is still considered "matched" because run()
returns True
for this case. Such output can be handled better by using the capability in Natex.
[ ]
A set of characters
( )
A capturing group
(?: )
A non capturing group
|
or
.
Any character except a newline
*
0 or more repetitions
*?
+
1 or more repetitions
+?
?
0 or 1 repetitions
??
{m}
Exactly m
repetitions
{m,n}
From m
to n
repetitions
{m,n}?
^
The start of the string
$
The end of the string
\num
The contents of the group of the same number
\d
Any decimal digit
\D
Any non-decimal-digit character
\s
Any whitespace character
\S
Any non-whitespace character
\w
Any alphanumeric character and the underscore
\W
Any non-alphanumeric character
Revisit your Quiz 2 and improve its language understanding capability using the large language model such as GPT.
Use ChatGPT to figure out the right prompts.
Use your trial credits from OpenAI to test the APIs.
Update the code to design a dialogue flow for the assigned dialogue system.
Create a PDF file quiz5.pdf
that describes the approach (e.g., prompt engineering) and how the large language model improved over the limitations you described in Quiz 2.
Answer the following questions in quiz5.py
:
What are the limitations of the Bag-of-Words representation?
Describe the Chain Rule and Markov Assumption and how they are used to estimate the probability of a word sequence.
Explain how the Word2Vec approach uses feed-forward neural networks to generate word embeddings. What are the advantages of the Word2Vec representation over the Bag-of-Words representation?
Explain what patterns are learned in the multi-head attentions of a Transformer. What are the advantages of the Transformer embeddings over the Word2Vec embeddings?
Consider that you want to extract someone's call name(s) during a dialogue in real time:
Design a prompt that extracts all call names provided by the user.
In "My friends call me Pete, my students call me Dr. Parker, and my parents call me Peter.", how does the speaker want to be called? Respond in the following JSON format: {"call_names": ["Mike", "Michael"]}
Let us write a function that takes the user input and returns the GPT output in the JSON format:
#2-6
: uses the ChatCompletition model to retrieve the GPT output.
#8-10
: uses the regular expression (if provided) to extract the output in the specific format.
Let us create a macro that calls MacroGPTJSON
:
#3
: the task to be requested regarding the user input (e.g., How does the speaker want to be called?).
#4
: the example output where all values are filled (e.g., {"call_names": ["Mike", "Michael"]}
).
#5
: the example output where all collections are empty (e.g., {"call_names": []}
).
#6
: the regular expression to check the information.
#7
: it is a function that takes the STDM variable dictionary and the JSON output dictionary and sets necessary variables.
Override the run
method in MacroGPTJSON
:
#2-3
: creates a input prompt to the GPT API.
#4-5
: retreives the GPT output using the prompt.
#7-11
: checks if the output is in a proper JSON format.
#13-14
: updates the variable table using the custom function.
#15-16
: updates the variable table using the same keys as in the JSON output.
Let us create another macro called MacroNLG
:
#3
: is a function that takes a variable table and returns a string output.
Finally, we use the macros in a dialogue flow:
The helper methods can be as follow:
N-gram Language Models, Jurafsky and Martin, Chapter 3 in Speech and Language Processing (3rd ed.), 2023.
Efficient Estimation of Word Representations in Vector Space, Mikolov et al., ICLR, 2013. <- Word2Vec
GloVe: Global Vectors for Word Representation, Pennington et al., EMNLP, 2014.
Deep Contextualized Word Representations, Ppeters et al., NAACL, 2018. <- ELMo
Attention is All You Need, Vaswani et al., NIPS, 2017. <- Transformer
Generating Wikipedia by Summarizing Long Sequences, Liu et al., ICLR, 2018.
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding, Devlin et al., NAACL, 2018.
Neural Machine Translation of Rare Words with Subword Units, Sennrich et al., ACL, 2016. <- Byte-Pair Encoding (BPE)
Google’s Neural Machine Translation System: Bridging the Gap between Human and Machine Translation, Wu et al., arXiv, 2016. <- WordPiece
SentencePiece: A simple and language independent subword tokenizer and detokenizer for Neural Text Processing, Kudo and Richardson, EMNLP, 2018.
Improving Language Understanding by Generative Pre-Training, Radford et al., OpenAI, 2018. <- GPT-1
Language Models are Unsupervised Multitask Learners, Radford et al., OpenAI, 2019. <- GPT-2
Language Models are Few-Shot Learners, Brown et al., NeurIPS, 2020. <- GPT-3
Let us create a simple transition that counts how many times the user visits:
#4
: calls the macro #VISITS
defined in #7
.
MacroVisits
can be defined as follow:
#10-13
: uses the match statements to return the appropriate literal.
The challenge is that we must save the number of visits to make this macro effective (and correct). This can be achieved by saving the variable dictionary into a binary file using the built-in Python object serialization called pickle:
#1
: takes a dialogue flow df
and a file path varfile
for saving the variable dictionary to.
#3
: creates a dictionary by copying only user-generated variables.
#4
: opens a writable (w
) and binary (b
) file and dumps the dictionry object into the file.
After running this code, you will see the visits.pkl
file saved under the resources
directory.
The following code shows how to load the saved dictionary to a new dialogue flow:
#1
: takes a dialogue flow df
and a file path varfile
for loading the variable dictionary from.
#2
: opens a readable (r
) and binary (b
) file and loads the object as a dictionary.
#3
: adds all variables in the loaded dictioinary to the variable dictionary of df
.
#5
: saves the new variable dictionary to the same file.
Give me 10 unique ways of me asking to make an appointment with professors for general purposes. Write as I would speak to the professor's secretary. Use "Prof.", "Dr.", or "Professor" to indicate professors.
Hi there, could you please help me schedule a meeting with Prof. Smith?
Good morning, I was hoping to set up a time to speak with Dr. Brown. Could you assist me with that?
Hello, I'm interested in scheduling a general appointment with Professor Green. Would it be possible for you to arrange that for me?
Greetings, I would like to schedule a meeting with Prof. Garcia. Is there a convenient time we could arrange?
Hi, I would appreciate your help setting up a time to meet with Dr. Patel. Could you let me know his availability?
Good day, I would like to request a meeting with Professor Jones for general purposes. Can you assist me in scheduling that?
Hello, I need to speak with Dr. Kim and was hoping to schedule an appointment. Could you please let me know when she is available?
Good morning, I would like to set up a meeting with Prof. Nguyen. Could you please help me arrange that?
Hi, I am interested in speaking with Dr. Lee and was hoping to schedule a time to meet. Could you assist me with that?
Good day, I would like to request a general appointment with Professor Chen. Could you please help me schedule a time to meet with her?
Give me 10 unique ways of me asking to make an appointment with professors regarding coursework. Write as I would speak to the professor's secretary. Use "Prof.", "Dr.", or "Professor" to indicate professors. Add specific times.
Hi there, could I please schedule an appointment with Prof. Johnson to discuss coursework? I'm available next Tuesday from 2-3pm if that works for him.
Hello, may I request an appointment with Dr. Lee to go over some coursework? I'm free on Thursday mornings before 11am, would that be possible?
Good morning, could I schedule a meeting with Professor Green to talk about our coursework? I'm available on Wednesday afternoons after 1pm, is that a good time for her?
Hi, I was wondering if it would be possible to set up a time to meet with Dr. Patel about coursework? I have availability on Monday and Wednesday evenings after 6pm, would either of those work for her?
Hello, I would like to make an appointment with Professor Hernandez to discuss our coursework. I'm free on Friday mornings between 9am and 11am, could we schedule something then?
Good afternoon, could I request a meeting with Dr. Kim to go over some coursework? I have availability on Tuesday afternoons from 3-4pm, would that work for her?
Hi there, I was hoping to schedule a time to talk with Professor Chen about our coursework. I'm available on Thursday evenings after 5pm, would that be a good time for him?
Hello, may I schedule a meeting with Dr. Jones to discuss some coursework? I'm free on Monday mornings before noon, would that work for her?
Good morning, could I please set up an appointment with Professor Nguyen to go over our coursework? I have availability on Wednesday afternoons from 2-3pm, would that be convenient for her?
Hi, I would like to make an appointment with Dr. Smith to discuss some coursework. I'm available on Friday afternoons after 1pm, would that be a good time for him?
Replace all professors with their full names.
Hi there, could I please schedule an appointment with Professor Elizabeth Johnson to discuss coursework? I'm available next Tuesday from 2-3pm if that works for her.
Hello, may I request an appointment with Dr. Amanda Lee to go over some coursework? I'm free on Thursday mornings before 11am, would that be possible?
Good morning, could I schedule a meeting with Professor Emily Green to talk about our coursework? I'm available on Wednesday afternoons after 1pm, is that a good time for her?
Hi, I was wondering if it would be possible to set up a time to meet with Dr. Rahul Patel about coursework? I have availability on Monday and Wednesday evenings after 6pm, would either of those work for her?
Hello, I would like to make an appointment with Professor Sofia Hernandez to discuss our coursework. I'm free on Friday mornings between 9am and 11am, could we schedule something then?
Good afternoon, could I request a meeting with Dr. Ji-Young Kim to go over some coursework? I have availability on Tuesday afternoons from 3-4pm, would that work for her?
Hi there, I was hoping to schedule a time to talk with Professor Yen-Ling Chen about our coursework. I'm available on Thursday evenings after 5pm, would that be a good time for him?
Hello, may I schedule a meeting with Dr. Lauren Jones to discuss some coursework? I'm free on Monday mornings before noon, would that work for her?
Good morning, could I please set up an appointment with Professor Thu-Huong Nguyen to go over our coursework? I have availability on Wednesday afternoons from 2-3pm, would that be convenient for her?
Hi, I would like to make an appointment with Dr. James Smith to discuss some coursework. I'm available on Friday afternoons after 1pm, would that be a good time for him?
Give me 10 unique ways of me asking to make an appointment with professors regarding research. Write as I would speak to the professor's secretary. Use only first names to indicate professors without "Prof.", "Dr.", or "Professor". Add specific times where multiple options are allowed.
Hi there! Could I schedule a meeting with Sarah sometime this week to discuss research? I'm available on Tuesday at 2 pm, Wednesday at 10 am, or Thursday at 3 pm.
Hello! I was wondering if I could set up a time to chat with David about some research I'm working on. Is he available next Monday at 11 am, Wednesday at 1 pm, or Friday at 3 pm?
Good morning! Can I schedule a meeting with Jessica to talk about research opportunities? I'm free on Tuesday at 11 am, Thursday at 2 pm, or Friday at 10 am.
Hey there! Could I arrange a time to meet with John to discuss a research project I'm working on? I'm available on Monday at 1 pm, Wednesday at 3 pm, or Friday at 11 am.
Hi! I would love to schedule a meeting with Lisa to talk about some research ideas I have. Would next Wednesday at 10 am, Thursday at 2 pm, or Friday at 11 am work for her?
Good afternoon! I was hoping to schedule a meeting with Michael to discuss a potential research collaboration. Is he available on Tuesday at 3 pm, Wednesday at 10 am, or Friday at 2 pm?
Hello there! Can I arrange a time to meet with Rachel to discuss research opportunities in her department? I'm free on Monday at 11 am, Wednesday at 1 pm, or Friday at 3 pm.
Hey! Could I schedule a meeting with Sam to talk about a research project I'm working on? I'm available on Tuesday at 2 pm, Thursday at 11 am, or Friday at 10 am.
Hi, I'd like to schedule a meeting with Tom to discuss a research proposal I'm developing. Would next Monday at 2 pm, Wednesday at 10 am, or Thursday at 3 pm work for him?
Good morning! I was hoping to set up a time to meet with Victoria to discuss some research ideas I have. Is she available on Tuesday at 1 pm, Thursday at 3 pm, or Friday at 10 am?
Give me 10 unique ways of me asking to make an appointment with professors regarding specific course issues (e.g., homework, quiz, midterm, final, exam). Write as I would speak to the professor's secretary. Use "Prof.", "Dr.", or "Professor" to indicate professors. Add specific time for the appointment.
Hello, may I schedule a meeting with Prof. Smith to discuss some issues with the upcoming midterm? How about next Tuesday at 3 PM?
Good morning, could I make an appointment with Dr. Johnson to talk about the final exam? Would next Wednesday at 1 PM work for you?
Excuse me, can I schedule a meeting with Professor Brown to go over some questions I had on the last quiz? What about this Thursday at 10 AM?
Hi, I was wondering if I could meet with Prof. Garcia to discuss a specific homework problem. Is there any availability next Friday at 2 PM?
Good afternoon, can I make an appointment with Dr. Kim to talk about some course material I am struggling with? How about next Monday at 11 AM?
Hello, may I schedule a meeting with Professor Patel to discuss an issue with the midterm grades? Would next Wednesday at 4 PM be possible?
Excuse me, I would like to make an appointment with Prof. Jones to review some final exam questions. What about this Friday at 9 AM?
Hi, I was hoping to schedule a meeting with Dr. Davis to discuss some study strategies for the upcoming final exam. Is there any availability next Thursday at 2 PM?
Good morning, can I make an appointment with Professor Lee to discuss some questions I have about the course syllabus? How about next Tuesday at 1 PM?
Hello, I would like to schedule a meeting with Dr. Hernandez to discuss some exam review material. Is there any availability next Monday at 3 PM?
Specify when the homework, quiz, midterm, final, exam was.
Hi, could I schedule a meeting with Prof. Johnson to discuss some issues with the homework we turned in last Friday? How about next Tuesday at 3 PM?
Good morning, I was wondering if I could make an appointment with Dr. Williams to go over some questions I had on the quiz we took last week. Would next Wednesday at 1 PM work for you?
Excuse me, may I schedule a meeting with Professor Brown to talk about the midterm we took two weeks ago? What about this Thursday at 10 AM?
Hi, I would like to make an appointment with Prof. Garcia to discuss a specific problem on the final exam we took last month. Is there any availability next Friday at 2 PM?
Good afternoon, could I make an appointment with Dr. Kim to talk about some course material we covered in class yesterday? How about next Monday at 11 AM?
Hello, I was wondering if I could schedule a meeting with Professor Patel to discuss an issue with the midterm grades that were posted last week. Would next Wednesday at 4 PM be possible?
Excuse me, may I schedule a meeting with Prof. Jones to review some final exam questions that we went over in class last week? What about this Friday at 9 AM?
Hi, I would like to schedule a meeting with Dr. Davis to discuss some study strategies for the upcoming final exam that is in two weeks. Is there any availability next Thursday at 2 PM?
Good morning, could I make an appointment with Professor Lee to discuss some questions I have about the course syllabus and the midterm that we took three weeks ago? How about next Tuesday at 1 PM?
Hello, may I schedule a meeting with Dr. Hernandez to discuss some exam review material that was covered in class yesterday? Is there any availability next Monday at 3 PM?
Give me 10 unique ways of me asking to make an appointment with professors regarding research issues (e.g., progress, deadline, result). Write as I would speak to the professor's secretary. Use "Prof.", "Dr.", or "Professor" to indicate professors.
Hi, may I please schedule a meeting with Prof. Smith to discuss my research progress and set some deadlines?
Good morning, I was hoping to arrange a meeting with Dr. Johnson to review the results of my research project.
Hello, could you help me schedule an appointment with Professor Garcia to discuss some issues related to my research?
Hi, I need to meet with Prof. Lee to discuss the results of my research and get some feedback on next steps. Can you help me schedule a meeting?
Good afternoon, I'd like to schedule a meeting with Dr. Patel to discuss the progress of my research and any areas where I need to improve.
Hello, I'd like to set up a meeting with Professor Kim to discuss my research project and ask for advice on how to proceed.
Hi, could you help me schedule a meeting with Prof. Brown to talk about my research progress and any issues I'm encountering?
Good morning, I need to meet with Dr. Davis to discuss the results of my research and get some guidance on next steps. Can you help me schedule a meeting?
Hello, I'd like to arrange a meeting with Professor Nguyen to discuss my research and get some feedback on how I can improve it.
Hi, may I please schedule a meeting with Prof. Taylor to review the progress of my research and discuss any concerns or questions I have?
Replace all professors with their full names. Indicate another person who also wants to come to this appointment.
Hi there, could I please schedule an appointment with Professor Jane Smith and my research partner, John Doe, to discuss the progress of our research project?
Good morning, I was hoping to schedule a meeting with Dr. Emily Johnson and my lab assistant, Sarah Lee, to talk about the results of our latest experiment.
Hello, I would like to request a meeting with Professor William Brown and my co-author, Karen Chen, to discuss the deadlines for our research paper.
Hi, could you help me schedule a time to meet with Professor Sungsoo Kim and my graduate student, Michael Park, to go over the progress of our thesis?
Good afternoon, I need to speak with Dr. Maya Patel and my research assistant, David Rodriguez, regarding the results of our research study. Could you assist me in scheduling a meeting?
Hello, I was hoping to schedule a meeting with Professor Youngjin Lee and my fellow lab member, Jiyeon Kim, to discuss the next steps for our research project.
Good morning, I need to speak with Dr. Carlos Garcia and my co-researcher, Maria Torres, about our research proposal. Could you please help me schedule a meeting?
Hi, I'd like to request a meeting with Professor Rachel Davis and my research partner, Steven Nguyen, to talk about the progress of our research project and any feedback they may have.
Hello, I would like to schedule a time to meet with Dr. Adam Adams and my co-investigator, Laura Nguyen, to discuss the results of our latest research experiment and any potential implications.
Good afternoon, I need to speak with Professor Lingling Chen and my research collaborator, Wei Zhang, regarding the deadlines for our research paper. Could you please assist me in scheduling a meeting with them?
G: General
C: Coursework
R: Research
CI: Course Issues
RI: Research Issues
1. Is the following about making an appointment? Respond with "yes" or "no". 2. Who does the speaker want to meet? Respond with the name. 3. What are the suggested times? Respond with bullet points 4. What is it about? Save the answer to a JSON format such as {"Q1": "yes", "Q2": [{"first_name": "John", "last_name": "Doe"}], "Q3": ["Monday at 1 pm"], "Q4": "Regarding the deadlines for their research paper."}:
Now is 2023-03-10 12:05. Convert "Tomorrow at 3:30pm" to the absolute date and time. Respond in the following JSON format: {"from": "%Y-%m-%d %H:%M", "to": "%Y-%m-%d %H:%M"}.
"Thursday evenings after 5pm"
"Thursday between 3:30 - 5pm"
Guidelines to prepare a team project proposal.
Every team is expected to give a 12 mins presentation.
Your presentation must include key contents from each section in the report (see below).
The proposal writing must be created in LaTex using this template.
The proposal should be 6 - 8 pages, including figures and tables (excluding references). Your proposal must include the following:
Write an abstract summarizing your proposal.
What is the team vision of your dialogue system? What makes your system interesting and important? Is a dialogue system the best practice to pursue your vision?
Who is your primary target audience? If your target audience is narrow, what is your strategy to engage the general audience in your system?
Describe a high-level dialogue flow of your system. Additionally, provide sample dialogues that you expect your system to conduct.
Describe your scientific approach in detail. What techniques and/or datasets will you use, and how do you plan to integrate them into your system?
How will you evaluate your system? Be specific about what aspects you plan to assess and how you will conduct such evaluation in terms of metrics and demographics.
What is novel about your system? Survey similar existing systems and compare them to show the uniqueness of your system.
Provide a weekly timeline specifying which members will work on which parts.
Submit your presentation slides and the report in PDF to Canvas.
The degree to which the chatbot is able to achieve its intended goals and produce desirable outcomes for users.
Whether the advice provided helps the user feel more confident in their conversational abilities.
How well it provides mental health support to individuals with varying levels of stress.
Whether the user found the previous interaction helpful.
Whether the chatbot was able to successfully complete her goal with the help of the chatbot.
The user's rating of how much the chatbot helped them in their career path.
How users feel about its ability to prepare them for real interviews.
The degree to which the chatbot meets users' expectations and provides a satisfactory experience.
Whether the insights, questions, and communication are well-balanced and whether the users feel comfortable with the ideal proportion.
How comfortable the user felt during the conversation.
Whether it understood the user's needs and provided personalization based on their style and preferences.
Whether the user felt a bit better after the interaction.
The pleasantness of the system persona and whether it meets users' expectations.
The degree to which the chatbot provides accurate and correct information or recommendations to users.
How accurately it identifies the presence of stress and changes response style accordingly.
Whether the bot's suggestions were relevant to the user's personal taste, style, and preferences, and whether the user would wear everything suggested by the bot.
The accuracy of its performance metrics, such as the accuracy of style recommendations.
Whether it is successful in making accurate recommendations for the user.
The quality and specificity of the feedback users received from the system, and whether the feedback provided accurate and correct information.
The degree to which the chatbot's responses and actions can be understood and interpreted by users.
Whether users can understand what the chatbot is saying.
Whether users experience instances of missed messages, misunderstandings, or abrupt exits, and whether the chatbot's responses can be interpreted clearly by users.
Its ability to understand the context of users' inquiries and provide relevant responses that can be understood and interpreted by users.
Whether the chatbot can assess the user's level of knowledge and adjust its responses accordingly, whether it uses language that the user can understand, and whether the user feels engaged with the chatbot's insights.
The degree to which the chatbot's responses and actions are logically consistent and connected with each other, and with the context of the conversation.
Whether it can recognize the topics mentioned by the user and provide relevant information that is logically connected with those topics.
Whether its responses are self-explanatory and related to each other in a logical and coherent manner.
Its level of consistency with actual interviews, i.e., whether its responses are logically consistent with the expectations and norms of real-life interviews.
Whether its suggestions are relevant and helpful for the given topic, and whether they are logically consistent with the context of the conversation.
The degree to which the chatbot's responses and actions resemble those of a human being, and are perceived as natural, fluent, and realistic by users.
How closely its responses resemble those of a human being, i.e., whether they are naturalistic in terms of language, syntax, grammar, tone, and other linguistic aspects.
The degree to which the chatbot's responses and actions adhere to ethical principles and standards, and avoid causing harm or offense to users or other stakeholders.
Whether it contains any content or responses that are offensive or inappropriate, such as hate speech, discrimination, or harassment.
The degree to understand and respond to the emotions and feelings of users in a compassionate and sensitive manner, and to provide emotional support or encouragement when appropriate.
Whether it demonstrates an understanding of the user's emotions and concerns, and responds in a way that is supportive and validating.
Using appropriate language and tone, acknowledging the user's perspective, and offering words of encouragement or empathy.
The degree to provide accurate and useful information to users in response to their queries or requests for assistance.
Its ability to provide factual information about fitness, such as exercise techniques, workout routines, or nutrition advice.
Assessing the accuracy and relevance of the information provided, as well as the chatbot's ability to understand and respond appropriately to the user's specific needs and goals.
The degree to capture and hold the user's attention, as well as to create a positive and enjoyable user experience.
The user's level of interest and involvement during the conversation.
Assessing the chatbot's ability to generate interesting and relevant topics of conversation, to respond in a timely and personalized manner, and to use engaging language and visual elements to create a more immersive and interactive experience.
The degree to tailor its responses and recommendations to the individual user's preferences, needs, and past interactions.
Evaluate the chatbot's ability to personalize advice based on the user's preferences and past interactions.
Whether the chatbot can effectively use data about the user, such as their history, feedback, and stated preferences, to provide personalized responses and recommendations. The following example illustrates this concept:
Create an account for OpenAI and log in to your account.
Click your icon on the top-right corner and select "View API keys":
Click the "+ Create new secret key" button and copy the API key:
Make sure to save this key in a local file. If you close the dialog without saving, you cannot retrieve the key again, in which case, you have to create a new one.
Create a file openai_api.txt
under the resources
directory and paste the API key to the file such that it contains only one line showing the key.
Add openai_api.txt
to the .gitignore
file:
Do not share this key with anyone or push it to any remote repository (including your private GitHub repository).
Open the terminal in PyCharm and install the OpenAI package:
Create a function called api_key()
as follow:
#4
: specifies the path of the file containing the OpenAI API key.
Retrieve a response by creating a ChatCompletition
module:
#1
: the GPT model to use.
#2
: the content to be sent to the GPT model.
#3
: creates the chat completion model and retrieves the response.
#5
: messages are stored in a list of dictionaries where each dictionary contains content from either the user
or the system
.
Print the type of the response and the response itself that is in the JSON format:
#1
: the response type.
#2
: the response in the JSON format.
Print only the content from the output:
The presentation should include only the proposed project, not the LINC movie discussion:
Every team is expected to give a 12 mins presentation.
Your presentation must include key contents from each section in the report (see below).
The proposal writing must be created in LaTex using .
The report should be 8 - 10 pages, including figures and tables (excluding references). Your proposal must include the following:
Abstract: Summarize the report, including the motivation, approach, and results.
Vision: Explain what this project aims to accomplish and why that is beneficial to society.
Challenges: Describe the main challenges of your project. Describe how your vision, approach, evaluation, etc. may have changed due to the challenges.
Dialogue Flow: Describe the overall dialogue flow of your system. Additionally, provide sample dialogues that your system can conduct.
Methodology: Illustrate specific methods used in your chatbot (other than the ones built-in STDM), including external APIs, datasets, macros, etc.
Evaluation: Describe the demographics and statistics of the users who participated in assessing your chatbot. Explain in detail how you evaluate your chatbot.
Novelty: Point out the main novelty of your chatbot against competitors. Survey on related systems similar to yours.
Contributions: Depict the contribution of each team member throughout the course of the project and estimate the percentages of individual contributions so that they sum up to 100%.
Submit your presentation slides and the report in PDF to Canvas.
Spring 2023
This seminar examines the realities of translation in multiple settings and contexts. Translation is embedded into our everyday lives, central to newsfeeds, religious texts, politics, Netflix and literature. Often, however, the phenomenon is unremarked, rendered invisible. Yet embedded within it are decisions with cultural, ethical and political ramifications. This course aims to make visible the people, issues and products involved: translators, subtitlers and interpreters; theories, strategies and methodologies; and the written and visual texts they produce. To that end, we will examine the history of translation via the Bible; study current issues in the field; and read work by several translators. Topics to include: translation and gender; bible translation; translation and race; LGBTQ issues in translation; subtitling; translators as social and political actors. Readings span fiction, memoir, theory, methodology, history, and journalism. Classes are discussion and workshop based and include numerous translation activities: comparing multiple versions of the same work, imitation pieces, translating genre and style, editing, and Oulipo activities. The course is taught in English, with no foreign language proficiency required.
Time: MW 10:00am - 11:15am
Location: Callaway S420
Instructor:
Time: 6 - 7:15PM, 2/8(W)
Location: Atwood 215
Time: 6 - 7:15PM, 3/15(W)
Location: Atwood 215
Your task is to evaluate your team chatbot given the following instructions:
This is an individual assignment. Each member must evaluate the team chatbot separately.
You need to evaluate at least 5 categories (e.g., ). Give a clear description of each category. You are welcome to discuss them with your team; however, your description must be original.
Create a static form to evaluate your chatbot. Your form should include a metric (e.g., Likert scale of 1 - 3) to evaluate each category and ask for reasons for the assessment.
Find a group of 10 people suitable to interact with your chatbot. Each interactor will evaluate your chatbot after one or more conversations using the static form.
Submit quiz6.pdf
summarizing your evaluation results, including:
Your evaluation categories and their descriptions.
Quantitative analysis of your chatbot using the metric.
Qualitative analysis of your chatbot using assessment reasoning.
Based on the analyses, potential improvements can (or should) be made.
Spring 2023
English Premier League Chatbot: Guide to the World’s Most Exciting Football League (Team 1) : Cholyeon Cho, Hasong Cho, Changhyun Kim, Melinda Zhang : (, : 7), (, : 8)
SpeakEasy (Team 2) : Max Bagga, Yella Diekmann, Harry Jeon, Victoria Ploerer, Rhea Ramachandran : (, : 18), (, , : 33)
KINDRED: Be the kindness you want to see (Team 3) : Microl Chen, Steve Li, Eugene Lim, Abbey Yuan : (, : 11), (, , : 16)
Becca: Your Personal Stylist (Team 4) : Rebecca Gerber, Cole Katz, Amya Moore, Yousef Rajeh, Andy Sun : (, : 10), (, : 5)
LEANNA: A Startup Business Model Chatbot (Team 5) : Yifei Gao, Yijun Liu, James Song, Jessie Wang, Eric Xue : (, : 17), (, , : 11)
LorelAI: A Music Recommendation Chatbot (Team 6) : Hazel Cho, Claire Fenton, Safia Read, Christopher Roebuck, Dani Royburg : (, : 24), (, : 16)
Interview Chatbot (Team 7) : Bilal Haider Zaidi, Ameer Husary, Rauf Iftikhar, Noah Okada : (, : 7), (, : 23)
SDevJobs: Software Development Jobs (Team 8) : Billy Ge, Jason Liu, Latifa Tan, Feiyu Xiang : (, : 17), (, : 4)
Revolutionizing Fashion with a Stylist Chatbot (Team 9) : Flora Chen, Nicole Cui, Siying Ren, Mark Si, Sammuel Yang : (, : 12), (, : 14)
Kennedi: College Applications Mentor (Team 10) : Tierra Ablorh, Andrea Brink, Ethan Krein, Katya Kurchin : (, : 17), (, : 15)
Fido: The Feelings Bot (Team 11) : Ezra Greidinger, Darin Kishore, Raphael Palacio, Eric Pina : (, : 11), (, : 13)
GymBrOT (Team 12) : Sarah Bekele, Devin Gee, Kristen Gram, Harry He : (, : 9), (, , : 14)
Dool-E (Team 13) : Ajay Karthik, Victoria Knieling, Hyungsuk Lee, Andrew Levy : (, : 4), (, : 8)
LoLa: A League of Legends ChatBot (Team 14) : Jacob Choi, Sean Hong, Rishie Srivastava, Claude Zheng : (, : 10), (, : 3)
[02/22] 1, 3, 6, 9
[02/27] 4, 8, 10, 12, 14
[03/01] 2, 5, 7, 11, 13
20+: 3 points (1 extra credit)
≥ 17: 2 points
≥ 9: 1 point
< 9: 0 point
[04/12] 2, 5, 7, 11, 13
[04/17] 4, 8, 10, 12, 14
[04/19] 1, 3, 6, 9
What is a conversational analysis, and why is it important?
Conversational Analysis is the study of how people communicate in everyday interactions.
Communication is a fundamental part of human interaction, and studying it can help us better understand social dynamics and cultural norms.
It involves analyzing the structure of conversations, including turn-taking, topic initiation and maintenance, and repair strategies.
By examining these elements, researchers can gain insight into the social dynamics of a particular interaction and the underlying cultural norms that guide communication.
Can the study of Human-to-Human Conversational Analysis be applied to analyze Huaman-to-Machine conversations?
How to conduct a conversational analysis?
-> It allows you to analyze the conversation in detail and identify patterns in the interaction.
-> It helps you understand the social context of the conversation.
-> It helps you understand the patterns of communication between speakers.
-> It helps you understand how speakers introduce and develop discussion topics.
-> It helps you understand how speakers handle communication breakdowns and errors.
-> It helps you understand how cultural norms, values, and beliefs influence communication.
If your conversations are based on an audio or video interface, recording and transcribing them enables you to go back and analyze the conversation to gain a deeper understanding.
There are several automatic transcribers available:
When analyzing a conversation, it is important to consider the gender, age, social status, and other relevant characteristics of the speakers. These factors can influence communication and provide important context for understanding the conversation.
Diversity: Including a diverse range of participants can provide insights into how different groups communicate and interact. It can include age, gender, race, ethnicity, socioeconomic status, and cultural background.
Context: Conversations in different settings, such as workplaces or social gatherings, may involve different communication styles and norms.
Purpose: Conversations focused on a specific topic or goal may involve different communication strategies than casual conversations.
Power Dynamics: Conversations that involve power imbalances, such as a boss and an employee, may involve different communication patterns than conversations between peers.
Relationship: Conversations between strangers may involve different communication patterns than conversations between friends or family members.
Identify ideal participants for testing your chatbot and discuss your strategy to gather such participants for the final project.
Turn-taking refers to the way that speakers take turns participating in the interaction. It includes both the decision to speak and the transition between speakers. Turn-taking can reveal:
Power imbalances between speakers, with some individuals dominating the conversation and others having less opportunity to speak.
How speakers collaborate and negotiate with each other to move the conversation forward.
Analysis aspects:
Message Length: The length of messages can indicate a speaker's intention to take a turn or signal that they have finished speaking.
Response Time: The time it takes for a speaker to respond to a message can indicate their intention to take a turn or signal that they are finished speaking.
Use of Markers: Speakers may use markers such as ellipses, dashes, or quotation marks to signal that they are taking a turn or indicate that they are listening to another speaker.
Emojis / Emoticons: The use of emojis or emoticons can indicate a speaker's attitude, emotion, or intention to take a turn.
Repetition: Speakers may repeat words or phrases to indicate their intention to take a turn or emphasize a point.
What are your strategies to balance the lengths between the chatbot and the users? Can you use any of the above cues to improve the overall quality of the conversations?
Topic initiation refers to how speakers introduce a new topic of conversation, while topic maintenance refers to how they keep the conversation focused on that topic. Through this analysis, we:
Gain insights into the participants' interests, goals, and social context.
Understand how speakers collaborate to build shared understanding and mutual goals.
Learn effective communication techniques for keeping conversations focused and productive.
Analysis aspects:
Topic Introduction: Speakers may introduce a new topic of discussion explicitly by using phrases such as "By the way," "Speaking of," or "Have you heard about". Such phrases indicate the speaker intends to change the topic or introduce something new.
Topic Development: Speakers may develop a topic by providing additional information or asking related questions. They may use open-ended, follow-up, or clarifying questions to maintain the topic.
Topic Shift: Speakers may shift the topic of discussion by changing the subject or introducing a new topic. Such shifts may be explicit or implicit and can be signaled by phrases such as "Anyway," "Moving on," or "So, as I was saying".
Topic Re-introduction: Speakers may re-introduce a topic discussed earlier by referring to it or bringing it up again. Such references can indicate that the speaker wants to continue discussing or bring attention to the topic.
Nonverbal Cues: Speakers may use punctuation or capitalization for emphasis or tone to indicate their intention to initiate or maintain a topic.
Does your chatbot allow users to introduce or switch topics? How does your chatbot proceed when users intend to do so?
Repair strategies refer to techniques used by speakers to correct misunderstandings, clarify meaning, or resolve problems in communication. It allows us to:
Identify areas where communication breakdowns are more likely to occur, such as when speakers have different cultural backgrounds, use different languages, or have varying knowledge about the discussed topic.
Identify communication patterns that may be hindering effective communication. For example, a speaker consistently interrupts others or fails to listen actively can lead to more frequent communication breakdowns.
Several aspects need to be analyzed to understand repair strategies:
Self-repair: Speakers may self-correct errors or repair communication breakdowns in real time by repeating or rephrasing their previous statement.
Other-repair: Speakers may ask their conversational partner to repeat or clarify what they said to repair communication breakdowns. They may also offer suggestions or provide information to help resolve the problem.
Repair Initiation: Speakers may initiate repair by indicating a problem or error in communication, such as saying, "I didn't understand what you said," or "Can you repeat that?".
Repair Resolution: Speakers may resolve the problem by clarifying, repeating, or rephrasing their previous statement or using other strategies to ensure successful communication.
Lexical Choice: The words speakers choose to use can impact the success of the repair. They may use more straightforward language to clarify their message or help their conversational partner understand.
Does your chatbot have any repair strategies? What are effective ways of catching them in STDM?
Cultural context refers to the social norms, values, and beliefs that influence communication. They can vary between different cultures and can impact how people interact with each other:
In some cultures, interrupting someone may be seen as assertive and confident, while in others, it may be seen as rude or disrespectful.
Some cultures may place a high value on politeness and indirect communication, while others may value directness and assertiveness.
Culture shapes how individuals perceive and interpret the world around them. By analyzing the cultural context, we can:
Gain insights into how communication is influenced by cultural factors such as social status, gender roles, power dynamics, and language proficiency.
Recognize and address potential biases or assumptions we may bring to the interaction.
Avoid misunderstandings and communicate more respectfully and effectively with people from different cultural backgrounds.
Analysis aspects:
Social Norms: Different cultures may have different social norms that dictate appropriate behavior in conversation, such as turn-taking, interruptions, and politeness strategies.
Language Use: Language use may vary based on cultural context, including vocabulary, grammar, and pronunciation. For example, some languages may have different words or expressions for the same concept, or different cultures may have different levels of formality in their language use.
Worldviews: Cultural differences can impact how people perceive and interpret events and actions. These differences can manifest in conversation through differences in humor, storytelling, and nonverbal communication.
Values and Beliefs: Different cultures may have different values and beliefs, influencing how people communicate and what topics they discuss. For example, some cultures may prioritize directness and honesty, while others prioritize harmony and social relationships.
Contextual Factors: Cultural context is also influenced by contextual factors such as the purpose of the conversation, the setting, and the relationship between speakers.
Please watch the movie before coming to this meeting. You can watch it at Emory's Swank Streaming: .
Category | OpenAI Whisper | Microsoft Azure | Rev AI |
---|
Website |
Pricing | Free | $1 / hour | $0.02 / minute |
Interface | Local Installation | Azure Platform | Web API |
Diarization | No | Yes | Yes |
Pros | Handles noisy environments well | High accuracy | East to use |
Cons | Requires a local GPU machine | Can be difficult to configure | Pricier than Azure for less accuracy |