A major source of frustration for any large organization, whether non-profit, public, or private, is the difficulty that individuals and teams within the organization have in locating relevant information both internally (on intranets) and externally (on the web). Employees can waste a significant amount of time trying to zero in on the right intranet or web source of information for various daily work related questions; or they might struggle to find the right internal expert to assist with the topic they seek answers about.
Google Cloud’s generative AI capabilities now enable organizations to address this pain point by leveraging Google’s best-in-class advanced conversational and search capabilities. Using Google Cloud generative AI features in Dialogflow, you can create a lifelike conversational AI agent that empowers employees to retrieve the most relevant information from internal or external knowledge bases. Generative AI features in Dialogflow leverages Large Language Models (LLMs) to power the natural-language interaction with users, and Google enterprise search to ground in the answers in the context of the knowledge bases. The knowledge base could consist of both structured and unstructured data.
In the following sections we provide an example on how to build a chat experience that handles HR benefits questions from both external websites and an internal FAQ knowledge base. Additionally, because the user may need to consult with a human HR representative for a specific situation, the Dialogflow virtual agent is able to find the right HR representative based on the conversation topic, and follow up with making an appointment by calling the calendar API. The core components of this example include:
Getting started takes a few simple steps. First go to the Vertex AI Conversation console to build your data store/knowledge base. Then, you can start to create a transactional agent with multi-turn conversation and call external APIs using Dialogflow. Before diving into the steps, let’s look at the use case that led to creating a conversational AI experience using generative AI.
Miranda recently joined a company with 500 employees. She’s spending countless hours trying to get up to speed on understanding benefits, compensation, performance reviews, and different aspects of the organization. It would be great if Miranda had, within her company’s web portal, a lifelike virtual agent to allow employees to find the right information and right people, quickly. This use case is applicable to any industry and organization. A user journey for Miranda would go as follows:
As a new employee, Miranda wants to know:
Miranda also wants to consult with a HR representative in person to understand how her compensation was modeled and how her performance will impact future compensation.
1. In the Vertex AI Conversation console, create a data store using data sources such as public websites, unstructured data, or structured data.
2. Go to Cloud Storage, create a bucket with name “demo-better-employee-search” and select “continue” until the final step, “create” the bucket.
3. Upload your document to the Cloud Storage bucket. We support:
4. Switch back to Vertex AI Conversation console and add data to your data store. There are three options to upload data:
The Generative AI Agent is a chat experience that can answer questions based on the organization’s knowledge base. After creating a data store in the previous step, you will be navigated to the Dialogflow CX console. Click “Test Agent” to try out the virtual agent.
Conversations can be categorized by generative AI-powered Playbooks. A Playbook can be defined by topics and the associated conversational path. For example, a pizza ordering agent might have playbooks or flows such as pizza order, customer information, make a payment, etc. In this virtual agent design, we use instructions from a Playbook to map HR topics with HR representatives.
Unlike a standard flow, which can be built by intents, training phrases, etc, Playbooks can be created based on instructions written in natural language to define tasks for virtual agents.
In this step, we first create parameters before creating instructions. Parameters are used to capture and reference values that have been supplied by the end-user during a session. Each parameter has a name and entity type.
1. Create three parameters for user data, hr_topics, hr_representative, and appointment as input parameters. Input parameters are collected and made available to the flow.
2. Create output parameter to collect “@sys.date” to obtain appointment availability during conversation. Input parameters are expected to be collected from the Playbook.
3. Setup instructions to describe what the flow does. Then identify steps to map $hr_topics and $hr_representative*.
To design the virtual agent, we identify intents to build a storyline, which is similar to creating an outline when writing a story. In the storyline, we build:
In the following section, we will learn how to build intents to route conversations.
An intent categorizes the end user’s intention during the conversation. Intents can be categorized as head intents and supplemental intents. Head intents identify users’ primary purpose for interacting with an agent, while a supplemental intent identifies a user’s subsequent questions. For example, in a pizza ordering virtual agent design, “order.pizza” can be a head intent, and “confirm.order” is a supplemental intent relating to the head intent. After identifying intents, you can add training phrases to trigger the intent.
In this tutorial, we create a head intent “redirect.schedule.appointment” to route conversations from Default Start flow to MapRepresentative flow. This can be triggered by utterances such as “ I want to talk to a HR representative.” We also build “confirmation” intents as supplemental to address users’ utterances such as “the schedule works for me.”
Conversation dialogue includes multiple conversation topics. With Dialogflow, you can combine predictive flows with specific, prescriptive intents with generative flows created by Playbooks. In the example, we build the following structure:
In this step the virtual agent will check the HR representative’s availability, and integrate with the calendar API via webhook. This can be achieved by deploying cloud functions.
In Cloud Functions:
1) Enter your code to call calendar API in index.js
2) Provide package.json
3) Deploy the cloud functions. Please find sample code in github here
4) Configure a webhook in Dialogflow
It’s not trivial to design a virtual agent. In order to build robust conversation experience, some best practices include:
In the example, we demonstrated how to create a virtual agent powered by generative AI that can answer frequently asked questions based on the organization’s internal and external knowledge base. In addition, when the user wants to consult with a human agent or HR representative, we use a “mix-and-match” approach of intent plus generative flows, including creating agents using natural language. We then added webhooks and API callsI to check calendar availability and schedule a meeting for the user.
Machine learning (ML) models are built upon data.
Editor’s note: This is the second post in a series that explores a range of…
David J. Berg*, David Casler^, Romain Cledat*, Qian Huang*, Rui Lin*, Nissan Pow*, Nurcan Sonmez*,…
Qualcomm did not violate a license with Arm when it acquired Nuvia for $1.4 billion,…
From layoffs to the return of Gamergate, video games—and the people who make and play…
Artificial intelligence that is as intelligent as humans may become possible thanks to psychological learning…