Natural Language Understanding (NLU) for retail: our first use cases and tech approach

Hervé Anvroin
ADEO Tech Blog
Published in
6 min readMar 26, 2021

I work at ADEO Group, the 3rd home-improvement retail company worldwide.

I have been working for a few months in the data team, in helping some business teams become more data-driven and providing them data solutions, with the help of a great team of data scientists and analysts.

My background is mainly business, and my playgrounds are customer services and customer relationship management businesses.

I’m Hervé by the way, 48, one-quarter tech, three-quarters business. And what I like to do in my free time is to play basketball, surf, to collect vinyl records.

A few months ago, I started to explore the possibilities in these fields and a convergence rapidly emerged:

1/ Business teams collect customer feedback with various applications and conduct heterogeneous and most of the time superficial analysis, due to lack of time or/and tools.

They all want to get actionable insights from the ~50K textual feedback we get every month (web, mail, social, messaging, chatbots, marketing studies, UX surveys, employee surveys, web crawling,…).

2/ Top management wants synthetic insights about:

  • what our customers (‘inhabitants’ we say at ADEO group) are telling about us,
  • our products,
  • the experience they live when they visit our website,
  • our stores,
  • with our installation or delivery partners,
  • when they are on the phone with us.

3/ Data tech team is excited by the emergence of Bert, GPT-3, and friends!

So let’s go with NLU for a first real dive (for me) into data science and machine learning! You have to start somewhere, don’t you?

What is NLU?

Natural Language Understanding is a branch of artificial intelligence (AI) that uses computer software to understand the meaning of sentences, as we naturally write or say them (not only the meaning of words).

Oh my! So many use cases!

What did we find out behind the big words NLU, NLP (P=processing; humans and machines talking to each other), NLG (G=generation; machine producing full texts by themselves), sentiment analysis?

Mainly, for what we want to do, it’s all about the U of Understanding.

What we first want is that machines learn to understand what Customer X means when she/he writes:

“Damn this store is huge ! So many alleys you could easily get lost. I love all the choices it offers you. But the man behind the counter in the kitchen department was a bit rude, although he obviously had a lot of expertise.”

I won’t do the exegesis of this feedback (do it for fun…), but yes, there’s a lot to learn from this single review (it’s about the store, kitchen department, organization of the store, courtesy and professionalism of the staff, some is satisfying, some is not,…)

And we get around 2K of those precious insights every day.

Our goal is to classify every feed-back in relevant classes.

And with this raw material, you can, for instance:

  • display customer insights directly to the teams in charge and help them monitor the actual effects of the actions they take (“customers are happier and happier with after-sales services of Paris La Madeleine Store”)
  • identify previously unknown insights or overlooked issues of importance for inhabitants.
  • make it easy for people in charge to take the right actions to solve the real issues: “this topic has to be tackled as a priority in this store.”
  • detect bad buzzing topics before they become a real issue. For instance trouble with a specific product, you sell by detecting that people have been talking about it for the last 3 days.
  • facilitate, accelerate and even automate business processes. For example, when a customer asks for an invoice through the mail, you can send it automatically when you understand it.

In the end, the key is to connect the intelligence produced by the machines (AI) to IRL actions taken by humans or by other machines (aka intelligent automation).

Mmm… at this point, both business teams and leaders usually go this way: what are we waiting for?

Oh my! The tech is moving so fast!

Thanks to this general enthusiasm, we were granted a first big team of … one data scientist (hi Alice!) to explore the domain and build our POC.

So we started digging.

Fortunately, we are talking deep learning here, possibly unsupervised, on a highly customer-centric topic, so it raises interest in the small family of Adeo and Leroy Merlin data scientists.

Thus, we eventually get some great shadow extra help (Hi Guillaume, Youssef, Victor, Cyril, Killian, Stéphane,…).

CamemBERT by INRIA

And it appears that the timing is right: new techs are operational, and after scanning the possibilities, we go for Bert and its French adaptation, CamemBert developed by the INRIA team (if you read French, you have spotted INRIA sense of humor).

And after 3 months, what did we actually achieve?

4 first versions of classification models developed, adapted to our playground:

  • they detect product department (kitchen, tools, gardening,…)
  • type of customer service (delivery order management, home installation),
  • issue expressed by the customer (store teams professionalism, waiting time in-store, need for the invoice, after-sale question,…),
  • and sentiment (basically: happy/unhappy)

These models are supervised and one thing has been confirmed through the process: we still need serious training data to make good enough classification. Machines are not omniscient yet! And thanks to the previous work made by business teams, we had sufficient training data.

Practically, after 4 months :

  • 400 K Google My Business reviews analyzed, and every new feedback is processed through the 4 models
  • 3 MVP Data Studios for store staff and teams at headquarters are online allowing them to understand what their customers are writing about the experience we make them live.

And the train and apply pipelines are in production.

Operational pipelines, train and apply
Operational pipelines, train and apply

And last but not least, we reached a global better comprehension of NLU by both tech and business teams: what we can do with it, how we can do it. That’s quite important for the next steps.

Our first step is online, what’s next?

1/ Back to business(es) :

You have to be sure that you have business teams within the project, more deeply involved, to be sure to target the most urgent/valuable issues:

Extend algorithms to other sources of feedback:

  • Social networks
  • after-sales feed-backs
  • on-line conversations
  • intern surveys

Add new features:

  • Feature recognition with NER algorithm (detect brands, type of products -driller, lawnmower,…) for market and buying teams
  • Alerting on trending topics detection with statistical approaches
  • First action automation from simple pushing intel to the right person in charge or more complex embedding in business applications
  • add unsupervised algorithms to detect from scratch what people are talking about (instead of pushing the categories from what we think is relevant)?

Improve UX of the solution:

  • embed it in other feedback application
  • start to investigate speech-to-text to relieve customer services staff from live classification so that they remain focused on the conversation, understanding customer needs, and fully answer it?
  • and more left to your imagination…

You definitely need business and management to choose the right next steps!

2/ Improve tech

The first move will be to improve the models: too many false negatives for instance.

We are not dealing with disease diagnosis, so it’s preferable to have a bit more wrong classification than to target 0% wrong-classified reviews.

Then investigate Entity Recognition with Hugging Face for instance to go further in understanding.

Then “API-fication” to get always closer to action, most of the time driven by business applications.

And speech to text, and,…

And back to the business above!

And last but not least: keep team engaged and passionate

For sure, what you need is a team of data experts engaged in their job, passionate about learning what’s new, eager to share it with their pairs, and able to explain it to uninitiated people in business teams.

And of course, you have to give them time and playgrounds to test the new possibilities emerging every week!

--

--