With the proliferation of AI, chatbots are evolving as a mandatory enterprise tool. However, it is imperative that they qualify on some “must-have” design requirements e.g. always-on, security etc. This paper presents an architectural approach for an efficient chatbot design which can fully meet these tenets by the use of proxy patterns, based on the OOAD methodology for design, and explains in depth the reasons and advantages of this pattern over others.
Businesses now increasingly focus on enhancing user experience and agile decision making with users being at the core of all business strategies. The user-enterprise relationship has inverted and enterprise boundaries are evaporating.
In order to fulfil these requirements, enterprises need a smart and intelligent virtual assistant or a chatbot. A human-like virtual assistant allows people and websites/mobile devices to engage in intelligent conversations via any interactive channel and in multiple languages. These digital virtual agents are highly contextual, allowing them to adopt any physical appearance or personality.
In principle, chatbots need to embody all the attributes of a next generation smart application such as:
So, what should the right architectural approach be - one that encapsulates all of the above? We explore OOAD-based design as a strong candidate for chatbot architecture. Object-oriented design is an old paradigm in enterprise architecture. This can be applied successfully to build a chatbot.
Let’s consider a simple basic use case where a user interacts with a chatbot and the following interaction ensues:
In an enterprise scenario, cognitive chat capabilities could be built leveraging a homegrown AI stack, or the more prevalent approach of customizing APIs offered by the likes of Wipro HOLMES, IBM Watson, Google, Amazon, etc. An organization may start with a vendor but subsequently move to another. The main reason for this migration could be availability of better AI features, pricing etc. Hence, the chatbot design should use the right architectural pattern to support this migration with minimal or zero disruption in an already established operation. Proxy pattern- a software design pattern, is a solution that is a subset of the larger broker pattern and is highly recommended for a chatbot design.
Proxy pattern: This pattern decouples server from client by the use of an intermediate proxy. Clients (UI) can initiate requests that the proxy can marshal to the server object that renders the cognitive services. The main benefit of this is that since the server can physically reside remotely in other address spaces, apart from the client’s server, this pattern is, by default, suitable for a distributed computing. Another advantage is that the proxy pattern helps to provide a security by shielding the server storing the organization's critical data.
The above scenarios can easily be modelled as a simple sequence diagram to illustrate the types of objects needed to build a chat and their interaction.
Figure 1: Chatbot Sequence Diagram
Figure 2: Cognitive State Diagram
Benefits of OO design or Proxy pattern for a chatbot:
Proxy design pattern is easy as well as simple to understand and implement. It is very popular for designing any distributed computing architecture specially as demanded by chatbot requirements. Proxy design pattern plays an important role in helping a software architect in taking decisions in solution design of any kind of chatbot and is a key enterprise tool that no business can afford to ignore.
References:
[1] http://cci.drexel.edu/seniordesign/2016_2017/DrexelChatbot/DrexelChatbotDD.pdf
[2] https://chatbotsmagazine.com/design-framework-for-chatbots-aa27060c4ea3
[3] https://chatbotslife.com/two-ways-to-design-chatbots-1deccd2448df
Manish Okhade -Solution Architect and Pre-sales Lead for the Automation Ecosystem HOLMES™.
With more than fifteen years of experience in engineering services and 4+ years in Artificial Intelligence, Manish has been associated with HOLMES since its inception in the CTO’s office and is instrumental in building complex AI solutions in the Health, Communications and other verticals.
© 2021 Wipro Limited |
|
© 2021 Wipro Limited |
Engineering, Construction & Operations
Pharmaceutical & Life Sciences