AI Phae 2 Project
AI Phae 2 Project
College Code:5113
TEAM MEMBERS:
D.Aakash(511321106001)
S.Chandrsekran(511321106005)
A.Dinesh(511321106010)
J.Yukendiran(511321106306)
Phase 2 Project:
Project Title: Chatbot using Python
INTRODUCTION:
A chatbot is an automated software program that interacts with
humans. A chatbot is merely a computer program that fundamentally
simulates human conversations. A chatbot that functions through AI and
machine learning has an artificial neural network inspired by the neural
nodes of the human brain. Chatbots are programs that can do talk like
human conversations very easily. For example, Facebook has a machine
learning chatbot that creates a platform for companies to interact with
their consumers through the Facebook Messenger application. In 2016,
chatbots became too popular on Messenger. By the consequences is
noted that2016 was the entire year of chatbots. The software industry is
mainly oriented on chatbots. Thousands of chatbots are invented on
startups and used by the businesses to improve their customer service,
keeping them hanging by a kind communication. According to research,
nowadays chatbots are used to solve a number of business tasks across
many industries like E-Commerce, Insurance, Banking,
Healthcare,Finance, Legal, Telecom, Logistics, Retail, Auto,
Leisure,Travel, Sports, Entertainment, Media and many others. Thus
that was the moment to look at the chatbots as a new technology in the
communication field. Nowadays various companies are using chatbots
to answer quickly and efficiently some frequented asking questions
from their own customers.
AIML and LSA are used for creating chatbots. Artificial Intelligence
Markup Language (AIML) and Latent Semantic Analysis (LSA) are used
for developing chatbots,which are used to define general pattern-based
queries. This patterncan also be used to give random responses for the
samequery in the chatbot. LSA is a Latent Semantic Analysis technology
in python, which is utilized to discover like nesses between words as
vector representation. So that the unanswered queries by AIML will be
viewed as a reply by LSA.
REQUIRMENTS:
It Requires both software and hardware
Software:
Programming languages like (Python (or) Pycharm)
A chatbot development platform (such as Dialogflow, Microsoft Bot
Framework, or IBM Watson)
A text editor or integrated development environment (IDE)
Hardware:
Computer or laptop (windows,mac,linux)
Internet
Keywords: Chabot, Chabot architecture, Artificial Intelligence, NLU (Natural
language understanding),NLP (Natural language processing) Artificial Intelligence
Markup Language
(AIML), Latent Semantic Analysis (LSA)
Identify the goals and objectives you want to achieve with the chatbot.
Preprocess and clean the data to make it suitable for training the model.
5. API Integration:
Obtain API access credentials for the selected language model.
Configure your Python code to interact with the model's API using the
provided credentials.
Define how the chatbot should respond to various user inputs and
scenarios.
Use NLP libraries like spaCy or NLTK for tasks such as tokenization,
entity recognition, and sentiment analysis.
If required, fine-tune the pre-trained model using your specific data and
objectives.
GROWTH OF CHATBOT:
REQUIRMENTS:
1. Python 3.x
2. OpenAI GPT-3
3 API access
Step 1: Sign up for the OpenAI GPT 3 API and obtain your API key.
GPT-3 key
PROGRAM:
import openai
import numpy as np
api_key = "YOUR_API_KEY"
response = openai.Completion.create(
engine="davinci", # You can use other engines like "curie" or "babbage" as well.
prompt=prompt,
max_tokens=max_tokens,
temperature=temperature
return response.choices[0].text
# Initialize conversation
conversation_history = []
print("Chatbot: Hi, how can I assist you today? (Type 'exit' to end)")
while True:
if user_input.lower() == "exit":
print("Chatbot: Goodbye!")
break
conversation_history.append(f"You: {user_input}")
chatbot_message = generate_response("\n".join(conversation_history))
print(f"Chatbot: {chatbot_message}")
conversation_history.append(f"Chatbot: {chatbot_message}")
In this script:
We initialize the OpenAI API client with your API key.
The chatbot continually interacts with the user, extending the conversation history as
needed.
This is a basic example, and you can further enhance it by adding features like
context management, sentiment analysis, or custom responses for specific
user inputs. You can also consider using other NLP libraries like spaCy or
NLTK to process and analyze user input for more sophisticated interactions.
Phase 2 CONCLUSION:
In this phase we summarized and disscused the advanced Techniques
like using pre training languages models (eg.,CHATGPT-3) to enhance thequalities
And upcoming sessions we are going to start builiding the chatbot by preparing
the environment and implementing basic user interactions.