Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1: Personality-aware Chatbot [100 marks] Have you ever wondered how smart are chatbots nowadays in interacting with users? Do you know they use conversational

Question 1: Personality-aware Chatbot [100 marks]

Have you ever wondered how smart are chatbots nowadays in interacting with users? Do you know they use conversational AI to automatically perceive and respond based on what they receive? In this part of the assignment, you are going to implement a personality-aware chatbot, called Pchatbot, which can have limited interaction with the user but is interesting enough to motivate you to think about developing a real personality-aware chatbot in the close future.

Your implemented chatbot should ask the following questions from the user to complete a conversation:

1. 'Hi, this is Pchatbot, can I talk to you? ' 2. 'What is your name? ' 3. 'How are you doing today? '

4. 'How old are you? ' Your program should have the following features:

For the first question it should be able to accept these inputs from the user: 'Y', 'y', 'N', and 'n'.

In the case of Y and y Pchatbot should continue the conversation. In the case of N and n Pchatbot should terminate the conversation with this message: 'Okay!

Talk to you soon!'.

For the second question, Pchatbot first should take the user name and print the message: 'Nice to

meet you, Name.' and Name refers to the name that Pchatbot took from the user.

For the third question, Pchatbot should be prepared to accept two categories of answers from the

user and react accordingly:

Positive response: if the user feels good and the answer is 'Good', 'I'm great', 'I'm good' or 'Fine', then, your chatbot should respond 'I'm glad you're feeling well, Name.'. Note that Name refers to the user name.

Negative response: if the user doesnt feel good and the answer is 'Bad', 'Not Okay', or 'I 'm not feeling good', then, the chatbot should respond 'Have some time to yourself to recharge!'.

Other response: Chatbot should say 'I see!' for any other users answer.

For the fourth question, if the user is older than 18 years (age > 18) and his response to the third question is only in the Positive response category Pchatbot should reply 'You are ready to drive.' Otherwise, Pchatbot should answer 'Still taking the bus!', and this is going to be the end of the user and Pchatbot interaction.

Figure 1 show some sample interactions between Pchatbot and the user. For this question You must name your code file q1.py and upload it to the HW1Q1: Personality-aware Chatbot section on Gradescope.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Robb,Carlos Coronel

5th Edition

061906269X, 9780619062699

More Books

Students also viewed these Databases questions