Chatbot DT

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

University Institute of Engineering

Department of Computer Science & Engineering

Experiment: 2.4

Student Name: Sagandeep Singh UID: 22BCS14568


Branch: Computer Science & Engineering Section/Group: 416-B
Semester: 01
Subject Name: Disruptive Technologies-1
Subject Code: 22ECH-102

1. Aim of the practical: Create an artificial intelligence powered ChatBot to mimic human
interactions for different application domains.

2. Tool Used: Google Colaboratory

3. Basic Concept/ Command Description:-


A chatbot is a software program for simulating intelligent conversations with human using rules or artificial
intelligence. Users interact with the chatbot via conversational interface through written or spoken text.

While a bot is a computer’s ability to understand human speech or text short for chat robot. A chatbot is merely a
computer program that fundamentally simulates human conversations. It allows a form of interaction between a
human and a machine the communication, which happens via messages or voice command.

A chatbot is programmed to work independently from a human operator. It can answer questions formulated to it in
natural language and respond like a real person. It provides responses based on a combination of predefined scripts
and machine learning applications.

Chatbots can live in messaging platforms like Slack, Facebook Messenger and Telegram and serve many purposes
– ordering products, knowing about weather and managing your finance among other things. The dynamic
intelligence of chatbots will allow them to converse with users as in a way we converse and communicate in
University Institute of Engineering

Department of Computer Science & Engineering

reallife situations. Conversational communication skill of the chatbot will not only make it a trendy and promising
technology but also empower them to deliver what we are looking for – response in human terms.

4. Code:
Install rasa library
!pip install rasa==2.0.2

Install python
!pip install -U ipython

Include four packages related to English


!python -m spacy download en ##en includes four packages related t english

Install nest_asyncio
!pip install nest_asyncio==1.3.3

import required libraries


import os import
rasa import
nest_asyncio
nest_asyncio.apply()
print("event loop ready")

config = "config.yml"
training_files = "data/" domain
= "domain.yml" output="models/"
print(config, training_files, domain, output)

print model path


model_path = rasa.train(domain, config, training_files, output)
#print(model_path)
University Institute of Engineering

Department of Computer Science & Engineering

import and use your chatbot


from rasa.jupyter import chat endpoints
= "endpoints.yml" chat(model_path,
endpoints)

5. Observations, Simulation Screen Shots and Discussions:


University Institute of Engineering

Department of Computer Science & Engineering


University Institute of Engineering

Department of Computer Science & Engineering


University Institute of Engineering

Department of Computer Science & Engineering

6. Result and Summary:


University Institute of Engineering

Department of Computer Science & Engineering

7. Additional Creative Inputs (If Any):


Learning outcomes (What I have learnt):
University Institute of Engineering
Department of Computer Science & Engineering

1. We learn how to create a chatbot which can answer questions formulated to it in


natural language and respond like a real person.

Evaluation Grid (To be filled by Faculty):

Sr. No. Parameters Marks Obtained Maximum Marks


1. Student Performance (task 12
implementation and result evaluation)
2. Viva-Voce 10
3. Worksheet Submission (Record) 8
Signature of Faculty (with Date): Total Marks Obtained: 30
University Institute of Engineering
Department of Computer Science & Engineering

You might also like