[PDF Download] Transforming conversational ai: exploring the power of large language models in inter

Page 1


Transforming Conversational AI: Exploring the Power of

Large

Language

Models in Interactive Conversational Agents 1st Edition Michael Mctear

Visit to download the full and correct content document: https://textbookfull.com/product/transforming-conversational-ai-exploring-the-power-of -large-language-models-in-interactive-conversational-agents-1st-edition-michael-mcte ar/

More products digital (pdf, epub, mobi) instant download maybe you interests ...

Programming Large Language Models With Azure Open Ai: Conversational Programming and Prompt Engineering With Llms (Developer Reference) 1st Edition Esposito

https://textbookfull.com/product/programming-large-languagemodels-with-azure-open-ai-conversational-programming-and-promptengineering-with-llms-developer-reference-1st-edition-esposito/

Psychodynamic-Interpersonal Therapy: A Conversational Model 1st Edition Michael Barkham

https://textbookfull.com/product/psychodynamic-interpersonaltherapy-a-conversational-model-1st-edition-michael-barkham/

Conversational Artificial Intelligence 1st Edition

Romil Rawat

https://textbookfull.com/product/conversational-artificialintelligence-1st-edition-romil-rawat/

Designing Bots Creating Conversational Experiences 1st Edition Amir Shevat

https://textbookfull.com/product/designing-bots-creatingconversational-experiences-1st-edition-amir-shevat/

Designing Voice User Interfaces Principles of Conversational Experiences 1st Edition Cathy Pearl

https://textbookfull.com/product/designing-voice-user-interfacesprinciples-of-conversational-experiences-1st-edition-cathy-pearl/

Forms of Practitioner Reflexivity: Critical, Conversational, and Arts-Based Approaches 1st Edition Hilary Brown

https://textbookfull.com/product/forms-of-practitionerreflexivity-critical-conversational-and-arts-basedapproaches-1st-edition-hilary-brown/

Conversational

Dialogue Systems for the Next Decade 704

Fernando D'Haro (Editor)

https://textbookfull.com/product/conversational-dialogue-systemsfor-the-next-decade-704-luis-fernando-dharo-editor/

GPT-3: Building Innovative NLP Products Using Large Language Models 1st Edition Kublik

https://textbookfull.com/product/gpt-3-building-innovative-nlpproducts-using-large-language-models-1st-edition-kublik/

VoLTE and ViLTE voice and conversational video services over the 4G mobile network 1st Edition Perez

https://textbookfull.com/product/volte-and-vilte-voice-andconversational-video-services-over-the-4g-mobile-network-1stedition-perez/

TRANSFORMING CONVERSATIONAL AI

EXPLORING

THE POWER OF LARGE

LANGUAGE MODELS IN INTERACTIVE CONVERSATIONAL AGENTS

Transforming Conversational AI: Exploring the Power of Large Language Models in Interactive Conversational Agents

Michael McTear

Belfast, Northern Ireland, UK

ISBN-13 (pbk): 979-8-8688-0109-9

Marina Ashurkina

London, UK

ISBN-13 (electronic): 979-8-8688-0110-5 https://doi.org/10.1007/979-8-8688-0110-5

Copyright © 2024 by Michael McTear, Marina Ashurkina

This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.

Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark.

The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.

While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein.

Managing Director, Apress Media LLC: Welmoed Spahr

Acquisitions Editor: Shivangi Ramachandran

Development Editor: James Markham

Project Manager: Gryffin Winkler

Cover designed by eStudioCalamar

Distributed to the book trade worldwide by Springer Science+Business Media New York, 1 New York Plaza, Suite 4600, New York, NY 10004-1562, USA. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.

For information on translations, please e-mail booktranslations@springernature.com; for reprint, paperback, or audio rights, please e-mail bookpermissions@springernature.com.

Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales web page at http://www.apress.com/bulk-sales.

Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub. For more detailed information, please visit https://www.apress.com/gp/ services/source-code.

Paper in this product is recyclable

About the Authors

Michael McTear is an emeritus professor of Ulster University who has worked in spoken dialogue technologies and conversational AI for more than 20 years. He is the author of several books, including Spoken Dialogue Technology (Springer, 2004), The Conversational Interface (Springer, 2016), and Conversational AI (Springer, 2020). Currently Michael is involved in several research and development projects investigating the use of conversational agents in socially relevant projects such as mental health monitoring and home monitoring of older adults. Michael’s main motivation for writing this book is to bring new developments in conversational AI to the attention of conversation designers and other professionals in a clear and accessible manner.

Marina Ashurkina studied linguistics and translation studies. She has over eight years of experience working with dialogue systems, including working in the company api.ai before it was acquired by Google and became Dialogflow. Also she had her own consultancy Cherry.ai helping companies build smart assistants and worked on building a multilingual voice assistant platform for Huawei. In 2020, Marina created and lectured on a conversation design course to 60 students with a focus on building skills for smart speakers. She was also a Product Manager in Generative Assistants Inc., a US-based startup striving to streamline the creation of generative AI assistants. Besides that, Marina is a certified Project Manager Professional, Scrum Master, and Product Owner, which helps her to set up and drive complex Conversational AI projects.

About the Technical Reviewer

Tom Taulli (@ttaulli) is an advisor and board member of various AI companies. He is also the author of books like Generative AI: How ChatGPT and Other AI Tools Will Revolutionize Business and Artificial Intelligence Basics: A Non-Technical Introduction.

Acknowledgments

In writing this book, we have been guided by an efficient and supportive team from Apress, including Shobana Srinivasan (Production Editor), Tom Taulli (Technical Reviewer), Jim Markham (Development Editor), Gryffin Winkler (Editorial Project Manager), and Linthaa Muralidharan, (Production Supervisor).

Thank you for all your constructive comments and guidance that have helped us improve our book.

We received useful feedback and suggestions from several friends and colleagues, including Mikhail Burtsev (Landau AI Fellow at London Institute for Mathematical Sciences) and Muskaan Singh (Ulster University) for helpful comments on Chapters 3 and 4 and Arseny Fitilbam (founder and CTO of JIQ.ai) for providing anonymized examples of conversations and statistical data for Chapter 8.

Writing a book requires a lot of time and effort, and during the months of drafting, editing, and rewriting chapters, we have been encouraged by our partners who have been patient and supportive during the long hours in which we were working on the book. Michael would like to thank and acknowledge the support of his wife Sandra; Marina is grateful for the support and encouragement she received from her husband Adam.

Introduction

We were motivated to write this book by the launch in November 2022 of ChatGPT and by the ensuing excitement and disruption across the world of Conversational AI. The book is written for a broad audience who are already working, starting to work, or simply interested in Conversational AI. This will include conversation designers, for whom these new technologies are bringing challenges as well as new opportunities; product owners, project managers, software developers, and data scientists who wish to learn about these new methods and technologies; and final year undergraduates and graduates of computer science who are keen to learn about Conversational AI. The book will also be of interest to professionals involved in content generation and discovery across diverse fields, including marketing, law, medicine, and education, as well as members of the general public eager to find out more about this revolutionary new technology.

In writing this book, we have been guided by two primary objectives. Firstly, we want to provide a practical guide for those who wish to explore Conversational AI and its associated technologies. A focal point of the book is the intricate art of prompt engineering. We illustrate with detailed examples the role of Prompt Engineers, nowadays much sought after specialists who can skillfully develop and optimize prompts to enhance the performance of systems powered by LLMs.

Our second aim is to enable you to understand and appreciate the complexities of the technologies of Conversational AI in a relatively non-technical way. Modern Conversational and Generative AI differ considerably from technologies that most readers will have encountered previously, and so we believe strongly that it is important to have a basic understanding and appreciation of how these new systems work. Also, given the controversies that surround the whole area of modern AI, we feel that it is important to consider risks and various ethical considerations that have featured prominently in media discussions.

Conversational AI is a dynamic and rapidly evolving field, with new advancements being reported almost weekly. Our aim in this book is to provide a comprehensive overview of the core concepts and principles of conversational AI, equipping you with a solid understanding of this ground-breaking technology.

In our final chapter, we will delve into the latest developments in conversational AI, highlighting the most significant breakthroughs and emerging trends up to the time of publication. To ensure you stay at the forefront of this exciting field, we encourage you to explore the list of resources provided, which will guide you to continue learning and staying informed about future advancements.

Overview of the Book

There are ten chapters in the book. Here is a brief summary of what we cover in each chapter.

Chapter 1, “A New Era in Conversational AI,” introduces groundbreaking developments in Conversational AI since the launch of ChatGPT in November 2022. Key terms in Conversational AI are explained along with illustrative examples of interactions with ChatGPT and similar chatbots and an overview of how AI-powered chatbots are revolutionizing diverse application areas, transforming the way we interact with technology.

Chapter 2, “Designing Conversational Systems,” reviews current approaches to conversation design and assesses the impact of recent developments, showing how Large Language Models can be leveraged to help designers brainstorm user intents, system responses, and conversation flows. The chapter also describes what is involved in leading a Conversational AI project, outlining the roles and responsibilities within a cross-functional team to ensure successful project execution.

Chapter 3, “The Rise of Neural Conversational Systems,” introduces the encoder–decoder architecture which provides a foundation for neural conversational systems. We explore transformers and the attention mechanism which have become state-of-the-art and revolutionized the field of Conversational AI. We conclude by outlining the advantages and disadvantages of the neural conversational approach compared to the traditional rulebased approach described in Chapter 2.

Chapter 4, “Large Language Models,” introduces Large Language Models (LLMs) and explains how they have transformed Conversational AI. We delve into the intricate mechanisms of LLMs and explore their fundamental differences from traditional search engines, how they can be augmented with external knowledge, and what is involved in fine-tuning. We also address the challenges and limitations of LLMs.

Chapter 5, “Introduction to Prompt Engineering,” introduces the essential terminology and concepts central to prompt engineering. It explores web interfaces for famous LLMs and examines different use cases. The chapter demonstrates practical examples of crafting effective prompts, common design techniques, and patterns. It also presents actionable examples for

Conversation Designers, illustrating methods to significantly reduce the time and effort required to develop intent-based virtual agents through prompt engineering. This chapter will help readers learn how to craft prompts for many scenarios. Moreover, this chapter lays the foundation for the advanced prompt engineering topics in Chapter 6.

Chapter 6, “Advanced Prompt Engineering,” offers an extensive overview of advanced tools and examples to develop prompt engineering skills further. It is written for those who want to go beyond basic LLM interfaces and acquire hands-on experience configuring and setting up the optimal combination of LLM parameters, chaining prompts, and creating LLM applications. This chapter covers system prompts and prompt settings, playgrounds, and APIs and discusses prompt hacking. It also reviews several sophisticated prompt patterns with reasoning elements, such as Chain-of-Thought, ReAct, and Self-Consistency.

Chapter 7, “Conversational AI Platforms,” reviews the transformation of conversational AI platforms from traditional to hybrid and ultimately to new LLMbased platforms. This chapter lists the most important components of classic platforms and how they are influenced by the rise of LLMs. Generative AI features become a new norm in hybrid platforms to automate the process of creating conversational systems and to enrich the end-user experience with live text generation and dynamic reasoning inside the application.

Chapter 8, “Evaluation Metrics,” explores various approaches for the evaluation of conversational systems. We begin by examining metrics employed in the assessment of traditional intent-based conversation systems. Next we provide a comprehensive overview of different frameworks for evaluating LLMs. Following this, we discuss the essential product metrics for evaluating conversational systems as a whole. Finally, we introduce the innovative concept of employing LLMs as a tool for assessing the quality of conversations.

Chapter 9, “AI Safety and Ethics,” delves into ethical considerations, including the handling of bias, toxic content, misinformation, privacy, and data protection. We examine how these critical issues are currently being tackled through regulatory measures and the establishment of standards aimed at fostering trustworthy and responsible AI.

Chapter 10, “Final Words,” reviews recent advancements in Conversational AI and the role of LLMs. We also explore the exciting possibilities that lie ahead in this rapidly evolving and captivating field.

The Appendix contains a list of LLM-powered chatbots that you can use to test the examples in the book.

The Notebook is a web-based resource accessible through https://github. com/Apress/Transforming-Conversational-AI to copy and paste the examples of prompts provided in the book.

1

A New Era in Conversational AI

On November 30, 2022, OpenAI, a prominent US company with headquarters in San Francisco, released a publicly available version of a chatbot called ChatGPT that transformed the world of Conversational Artificial Intelligence (AI) and ignited what has come to be known as “The Conversational AI Arms Race.” Within just five days of its launch, ChatGPT had acquired a million users, and within two months, it was estimated to have 100 million active users. In February 2023, Microsoft, having invested heavily in OpenAI, launched a version of its Bing search engine powered by the technology behind ChatGPT. Google responded in March 2023 by releasing its own AI-powered chatbot called Bard. Others followed, including Anthropic, funded initially by Google and subsequently by Amazon, with a chatbot called Claude, as well as major Chinese tech firms, such as Baidu and Alibaba.

Approximately a year after the launch of ChatGPT, on November 6, 2023, OpenAI unveiled a host of enhancements, innovative products, and tools at

© Michael McTear, Marina Ashurkina 2024

M. McTear and M. Ashurkina, Transforming Conversational AI, https://doi.org/10.1007/979-8-8688-0110-5_1

its inaugural developer conference, OpenAI DevDay.1 These developments are likely to provide new opportunities for those involved in the creation of AI applications. At the same time, they present formidable challenges for competitor companies and we can expect another upsurge of activity as the industry responds to and addresses these challenges.

So what is this all about and why does it matter? Our aim in this chapter is to introduce you to the world of ChatGPT and similar chatbots. We will begin by defining some of the commonly used terms in this area of Artificial Intelligence, such as Conversational AI, Generative AI, and Large Language Models. Following this, we will introduce some examples of how you can engage in natural and meaningful dialogues with ChatGPT and other chatbots. More detailed examples and explanations of how they work and how they can be used will be provided in later chapters. Next we will examine some areas in which these chatbots are being used, looking at the benefits as well as some of the concerns around their use. The chapter concludes with a list of useful resources for you to consult if you wish to delve further into this fascinating field.

By the end of the chapter, you will have gained a good understanding of the main concepts in the fields of Conversational and Generative AI, insights into the diverse types of applications leveraging these technologies, and an awareness of how these applications are likely to impinge on many aspects of our daily lives.

Understanding Key Terms in Conversational AI

Before we go any further, it will be useful to explain some of the terms that we will be using throughout this book.

Conversational AI is a fairly recent term that describes an area of Natural Language Processing (NLP) and Artificial Intelligence (AI) concerned with developing systems that can process human language and interact with humans in a natural way that mimics human conversation. These systems are known by various names, including conversational agents or assistants, chatbots, and digital personal assistants. The term (spoken) dialogue system is used widely in academic and industrial research laboratories, while in commercial applications such as automated customer service, they are known as voice user interfaces. Embodied Conversational Agents (ECAs) are another type of application that features computer-generated animated characters and social robots that can display emotions, gestures, and facial expressions. In some cases, they can also recognize and interpret these cues when displayed by the humans they interact with, thus providing a more human-like and engaging form of interaction. Recently, Meta has been

1 https://devday.openai.com/

developing Conversational AI characters with unique interests and personalities (see further Chapter 10).2

Natural Language Processing (NLP) is a branch of Artificial Intelligence that is concerned with giving computers the ability to process, understand, and generate natural language. NLP has its roots in the 1950s with early attempts at machine translation, and has passed through several stages:

• Symbolic NLP (from the 1950s to early 1990s): in which hand-crafted rules were developed to understand and generate natural language texts

• Statistical NLP (from the 1990s to 2010s): in which machine learning algorithms were used in tasks such as classifying texts and user inputs

• Neural NLP (from around 2010 to the present): in which deep learning methods have been applied to NLP tasks

NLP can be broken down into Natural Language Understanding (NLU) and Natural Language Generation (NLG). Interactive NLP systems, such as Dialogue Systems, also include a Dialogue Management (DM) component that processes inputs and determines the system’s actions and responses. Voice-based (or spoken) dialogue systems also include an Automated Speech Recognition (ASR) component that converts spoken input into text and a Text-to-Speech (TTS) component that converts text output to speech.

■ Note Recently, the term NLU has come to be used to describe chatbots and conversational systems that have been developed using traditional technologies involving intents, entities, and pre-defined system responses and conversational flows, as described in Chapter 2, as opposed to systems developed using neural technologies, as described in Chapters 3 and 4

Generative AI is a new and rapidly emerging area of AI that is concerned with generating new data. This data can be in the form of textual content, such as responses to prompts, summarizations, and text transformations, such as translation to different formats or different languages. More recently, Generative AI is being used to generate images, 3D models, videos, and music. Generative AI leverages the capabilities of Large Language Models (LLMs) to create this new content and has a wide range of potential applications in fields such as art, music, gaming, entertainment, and scientific research. In the

2 https://about.fb.com/news/2023/09/introducing-ai-powered-assistantscharacters-and-creative-tools/

commercial arena, Generative AI is being deployed to enhance productivity in repetitive tasks such as the creation of marketing content, legal documents, and more.

Large Language Models (or LLMs) represent a breakthrough in recent AI. Large Language Models can understand and generate human-like language and are used to perform many tasks in NLP, including translation, summarization, question-answering, and content generation. We provide a fairly non-technical overview of LLMs, how they are trained, and how they are used, in Chapter 4.

AI-powered chatbots. This term refers to chatbots and conversational agents that make use of new technologies such as Large Language Models in contrast to earlier systems based on hand-crafted rules. We show examples of several AI-powered chatbots in the book. As well as ChatGPT, we also provide examples generated by Google’s Bard, Anthropic’s Claude, and others.

■ Note For many of these systems, there are free as well as subscription-based versions. You can find a list of these in the Appendix.

ChatGPT is a conversational interface to various LLMs developed by OpenAI. The interface allows users to insert a prompt to which ChatGPT generates a response, or more precisely, a completion, as the prompt provides a completion to the words of the user’s input. The latest version of ChatGPT can also generate images from textual prompts and search the Internet, and there are also speech-to-text and text-to-speech capabilities. We describe how the completion is generated in more detail in Chapter 3, while the creation of effective prompts to ensure useful output is explained with multiple examples in Chapters 5 and 6.

GPT. The GPT in ChatGPT refers to the Generative Pre-trained Transformer Architecture that is the basis for AI-powered chatbots. The Transformer architecture is described in Chapter 3, while Chapter 4 provides an overview of pre-trained (or foundational) Large Language Models that make use of the architecture.

■ Note The term GPT is now being used to refer to applications in which ChatGPT can be customized by anyone wishing to develop chatbots for their own specific purposes using noncoding methods. It is planned to create a GPT Store where these GPTs can be stored and made accessible.3

3 https://openai.com/blog/introducing-gpts

Interacting with ChatGPT and Similar Chatbots

While the underlying technologies powering ChatGPT and similar AI-powered chatbots have been in existence for several years, it wasn’t until its launch in November 2022 that ChatGPT became the fastest-growing computing technology in history. This was largely due to its simple user-friendly chat interface that allowed anyone with Internet access to engage in open-ended conversations on any topic with an AI entity that could provide detailed answers to questions, execute tasks such as document summarization, generation of emails and other content, language translation, computer code production, and much more. Figure  1-1 depicts the intuitive ChatGPT chat interface.

Figure 1-1. The ChatGPT chat interface4

In addition to offering interaction tips and a disclaimer about potential errors, users are presented with a message box for entering textual prompts. The latest version, ChatGPT-4, expands the input options to include images as well as documents. Similarly, other advanced chatbots, such as Anthropic’s Claude, also accept documents as input.

4 https://chat.openai.com/

What differentiates a chat interface from a simple request to an LLM is the feature of keeping the entire conversational context. The user can freely switch from one topic to another, and the bot will retain and remember all the information to support the conversation as a human would. This makes the conversation genuinely remarkable. It’s possible due to the large context window. At the time of writing this book, Claude 2.1 (Anthropic) has an industry-leading context window of 200K tokens, which was released on November 21st.5 It can remember and track text as large as 150,000 words or 500 pages.

We will introduce the concepts of tokens, context window, prompt parameters, and techniques for prompt engineering in Chapters 5 and 6. You can copy the provided prompt examples from the notebook and try them out in different chat interfaces. Chapters 6 and 7 will introduce playgrounds and Conversational AI platforms where you can build your own LLM application similar to ChatGPT. This section offers a few examples to illustrate the power and versatility of this ground-breaking technology.

We have used search engines such as Google to access information for several decades already. That’s why when we interact with ChatGPT or similar chat interfaces, we unconsciously use them as search engines. We need to start thinking differently about them. To get a better result, we need to improve our query. Instead of asking a simple question, we can provide context, ask them to follow instructions, and give detailed descriptions of what we need. We can ask the LLM to take on a specific role, such as a teacher, lawyer, financial advisor, detective, and many more.

Let’s provide a simple example of how a differently formulated query can improve the conversation with ChatGPT. If we want to learn about the history of the UK’s landmark the London Tower Bridge, instead of just asking, “How was London Tower Bridge built?” we can provide a detailed prompt, as shown in Figure 1-2.

5 www.anthropic.com/index/claude-2-1

Figure 1-2. Interacting with ChatGPT is different from interacting with a search engine. Prompt engineering techniques make the generated text unique and creative

Using different techniques for constructing prompts, we can create better experiences and generate unique text. Prompt engineering is as much a technical task as it is creative.

OpenAI models have a knowledge cut-off; if used as-is, they can’t provide realtime information. GPT-4, OpenAI’s most recent model, has world knowledge up to April 2023. To solve this issue, OpenAI first introduced ChatGPT plugins, which were able to make requests to third-party applications to get relevant data. In November 2023, OpenAI rolled out GPTs, custom versions of ChatGPT, which can be connected to the real world via a function called ‘actions’. Microsoft took an early stance on the issue of knowledge cut-off with Bing by integrating search, browsing, and chat into a unified experience in February 2023. Google also integrated search into its conversational interface in Bard. We will talk about GPTs in Chapter 10 of this book.

Throughout this book, we will provide numerous examples of how to interact with ChatGPT and similar chat interfaces. For a list of the most prominent AI-powered conversational systems, refer to the Appendix.

Using AI-Powered Chatbots: Examples of Some Relevant Application Areas

Chatbots have been used for a number of years in many diverse application areas, including customer service, education, healthcare, and as social companions. Traditionally, these applications were developed using conventional design and development methods, as detailed in Chapter 2. Now the field of Conversational AI has been revolutionized by the emergence

of Large Language Models (LLMs) and deep neural network architectures. While these advancements have opened up exciting new possibilities, they have also presented a unique set of challenges. In this section, we delve into some key application areas where these emerging and innovative technologies are making a significant impact.

Customer Service

Customer service is one of the most popular use cases for Conversational AI. According to Gartner, Inc., chatbots will become a primary customer service channel for roughly a quarter of organizations by 2027.6 Businesses were eager to automate customer service long before Generative AI. They used more conventional technology and deployed it to multiple channels such as the web, phone, emails, and messengers.

Generative AI uncovers new opportunities for customer support. With its ever-growing context window size, it can remember the entire conversation history with a specific customer across multiple channels and provide better customer support. Customer support agents can benefit from using live AI assistants which can create drafts and suggestions during live calls with customers. LLM-powered conversational agents sound more fluent and human-like. Customer service can benefit from using Generative AI for summarizing customers’ cases, identifying the sentiment of the conversation, and gaining insights from data. Also, automated internal employee support is a growing business case as a large amount of the company’s data can be used as a knowledge base for conversational agents.

However, implementing Generative AI in customer-facing applications may come with risks. Traditional tools which used machine learning classifiers to identify pre-defined intents and follow specific scenarios offered more control over the technology. LLMs come with incredible opportunities as well as certain risks, such as hallucinations, where the LLM fabricates information, bias, privacy, latency, copyright, and other issues which we aim to address comprehensively in this book.

With the right approach and required skills within the team, it’s possible to bring Generative AI to customer support. Let’s take as an example South Korea’s leading mobile operator KT, which has trained its own LLM in the Korean language. GiGA Genie has become the most popular AI voice assistant in South Korea and has had conversations with over 8 million customers as of

6 www.gartner.com/en/newsroom/press-releases/2022-07-27-gartner-predictschatbots-will-become-a-primary-customer-service-channel-withinfive-years

September 2022. By leveraging LLMs, the company has achieved significant quality improvements, better language understanding, and more humansounding sentences.7

Education

Shortly after the launch of ChatGPT in November 2022, concerns were voiced in educational circles warning of the dangers arising from the potential misuse of this new technology. There was a fear that students would be able to have essays generated by ChatGPT that would be indistinguishable from their own work, making the detection of plagiarism almost impossible. Furthermore, given the propensity for LLMs to output inaccurate information, students could be fed content that they would be unable to critically evaluate. These are legitimate concerns that warrant careful consideration. However, it is important to recognize that alongside these challenges, the emergence of new technologies like ChatGPT brings forth many exciting opportunities for students as well as educators. Embracing these technologies responsibly can empower students to explore innovative learning methodologies, while educators can foster a dynamic and enriched learning environment, tailoring their approaches to cater to individual needs and inspiring a new era of educational excellence.

LLMs provide a versatile learning tool for pupils and students at all levels of education, from elementary school through to university and beyond, in tasks such as writing essays, translating texts, summarizing documents, and generating computer code. The challenge is to treat this generated content not as a final product but as an initial suggestion that can be refined based on specific criteria. Assessment of the student’s work should extend beyond the text output produced by the LLM to a focus on how the student iteratively refined and re-designed prompts to the LLM throughout the learning process. In this way, the LLM becomes a facilitator in the content production process.

LLMs also have the potential to serve as tools for improving the student’s writing skills and critical thinking abilities, while also supporting other tasks such as the development of reading comprehension or the learning of foreign languages. Each student can work individually with their own chat-based LLM interface, thus benefiting from a personalized learning experience in which they receive individualized constructive feedback.

There are also many benefits for teachers. For example, LLMs can be used to produce lesson plans or to brainstorm the topics to be covered in a lecture. These outputs could be tailored to cater to different levels of student

7 https://blogs.nvidia.com/blog/kt-large-language-models/

Chapter 1 | A New Era in Conversational AI

proficiency, creating personalized lesson plans that align with individual learning needs.

LLMs can also be beneficial in semi-automated grading processes where the teacher can input the student’s work into the LLM and obtain a concise summary highlighting the strengths and weaknesses of the work. LLMs can also be used as a powerful tool for plagiarism detection.

Balancing the concerns mentioned earlier with the potential benefits requires a concerted effort to establish robust guidelines, ethical frameworks, and educational practices that harness the transformative power of ChatGPT while mitigating its risks.

For more detailed discussion of the benefits as well as the challenges of LLMs in education, you can check out the following papers: “Practical and Ethical Challenges of Large Language Models in Education: A systematic review”8 and “ChatGPT for Good? On Opportunities and Challenges of Large Language Models for Education.”9

Healthcare

Healthcare is a domain where LLMs have demonstrated enormous potential, but also where there are significant concerns. ChatGPT, for instance, has proved capable of passing medical exams (e.g., the U.S. Medical Licensing Exam), and there are already several specialized LLMs tailored for medical applications, including BERT for Biomedical Text Mining (BioBERT), ClinicalBERT, GatorTron, Med-PALM, and many more. At the same time, the critical nature of healthcare requires careful consideration of issues related to misinformation, bias, potential breaches of patient privacy, and others.

In this section, we will look at how LLMs can enhance the work and educational experience of healthcare professionals and medical students. Additionally, we explore the positive impact LLMs can have on the lives of patients. Following this, we will outline some of the challenges associated with the use of LLMs in healthcare and propose some solutions to mitigate these concerns.

LLMs can alleviate the burdens faced by healthcare professionals in various time-consuming and repetitive tasks. For example, LLMs can drastically reduce the time and effort required for creating summaries of medical interviews with patients, composing standardized reports and discharge summaries, and even translating documents into other languages.

8 https://bera-journals.onlinelibrary.wiley.com/doi/full/10.1111/ bjet.13370#:~:text=Large%20language%20models%20have%20been,question%20 generation%20and%20essay%20scoring

9 www.sciencedirect.com/science/article/abs/pii/S1041608023000195

LLMs can also provide efficient access to medical research, delivering summaries and responses tailored to individual patients. Furthermore, they can also act as a basis for conversational assistants, capable of examining and explaining medical images and other test results, assisting in diagnosis, and supporting clinical decision-making.

With the integration of frameworks like Retrieval Augmented Generation (RAG), which we will describe later in Chapters 4 and 7, LLMs can analyze relevant documents such as electronic health records, radiology reports, and other medical documentation to predict diagnoses, recommend treatment options, and offer clinical decision support to healthcare professionals.

Medical students can benefit from the use of LLMs in several ways. In addition to providing summaries of relevant research papers, LLMs can enable students to create learning simulations in which the students can engage in realistic interactions with simulated patients and develop skills for taking patient histories, assessing diagnosis, and formulating treatment plans.

For patients, in a healthcare environment facing increasing resource constraints, Conversational AI-powered virtual nurses can serve as complementary tools for patients, offering preliminary guidance and triage until a healthcare professional becomes available.

Given the paramount importance of patient safety in healthcare, there are several ethical issues to consider. Fairness is concerned with the data used to train the LLM and the need to prevent bias and ensure accurate predictions. However, obtaining suitable datasets for LLM training poses a challenge due to data privacy concerns and the general reluctance of individuals to share their personal data for LLM training.

In healthcare applications, the explainability of LLM predictions and decisions is crucial for maintaining transparency. Robust regulatory frameworks must be established to oversee the usage of LLMs in healthcare applications, ensuring accountability and adherence to ethical principles.

Finally, given the relative novelty of LLMs in healthcare, there is a need for comprehensive training and education in programs for healthcare professionals, emphasizing the capabilities, limitations, and potential risks associated with LLM technology.

There is an extensive literature on LLMs in healthcare. This article, “Large Language Models in Health Care: Development, Applications, and Challenges”10 provides a readable overview, with a particular emphasis on the challenges involved. See also “Embracing Large Language Models for Medical Applications: Opportunities and Challenges. ”11

10 https://onlinelibrary.wiley.com/doi/10.1002/hcs2.61 11 www.ncbi.nlm.nih.gov/pmc/articles/PMC10292051/

Social Companions

Originally the term chatbot was used to characterize a conversational system that engaged primarily in casual chit-chat with users for the purposes of entertainment in contrast to task-oriented systems with more “serious” purposes such as responding to queries or helping users complete a task. Nowadays the term has broadened to encompass all types of conversational systems.

One particularly compelling application of modern chatbots is to act as virtual social companions for individuals like older adults or those living alone who may struggle with the challenges of depression and related disorders. In this context, a social companion can play a crucial role in enhancing the overall well-being of these individuals, providing assistance with activities of daily living, identifying potential risks, and offering both practical support and companionship. The deployment of chatbots as social companions can contribute to the automation of the previously highlighted issue of the scarcity of public health and care workers in many contemporary communities. In the following paragraphs, we provide brief descriptions of two instances where chatbots are actively employed in social care applications.

CLOVA CareCall Service

The CLOVA CareCall Service, developed by NAVER, South Korea’s leading platform company, was deployed initially to monitor the health symptoms of users during the COVID pandemic. The service has since been re-purposed to provide support to elderly individuals with simulated LLM-powered conversations on a range of topics based on a large-scale conversational dataset. Using LLMs has enabled the system to provide open-domain conversations on a range of topics, including general health of users as well as their hobbies and interests.

The service has been evaluated through focus group observations and interviews and has generally received positive support. However, on occasions, it was found that users expected the system to be able to support social services that were beyond the system’s scope. Users also felt that the system was impersonal as it was unable to follow up on past conversations due to the lack of long-term memory in LLM-powered chatbots. Attempts to address these problems include the use of in-context learning in which prompts are augmented with additional information. We describe in-context learning and prompt augmentation in more detail in Chapters 4 and 6.

This posting from the European AI Alliance provides a brief description of the CareCall system.12 You can find more detail in this paper from the CHI ’23 conference.13

12 https://futurium.ec.europa.eu/en/european-ai-alliance/best-practices/ ai-people-clova-carecall-service-naver

13 https://dl.acm.org/doi/fullHtml/10.1145/3544548.3581503

The e-VITA project

e-VITA, a three-year collaborative European and Japanese research project, has developed a virtual coach aimed at empowering older adults to effectively manage their health, well-being, and daily routines.14 The virtual coach provides personalized support and motivation across a range of critical areas, including cognition, physical activity, mobility, mood enhancement, social interaction, leisure, and spiritual well-being.

During the initial phase of the project, dialogues with the virtual coach were developed using Rasa’s open source Conversational AI platform. Developing these dialogues involved creating training examples to enable the classification of intents based on user inputs across the various domains covered by the coach; specifying the system’s responses; and designing conversation flows (known in Rasa as stories).

Following the launch of ChatGPT in November 2022, there was a growing demand from users to be able to access the latest Conversational AI technologies. As a result, LLM-powered dialogues based on the OpenAI API were integrated into the system. These dialogues were employed in two different ways:

1. Fallback intent: When the system was unable to classify a user’s utterance using its predefined intent classification capabilities, the LLM was invoked to recognize the intent and enable the dialogue to continue. This mechanism ensured that users could seamlessly engage with the system even if their input did not fit neatly into predefined categories.

2. Casual dialogue: Users could explicitly request to continue a dialogue with the LLM when a predetermined story had reached a conclusion. This resulted in a more open-ended conversation that did not need to follow the constraints of a predefined script. This approach allowed users to engage in a more spontaneous way with the virtual coach, thus providing a more natural and personalized conversational experience.

The use of the LLM-based approach in the project was subject to certain constraints, particularly for the European Union (EU) on account of regulations regarding the use of AI systems (for more detail see Chapter 9). For this reason, the scope of topics for the LLM-powered conversations was restricted to information contained in documents provided by the project’s Content Group. These documents were fed into the API to provide a contextual basis

14 www.e-vita.coach/

for the dialogues. We describe this process, known as Retrieval Augmented Generation (RAG), in greater detail in Chapters 4 and 7. Constraining the LLMpowered conversations to this curated content helped to mitigate potential risks of misinformation, harmful content, and hallucinations that could arise in scenarios involving less restricted use of LLMs.

Summary

In this chapter, we introduced you to the captivating world of ChatGPT and other AI-powered chatbots. We began by defining some key terms in Conversational AI, followed by some examples illustrating the diverse ways we can interact with ChatGPT and similar chatbots. Then, to whet your appetite for the upcoming chapters, we described some application areas in which AI-powered chatbots are revolutionizing our world.

In the next chapter, we delve into the intricacies of conversation design, tracing its evolution from traditional approaches to the transformative impact of Large Language Models (LLMs) and neural conversational systems.

Resources

There are many resources that will help you find out more about Conversational AI and keep up with the latest developments. Here is a selection of those that we have found particularly useful.

Podcasts, Blogs, and Social Media

Synthedia – by Bret Kinsella, a newsletter about the latest developments in Generative AI: https://synthedia.substack.com/

Voicebot.ai – also by Bret Kinsella, newsletter covering AI stats, research reports on the Conversational AI market, podcasts, and videos: https:// voicebot.ai/

VUXWorld – by Kane Simms, podcasts, articles, Conversational AI Maturity Assessment, events. With a focus on the future of AI-driven customer experience: https://vux.world/

The Batch – by Andrew Ng, founder of DeepLearning.AI, courses, newsletter, blogs, and resources on Generative and Conversational AI: www. deeplearning.ai/the-batch/

Medium Daily Digest – short articles on various topics in Artificial Intelligence, Large Language Models, and other topics. Select topics to follow here: https://medium.com/me/following/suggestions#suggested-topics

PyCoach – articles and courses on ChatGPT, GPT, Prompt Engineering: https://thepycoach.com/

Convoclub – hosted by Maaike Groenewege, provides news, community group, forum and chat6, meetups, and tutorials.

LinkedIn is a business and employment-focused social media platform that offers a free, basic membership to those who wish to create a professional online profile. Many professionals interested in Conversational AI post regularly on LinkedIn: www.linkedin.com/

Online Courses

Introduction to Conversational AI by LinkedIn Learning: www.linkedin.com/ learning/introduction-to-conversational-ai

Master the art of creating winning AI Assistants. Conversation Design Institute: www.conversationdesigninstitute.com/

Contact Center AI: Conversational Design Fundamentals. Google Cloud: www. coursera.org/learn/contact-center-ai-conversationaldesign-fundamentals

Building Conversational AI Applications. Nvidia. www.nvidia.com/en-gb/ training/instructor-led-workshops/building-conversationalai-apps/

See also courses at Coursera (www.coursera.org/), Udemy (www.udemy. com/), Deeplearning.AI (www.deeplearning.ai/courses/), and edX (www. edx.org/).

Videos

Code.org – educational videos, including a series on how AI works, including chatbots and large language models: https://code.org/educate/ resources/videos

There are many videos on Conversational AI, Large Language Models, and other relevant topics on YouTube (www.youtube.com/)

Conferences

There are many conferences that focus on Conversational AI. Here is a selection that we have enjoyed and found particularly useful.

Conversational AI & Customer Experience Summit. Held annually in Munich, Germany, also editions in Asia: https://altrusiaglobal.com/our-events/

Chapter 1 | A New Era in Conversational AI

The European Chatbot & Conversational AI Summit. Held annually in Edinburgh, Scotland: https://theeuropeanchatbot.com/

Voice & AI. Covers voice-based systems and chatbots, held in Arlington, VA, USA: www.voiceand.ai/

Unparsed: The Conversational Design Conference. Billed as the world’s first Conversation Design Conference, first held in London in July 2023, to be held in London in June 2024: https://unparsedconf.com/

Chatbot Summit: www.chatbotsummit.com/aboutus

Project Voice: www.projectvoice.ai/

2

Designing Conversational Systems

Conversation design plays a pivotal role in the development of a successful conversational system. In light of the customer dissatisfaction issues that arose from earlier telephone-based interactive voice response (IVR) systems, companies now recognize the criticality of delivering exceptional user experiences as they embrace the new and rapidly evolving technology of Conversational AI. Consequently, over the past few years, the demand for conversation designers has skyrocketed, giving rise to an entirely new industry centered around the art of conversation design.

Traditional conversation design has long relied on established best practice guidelines that have been developed over several decades. However, the landscape is rapidly evolving with the advent of conversational interfaces like ChatGPT and Google’s Bard, which harness the power of Large Language Models (LLMs) and that will be the focus of the rest of this book. As these new emerging technologies continue to unfold, we can anticipate significant transformations in the role of the traditional conversation designer which may be seen as a threat but which, as we will show, offer exciting new challenges and opportunities.

© Michael McTear, Marina Ashurkina 2024 M. McTear and M. Ashurkina, Transforming Conversational AI, https://doi.org/10.1007/979-8-8688-0110-5_2

In this chapter, we begin by exploring what is involved in leading a Conversational AI project, looking into the roles and responsibilities within a cross-functional team. Our view is that although aspects of the conversation designer’s tasks will evolve as a result of the advent of new technologies, there will always be a need for a skilled conversation designer in any conversational AI project.

Next we describe in some detail what is involved in traditional conversation design, looking at the key issues that designers need to consider when developing a conversational system. Some of these tasks have previously involved extensive handcrafting but can now be facilitated and automated using LLMs. We provide some examples of how LLMs can be used to brainstorm tasks such as providing training examples for intents, creating system responses, and developing conversation flows.

By the end of this chapter, you will have a good understanding of traditional conversation design and how the emergence of AI-powered chatbots based on LLMs offer new opportunities for conversation designers.

Leading a Conversational AI Project

Although large language models will change the nature of conversation design, the role of the conversation designer in leading a Conversational AI project remains a complex task, requiring a good understanding of technology trends and best practices from existing solutions with their opportunities and limitations, attracting the right talent into the team, setting ambitious but achievable goals, and staying up-to-date with compliance and regulations across different territories. As Conversational AI continues to have periods of extreme growth (e.g., during the pandemic or after the release of ChatGPT), companies need experienced leaders to manage the projects. Note that we are talking about complex, large-scale projects, building multilingual, multidomain chatbots and voice user interfaces, as opposed to the simple automation of FAQ’s.

The Conversational AI market size is expected to increase from USD 10.7 billion in 2023 to USD 29.8 billion by 2028, according to IMIR (Intellectual Market Insights Research),1 which means that new opportunities will arise and new projects will be initiated worldwide. It will require the existing workforce to adapt to new roles. Specialists from adjacent industries will need to upskill to fit new job requirements. Many UX designers, copywriters, customer support agents, linguists, programmers, data scientists, and other specialists will start working in Conversational AI. The most prominent application is still customer support automation; however, there are other opportunities to pursue.

1 www.intellectualmarketinsights.com/report/conversational-ai-marketresearch-current-trends-and-growth/imi-005460

For a team to achieve success, leaders need to employ proven tools in project and product management. First and foremost, it is necessary to align the project goals with the company’s strategy. Project and technical leads must collaborate effectively and share ideas to ensure that the architecture aligns with current and future requirements. Given the volatility of the market and the constant emergence of new tools and changing trends, the team must cultivate an agile mindset and remain cross-functional. One decisive factor for success is how quickly the team can deliver new functionality to end users. To accelerate time to market, popular frameworks such as Scrum or Kanban can be utilized. As the team grows, the concept of “teams of teams” may arise, with each team focusing on creating value for the user.

We want to look at Conversational AI projects from an optimistic as well as a realistic point of view. It’s not surprising that Conversational AI real-world performance often leaves much to be desired. As you read this book, someone out there is having a frustrating experience with a chatbot. This is particularly the case when it comes to resolving difficult tasks involving queries about insurance or banking. Leaders must take responsibility, mitigate risks, and drive their teams to collaborate with customers constantly, setting highquality standards, and accepting that it’s hard to create flawless conversation design experiences. You may remember, for example, that even the early version of Microsoft Word2 was frustrating initially because it wouldn’t save your information automatically. All technology takes time to mature and become bug-free; however, it only happens if motivated people make it their point to change it for the better.

In the next section, we’ll describe different roles, assuming that one person can take on one or more functions, depending on the project size, technology stack, organization, and the person’s abilities and ambitions. We want to make it easier for anyone passionate about Conversational AI to find an entry point into this world.

Roles and Responsibilities in a Cross-functional Team

We would like to introduce a few roles that are common for a Conversational AI project. In reality, you’ll encounter a lot more diverse roles including project managers, product managers, product owners, quality assurance specialists, machine learning engineers, NLU engineers, data analysts, consultants, and many more, depending on the project size and the company they work at.

2 https://en.wikipedia.org/wiki/Microsoft_Word#Reception

Another random document with no related content on Scribd:

short and witty one. He solved the problem.

De mortuis nil nisi bene. One should speak only evil of the living.

Heinrich Hoffman, a Frankfort doctor, wrote the popular tales for children about Struwelpeter, which are nursery classics in many languages. These stories have an added interest from the clever illustrations by their author.

Wilhelm Busch, also a comic artist, born near Hanover, is the creator of the Max and Maurice stories and pictures.

He was a well-known contributor to the Fliegende Blätter, the popular comic paper of Germany.

A distinct type of German humor is found in their Student Songs. These, oftener than not, are in praise of merrymaking and good cheer.

POPE AND SULTAN

The Pope he leads a happy life; He fears not married care nor strife; He drinks the best of Rhenish wine I would the Pope’s gay lot were mine.

He drinks the best of Rhenish wine— I would the Pope’s gay lot were mine.

But then, all happy’s not his life; He has not maid nor blooming wife, Nor child has he to raise his hope I would not wish to be the Pope.

The Sultan better pleases me; His is a life of jollity; His wives are many as his will I would the Sultan’s throne then fill.

But even he’s a wretched man; He must obey his Alcoran; And dares not drink one drop of wine I would not change his lot for mine

So, then, I’ll hold my lowly stand, And live in German fatherland; I’ll kiss my maiden fair and fine, And drink the best of Rhenish wine

Whene’er my maiden kisses me, I’ll think that I the Sultan be; And when my cheery glass I tope, I’ll fancy then I am the Pope

For the sole edification Of this decent congregation, Goodly people, by your grant I will sing a holy chant, I will sing a holy chant If the ditty sound but oddly, ’Twas a father, wise and godly, Sang it so long ago Then sing as Martin Luther sang: “Who loves not woman, wine, and song, Remains a fool his whole life long!”

He, by custom patriarchal, Loved to see the beaker sparkle; And he thought the wine improved, Tasted by the lips he loved, By the kindly lips he loved. Friends, I wish this custom pious Duly were observed by us, To combine love, song, wine, And sing as Martin Luther sang, As Doctor Martin Luther sang: “Who loves not woman, wine and song, Remains a fool his whole life long!”

Who refuses this our Credo, And who will not sing as we do,

CREDO

Were he holy as John Knox, I’d pronounce him heterodox, I’d pronounce him heterodox, And from out this congregation, With a solemn commination, Banish quick the heretic, Who’ll not sing as Luther sang, As Doctor Martin Luther sang: “Who loves not woman, wine and song, Remains a fool his whole life long!”

ITALIAN HUMOR

The humorists of Italy in the eighteenth and nineteenth centuries are few and far between. Carlo Goldoni and Count Carlo Gozzi were both dramatists, the latter also a novelist, whose works show humor, but are not available for quotation.

Count Giacomo Leopardi, though himself a gloomy sort of person, left some satirical writings tinged with wit.

THE ACADEMY OF SYLLOGRAPHS

The Academy of Syllographs, hold that it would be in the highest degree expedient that men should retire as far as possible from the conduct of the business of the world, and should gradually give place to mechanical agency for the direction of human affairs. Accordingly, resolved to contribute as far as lies in its power to this consummation, it has determined to offer three prizes, to be awarded to the persons who shall invent the best examples of the three machines now to be described.

The scope and object of the first of these automata shall be to represent the person and discharge the functions of a friend who shall not calumniate or jeer at his absent associate; who shall not fail to take his part when he hears him censured or ridiculed; who shall not prefer a reputation for wit, and the applause of men, to his duty to friendship; who shall never, from love of gossip or mere ostentation of superior knowledge, divulge a secret committed to his keeping; who shall not abuse the intimacy or confidence of his fellow in order to supplant or surpass him; who shall harbor no envy against his friend; who shall guard his interests and help to repair his losses, and shall be prompt to answer his call, and minister to his needs more substantially than by empty professions.

In the construction of this piece of mechanism it will be well to study, among other things, the treatise on friendship by Cicero, as well as that of Madame de Lambert. The Academy is of opinion that the manufacture of such a machine ought not to prove impracticable

or even particularly difficult, for, besides the automata of Regiomontanus and Vaucanson, there was at one time exhibited in London a mechanical figure which drew portraits, and wrote to dictation; while there have been more than one example of such machines capable of playing at chess. Now, in the opinion of many philosophers human life is but a game; nay, some hold that it is more shallow and more frivolous than many other games, and that the principles of chess, for example, are more in accordance with reason, and that its various moves are more governed by wisdom, than are the actions of mankind; while we have it on the authority of Pindar that human action is no more substantial than the shadow of a dream; and this being so, the intelligence of an automaton ought to prove quite equal to the discharge of the functions which have just been described.

As to the power of speech, it seems unreasonable to doubt that men should have the power of communicating it to machines constructed by themselves, seeing that this may be said to have been established by sundry precedents, such, for example, as in the case of the statue of Memnon, and of the human head manufactured by Albertus Magnus, which actually became so loquacious that Saint Thomas Aquinas, losing all patience with it, smashed it to pieces. Then, too, there was the instance of the parrot Ver-Vert, though it was a living creature; but if it could be taught to converse reasonably how much more may it be supposed that a machine devised by the mind of man, and constructed by his hands, should do as much; while it would have this advantage that it might be made less garrulous than this parrot, or the head of Albertus, and therefore it need not irritate its acquaintances and provoke them to smash it.

The inventor of the best example of such a machine shall be decorated with a gold medallion of four hundred sequins in weight, bearing on its face the images of Pylades and Orestes, and on the reverse the name of the successful competitor, surrounded by the legend, F R F A.

The second machine called for by the Academy is to be an artificial steam man, so constructed and regulated as to perform virtuous and magnanimous actions. The Academy is of opinion that

in the absence of all other adequate motive power to that end, the properties of steam might prove effective to inspire an automaton, and direct it to the attainment of virtue and true glory. The inventor who shall undertake the construction of such a machine should study the poets and the writers of romance, who will best guide him as to the qualities and functions most essential to such a piece of mechanism. The prize shall be a gold medal weighing four hundred and fifty sequins, bearing on its obverse a figure symbolical of the golden age, and on its reverse the name of the inventor.

The third automaton should be so constituted as to perform the duties of woman such as she was conceived by the Count Baldassar Castiglione, and described by him in his treatise entitled The Courtier, as well as by other writers in other works on the subject, which will be readily found, and which, as well as that of the count, will have to be carefully consulted and followed. The construction of a machine of this nature, too, ought not to appear impossible to the inventors of our time, when they reflect on the fact that in the most ancient times, and times destitute of science, Pygmalion was able to fabricate for himself, with his own hands, a wife of such rare gifts that she has never since been equaled down to the present day. The successful inventor of this machine shall be rewarded with a gold medal weighing five hundred sequins, bearing on one face the figure of the Arabian Phenix of Metastasio, couched on a tree of a European species, while its other side will bear the name of the inventor, with the title, I F W C H

Finally, the Academy has resolved that the funds necessary to defray the expenses incidental to this competition shall be supplemented by all that was found in the purse of Diogenes, its first secretary, together with one of the three golden asses which were the property of three of its former members—namely, Apuleius, Firenzuola, and Machiavelli, but which came into the possession of the Academy by the last wills and testaments of the aforementioned, as duly recorded in its minutes.

Antonio Ghislanzoni, an Italian journalist was possessed of a sort of humor that would be a credit to any nation. It is not far removed from the style of the early American jocularists.

Ghislanzoni was an opera singer, but, losing his voice, he quitted the stage, and founded a comic paper, L’Uomo di Pietra.

His paper on Musical Instruments is so entertaining we quote it all.

ON MUSICAL INSTRUMENTS

The Clarinet

This instrument consists of a severe cold in the head, contained in a tube of yellow wood.

The clarinet was not invented by the Conservatory, but by Fate.

A chiropodist may be produced by study and hard work; but the clarinet-player is born, not made.

The citizen predestined to the clarinet has an intelligence which is almost obtuse up to the age of eighteen—a period of incubation, when he begins to feel in his nose the first thrills of his fatal vocation.

After that his intellect—limited even then—ceases its development altogether; but his nasal organ, in revenge, assumes colossal dimensions.

At twenty he buys his first clarinet for fourteen francs; and three months later his landlord gives him notice. At twenty-five he is admitted into the band of the National Guard.

He dies of a broken heart on finding that not one of his three sons shows the slightest inclination for the instrument through which he has blown all his wits.

The Trombone

The man who plays on this instrument is always one who seeks oblivion in its society—oblivion of domestic troubles, or consolation for love betrayed.

The man who has held a metal tube in his mouth for six months finds himself proof against every illusion.

At the age of fifty he finds that, of all human passions and feelings, nothing is left him but an insatiable thirst.

Later on, if he wants to obtain the position of porter in a gentleman’s house, or aspires to the hand of a woman with a delicate ear, he tries to lay aside his instrument, but the taste for loud notes and strong liquors only leaves him with life.

The Harmoniflute

This instrument, on account of the nature of its monotonous sounds and its tremendous plaintiveness, acts on the nerves of those who hear it, and predisposes to melancholy those who play it.

The harmoniflautist is usually tender and lymphatic of constitution, with blue eyes, and eats only white meats and farinaceous food.

If a man, he is called Oscar; those of the other sex are named Adelaide.

At home, he or she is in the habit of bringing out the instrument at dessert, and dinner being over, and the spirits of the family therefore more or less cheerfully disposed, will entertain the company with the “Miserere” in Il Trovatore, or some similar melody.

The harmoniflautist weeps easily. After practising on the instrument for fifteen years or so, he or she dissolves altogether, and is converted into a brook.

The Organ

This complicated and majestic instrument is of a clerical character, and destined, by its great volume of sound, to drown the flat singing of clergy and congregation in church.

The organist is usually a person sent into the world for the purpose of making a great noise without undue expenditure of strength, one who wants to blow harder than others without wearing out his own bellows.

At forty he becomes the intimate friend of the parish priest, and the most influential person connected with the church. By dint of repeating the same refrains every day at matins and vespers, he acquires a knowledge of Latin, and gets all the anthems, hymns, and

masses by heart. At fifty he marries a devout spinster recommended by the priest.

He makes a kind and good-tempered husband, his only defect in that capacity being his habit of dreaming out loud on the eve of every church festival. On Easter Eve, for instance, he nearly always awakens his wife by intoning, with the full force of his lungs, Resurrexit. The good woman, thus abruptly aroused, never fails to answer him with the orthodox Alleluia.

At the age of sixty he becomes deaf, and then begins to think his own playing perfection. At seventy he usually dies of a broken heart, because the new priest, who knows not Joseph, instead of asking him to dine at the principal table with the clergy and other church authorities, has relegated him to an inferior place, and the society of the sacristan and the grave-digger.

The Flute

The unhappy man who succumbs to the fascinations of this instrument is never one who has attained the full development of his intellectual faculties. He always has a pointed nose, marries a shortsighted woman, and dies run over by an omnibus.

The flute is the most deadly of all instruments. It requires a peculiar conformation and special culture of the thumb-nail, with a view to those holes which have to be only half closed.

The man who plays the flute frequently adds to his other infirmities a mania for keeping tame weasels, turtle-doves, or guineapigs.

The Violoncello

To play the ’cello, you require to have long, thin fingers; but it is still more indispensable to have very long hair falling over a greasy coat-collar.

In case of fire, the ’cellist who sees his wife and his ’cello in danger will save the latter first.

His greatest satisfaction, as a general thing, is that of “making the strings weep.” Sometimes, indeed, he succeeds in making his wife and family do the same thing in consequence of a diet of excessive

frugality Sometimes, too, he contrives to make people laugh or yawn, but this, according to him, is the result of atmospheric influences.

He can express, through his loftily attuned strings, all possible griefs and sorrows, except those of his audience and his creditors.

The Drum

An immense apparatus of wood and sheepskin, full of air and of sinister presages. In melodrama the roll of the drum serves to announce the arrival of a fatal personage, an agent of Destiny, in most cases an ill-used husband. Sometimes this funereal rumbling serves to describe silence—sometimes to indicate the depths of the operatic heroine’s despair.

The drummer is a serious man, possessed with the sense of his high dramatic mission. He is able, however, to conceal his conscious pride, and sleep on his instrument when the rest of the orchestra is making all the noise it can. In such cases he commissions the nearest of his colleagues to awaken him at the proper moment.

On awaking, he seizes the two drumsticks and begins to beat; but, should his neighbor forget to rouse him, he prolongs his slumbers till the fall of the curtain. Then he shakes himself, perceives that the opera is over, and rubs his eyes. If it happens that the conductor reprimands him for his remissness at the attack, he shrugs his shoulders and replies, “Never mind, the tenor died, all the same. A roll of the drum, more or less, what difference would it have made?”

Edmondo de Amicis, soldier and writer of books of travel, often gives amusing descriptions of scenes or incidents.

TOOTH FOR TOOTH

An English merchant of Mogador was returning to the city on the evening of a market-day, at the moment when the gate by which he

was entering was barred by a crowd of country people driving camels and asses. Although the Englishman called out as loud as he could, “Make way!” an old woman was struck by his horse and knocked down, falling with her face upon a stone. Ill fortune would have it that in the fall she broke her last two front teeth. She was stunned for an instant, and then rose convulsed with rage, and broke out into insults and ferocious maledictions, following the Englishman to his door. She then went before the governor, and demanded that in virtue of the law of talion he should order the English merchant’s two front teeth to be broken The governor tried to pacify her, and advised her to pardon the injury; but she would listen to nothing, and he sent her away with a promise that she should have justice, hoping that when her anger should be exhausted she would herself desist from her pursuit. But, three days having passed, the old woman came back more furious than ever, demanded justice, and insisted that a formal sentence should be pronounced against the Christian.

“Remember,” said she to the governor, “thou didst promise me!”

“What!” responded the governor; “dost thou take me for a Christian, that I should be the slave of my word?”

Every day for a month the old woman, athirst for vengeance, presented herself at the door of the citadel, and yelled and cursed and made such a noise, that the governor, to be rid of her, was obliged to yield. He sent for the merchant, explained the case, the right which the law gave the woman, the duty imposed upon himself, and begged him to put an end to the matter by allowing two of his teeth to be removed—any two, although in strict justice they should be two incisors. The Englishman refused absolutely to part with incisors, or eye-teeth, or molars; and the governor was obliged to send the old woman packing, ordering the guard not to let her put her foot in the palace again.

“Very well,” said she, “since there are none but degenerate Mussulmans here, since justice is refused to a Mussulman woman against an infidel dog, I will go to the sultan, and we shall see whether the prince of the faithful will deny the law of the Prophet.”

True to her determination, she started on her journey alone, with an amulet in her bosom, a stick in her hand, and a bag round her neck, and made on foot the hundred miles which separate Mogador from the sacred city of the empire. Arrived at Fez, she sought and obtained audience of the sultan, laid her case before him, and demanded the right accorded by the Koran, the application of the law of retaliation. The sultan exhorted her to forgive. She insisted. All the serious difficulties which opposed themselves to the satisfaction of her petition were laid before her. She remained inexorable. A sum of money was offered her, with which she could live in comfort for the rest of her days. She refused it.

“What do I want with your money?” said she; “I am old, and accustomed to live in poverty. What I want is the two teeth of the Christian. I want them; I demand them in the name of the Koran. The sultan, prince of the faithful, head of our religion, father of his subjects, cannot refuse justice to a true believer.”

Her obstinacy put the sultan in a most embarrassing position. The law was formal, and her right incontestable; and the ferment of the populace, stirred up by the woman’s fanatical declamations, rendered refusal perilous. The sultan, who was Abd-er-Rahman, wrote to the English consul, asking as a favor that he would induce his countryman to allow two of his teeth to be broken. The merchant answered the consul that he would never consent. Then the sultan wrote again, saying that if he would consent he would grant him, in compensation, any commercial privilege that he chose to ask. This time, touched in his purse, the merchant yielded. The old woman left Fez, blessing the name of the pious Abd-er-Rahman, and went back to Mogador, where, in the presence of many people, the two teeth of the Nazarene were broken. When she saw them fall to the ground she gave a yell of triumph, and picked them up with a fierce joy. The merchant, thanks to the privileges accorded him, made in the two following years so handsome a fortune that he went back to England toothless, but happy.

SPANISH HUMOR

The only illustrious name of a writer of humor in Spain in the eighteenth century is that of the justly celebrated Thomas Yriarte. He is best known to English readers through his Literary Fables, which have been frequently translated.

THE ASS AND THE FLUTE

You must know that this ditty, This little romance, Be it dull, be it witty, Arose from mere chance

Near a certain inclosure, Not far from my manse, An ass, with composure, Was passing by chance.

As he went along prying, With sober advance, A shepherd’s lute lying, He found there by chance.

Our amateur started, And eyed it askance, Drew nearer, and snorted Upon it by chance.

The breath of the brute, sir, Drew music for once; It entered the flute, sir, And blew it by chance.

“Ah!” cried he, in wonder, How comes this to pass? Who will now dare to slander The skill of an ass?

And asses in plenty I see at a glance,

Who, one time in twenty, Succeed by mere chance.

Beyond the sunny Philippines

THE EGGS

An island lies, whose name I do not know; But that’s of little consequence, if so You understand that there they had no hens; Till, by a happy chance, a traveler, After a while, carried some poultry there. Fast they increased as any one could wish; Until fresh eggs became the common dish. But all the natives ate them boiled they say Because the stranger taught no other way. At last the experiment by one was tried Sagacious man! of having his eggs fried And, O! what boundless honors for his pains, His fruitful and inventive fancy gains!

Another, now, to have them baked devised Most happy thought!—and still another, spiced Who ever thought eggs were so delicate! Next, some one gave his friends an omelette: “Ah!” all exclaimed, “what an ingenious feat!” But scarce a year went by, an artiste shouts, “I have it now ye’re all a pack of louts! With nice tomatoes all my eggs are stewed.”

And the whole island thought the mode so good, That they would so have cooked them to this day, But that a stranger wandered out that way, Another dish the gaping natives taught, And showed them eggs cooked à la Huguenot Successive cooks thus proved their skill diverse; But how shall I be able to rehearse All of the new, delicious condiments That luxury, from time to time, invents?

Soft, hard, and dropped, and now with sugar sweet, And now boiled up with milk, the eggs they eat; In sherbet, in preserves; at last they tickle Their palates fanciful with eggs in pickle. All had their day the last was still the best. But a grave senior thus, one day, addressed The epicures: “Boast, ninnies, if you will,

These countless prodigies of gastric skill But blessings on the man who brought the hens!”

Beyond

the sunny Philippines

Our crowd of modern authors need not go New-fangled modes of cooking eggs to show

THE COUNTRY SQUIRE

A country squire, of greater wealth than wit (For fools are often bless’d with fortune’s smile), Had built a splendid house, and furnish’d it In splendid style.

“One thing is wanted,” said a friend; “for, though The rooms are fine, the furniture profuse, You lack a library, dear sir, for show, If not for use.”

“’Tis true; but, zounds!” replied the squire with glee, “The lumber-room in yonder northern wing (I wonder I ne’er thought of it) will be The very thing.

“I’ll have it fitted up without delay With shelves and presses of the newest mode And rarest wood, befitting every way

A squire’s abode

“And when the whole is ready, I’ll despatch My coachman a most knowing fellow down, To buy me, by admeasurement, a batch

Of books in town ”

But ere the library was half supplied With all its pomp of cabinet and shelf, The booby Squire repented him, and cried, Unto himself:—

“This room is much more roomy than I thought; Ten thousand volumes hardly would suffice To fill it, and would cost, however bought, A plaguy price.

“Now, as I only want them for their looks,

It might, on second thoughts, be just as good, And cost me next to nothing, if the books Were made of wood

“It shall be so. I’ll give the shaven deal A coat of paint a colourable dress, To look like calf or vellum and conceal Its nakedness

“And gilt and letter’d with the author’s name, Whatever is most excellent and rare Shall be, or seem to be (’tis all the same)

Assembled there ”

The work was done; the simulated hoards Of wit and wisdom round the chamber stood, In bindings some; and some, of course, in boards, Where all were wood

From bulky folios down to slender twelves, The choicest tomes in many an even row, Display’d their letter’d backs upon the shelves, A goodly show.

With such a stock, which seemingly surpass’d

The best collection ever form’d in Spain, What wonder if the owner grew at last Supremely vain?

What wonder, as he paced from shelf to shelf, And conn’d their titles, that the Squire began, Despite his ignorance, to think himself

A learned man?

Let every amateur, who merely looks To backs and bindings, take the hint and sell His costly library; for painted books

Would serve as well.

There were other Spaniards, doubtless, who possessed humor or wit, but the only available translations of their plays or stories are too long for quotation.

RUSSIAN HUMOR

A glance at Russia in the eighteenth and nineteenth centuries shows the great popularity of the Fable as a means of expressing the wit and wisdom of the philosophers.

The two greatest Fabulists were Ivan Chemnitzer or Khemnitzer and Ivan Kryloff.

Alexander Griboyedoff was a writer of comedies.

I C

THE PHILOSOPHER

A certain rich man, who had heard it was an advantage to have been at school abroad, sent his son to study in foreign parts. The son, who was an utter fool, came back more stupid than ever, having been taught all sorts of elaborate explanations of the simplest things by a lot of academical windbags. He expressed himself only in scientific terms, so that no one understood him, and everyone became very tired of him.

One day, while walking along a road, and gazing at the sky in speculating upon some problem of the universe to which the answer had never been found (because there was none), the young man stepped over the edge of a deep ditch. His father, who chanced to be near by, ran to get a rope. The son, however, sitting at the bottom of the ditch, began to meditate on the cause of his fall. He concluded that an earthquake had superinduced a momentary displacement of his corporeal axis, thus destroying his equilibrium, and, in obedience to the law of gravity as established by Newton, precipitating him downward until he encountered an immovable obstacle—namely, the bottom of the ditch.

When his father arrived with the rope, the following dialogue took place between them:

“I have brought a rope to pull you out with. There, now, hold on tight to that end, and don’t let go while I pull.”

“A rope? Please inform me what a rope is before you pull.”

“A rope is a thing to get people out of ditches with, when they have fallen in and can’t get out by themselves.”

“But how is it that no mechanical device has been constructed for that purpose?”

“That would take time; but you will not have to wait until then. Now, then——”

“Time? Please explain first what you mean by time.”

“Time is something that I am not going to waste on a fool like you. So you may stay where you are until I come back.”

Upon which the man went off, and left his foolish son to himself.

Now, would it not be a good thing if all eloquent windbags were gathered together and thrown into the ditch, to keep him company? Yes, surely. Only it would take a much larger ditch than that to hold them.

The Fables.

THE LION’S COUNCIL OF STATE

A Lion held a court for state affairs. Why? That is not your business, sir ’twas theirs. He called the elephants for councilors. Still The council-board was incomplete, And the king deemed it fit

With asses all the vacancies to fill.

Heaven help the state, for lo! the bench of asses

The bench of elephants by far surpasses

“He was a fool, th’ aforesaid king,” you’ll say; “Better have kept those places vacant, surely, Than to have filled ’em up so very poorly ”

Oh, no, that’s not the royal way; Things have been done for ages thus, and we Have a deep reverence for antiquity

Naught worse, sir, than to be, or to appear, Wiser and better than our fathers were!

The list must be complete, e’en though you make it

Complete with asses for the lion saw

Such had through all the ages been the law. He was no radical to break it;

“Besides,” said he, “my elephants’ good sense Will soon my asses’ ignorance diminish, For wisdom has a mighty influence ” They made a pretty finish! The asses’ folly soon obtained the sway: The elephants became as dull as they!

I K

THE SWAN, THE PIKE, AND THE CRAB

Whene’er companions don’t agree, They work without accord; And naught but trouble doth result, Although they all work hard

One day a swan, a pike, a crab, Resolved a load to haul; All three were harnessed to the cart, And pulled together all But though they pulled with all their might, The cart-load on the bank stuck tight. The swan pulled upward to the skies; The crab did backward crawl; The pike made for the water straight It proved no use at all!

Now, which of them was most to blame, ’Tis not for me to say; But this I know: the load is there Unto this very day.

THE MUSICIANS

The tricksy monkey, the goat, the ass, and bandy-legged Mishka, the bear, determined to play a quartet. They provided themselves with the necessary instruments—two fiddles, an alto, and a bass. Then they all settled down under a large tree, with the object of dazzling the world by their artistic performance. They fiddled away lustily for some time, but only succeeded in making a noise, and no music.

“Stop, my friends!” said the monkey, “this will not do; our music does not sound as it ought. It is plain that we are in the wrong positions. You, Mishka, take your bass and face the alto; I will go opposite the second fiddle. Then we shall play altogether differently, so that the very hills and forests will dance.”

So they changed places, and began over again. But they produced only discords, as before.

“Wait a moment!” exclaimed the ass; “I know what the matter is. We must get in a row, and then we shall play in tune.”

This advice was acted upon. The four animals placed themselves in a straight line, and struck up once more.

The quartet was as unmusical as ever. Then they stopped again, and began squabbling and wrangling about the proper positions to be taken. It happened that a nightingale came flying by that way, attracted by their din. They begged the nightingale to solve their difficulty for them.

“Pray be so kind,” they said, “as to stay a moment, so that we may get our quartet in order. We have music and we have instruments; only tell us how to place ourselves.”

To which the nightingale replied:

“To be a musician, one must have a better ear and more intelligence than any of you. Place yourselves any way you like; it will make no difference. You will never become musicians.”

Fedor Dostoevsky was a celebrated Russian novelist and journalist.

We quote a small extract, which, it may be, depends in part for its fun on its excellent English rendition of the German patter.

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.