# 3.5. Quiz

## Overview

Your goal is to create a chatbot that talks about movies. Here is a sample dialogue:

{% code lineNumbers="true" %}

```
S: Hello, may I have your name?
U: Call me Jinho.
S: It's nice to meet you, Jinho. What was the latest movie you watched?
U: That'd be Spider Man No Way Home.
S: I love Marvel movies. Who is your favorite avenger?
U: Captain America.
S: Captain is my man. So I guess you are a big fan of Sci-Fi movies?
U: Yes, I am.
S: Excellent. Why do you like them so much?
U: They make me feel like living in the future.
S: I'm with you. Thanks for sharing.
```

{% endcode %}

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:

* An [ontology](https://emory.gitbook.io/conversational-ai/3.-contextual-understanding/3.2.-ontology) covering common movie genres and a branch of movies that you target,
* At least one [macro](https://emory.gitbook.io/conversational-ai/3.-contextual-understanding/3.5.-macro),
* At least one [regular expression](https://emory.gitbook.io/conversational-ai/3.-contextual-understanding/3.4.-regular-expression) (can be used inside a macro).

## Task 1

1. Create a Python file [**`quiz3.py`**](https://github.com/emory-courses/conversational-ai/blob/main/src/quiz/quiz3.py) under the [`quiz`](https://github.com/emory-courses/conversational-ai/tree/main/src/quiz) package.
2. Create a JSON file [**`ontology_quiz3.json`**](https://github.com/emory-courses/conversational-ai/blob/main/resources/ontology_quiz3.json) under the [`resources`](https://github.com/emory-courses/conversational-ai/blob/main/resources/) directory.
3. Update them to design a dialogue flow for the chatbot.

## Task 2

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.

## Submission

1. Commit and push **`quiz3.py`** to your GitHub repository.
2. Submit **`quiz3.pdf`** to Canvas.
