Tata Motors GDC .LTD Internship

205 views 54 slides Sep 20, 2020
Slide 1
Slide 1 of 54
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54

About This Presentation

Tata Motors GDC .LTD Internship


Slide Content

Semester Long Internship Tata Motors .LTD GDC (Global Delivery Center) Project Title: Chatbot & dashboard development Under Guidance of Mr. Sidhant Chatterjee & Mr. Abhijeet Dalavi TML GDC , Digital Transformation Tower Omkar Rane Block-A ,BETA17, Exam Seat No. B197026 ,0120160172 B.TECH ENTC ,MIT-AOE

Vendor chatbot project. Drishti dashboard for employees. Sending automated mails and employee health monitoring dashboard (TML-Arogya Bot). AWS EC2 & RDS instance creation (deployment). Contract life cycle management (CLM) dashboard project . Content

A chatbot is a computer program designed to interact with users replacing human. They mimic human conversations and provide end to end support. Chatbots are classified into two : Scripted bots AI based bots Scripted bots: These bots are pre-defined with a conversational flow and so when a user throws a query, the bot responds with a pre-defined script from the library. e.g.- bots direct implemented using TelegramBot api. AI bots: AI bots or intelligent bots use NLP to answer user queries. The intelligent bots act smart and respond back with most appropriate answer possible. It actually gets trained to user’s queries and makes a pattern to respond back to them with the most reliable answer possible. e .g. – chatbots developed with frameworks like Rasa and chatterbot. What is a chatbot ?

What is NLP? NLP is a subset of AI, and it involves programming computers to process massive volumes of language data. It involves numerous tasks that break down natural language into smaller elements in order to understand the relationships between those elements and how they work together. Common tasks include parsing, speech recognition, part-of-speech tagging, and information extraction. NLP focuses largely on converting text to structured data. What is NLU? NLU is to teaches machines how to interpret and understand language inputted by humans. NLU leverages AI algorithms to recognize attributes of language such as sentiment, semantics, context, and intent, entities. For example, the questions “what’s the weather in pune?” and “how’s the weather in pune?” are both asking the same thing. The question “what’s the weather in pune?” can be asked in hundreds of ways. With NLU, computer applications can recognize the many variations in which humans say the same things. NLP & NLU

Abou t Rasa and Spacy Rasa  is an open source machine learning framework for building  AI assistants and chatbots . Mostly you don’t need any programming language experience to work in Rasa. Although there is something called “ Rasa   Action Server ” where you need to write code in Python, that mainly used to trigger External actions like Calling Google API or REST API etc. Rasa has three main modules: Rasa NLU  for understanding user messages (we are making use of only this in project ).This is the place, where rasa tries to understand User messages to detect  Intent  and  Entity  in your message. Rasa NLU has different components for recognizing intents and entities, most of which have some additional dependencies Rasa Core  for holding conversations and deciding what to do next. Rasa X is a tool that helps you build, improve, and deploy AI Assistants that are powered by the Rasa framework . spaCy is an open-source software library for advanced natural language processing, written in the programming languages Python and Cython . The library is published under the MIT license and its main developers are Matthew Honnibal and Ines Montani, the founders of the software company Explosion.

IMPLEMENTATION

Key Features of Vendor chatbot project User has to get registered with vendor desk before using bot. Bot will send disclaimer and will ask user to accept it contact details will be shared and verified if it matches then only he will be getting replies for his queries. This is authentication method for bot. It will initially ask invoice number then user has to enter invoice number if it matches the record then only it will display record information related to invoices. It is displaying data from SAP excel file record. (for future use it could be a production database). If user does not knows his invoice number then it will show all paid and unpaid invoice details. User has to just click on respective invoice number to get details his of invoice. It can extract numbers from text with concept of python text regularization.

Telegram (User)/vendor Chat Telegram Chatbot (logic) Replies based on intent & Entities RASA NLU (A.I Engine) Get Intent & Entities Regex Text Regularization (Number Extraction) Chat Replies User Chat (with invoice number) Intent Entities Vendor chatbot project Block diagram User chat

Intent : An intent represents the purpose of a user's input. You define an intent for each type of user request you want your application to support. Entity: An entity represents a term or object that is relevant to your intents and that provides a specific context for an intent. You list the possible values for each entity and synonyms that users might enter. What is Intent & Entities? Intent and entity extraction Chatbot replies based on intent and entities

Launching Rasa GUI NLU Trainer With command: rasa- nlu -trainer Rasa GUI based NLU trainer Training of Rasa NLU model Placing blank json file at project location .

Generated training data in json file with intent and entities Training of model with command : rasa train or rasa train- nlu

Including trained model into project and pass user chat to model and extract intent and entities from it.

Writing function for extracting invoice number from string(chat as input for function) Including it in actual project for extraction of invoice number from chat string and passing to other function. Concept of Regex(  regular expression ) in python. It is basically used here to extract numbers from string data. A RegEx, or Regular Expression, is a sequence of characters that forms a search pattern. RegEx can be used to check if a string contains the specified search pattern. ‘\d’ matches a single digit pattern. ‘+’ matches one or more of the preceding character (greedy match). findall( ) : Returns a list containing all matches

Results: Vendor Chatbot greeting Verifying invoice number If vendor is registered then it can show invoices paid & unpaid. Ending a chat

By clicking on appropriate inline keyboard of respective vendor can get its details If invoice number is valid then it will show details related to that invoice number.

Learning outcomes Take away: Telegramchatbot api & telegram api key library used with python programming. Creation of telegram based chatbot. Natural language processing concept i.e. In particular Natural Language understanding used for intent and entities extraction from user chat. Revisiting Python programming language concepts. Rasa A.I frame work for NLU training and processing data. (A.I Engine of chatbot). Regex in python for extracting numbers from string data.

System for adding new users to drishti dashboard. Problem statement: Previously there was manual process of adding users (new joiner’s/employee’s) from excel file received from H.R it was done by python based script that converts excel data into nested dictionary in form of json file. That was done by technical person. So now we have develop a database based system with functionality to view database entries into website and new upload new data in specified file and format (json & excel csv file only). This online RDS database can be used any office chatbot applications. AWS RDS DATABASE (online) Employee Data from .json file Employee data from excel .csv format Drishti Dashboard (Website) (any) Chatbot application Upload data (view data) Send data Get data

Upload and view button backend logic Results

Uploading file and sending data to AWS RDS database Upload done successfully (for both excel and json files) View button functionality

If user tries to upload file with wrong format.

Dashboard for employee health monitoring System Dashboard was made using HTML-CSS web technologies and python flask was web framework. Rev 1 Rev 2

Results for Python based mailing server for automatically sending mails .This system will automatically send mails to recipients in “To” and “CC”. It is part of TML Arogya project and send employee sick details and his data to respective authority. Sending automated mails using python .

Deployment of projects on AWS. .

RDS Instance Ec2 Instance

Running and deploying project on EC2 via putty .

Learning outcomes Take away: HTML,CSS,BOOTSTRAP. Python flask programming. Python programming language. AWS amazon webservices (RDS) and EC2 technology. Database Management Systems. E.g. : MySQL software

TATA Motors Contract Lifecycle Management (TML CLM). Contract Lifecycle Management (CLM) is the proactive, methodical management of a contract from initiation through creation , compliance and renewal. Implementing CLM can lead to significant improvements in cost savings and efficiency. Understanding and automating CLM can also limit organizational liability and increase compliance with legal requirements. Background of project and key technologies. Corporate legal and GDC working together to identify opportunities where digital technologies can augment contract management Identify gaps in existing scenarios and bring changes in existing processes Identify opportunities in new contract formulation Identify opportunities to monitor existing contracts

Contract Data loading: Inserting Contract Type, Sections and Clauses which are manually added.   Contract Creation: We can use loaded contract data to create the dynamic contract template and render data on the template, after this we can also download the data in a word file. Contract Suggestion: Users can suggest the new clauses and the sections in particular contract type. Custom Authentication: Users can now register successfully only after adding their emails in the invite screen. Email Invite: We can Invite users to the portal by sending mail through the SMTP server. Current features in the TML CLM:

Invite new user

Email based invitation

Registration page

Features of subscription page: As per role of per only admin and super admin as right to access subscription page. User is only allowed to use service. On subscription page feature of three subscription gold, silver and platinum along with start date and end date of subscription for contract life cycle management is shown. On subscription page if user is registered then data in fields like email, name and phone section will be auto filled from database table ‘users’ .we can also collect information like name, contact number from user. we will provide an option for user to select product as per user need. Only registered user is able to subscribe to CLM service. User can be invited from email and can be registered to CLM service. Developing Billing page generating invoices, Subscription pages and modification in database.

User management page

Super admin access to billing & subscription option.

Admin access to subscription page.

User has no access to billing & subscription option.

In billing page one can see user details start date and end date ,subscription data in tabular form.we can set basic price value of product from backend of code. We create an export of excel file. We can select user name drop down list and generate its invoice using open source FPDF library. Generated invoice can be saved in pdf format. Super admin will be able to see summary of customer data in tabular form on website.   Features of billing page:

select customer and then clicking on generate invoice button automatically pdf invoice will be generated.

Click on export to excel for downloading excel file and viewing data in excel file .

Profile page

  password_hash () method: Syntax: password_hash  ( string $password ,  mixed  $algo [, array $options ] ) : string password_hash () creates a new password hash using a strong one-way hashing algorithm.  password_hash () is compatible with  crypt() . Therefore, password hashes created by  crypt()  can be used with  password_hash (). The following algorithms are currently supported: PASSWORD_DEFAULT - Note that this constant is designed to change over time as new and stronger algorithms are added to PHP. For that reason, the length of the result from using this identifier can change over time. Therefore, it is recommended to store the result in a database column that can expand beyond 60 characters (255 characters would be a good choice). PASSWORD_BCRYPT - Use the CRYPT_BLOWFISH algorithm to create the hash. This will produce a standard  crypt()  compatible hash using the "$2y$" identifier. The result will always be a 60 character string, or FALSE on failure. PASSWORD_ARGON2I - Use the Argon2i hashing algorithm to create the hash. This algorithm is only available if PHP has been compiled with Argon2 support. PASSWORD_ARGON2ID - Use the Argon2id hashing algorithm to create the hash. This algorithm is only available if PHP has been compiled with Argon2 support. Supported options for PASSWORD_BCRYPT: salt  ( string ) - to manually provide a salt to use when hashing the password. Note that this will override and prevent a salt from being automatically generated. Password encryption available in php .

b) password_verify ( ): Syntax: password_verify  ( string $password , string $hash ) : bool Verifies that the given hash matches the given password. Note that  password_hash ()  returns the algorithm, cost and salt as part of the returned hash. Therefore, all information that's needed to verify the hash is included in it. This allows the verify function to verify the hash without needing separate storage for the salt or algorithm information. This function is safe against timing attacks.

Encrypted passwords in field

Learning outcomes Take away: Frontend:HTML,CSS,BOOTSTRAP,PHP . Backend:PHP programming. Codeignitor MVC framework . Creating invoice format using php FPDF library, making using of inbuilt php libraries for encryption & decryption of passwords in php. Database Management Systems : MYSQL PHP admin, XAMP server.

References [1] Official Documentation Rasa Framework https://rasa.com/docs/ [2] Udemy Course on python flask: https://www.udemy.com/certificate/UC-8913f109-3fb0-48af-b575-c9c5a528450f/ [3] MySQL official documentation and learnt on W3C schools. https://www.w3schools.com/sql/ [4] AWS official documentation on website. https://docs.aws.amazon.com/ [5] Telegrambot and telegram api documentation on website. https://core.telegram.org/bots/api [6] codeignitor framework https://codeigniter.com/user_guide/index.html

Tata Motors .LTD GDC (Global Delivery Center) ICC Devi Gaurav Technology Park Turing Lab.