Building the CNBC Conversation Action for Google Assistant
By Gopi Shanmugam and Kelly Gyenes
CNBC brings you the most up-to-date business and stock news, market insights and CNBC television schedules with @CNBC, a Conversation Action for the Google Assistant, which is available on Google Home devices.
FIND IT BY SAYING "OK GOOGLE, TALK TO CNBC"
To engage with @CNBC, you simply need to say "Ok Google, I want to talk to CNBC" and the conversation will start. Or you can initiate the conversation and make a request by saying things like:
"Ok Google, let me talk to CNBC about the markets."
"Ok Google, I want to talk to CNBC about the latest news."
"Ok Google, ask CNBC to tell me when âThe Profitâ is on next."
Once in a conversation, you continue asking questions, such as "whatâs CNBCâs take on the markets?", "whatâs the latest business news?", "whatâs going on with <insert your stock pick>?", and "when is <insert your favorite show> on CNBC?"
As a launch partner for Actions on Google for the Google Assistant, we partnered closely with Google to bring to market the CNBC Conversation Action, which is built using API.AI and the Google Cloud Platform.
API.AI is a natural language understanding platform that provides developers and business users tools to develop a natural language processing system with artificial intelligence and speech-to-text translation with custom functionality. The platform comes with optional pre-built services called domains to accelerate building conversational interfaces. Once an Action on Google is available in market, API.AI offers additional features that help developers understand the user's usage of the Action and presents opportunities to train the Action to improve the user experience.
The CNBC Conversation Action backend service and endpoints are built using the Google Cloud Function Infrastructure and developed using Node.js, which handles the business logic, including talking to the relevant feeds, massaging the data, and producing a JSON response acceptable by API.AI to process and provide a response to the user via Google Assistant.
DEFINING & CREATING THE VUI
When designing @CNBC, we carefully thought about the best practices of VUI design and the conversation flow between the user, the Google Assistant voice, and the @CNBC voice. For example, we took great care to ensure that we acknowledged the user's request as part of our response, so the user would have confidence in what they were going to hear.
For every use case, API.AI requires the population of queries, which are the phrases a user may say to invoke a request. This helps match the user's input with an intent, so we can fulfill their request. When anticipating the questions a user may ask, we identified the types of queries best suited for this voice platform and optimized responses for clarity and usefulness.
"OK GOOGLE, LET ME TALK TO CNBC ABOUT THE MARKETS"
CNBC's On Air Stocks Editor Bob Pisani and the CNBC Radio team deliver market and business news updates as audio content throughout the day, which we offer using speech synthesis markup language (SSML). After the market updates, we ask users if they would like a real-time check of the markets to get the very latest, which we deliver text-to-speech.
"OK GOOGLE, CAN I TALK TO CNBC ABOUT GOOGLE?"
Many users like to keep up with what's going on with certain companies, so when they ask for news about a stock or company, we convert the user's spoken request into text using API.AI and then use that info to fetch the latest news about the company, along with a current stock quote. These dynamic updates are also shared back to the user via a text-to-speech output.
We employ cooperative principles to help clarify a user's request to try to help reach the desired response. For example, if a user asks for news about a stock, but it is unclear which stock, the @CNBC clarifies by asking, "Which stock or company are you interested in?" This advances the conversation, while handling a situation that could produce an error loop otherwise.
"OK GOOGLE, ASK CNBC TO TELL ME WHEN âJAY LENO'S GARAGEâ IS ON NEXT"
Whenever users want to find out what's on TV or when their favorite show is on, @CNBC can help. We look up programming information against show schedule feeds and can search by date, day, and time or by show name. Presenting schedule information can be difficult and we discovered how important it is to relay the information back in a construct similar to the user's query.
We also learned natural language processing and training our Action is important; for example, when we saw that certain test users asked about CNBC's popular program "The Profit" and the text input we received was "The Prophet". Each Action will have its own set of vocabulary challenges and similar sounding words, which is where extensive testing with different voices and accents can help illuminate scenarios for handling.
"OK GOOGLE, WHAT'S THE NEWS?"
Beyond the CNBC Conversation Action, CNBC offers several news options that can be included in the playlist response for when you say, "Ok Google, what's the news?" Add CNBC for market and business news updates from CNBC Radio and On-Air Stocks Editor Bob Pisani. Additionally, CNBCâs âFast Moneyâ and âNightly Business Reportâ podcasts are available for your Narrated News playlist. These all can be selected as preferred news sources in the Google Home mobile app.
Have you talked to @CNBC on Google Home? Let us know what you think by emailing us at [email protected].