4 min read
For LaLiga, keeping fans entertained and engaged is a top priority. And when it comes to fans, the Spanish football league has them in droves, with approximately 1.6 billion social media followers around the world. So any time it introduces a new feature, forum, or app for fans, instant global popularity is almost guaranteed. And while this is great news for LaLiga, it also poses technical challenges—nobody wants systems crashing or going unresponsive when millions of people are trying out a fun new app.
When LaLiga chose to develop a personal digital assistant running on Microsoft Azure, its developers took careful steps to ensure optimal performance in the face of huge user volume in multiple languages across a variety of voice platforms. Specifically, the league used Azure to build a conversational AI solution capable of accommodating the quirks of languages and nicknames to deliver a great experience across multiple channels and handle a global volume of millions of users.
Along the way, some valuable lessons emerged for tackling a deployment of this scope and scale.
Accommodating the quirks of languages and nicknames
The LaLiga virtual assistant has launched for Google Assistant and Skype, and it will eventually support 11 platforms. The assistant was created with Azure Bot Service and the Microsoft Bot Framework, and it incorporates Azure Cognitive Services and a variety of other Azure tools. The main engine for the assistant takes advantage of the scalability and flexibility of Azure App Service —a platform as a service (PaaS) offering—to streamline development. LaLiga used it multiple times to accelerate the development of the bot logic, image service, Google Assistant connector, Alexa connector, data loaders, cache management, and two Azure functions for live data and proactive messages.
Figure 1. An overview of the LaLiga virtual assistant architecture
Fans can ask the assistant questions using natural language, and the system parses this input to determine user intent by using Azure Text Analytics and Azure Cognitive Services Language Understanding in either Spanish or English. That may seem straightforward, but developers learned that subtitles of language can complicate the process. For example, the primary word for “goalkeeper” is different in the Spanish dialects used in Spain, Argentina, and Colombia. So the mapping of questions to intents needed to accommodate a many-to-one relationship for these variations.
A similar issue arose with players whose names have complicated spellings and don’t clearly correspond to the pronunciation – for example, “Griesman” instead of “Griezmann” – resulting in a variety of translations. The solution here was to use aliases to guide the system to the correct player. Nicknames were another sticking point. Developers used Azure Monitor Application Insights to investigate user queries that weren’t mapping to any existing player and found that a lot of people were asking about a player but using his nickname rather than his official name. Once again, aliases came to the rescue
Guaranteeing a great experience across multiple channels
One goal of the development team was to support a consistent, high-quality user experience across different mobile platforms and devices, each of which has its own display parameters and may also have different connection protocols. In response to every user query, the LaLiga virtual assistant returns three elements: an image, some text, and a voice reply. The image can be a picture of a player or a “hero card” showing match results or player statistics. For channels with a visual display, the image and text are customized with XAML to make them easily legible for the specific display resolution.
All channels aren’t created equal when it comes to user popularity, either. LaLiga expects that some channels will be used much more frequently than others, and this requires adjustments to properly manage scalability resources. Developers created an app service for each channel and optimized it for anticipated usage.
Developers also needed to customize the connectors that the assistant uses for different channels depending on the channels’ capabilities and requirements. For example, the Alexa interface is based on Microsoft .NET Framework, which made it straightforward to develop a connection with Microsoft tools, but Google Assistant uses Node.js, requiring more complex development. Developers found it tricky to map messages from the LaLiga virtual assistant to types that Google Assistant understands. Adding a custom connector hosted with App Service resolved the issue. App Service also helps manage the scalability requirements for the channel. Microsoft is using the lessons learned from the LaLiga virtual assistant to help all developers streamline the creation of connectors with Azure-based bots.
Figure 2. An overview of integration with Google Assistant and Alexa
Planning for millions of enthusiastic users
LaLiga anticipates that the assistant will be hugely popular and that most users will ask multiple questions, generating a vast number of hits on the system each day and leading to high consumption of computing resources. Developers adopted multiple strategies to mitigate this high demand.
Incoming queries get divided into two categories—live and non-live. A live query could be one about a match in progress, where the data could be constantly changing, whereas a non-live query might relate to a completed game or player’s basic statistics. Whenever a non-live query arrives, the result is cached, so the answer is readily available if someone else asks the same question. The LaLiga virtual assistant uses a highly optimized Azure SQL database as its main data storage, rather than a non-structured data lake, to expedite results.
Because scalability was a big concern, the team decided early to dedicate a developer to scalability testing. The developer created an automated system to simulate queries to the assistant, eventually testing millions of hits a day and setting the stage for a smooth launch. Bombarding the system with so many queries revealed another hitch—all those hits were genuine queries, but some web services might see that huge volume and think that the system is being hit by a distributed denial of service (DDOS) attack. So it’s essential to ensure that all components are configured to account for the popularity of the assistant.
Learn from LaLiga and build your own great bot
While some of these use cases may seem straightforward, the LaLiga virtual assistant development experience showed that sometimes a small tweak to development processes or application configuration can yield substantial rewards in terms of system performance and development time. We hope that the lessons learned during the LaLiga project will help you build your own massively popular digital assistant!
Read the case study for more information about LaLiga’s digital transformation and its initiatives to boost fan engagement.
Get started building your own branded virtual assistant.
Start more simply and build your first Q&A bot with QnA Maker.