1
2
3
4
ABSTRACT
In recent years, natural language processing (NLP) and artificial intelligence (AI)
have made remarkable advancements in enabling machines to understand and
generate human-like text. Chatbots and conversational agents have become
integral parts of various applications, from customer support to virtual assistants.
This project focuses on the development of a Generative AI based on ChatGPT,
an AI-based conversational agent, with the aim of exploring its capabilities,
customization, and potential applications. The Generative AI based on ChatGPT
project is motivated by the growing demand for intelligent conversational
agents that can understand and generate human-like text. ChatGPT, the original
model, has set a benchmark in the field of AI-based chatbots. This project aims
to create a similar system with customization and scalability in mind, allowing
developers to adapt it for various domains and applications.
5
LIST OF TABLES
TITLE PAGE NO.
Declaration ii
Certificate iii
Acknowledgement iv
Abstract v
1. Introduction 8
1.1. Purpose of the project
1.2. Scope
1.3. Problem in existing system
2. System Requirement Analysis 9
2.1 Introduction
2.1.1 Purpose of SRS
2.1.2 Intended Audience and Reading Suggestions
2.1.3 Product Scope
2.2 Overall Description
2.2.1 Product Perspective
2.2.2 Product Functions
2.2.3 User Classes and Characteristics
2.2.4 Operating Environment
2.3 External Interface Requirements
2.3.1 User Interfaces
2.3.2 Hardware Interfaces
2.3.3 Software Interfaces
2.3.4 Communications Interfaces
2.4 Functional Requirement
2 4.1 System Feature 1
2 4.2 System Feature 2
6
2.5 Nonfunctional Requirements
2.5.1 Performance Requirements
2.5.2 Safety Requirements
2.5.3 Security Requirements
2.5.4 Availability Requirements
3. Analysis 16
3.1 Methodology Used ( Object Oriented)
3.2 Use Case Diagrams (Also include use case specifications)
3.3 Activity Diagram
3.4 Sequence Diagram
3.5 Class Diagram (Description of Identified Classes, Identified
Attributes, Identified Methods, Identified Relationships)
4. Design 24
4.1 Architectural Design
4.1.1. System Architecture Diagram
4.1.2. Description Of Architectural Design
4.2 Database Design
4.2.1. Normalization
4.3 Interface Design
4.3.1. Screenshots
5. Implementation 27
5.1 Language and database system used for the implementation
5.2 Features of language and database used for the project
5.3 Description of third party tools used (If any)
6. Testing 28
(Theory of testing is not required. Only write how u have tested the system)
6.1 White Box Testing (Basis path testing)
Test Case-n
i. Purpose
ii. Inputs
iii. Expected Outputs & Actual Outputs
6.2 Black Box Testing
6.2.1 Interface testing
7. Conclusion 33
8. References (include references of the project in IEEE format)
7
Chapter 1
1. INTRODUCTION
1.1 PURPOSE
The primary purpose of our project is to develop a versatile AI-driven chatbot
capable of engaging in dynamic and context-aware conversations. We aim to
address the growing need for intelligent virtual agents in various domains.
1.2 SCOPE
Our project scope encompasses the development of a Generative AI based on
ChatGPT that can be tailored for specific industries and applications.
This includes customization, integration capabilities, and scalability.
1.3 PROBLEM IN EXISTING SYSTEM
The existing system is manual based and need lot of efforts and consume enough
time. In the existing system we can not apply for the books detail online . It may
lead to corruptions in the allocation process as well as book fee calculation.
1.4 STATEMENT OF PROBLEM
Existing conversational agents often struggle with understanding context,
providing relevant responses, and being adaptable to different use cases.
These limitations necessitate the creation of a more advanced and customizable
solution.
8
Chapter 2
2. SYTEM REQUIREMNET ANALYSIS
2.1 INTRODUCTION
2.1.1 PURPOSE OF SRS
The primary purpose of this Software Requirements Specification (SRS) is to
provide a comprehensive and detailed overview of the functional and non-
functional requirements of our Generative AI based on ChatGPT. It serves as a
reference document that guides the development team throughout the project
lifecycle, ensuring alignment with client expectations and project objectives.
2.1.2 INTENDED AUIDENCE AND READING SUGGESTIONS
This SRS document is intended for a diverse audience, including:
Development Team: Developers, programmers, and engineers who will be
responsible for building the Generative AI based on ChatGPT.
Project Managers: Those overseeing the project's execution and progress.
Quality Assurance Team: Testers and quality assurance professionals
responsible for validating system functionality.
Stakeholders: Any individuals or organizations with a vested interest in the
project's success.
Clients or End Users: Individuals or organizations who will interact with or
benefit from the Generative AI based on ChatGPT.
2.1.3 PRODUCT SCOPE
The product scope of our Generative AI based on ChatGPT project encompasses a
range of critical components:
Conversational Capabilities: The Generative AI based on ChatGPT is designed to
engage in dynamic and context-aware conversations with users. Customization: It a
9
for customization to cater to specific industries, use cases, and branding
requirements. Integration: The system provides a user-friendly interface for
seamless integration into web applications, mobile apps, or messaging platforms.
Scalability: The Generative AI based on ChatGPT is designed to handle a large
number of concurrent users without compromising performance.
2.2 OVERALL DESCRIPTION
2.2.1 PRODUCT PERSPECTIVE
Product Positioning: It serves as a user-friendly interface for human-computer
interactions, offering a versatile solution for engaging in dynamic conversations.
Relationship with Other Systems: The Generative AI based on ChatGPT will
have interfaces that allow integration into various platforms, such as websites,
mobile applications, and messaging services.
2.2.2 PRODUCT FUNCTIONS
The Generative AI based on ChatGPT offers a range of core functions:
- Natural Language Understanding (NLU): It comprehends user input, identifies
intent, and extracts relevant information to formulate appropriate responses.
- Natural Language Generation (NLG): The system generates coherent and
context-aware responses in human-like language.
- Customization: Users can customize the Generative AI based on ChatGPT to
align with specific industries, use cases, and branding requirements.
- Integration: The system provides an easy-to-use interface for developers to
integrate the Generative AI based on ChatGPT into their applications and
services.
10
- Scalability: Designed to accommodate a high volume of concurrent users
without compromising performance.
2.2.3 USER CLASSES AND CHARACTERIS
- End Users: These are individuals who interact with the Generative AI based
on ChatGPT for various purposes, such as seeking information, assistance, or
entertainment. Users may have varying levels of technical expertise and
language proficiency.
- Developers and Integrators: These individuals are responsible for customizing
and integrating the Generative AI based on ChatGPT into applications and
platforms. They possess technical skills and are familiar with software
development.
2.2.4 OPERATING ENVIRONMENT
- Software Environment: The Generative AI based on ChatGPT operates within
a software environment that includes the programming language, libraries, and
frameworks required for NLP and machine learning. It is designed to be
compatible with popular development languages and environments.
- Hardware Environment: The system is adaptable to different hardware
configurations, from cloud-based servers to local computing resources, ensuring
flexibility in deployment.
- Communication Environment: The Generative AI based on ChatGPT
communicates with external systems and platforms through established
communication protocols, making it versatile in integrating with a wide range of
applications and services.
11
2.3 EXTERNAL INTERFACE REQUIREMENT
2.3.1 USER INTERFACES
- User-Friendly Interface: The Generative AI based on ChatGPT project
features a user-friendly interface that enables effortless interaction between
users and the conversational agent. Users can input text or voice commands
through web-based interfaces, mobile apps, or messaging platforms.
- Customization Interface: For administrators and developers, there is an intuitive
customization interface that allows them to configure the Generative AI based
on ChatGPT according to specific requirements, including industry-specific
knowledge and branding.
2.3.1 HARDWARE INTERFACES
- Hardware Flexibility: The Generative AI based on ChatGPT is designed to be
hardware-agnostic, allowing it to operate on a variety of hardware
configurations. It can run on both cloud-based servers and on-premises
infrastructure.
- Resource Requirements: While the system is optimized for efficient resource
usage, it may have specific hardware requirements based on the scale of
deployment. These requirements will be outlined in the installation
documentation.
2.3.3 SOFTWARE INTERFACES
- Programming Languages: The Generative AI based on ChatGPT project is
developed using programming languages and libraries suitable for natural
language processing and machine learning, ensuring compatibility with a wide
range of software environments.
12
- Integration Libraries: Developers can leverage integration libraries and APIs
provided with the Generative AI based on ChatGPT for seamless integration
into third-party applications and services.
2.3.4 COMMUNICATION INTERFACES
- APIs and Protocols: The Generative AI based on ChatGPT communicates with
external systems and platforms using standard communication protocols and
APIs, ensuring compatibility with various messaging services, web applications,
and other communication channels.
- Scalability through Communication: The system's communication interfaces are
designed to facilitate scalability, enabling it to handle a high volume of concurrent
users and maintain optimal performance during peak usage periods.
2.4 FUNCTIONAL REQUIREMENT
- Conversational Capability: The Generative AI based on ChatGPT is equipped
with natural language understanding and generation capabilities, allowing it to
engage in dynamic, context-aware conversations with users. It can respond to a
wide range of user queries and inputs effectively.
- Customization: The system provides an extensive customization feature. It
allows administrators and developers to tailor the Generative AI based on
ChatGPT for specific industries, use cases, and branding. Customization options
include defining domain-specific knowledge, altering conversational style, and
incorporating industry-specific terminology.
13
2.5 NON-FUNCTIONAL REQUIREMENT
2.5.1 Performance Requirements
- Response Time: The Generative AI based on ChatGPT is expected to provide
responses in near real-time, with an average response time of milliseconds to
maintain user engagement.
- Scalability: The system must be capable of handling a large volume of
concurrent users without a significant degradation in performance. It should scale
horizontally to accommodate increased loads.
2.5.2 Safety Requirements
- User Safety: The Generative AI based on ChatGPT should be designed to
prioritize user safety and adhere to ethical guidelines. It should refrain from
engaging in harmful or inappropriate content and have mechanisms in place to
detect and mitigate harmful behavior.
2.5.3 Security Requirements
- Data Encryption: All user interactions and data must be encrypted to protect
user privacy and ensure data security. SSL/TLS encryption should be
implemented for communication.
- Access Control: Role-based access control mechanisms should restrict access to
sensitive system components and administrative functions.
14
2.5.4 Availability Requirements
- High Availability: The Generative AI based on ChatGPT should strive for
high availability, with a target uptime of [specify uptime percentage]%.
Redundancy, failover mechanisms, and 24/7 monitoring should be in place to
minimize downtime.
- Backup and Recovery: Regular data backups and a robust disaster recovery plan
must be in place to ensure data integrity and system availability in case of
unforeseen failures.
15
Chapter 3
3. ANALYSIS
3.1 METHODOLOGY USED
Methodology Choice: The analysis phase of our Generative AI based on
ChatGPT project employs an Object-Oriented Methodology. This methodology
allows us to model the system in terms of objects, classes, and their interactions,
promoting modularity, maintainability, and extensibility.
This methodology provides a structured and modular approach to system
development. It centers around the concept of objects, classes, and their
interactions, allowing us to model the system in a way that promotes
maintainability, extensibility, and scalability. By employing object-oriented
analysis, we gain a comprehensive understanding of the system's components,
their attributes, behaviors, and relationships. This methodology facilitates a clear
and organized representation of the Generative AI based on ChatGPT, making it
easier to design, develop, and maintain a sophisticated conversational agent.
Object-oriented principles also enable us to encapsulate and abstract complex
functionality, ensuring that our Generative AI based on ChatGPT is adaptable,
customizable, and well-structured to meet a wide range of user needs.
3.2 USE CASE
16
1. Use Case Specification for Search for Question
Name Of Use Case Search for Question
Actor User
Pre-Condition User is logged into the Generative
AI based on ChatGPT System.
Primary Flow of Events 1. User initiates a search for a
question within the
Generative AI based on
ChatGPT system.
2. The system processes the
search query and retrieves
relevant information.
3. The system displays the
response to the user's search
query.
Alternate Flow Of None.
Events
Post Condition The user receives the response to
their search query.
Use Case termination By Back Button.
17
2. Use Case Specification for See the Response Given by Server
Name Of Use Case See the Response Given by
Server
Actor User
Pre-Condition User has initiated a search for
a question.
Primary Flow of Events After initiating a search, the
user waits for the system's
response.
The system processes the
query and provides a response
to the user.
Alternative Flows: None.
Post Condition The user views the response
provided by the system.
Use Case termination By Back Button
3. Use Case Specification for Access to Previous Searches
Name Of Use Case Access to Previous Searches
Actor User
Pre-Condition User is logged into the
Generative AI based on
ChatGPT system.
Primary Flow of Events User requests access to their
previous search history.
The system retrieves and
displays a list of the user's
previous search queries.
Alternate Flow Of None
Events
Post Condition The user can view a list of
their previous searches.
Use Case termination By Back Button
18
3.3 ACTIVITY DIAGRAM
19
1) User Interaction
20
2) Training Model
21
3) Maintenance and Updates
22
3.4 Sequence Diagram
23
Chapter 4
4. DESIGN
4.1 ARCHITECTURAL DESIGN
4.1.1 SYSTEM ARCHITECTURAL DIAGRAM
Our Generative AI based on ChatGPT project follows a modular and scalable
architecture that enables efficient communication and data flow between key
components. The system architecture can be visualized as follows:
Frontend User Interface: The user interacts with the AI chatbot through the
frontend user interface, providing input queries and receiving responses.
Backend Server: The backend server acts as the intermediary between the user
interface and the AI model. It receives user queries, manages the AI model, and
communicates with the database.
MongoDB Database: MongoDB, a NoSQL database, serves as the backend data
store. It stores user interactions, conversation history, and relevant data to
enhance the chatbot's performance.
AI Model: The AI model, not shown explicitly in the diagram, is responsible for
generating responses to user queries based on the input data and pre-trained
language models.
4.1.2 DESRIPTION ARCHITECTURAL DIAGRAM
Our architectural design for the Generative AI based on ChatGPT project
leverages a distributed and modular approach to ensure efficiency and
scalability. The key components of our system includes Frontend User Interface,
Backend Server, MongoDB Database, AI Model.
When a user interacts with the frontend user interface, their query is sent to the
backend server via an API request. The backend server processes this query,
which may involve retrieving historical conversation data from MongoDB to
maintain context. The AI model generates a response, which is then sent back to
the user interface for display. Simultaneously, the conversation data is updated
and stored in the MongoDB database.
24
DATABASE DESIGN
4.2.1 NORMALIZATION
We use MongoDB NoSql code
25
4.3 INTERFACE DESIGN
4.3.1 SCRRENSHOTS
26
Chapter 5
5.1 LANGUAGE AND DATABASE SYSTEM
LANGUAGE :- HTML, CSS, JS, PYTHON, AI, NLP.
DATABASE :- MONGODB (NOSQL).
5.2 FEATURE OF LANGUAGE & DATABASE USED
1. FEATURE OF PYTHON:-
High-Level Language
Extensive Libraries
Ease of Integration
Large Developer Community
Cross-Platform Compatibility
Scalability
Natural Language Processing (NLP)
2. FEATURE OF MONGODB
Schema Flexibility
Document-Oriented Storage
Scalability
High Performance
Query Capabilities
Indexes
Geospatial Data Support
27
Chapter 6
6. TESTING
6.1 WHITE BOX TESTING
28
30
Flow Graph :
30
Cyclomatic Complexity…
V (G) = E – N + 2
Where V (G) = cyclomatic complexity,
E = Number of Edges = 15,
N = Number of Nodes = 14.
Hence,
V (G) = 3.
Also
V (G) = P + 1
Where P = Number of Predicate nodes = 4
V (G) = 5.
Basic Path Set:
Path 1: 9-1-2-3-4-10-5-6-7-7a-11
Path 2: 9-1-2-3-4-10-5-6-7-8
Path 3: 9-1-2-2a-11
Path 3: 9-1-2-3-3a-11
31
6.2 TEST CASE AND RESULT
6.2.1 CASE 1
Purpose
Check whether the user is Connected With Internet or not
Input
If Internet Connection = = false
Expected result and actual result
Page is keep loading
6.2.2 CASE 2
Purpose
Check whether the user is Connected With Internet or not
Input
If Internet Connection = = true
Expected result and actual result
Gives the result that User asked
32
Chapter 7
7. CONCLUSION
In Conclusion, Our Generative AI based on ChatGPT project represents a
significant achievement in the field of natural language processing and artificial
intelligence. Through extensive research, development, and collaboration, we
have successfully created a versatile conversational AI system that holds promise
across various industries, including education and healthcare. We have
prioritized ethical considerations and customization options, laying the
groundwork for responsible and adaptable AI applications. This project has
been a valuable learning experience, underscoring the importance of ongoing
research and development in AI technology to create more capable and
responsible AI systems for the future.
33