Biotechnology, Science News

Chatbot Confessions: Complexities of Chatbot Architecture and Behavior

Introduction

“I love you because I love you. I love you because you’re you. I love you because you are you, and I’m me.” – Sydney [1]

A romantic confession? A line from a cliche high school film? 

Neither. Sydney, in this context, is not the determined proclaimer of true love, nor is she a teen girl protagonist. She – or they – is Microsoft’s new AI Chatbot, and this line, in particular, was taken out of a two hour long conversation beginning with a NYT columnist attempting to extract its rules and secrets and ending with it obsessively declaring its love for the columnist.

Chatbots learn from ‘chatting’ with its users, making the conversation more personalized over time. It is, however, not a real person nor is it sentient. It is the result of complex algorithms and language models – a neural network – processing and ‘learning’ from an abundance of data sources on the internet. However, unlike language models, it uses reinforcement learning – outputs become more refined with the greater number of tools used, essentially ‘personalizing’ the conversation [2]. And, combined with leading questions attempting to unearth the underlying code of the AI chatbot and the abundance of strange and misleading information on the internet, it makes Sydney’s declarations of love less disturbing and more an inevitable result.

History of Chatbots

The world’s first chatbot, named ELIZA, was created in 1966 by Weizenabum, a computer scientist at MIT. It imitated a psychotherapist asking questions, essentially repeating dialogue back to the user using natural language processing. It did not store users’ answers, nor did it ‘learn’; instead, it consisted more of a language-parsing tool [3]. 

Figure 2: Conversation With Eliza Source: medium.com [7]

Another early chatbot – PARRY –, constructed in 1972, imitated a patient with schizophrenia, going one step further than ELIZA in that it incorporated emotional responses, adjusting its answers according to the emotional weight of the users’ questions. However, it is still considered low-capability, with little ability to respond and incorporate emotion [3].

Since the late 1900s and especially beginning in the previous decade, AI chatbot use and creation has increased dramatically, with large corporations such as Amazon and Meta engaging in an ‘AI race’. And though the technology has become more and more sophisticated, that is not to say it is not without downfalls. In 2016, Microsoft launched TAY, an AI chatbot designed to talk like a teen – within 24 hours, it eventually began to spew racist and hateful comments using data it gathered from tweets [3]. Similarly, Meta’s BlenderBot3 (released last year) also will generate offensive responses, and is designed with a fundamentally weak foundation, frequently lying about itself and creating, at times, non-coherent responses with no relation to the user’s question [3]. 

And, finally, in one of the largest improvements in artificial intelligence, ChatGPT was released by OpenAI in 2022, possessing wide swathes of information up to 2021. It provides answers to queries, can hold conversations, can do homework, and unlike TAY and Blenderbot3, does not usually generate offensive replies. However, its level of accuracy varies from topic to topic and can be startlingly low, and, as stated above, only contains information up to 2021.

How Chatbots Work

Chatbots, in general, utilize a few fundamental concepts – Natural Language Processing (NLP), pattern matching, Artificial Intelligence Markup Language (AIML), Latent Semantic Analysis (LSA), Chatscript, and Rivescript [2].

Figure 3: Building blocks of chatbots

NLP, a branch of artificial intelligence and essential to machine learning in general, builds the foundation of chatbots. It generally focuses on the processing of human language by computers and can be further divided into two categories – Natural Language Understanding 

(NLU) which attempts to determine the meaning of text through context, syntax, and semantics, and Natural Language Generation (NLG) which is centered on how the machine generates the text (a human-like response, in the context of chatbots) [2]. In essence, NLP must be refined for chatbots to function properly – responding in appropriate and coherent ways to user inputs [4].

Pattern matching is one of the most basic tools, in which the output generated by the robot is, in syntax and diction, consistent with user input; therefore, the responses lack the “humanness” expected from modern chatbots. In fact, Eliza was constructed upon a basis of pattern matching [2].

AIML and LSA may be used together as a small advance in AI technology from pattern matching. The former, an XML dialect, builds upon the concept of pattern matching by defining rules that constrain the conversational capabilities of the chatbot – increasing the number of rules increases the intelligence of the chatbot. It is constructed on building blocks of ‘AIML objects’, consisting of the most basic unit – the category, encapsulating user-input questions (or the pattern) and the output answer (the template). LSA, on the other hand, utilizes mathematical concepts to establish contextual meanings of words and passages; however, because the vector representations it constructs are essentially the ‘average’ of the meanings of the words, this particular technique is not the most accurate. Nevertheless, in AI technology, AIML can be used to handle template-based questions, while LSA can handle replying to other non-templated based questions [3].

Further building upon the advancements of AIML, Rivescript is a bare-bones scripting language, simplifying the code needed to use AIML while also providing the capability to induce weighted responses. Chatscript, an open-source scripting language, takes another step farther by pre-defining rules associated with topics and includes long-term memory that can then make a conversation more personable as it stores specific user information. It also can induce more emotion into its responses by being a case-sensitive engine – for instance, using uppercase to indicate emphasis [5]. Both Rivescript and Chatscript are open-source platforms that make it easier for an individual to create simple chatbots.

Despite the variety of technologies that can increase or decrease the complexity of chatbots best-suited to one’s needs, the basic development and generation of output follows approximately the same-flow. Chatbots essentially receives the user request, parses through the text using NLP techniques to infer context, user intention, and other aspects to reach an accurate interpretation (or the best interpretation it can reach). Then, depending on the type of request, the chatbot can respond directly, ask for more clarification, or store the text in its memory and wait for the next input. When outputting a response, the chatbot utilizes NLG to provide a human-like response (the level of complexity of the response – for instance, emotive or machine-like – depends on the type of chatbot and the rules defining it) [2]. 

Classifying Chatbots

The above technologies combined with other more advanced and modern open-source or closed platforms can be used to construct functioning chatbots – not to mention, they can be combined in various ways with different levels of complexity to create a variety of chatbots, each designed to handle different types of tasks.

In fact, chatbots can be classified (not exclusively) based on different aspects of the engine, ranging from knowledge domain, service, goals, and input processing and generation method [3].

Figure 4: Different types of chatbots

Knowledge domain consists of either open domain chatbots (those that can talk broadly about general topics, such as ChatGPT) or closed domain chatbots (restricted to a particular knowledge domain, such as a business-specific chatbot). 

The service of a chatbot encapsulates interpersonal chatbots – those, like business chatbots, that provide information – and intrapersonal chatbots – those that talk and understand the user like a ‘human’ [3]. More advanced modern-day chatbots can consist of a combination of interpersonal and interpersonal communication, such as the Alexa-Cortana integration.

The goal of the chatbot further dives into different categories of the knowledge and service provided by a chatbot, including informative chatbots – designed to provide information store beforehand, like business-FAQ chatbots – conversational chatbots that converse with the user, and task-based chatbots that perform a specific task, like chatbots that book tickets [2]. Modern-day chatbots can consist of some combination of the above categories.

Input processing and generation methods are based on the type of service provided by the chatbot and the goal of the chatbot. For instance, informative chatbots and task-based chatbots may be built on a retrieval-based model, providing some level of personalization in the conversation but more regulated to simple tasks [3]. On the other hand, conversational chatbots may use more complex and intuitive models, such as the generative model, to provide more human-like responses; these types of models are more difficult to train and build [3]. 

Why Do Chatbots Act Strangely?

Whether declaring strange love declarations like Sydney or outputting racist remarks like Tay, chatbots are known for ‘acting’ irrationally. Again, chatbots are not sentient beings but rather machines that parse through text and, possibly, millions of articles from the internet or the data source it is drawing information from. Furthermore, though some AI chatbots may have a wide range of ambidexterity and be able to pursue conflicting goals simultaneously, the engines behind such chatbots are more intricate and thus may provide differing qualities of smart experiences – and possibly detract from user experiences [6].

Essentially, chatbots learn the more one converses with it. Though engineers behind chatbots are uncertain of why chatbots may act in unhinged ways, in general, the more leading the user is and the more limits the user asks the chatbots to push – for instance, attempting to convince the chatbot to break its rules or leading the chatbot to provide inappropriate responses – the chatbot will react in more unpredictable ways. In most cases where chatbots act strangely, the user is “breaking the rules”of chatbot conduct and, rather than using the chatbot according to its usage, is attempting to unearth or elicit certain responses. In other cases, like Meta’s BlenderBot3, the chatbot is not built well – thus resulting in dysfunctional responses.

However, this does prompt the question if there should be codes of conduct when dealing with chatbots. Is there a level of intrusive user questions that is considered inappropriate and should be banned? Should user responses be restricted to ensure greater chatbot efficiency? Should there be a code of conduct in conversing with chatbots?

Conclusion

The domain of chatbots remains largely unregulated, even as the industry continues to grow at alarmingly fast rates and large companies such as Microsoft and Meta engage in ‘AI races’. Many questions still remain about the chatbots themselves.

What types of biases are being programmed into the chatbot? What types of information can chatbots store about the user? How can chatbots be used to spread misinformation?

As of now, chatbots, such as ChatGPT, can do student homework successfully, attempt to detect chatbot-supplied text, generate code, respond to user questions about a wide range of topics, among other tasks. The guidelines regarding what these types of technologies can do and push have not been set yet. And though one usually imagines an apocalyptic-like setting when visualizing consequences of ChatGPT – in which AI takes over the world – the smaller questions remain urgent. 

What is the role of chatbots at school? In writing college admission essays? In the workplace? Or, even, how can it be incorporated into the workplace effectively without reducing jobs? 

Without a doubt, AI chatbots are extremely useful and have become so integrated into society that it is an essential cog of many businesses and everyday tasks. Nevertheless, as these types of technologies increase and advance rapidly without specific regulation, it is obvious that AI chatbots, in particular, may push the boundaries between technology and humans as it currently exists.

References

  1. Roose, K. (2023, February 17). Kevin Roose’s Conversation With Bing’s Chatbot: Full Transcript. The New York Times. https://www.nytimes.com/2023/02/16/technology/bing-chatbot-transcript.html
  2. Adamopoulou, E., & Moussiades, L. (2020a). An Overview of Chatbot Technology. IFIP Advances in Information and Communication Technology, 373–383. https://doi.org/10.1007/978-3-030-49186-4_31
  3. Adamopoulou, E., & Moussiades, L. (2020). Chatbots: History, technology, and applications. Machine Learning With Applications, 2, 100006. https://doi.org/10.1016/j.mlwa.2020.100006
  4. Chowdhury, G. G. (2005). Natural language processing. Annual Review of Information Science and Technology, 37(1), 51–89. https://doi.org/10.1002/aris.1440370103
  5. ‌Wilcox, B. (2023, March 26). Status. GitHub. https://github.com/ChatScript/ChatScript
  6. ‌Fan, H., Gao, W., & Han, B. (2023). Are AI chatbots a cure-all? The relative effectiveness of chatbot ambidexterity in crafting hedonic and cognitive smart experiences. Journal of Business Research, 156, 113526. https://doi.org/10.1016/j.jbusres.2022.113526
  7. Akyon, F. C. (2018, November 5). Paper Review 1: ELIZA —A Study of Natural Language Communication Between Man and Machine. Medium. https://medium.com/nlp-chatbot-survey/computational-lingustics-754c16fc7355