Bots: Language as the User Interface

Introduction to Intention Analysis Framework for implementing bots
Bots are being touted as the next generation frontier for applications. From a user-experience point of view, bots are termed as the invisible or transparent User Interface to applications. Business Bots are fancy names for intention analysis which can be thought of as a natural evolution from text processing algorithms like information search, sentiment analysis, opinion mining etc.

A bot can be thought of as a mapping between free flowing natural language chat messages of the user to an appropriate web service API functions along with an automatic deduction of the API functions parameters using context-based information.

While there are many bot implementations which leverage domain-independent machine learning techniques like deep-learning, highly sophisticated bot systems can be built with a judicious mix of machine learning and traditional language modeling techniques like Intention Analysis. Intention Analysis is a framework for deducting what is the motivation behind a query sentence by analyzing the verbs and nouns in the sentence.

Statistical Language Analysis

Traditional linguistics based Natural Language Processing (NLP) systems had been focusing on developing software systems and were based on parsing the syntactical structures of sentences to extract the meaning from the input systems. The practical applications for these NLP systems were machine translation systems, natural language interface, and natural language understanding systems. The complexity of sentential structures in natural languages was a major impediment to the development of practical NLP applications for decades
Information search systems which were based on word frequencies fall under statistical paradigm which is at the opposite spectrum of parsing systems.
In stark contrast to sentential parsing system which assigns centrality to sentential structures, the statistical paradigm is based on the premise that statistical patterns in sentence structures alone are good enough to engineer practical applications.
Today, topic models which are also based statistical paradigms are used in many practical applications like news analysis etc. Bayesian Inference based spam filtering systems is another great success for statistical language processing systems. Entity extraction is another NLP technique of which there are many open source and commercial web services available. Given a text, the entity extraction service can provide with the list of entities like people, place, things and events which are discussed in the text. Entity extraction is widely useful for indexing texts and blogs to provide search on a topic.
Social Media Listening and Sentiment Analysis
The massive adoption of social networks and social media platforms have created the demand for automatic monitoring systems which watches and alerts brand owners whenever something bad was talked about their brands. Sentiment analysis has evolved as the successful tool for social media listening. Sentiment analysis takes a sentence and slots where it is positive or negative based on the emotion words in the sentence just like spam-filter slots whether an email is spam or not based on the words in the email.


Bots: Sentiment Analysis to Intention Analysis
Designers are working to find solutions to implement a Chabot that can understand what the users want from analyzing their chat messages and mapping it to the web-service functions they have in their arsenal. Bot Frameworks need not be fully conversant in everything about the world but just the very limited context of ordering taking, responding to a service request etc.
One of the major theories that will be useful to develop bots is the “Speech Act Theory” of John Rogers Searle. He introduced the concept of Intentional States. According to him, there are two types of intentional states – Beliefs and Desires. When we make an utterance, we might express our opinions and beliefs about them. The intentional state of these types of sentences is belief.
When we are doing sentiment analysis, we are extracting the belief. The direct of the mapping in case of belief intentional state is “mind to world”.
The other possible intention is desires. The sentence with “desire” intentional state expresses a change in state of the world which the speaker wants. The direction of the intentional state in case of desires is “world to mind”. The utterances of the desire intentional state want to bring about a change in the state of the world as imagined by the mind.

Designing a Business Bot
Implementing a bot using Speech-Act theory boils down to extracting what type of change the user wants to effect. To build a practical bot framework, the designers should delimit the number of categories of intentions to the business context of sales, customer service etc. As the type of changes that can be effected by the Chabot is limited to the list of web services it can access, the Chabot should handle only those type of desires. Hence the categories of intention which a business bot can handle should be limited to the following categories:
⦁ wish
⦁ purchase
⦁ inquire
⦁ compare
⦁ praise
⦁ criticize
⦁ complain
⦁ quit
⦁ direct
⦁ sell
If there are individual webservices to handle the above categories of intentions, the function of the bot framework would be to extract the entities like things, people, place and events from the nouns of the chat messages of the users. Using the verbs of the chat messages, the framework has to identify the right webservice through identifying the category of intention. If the mandatory parameters of the webservice cannot be inferred from the context, the bot framework has to simulate a conversation by asking questions which can make the user provide the missing parameters. Once all the parameters are identified, the bot framework can execute the webservice and provide the results back to the user in Cards based UI format.
There are many readily available bot frameworks like which can handle the non-application specific bot functions like greeting a customer, simulating a conversation, presenting results etc. Designing and developing a business bot involves directing the general-purpose bot to gather the mandatory parameters of a webservice and executing the webservices