Sunday, August 25, 2019

ChatBot First

I was working on this blog for some weeks now. This is the most interesting topic or happening hot cake in programming on the event horizon. 

Necessity for today’s business to use chatbots

Due to successful chatbot experience of last few years, small business owners are now using AI technologies to improve their daily operations, interact with customers and increase income.
Lets not bagged down by these technology jargon just start with simple smile and open for learning a few things.   Integration and union of apps from different areas with the help of bots allow companies to introduce their software to a new level. Prosperous experience of Slack, Telegram, Messenger, etc. shows us that AI-based bots will remain in demand even further. Nevertheless, not everything is so smooth, and certain aspects of their use still slow introduction of chatbots into today’s business.
Current Forecasts

In relation to AI future in general and chatbots perspectives in particular, the results of the studies diverge. For instance, according to the Oracle research, 80 percent of surveyed said they are going to implement chatbots for customers support during the next years. At the same time, Forrester published completely different results for AI adoption among interviewed companies: only about 20 percent of them are ready to use AI in general, not just chatbots, for business needs in the coming years. Peak of blind popularity and inflated expectations seems to be left behind, as well as existing obstacles and shortcomings have already arisen in front of developers. And now it’s good time for rise of enlightenment, constructive solutions and productive work.

Advantages and Prospects

The reasons for the increased interest to chatbots are quite obvious. Customer expectations are increasing every day, and along with appearance of new technologies they expect more up-to-date customer service which includes fast and reliable payment operations, rapid processing of orders, easy shopping experience, personal approach to each client and much more. And chatbots can provide this. Here’re only some of their capabilities:

    Chatbots allow to resolve problems more quickly. Working 24/7, they not only let the company save money on round the clock support, but also are always ready to answer customer questions or perform another necessary task. With these many integrations, customers don’t need to wait in line, chatbots are always available to them from anywhere and anytime. According to the Business Insider Intelligence research, use of chatbots for customer service can reduce up to 30% of the company’s costs for communication with customers. In the project management process chatbots can be used to reduce the number of distracting conversations, answers to endless questions, discussions with colleagues, while allowing all members of the team to always keep abreast of developments.
    Chatbots provide personal approach to every customer. The fact is that many employees are not attentive enough to each individual client due to the general load and tiredness, lack of important information and knowledge, or irresponsibility. Chatbots have no such problems. Moreover, they allow to attract clients in a more personalized way. Artificial intelligence and machine learning can be used to generate a complete portrait of the customer, explore his habits and needs, gather purchasing history, form personalized experiences to improve the quality of customer service. If customers have a positive interaction with a company, they are more likely to return. No matter how cool your goods or services are, clients primarily care about how well you treat them. What about project management, chatbots can use collected information about users to automate a lot of tasks related to estimating and tracking time spent on tasks, provide interested project data according to the developer’s current activity and so on.
    Chatbots are also very convenient to use. Due to global integration, they can be always available in any desired application. Chatbots let customers save time and get required help without distracting from their smartphones. For example, if we say about project management tool like Riter, developers can use Slack or Telegram chatbots to create and assign tasks just during their discussion with team members without need to open the Riter application itself.
    Chatbots are easy to create and run. As a rule, you can use provided API to create your own chatbots on a necessary platform or just find somebody who can do this for you. For example, Riter has GraphQL API for integration with existing services. This year we are going to release a platform for writing bots and create the first set of bots for integration with the most popular third-party resources. Riter bot system will be able to provide not less opportunities than Jira plugins do, furthermore, our bots may be written in any language and placed on either our servers or on the client side. Later we plan to open a store of bots, where everyone will be able to add their own bots and get interest from their work. In addition, Riter users will get an ability to create private bots for their personal usage.

The chatbot landscape is changing fast, and all business owners need to keep upwiht it.  Facebook’s recent move to bring augmented reality to chatbots is just the latest adaptation, as this young technology tries to keep up with the blistering pace of communications. Having already tried communicating with emoji and by sharing images, what next for chatbots and what should yours focus on?

Ferris Bueller’s final line, “Life moves pretty fast. If you don’t stop and look around once in a while, you could miss it.” is very apt for technology. The trouble is, companies are so focused on adding new features to keep the headlines rolling, the road map on track and to generate interest that they rarely stop to ask, is this in the end-user or consumer interest?

Addition of Augmented Reality gives a great additional push.  So, we have the latest news from Facebook, from its F8 conference With the embattled company trying to push further into our lives with dating services and other efforts. Trying to bolt another tech poster-child, augmented reality (AR) into Facebook Messenger Chatbots is an exciting, if pushy move.

As ever, a few brands get to play guinea pig with the technology, but soon any brand could be pushing visual augmented messaging. That would be interesting for location-based work (“we’re here” with flashing arrows, or replacing complicated instructions with visual cues!) But, for most chatbots it doesn’t feel like something to get excited about.

In the not too distant future, AR will be relevant in many applications, especially as we move away from smartphones into glasses, micro-headsets, or whatever comes next to help us interact with technology and services. That’s when things may get interesting.

Instead, we’ll probably get mixes of AR’s traditional uses, such as funny faces, overlaying of logos on your world and so on to make a chat more lively. That will appeal to brands with big logos to splash around, perhaps even simple games to play.

Kia as one of the early adopters plans to let its Kian chatbot show users around the new Stinger 2018 model. But that’s something car brand apps have been doing for some time, so its not really new or innovative, just moving a feature from one platform to another.

Still, there’s plenty of news involving AR, almost enough to match chatbots when it comes to vendor and ecosystem excitement. At least some of those features should make bots more interesting to interact with. But the Messenger service already has some eight billion chats across it each month, is there really time to be stopping and staring at AR imagery?

In the few short years of their existence, chatbots have already moved from plain text to buttons, then added image recognition and further interactions, but none of them have threatened to replace text as the key feature.

For most bots, certainly for the next year, there is little need to go overboard on adding AR imagery to a chat. Instead most bot providers like SnatchBot offer what is still exciting and media-friendly services, with photos, video and other elements easy to integrate into any conversation for the best experiences.
When it comes to existing chatbots, what we may see happen is features like AR used to speed up a process that takes time if done by text, so images might augment a series of instructions. For retail brands, the visual impact of a product popping up in a chat might help drive some impulse purchases. Imagine walking past a burger bar and getting a location-based chat pop-up offering you their latest meal and cool drink on a hot day.

These and other ideas will all slowly trickle down into chatbots, and in a few years we may wonder why we ever bothered with text. But for now it remains the dominant force in bots and is all most companies will need to keep their customers engaged.

“Let’s build a Chatbot!” , I am trying to put in a programmers language lets see how successful I am. Chatbots are cool. They are driving the industry like hardly any other topic these days and are considered to be real game changers.

Therefore it’s pretty easy to convince customers to implement a digital assistant. But, it becomes tricky when we’re talking about costs. To give serious numbers, customers have to do their homework first.

Lets collect some data to get started,  first of all, we should investigate all your contact channels looking for the real pain points. Topics to consider are…

    Where are most of the requests coming in?
    Which requests are coming again and again?
    Which of those can be answered using standardized replies?
    And especially, which requests need most resources in your contact center?

In nine out of ten cases our advise is to start with a FAQ bot. The focus is on pain points and cost drivers identified within your contact channels.

So that’s the first milestone: Build a FAQ Chatbot

You shouldn’t necessarily compare a FAQ bot with those often pretty boring Frequently Asked Questions sections on websites. More than that, a FAQ Chatbot could…

    lead customers in a smart dialog to the desired information
    directly link customers to a contact form or similar on your website
    or ask for all the parameters needed according to the users intent and create and assign tickets in your system

How to integrate with Backend Systems?

The next milestone is usually to integrate your Chatbot with your Backend Systems. Technically, that’s usually not a big deal.

Questions to ask are…

  •     what are the most common Use Cases?
  •     which value can be added by standardized replies?
  •     does your Back-end System expose an open interface?

After identifying your Use Cases, you should (especially in Europe) consider GDPR topics. In addition, you usually need some kind of authentication method if your chatbot is dealing with customer related data. It’s always a good idea to include your legal department in this questions.
What should the technical implementation look like?

Now things are getting pretty easy ;). If you can answer all the things above, we can make a reliable recommendation according the technical implementation.

This recommendation will cover…

  •     Input and Output methods used
  •     The Design of the User Interface
  •     The desired User Experience
  •     Training and Testing of your Chatbot
  •     Development technologies and the Toolstack used

Now lets wait for my next blog for actual Chat Bot programming tutorial. Feel free to reach me at ravindrapande@gmail.com for any queries & suggestions.

Building the Bot

Pre-requisites

Hands-On knowledge of scikit library and NLTK is assumed. However, if you are new to NLP, you can still read the article and then refer back to resources.
NLP

The field of study that focuses on the interactions between human language and computers is called Natural Language Processing, or NLP for short. It sits at the intersection of computer science, artificial intelligence, and computational linguistics[Wikipedia].NLP is a way for computers to analyze, understand, and derive meaning from human language in a smart and useful way. By utilizing NLP, developers can organize and structure knowledge to perform tasks such as automatic summarization, translation, named entity recognition, relationship extraction, sentiment analysis, speech recognition, and topic segmentation.
NLTK: A Brief Intro

NLTK(Natural Language Toolkit) is a leading platform for building Python programs to work with human language data. It provides easy-to-use interfaces to over 50 corpora and lexical resources such as WordNet, along with a suite of text processing libraries for classification, tokenization, stemming, tagging, parsing, and semantic reasoning, wrappers for industrial-strength NLP libraries.

NLTK has been called “a wonderful tool for teaching and working in, computational linguistics using Python,” and “an amazing library to play with natural language.”

Natural Language Processing with Python provides a practical introduction to programming for language processing. I highly recommend this book to people beginning in NLP with Python.

Downloading and installing NLTK

    Install NLTK: run pip install nltk
    Test installation: run python then type import nltk

For platform-specific instructions, read here.
Installing NLTK Packages

import NLTK and run nltk.download().This will open the NLTK downloader from where you can choose the corpora and models to download. You can also download all packages at once.
Text Pre- Processing with NLTK

The main issue with text data is that it is all in text format (strings). However, Machine learning algorithms need some sort of numerical feature vector in order to perform the task. So before we start with any NLP project we need to pre-process it to make it ideal for work. Basic text pre-processing includes:

    Converting the entire text into uppercase or lowercase, so that the algorithm does not treat the same words in different cases as different
    Tokenization: Tokenization is just the term used to describe the process of converting the normal text strings into a list of tokens i.e words that we actually want. Sentence tokenizer can be used to find the list of sentences and Word tokenizer can be used to find the list of words in strings.

The NLTK data package includes a pre-trained Punkt tokenizer for English.

    Removing Noise i.e everything that isn’t in a standard number or letter.
    Removing Stop words. Sometimes, some extremely common words which would appear to be of little value in helping select documents matching a user need are excluded from the vocabulary entirely. These words are called stop words
    Stemming: Stemming is the process of reducing inflected (or sometimes derived) words to their stem, base or root form — generally a written word form. Example if we were to stem the following words: “Stems”, “Stemming”, “Stemmed”, “and Stemtization”, the result would be a single word “stem”.
    Lemmatization: A slight variant of stemming is lemmatization. The major difference between these is, that, stemming can often create non-existent words, whereas lemmas are actual words. So, your root stem, meaning the word you end up with, is not something you can just look up in a dictionary, but you can look up a lemma. Examples of Lemmatization are that “run” is a base form for words like “running” or “ran” or that the word “better” and “good” are in the same lemma so they are considered the same.

Bag of Words

After the initial preprocessing phase, we need to transform the text into a meaningful vector (or array) of numbers. The bag-of-words is a representation of text that describes the occurrence of words within a document. It involves two things:
 •A vocabulary of known words.
•A measure of the presence of known words.

Why is it is called a “bag” of words? That is because any information about the order or structure of words in the document is discarded and the model is only concerned with whether the known words occur in the document, not where they occur in the document.

The intuition behind the Bag of Words is that documents are similar if they have similar content. Also, we can learn something about the meaning of the document from its content alone.

For example, if our dictionary contains the words {Learning, is, the, not, great}, and we want to vectorize the text “Learning is great”, we would have the following vector: (1, 1, 0, 0, 1).

And that’s the point, where we can seriously talk about numbers, now lets take a breath and revisit what have we learned till this point.

Now lets wait for my next belog for actual ChatBot programming tutorial. Feel free to reach me at ravindrapande@gmail.com for any queries & suggestions.

Tuesday, June 25, 2019

AI & Cyber security


Artificial Intelligence Cyber security
As the new ways & means are available to all bad hackers or Data theft resources we need to life the vial from such threats and build a tools to tackle these known & somewhat unknown threats.  The world of cyber security has improving day by day. Signature-based solutions, whitelisting, application controls, and heuristics fail in the modern threat landscape. As attackers have learned to automate malicious code and vary it to flood an enterprise until a breach occurs. And the reality is many enterprises, from mid-size organizations to multi-national brands, have likely been infiltrated without detection.
Artificial intelligence (AI) is the attempt by humans to make machines smart. Intelligence is such an important part of what makes humans unique that until recently the embodiment of intelligence in a machine was almost always accompanied by a humanoid robot. Today, along with the development of smart devices that assist us, one of the important goals of AI is to provide answers we would never arrive at by finding those answers within our own massive archives of information.
AI may prove to be the largest advancement in human technology since the start of the industrial revolution. Once conceived only in science fiction, AI is finally here and impacting daily life.

For many years, traditional AV vendors operated using the same model: detect and respond. Now a data science company has introduces a new paradigm applying AI to pinpoint bad actors in your network, prevent malware and other threats, and protect against both known and unknown attacks.
We can achieve a level of security and endpoint protection previously unavailable when you employ AI based prevention. Moreover, you can attain a superior compromise assessment, ROI, and efficacy. AI and machine learning have reinvented endpoint protection by providing predictive, preventative security that proactively stops attacks before they impact critical systems. Traditional antivirus requires layers of technology and a first victim, and they can’t prevent never-before-seen or unknown threats. AI and machine learning predict and protect systems pre-execution, before an attack occurs, and without a sacrificial lamb. With fewer security layers, network traffic, and memory use, you can reach greater than 99% effectiveness against attacks, while saving time, money, and resources.
India Training Services provide services to audit such AI & all other security threats in a periodic manner at an economical rate. This helps an enterprise or Multi-national organization to relax and worry about more critical business goals.
Business Case: When you protect through AI based prediction and prevention, you allow cyber security to go from business inhibitor to business enabler. Let’s build some good segregated points on this. The means you elevate threat protection from a tactical objective to a strategic mission by supplying:
  • Streamlined Operations: Eliminate the need for EPP firewalls, device controls, host IPS, data loss prevention, and encryption, while stopping undetected malware and avoiding ransomware using one simple solution
  • Decrease Incidents and Prioritize: Transform your IT from reacting to events to proactively securing your environment. Remove mundane tasks that get in the way of strategic projects like virtualization, cloud security, and IT automation
  • Enhance Business Continuity: Fortify against enterprise attacks meant to breach your network, steal credentials, and exfiltrate data. Keep from making the next news headline, while ensuring service to customers
  • Improve Compliance: Meet government regulations, from healthcare to financial to critical infrastructure industries, as well your internal security policies, with greater protection efficacy

AI not only improves efficacy, but it also changes the deployment model and makes cyber security implementation and operation a seamless, smooth process. Because of the advanced features of machine learning, you no longer employ traditional AV technology and tactics, including:
  • Incremental storage
  • Scanning machines
  • Re-imaging machines

Moreover, you can remove large endpoint agents that create performance friction for enterprise users. You also eliminate the tedium of taking machines offline during periodic scans.
AI and Machine Learning Provide:
  •  A comprehensive assessment using science and big data analytics
  •  Greater ROI that eliminates tens of thousands of help desk tickets
  • Prediction and prevention of threats pre-execution without a cloud connection and time-wasting daily updates
  • A streamlined approach that removes layers of technology and redundant incident response tools


AI and Machine Learning Help You:
  • Use minimal system resources (1-2% CPU usage and 40-50 MB of memory)
  • Prevent attacks with superior speed (in milliseconds)
  • Replace ineffective traditional AV tools (or augment existing security)
  • Achieve efficacy rates of greater than 99% (compared to 50-60% with antiquated signature-based AV)


The benefits
Simple
Organizations can protect endpoints with fewer system resources and reduce network and user impact. When they change their cyber security approach to pre-execution, they begin to remove layers of technology. Thus, costs are significantly lowered and they begin to discover ways to consolidate infrastructure. It’s easy to deploy and secure your entire enterprise, whether it is 100 or 100,000 endpoints.
Seamless
You can predict and protect across platforms, operating systems, file types, and devices with AI and machine learning. It easily integrates into existing SIEM platforms and works in OEM and embedded devices. In addition, it provides continuous protection for security from system- and memory-based attacks, malicious documents, zero-day malware, privilege escalations, scripts, and potentially unwanted programs.
Silent
You can reduce alerts, helpdesk tickets, re-imaging requests, and impact to users when you empower your endpoints with AI based security. You also diminish the need for fire drills and incident response because you eliminate the threat before it manifests. Bolster your endpoint security by using an intuitive web console and simple SIEM integration, with no need for inconvenient signature updates or scan schedules.

For some non-IT friends lets understand some techy mumbo-jumbos

Malware & Virus: These are the small programs that once they infect a computer replicate themselves and attempt to send the replicated version to another computer, much in the same way a biological virus infects its host.
Most of the virus programs impact the computers on which they find themselves by destroying or altering data.
The computer worm is a type of malware, which like a virus, does its best to replicate and spread itself. Unlike viruses that need a host program in which to be spread, worms are standalone programs that can spread completely on their own. They do the same kind of damage as a virus.

The Trojan is malware named after a mythical wooden horse used by the Trojans more than 2,700 years ago as a peace offering to Sparta. Once the Spartans brought the Trojan horse within the walls of Sparta, soldiers hidden inside were able to attack and defeat Sparta.

Trojan computer malware is often disguised as legitimate software programs. Any number of social engineering methods are used to get people to download and install the Trojan. Once installed, it usually works to give access to a malicious third-party. 

Unlike viruses, they don’t replicate themselves. They rely on the con game to get people to infect their own computers. 
Intrusion involves security breaches not caused by a program that has breached your defenses. I know it is probably improper to define something based on what it isn’t. But with non-malware intrusion that’s the easiest way to encompass such a broad arena of attack vectors. It generally doesn’t involve a virus, Trojan, or other malware file. Generally, a non-malware attack is an attempt to breach a computer or network using software you trust, like Microsoft Office or the Windows Management Instrumentation (WMI). Even though the first two examples were
Windows-based the software commonly used in these types of attacks can run on many other operating systems, such as Linux (and all its variants).
SSH, the Secure Socket Shell, is a hacker’s dream. It’s the administrator’s “back door.” It provides remote command-level access to whatever operating system is running SSH. Today, that would be all of them.
Database Security : Structured Query Language (SQL) is the query language for many modern databases. Malicious instructions can be embedded into an SQL database, causing it to return the contents of the entire database (commonly referred to as an SQL injection). This can be done by entering the code into a user input field in a web form.  This code then gets embedded as a user field in the SQL sent to the database.
This is an old exploit, and today’s enterprises have updated their database query codes to eliminate this kind of attack. One method is using something known as parameterized SQL statements. This pulls the user input information out of the actual SQL statement itself and places it into parameters that are passed along.
This kind of programming has largely defeated the SQL injection attack. But, there are many unpatched systems out there. It’s a bit of work to go through and recode all those SQL calls in your program.