You are on page 1of 20

CHATBOTS

Dr. Yll Haxhimusa


MECHANICAL TURK
The chess-playing automaton known as the
Mechanical Turk that was built in the 1770s
by Wolfgang von Kempelen to entertain the
Habsburg Archduchess Maria Theresa.
A mechanical figure wearing robes and a
turban sat behind a cabinet with a chessboard
on top.
CHATBOOT
WHAT IT IS?
 Definition

 A chatbot is an artificial intelligence powered software

 Tries to capture needs of consumer and then assist them to perform a particular task

 Collect data about customer satisfaction


HISTORY
 ELIZA

 First chatbot proposed by Joseph Weizenbaum


(German-American computer scientist) at MIT
Artificial Intelligence Laboratory (1966)

 It imitate the language of a Rogerian


psychotherapist from only 200 lines of code.
TWO VARIANTS OF CHATBOTS
 Rule-based Bots  Self-learning Bots
 The bots answers questions based on some rules  Machine learning-based approaches
on which it is trained  Retrieval based
 The rules defined can be very simple to very  Generative
complex. The bots can handle simple queries but
fail to manage complex ones
TWO VARIANTS OF CHATBOTS
 Rule-based Bots  Self-learning Bots
 Step one: questions  Step one: questions
 Step two: predefined rules  Step two: thinking
 Step three: answers  Step three: answers
SELF-LEARNING BOTS
 Retrieval-based Bots  Self-learning Bots
 heuristics  generate answers
 response  not always replies
 library  more ‘intelligent’
ELIZA
 Rule-based bot
 Textual question and answers

 Rules look like


 Rules look like
initial: How do you do. Please tell me your problem.
key: am
final: Goodbye. Thank you for talking to me.
decomp: * am i *
quit: goodbye
reasmb: Do you believe you are (2) ?
pre: maybe perhaps
reasmb: Would you want to be (2) ?
post: me you
reasmb: Do you wish I would tell you you are (2) ?
synon: desire want need
reasmb: What would it mean if you were (2) ?

~360 line of language rules


LEARNING RULES
 Use BigData Text Collection from all possible sources:
 Newspapers,
 Books,
 Facebook,
 Twitter,
 Intagram,
 ….
LEARNING RULES

Create your Training and Test Data Set Classification Methods


Text RNN
AND YOU GET
 The State of the Art in Chatting with a Bot
 Tidio
 ProProfs ChatBot
 Freshchat
 Landbot
 Salesforce
 Podium
 Mitsuku
 ChatGPT
CHATGPT
GPT (short for “Generative Pre-training Transformer”) is a type of language model developed
by OpenAI.
It is a neural network trained to generate human-like text by predicting the next word in a
sequence given a large dataset of examples.
Chat GPT refers to the use of this model in chat applications, where it can be used to generate
responses to user messages in real time.
It is designed to be able to carry on a conversation by understanding the context of the conversation
and generating appropriate responses.
CHATGPT
 Questions: explain the difference between a supervised and unsupervised machine learning, and
give a real life example of each. And yes, I’m aware of the irony of asking it a machine learning
question.
 The answer from ChatGPT:
 Supervised Machine Learning: Supervised machine learning is a type of machine learning algorithm that
uses labeled data to train a model. Labeled data is data that has been labeled with the correct answer or
output. For example, a supervised machine learning algorithm could be used to classify images of cats
and dogs. The algorithm would be trained on labeled data, such as images of cats labeled as “cat” and
images of dogs labeled as “dog”. Once the model is trained, it can then be used to classify new images of
cats and dogs.

i ve
ess
pr
im
CHATGPT
 Unsupervised Machine Learning: Unsupervised machine learning is a type of machine learning
algorithm that uses unlabeled data to train a model. Unlabeled data is data that does not have the correct
answer or output associated with it. For example, an unsupervised machine learning algorithm could be
used to cluster customer data. The algorithm would be trained on unlabeled data, such as customer
purchase history, age, gender, etc. Once the model is trained, it can then be used to group customers into
different clusters based on their similarities.

i ve
ess
pr
im
CHATGPT

im
pr
ess
i ve
AND…

The correct answer already given


YOU: If it takes 5 machines 5 minutes to make 5 devices, how long would it take 100 machines to
make 100 devices?
ChatGPT: If it takes 5 machines 5 minutes to make 5 devices, then it would take 100 machines
100 minutes to make 100 devices.
YOU: That's not right. Check carefully and try again.
ChatGPT: I apologize if my response was not correct. Can you please provide more information
or clarify your question? I may have misunderstood the scenario you described.
YOU: It takes a machine 5 minutes to make a device. How long would it take 100 machines to
make 100 devices?

i ve
ChatGPT: If it takes a single machine 5 minutes to make a single device, then it would take 100

ess
machines 5 minutes to make 100 devices. Therefore, it would take a total of 500 minutes for 100

pr
machines to make 100 devices.

im
SO
T
NO
WHY THE RIGHT AND THE
WRONG ANSWER
 The solution/problem is that the model learns everything present in the data.
 However, throw it a slightly different problem it has not seen before, and it fails to answer
spectacularly easy questions.
 What is only in the data will be learned – nothing else
ELIZA (IN ALBANIAN)
Taken the original paper from Weizenbaum and translated all the English language Rules into Albanian

 Rules look like  Rules look like


initial: Si jeni. Ju lutem më tregoni problemin tuaj. key: jam
final: Mirëupafshim! Falemnderit që biseduat me mua. decomp: * jam unë *
quit: mirëupafshim reasmb: A besoni se jeni (2) ?
pre: ndoshta mbase reasmb: A do të dëshironit të jeni (2) ?
post: mua ti reasmb: Dëshironi t'ju them se jeni (2) ?
synon: dëshiroj dua nevojë reasmb: Çfarë do të thotë nëse do të ishit (2) ?

~360 line of language rules


ELIZA IN ALBANIAN VER.1.0
 Well it does NOT work well ….

 Work in Progress….analyzing possible


solutions in Albanian.

You might also like