Artificial intelligence is all the buzz these days. But how does it actually work? Over the last few weeks, we’ve gone behind the scenes of HubSpot's artificial intelligence, one feature at a time. Our first post covered duplicate management. Our second covered adaptive testing - the next evolution of A/B testing, infused with AI. In this post, we'll take you under the hood of HubSpot's AI-powered business card scanner.
Most business cards never see the light of day. You leave a trade show or a meeting with a pocketful of cards, thinking “I should really do something with these cards at some point….”
Your options are bleak: spend a few hours manually inputting them into your database, go through the trouble of hiring someone to do it for you, buy an expensive app to scan the cards (and another one to integrate it with your system of record). Or you can do nothing at all. Leave those cards in your pocket to collect dust. We’ve all been there.
In early 2019, HubSpot launched a solution to the problem of abandoned business cards: a free business card scanner, built into the HubSpot mobile app, that turns business cards into CRM contacts automatically.
The secret sauce behind the business card scanner: powerful artificial intelligence.
In this article, we’ll take you under the hood of the business card scanner's AI
What's the Feature, Exactly?
The business card scanner is a part of HubSpot's mobile application. You can use it to import contacts from business cards. The process is simple:
- Open the HubSpot app on your device.
- In the bottom navigation menu, tap Contacts.
- In the upper right (iOS) or lower right (Android), tap the + icon, then tap Scan business card.
- In the Allow HubSpot to take pictures and record video? prompt, tap Allow.
- Take a photo of the business card with your device. Make sure there's adequate lighting and there isn't any severe glare or blur.
- Tap and drag the four points to define the edges of the business card.
- Tap the properties that are a correct match. If any of the values are incorrect, they can also be selected and edited in the next step. In the top right, tap Next.
- Review and edit any incorrect properties. In the top right, tap Save.
- You'll be redirected to the newly created contact record, with a message Contact saved. To scan another business card, tap Scan another card.
And that's it!
What Does the AI Actually Do?
The AI figures out which text on the business card should be mapped to which property in HubSpot (step 7 above). For example, the AI is how HubSpot knows that “John Smith” is someone’s name, and should be input into the “First Name” and “Last Name” properties.
Why is This a Good Problem for AI?
Seems easy enough, right? As it turns out, not so much. Can you come up with a specific set of rules that differentiate a name from an email address or a job title correctly, every time? Asking a question like “does the text have an @ symbol” gets you part of the way there. But, after a few basic rules, the logic gets harder to predict.
AI helps to find patterns in “fuzzy” data like this, where a rules-based approach isn’t sufficient.
One additional advantage of using AI: it’s not limited by language. The machine learning model we use can learn to classify data and scan business cards across languages.
How does it work?
Put simply, AI turns what seems like a purely text-based question (e.g. “Is John Smith a name or a job title?”) into a math problem.
First, HubSpot’s system scan the words on the business card, and assign each letter of text a number. Those numbers are then fed into a neural network. Neural networks are computer-based models inspired by the neurons that make up a human brain. Here’s how a recent Forbes article explained neural networks:
Neural networks use different layers of mathematical processing to make sense of the information they’re fed. Typically, a neural network has anywhere from dozens to millions of artificial neurons—called units—arranged in a series of layers. As the data goes through each unit the network is learning more about the data.
The neural network’s output, after all that: the probability that the original piece of text is a name, a job title, a website, a phone number, or an email. After a series of rules-based tests to further break down the data --- similar to the rules we discussed in the previous section --- the string of text is mapped to the corresponding HubSpot property using the probabilities calculated by the neural network.
How Much Data Does the System Need to “Train?”
The neural network incorporates known data - hundreds of thousands of business cards for which we already know the correct categorization - to solve a complex series of equations that help to predict which pieces of text belong to which CRM properties.
The model, in this case, used two million sample lines of text, spread across almost half a million business cards, to learn their patterns well enough for everyday use.
Is it Always Right?
Just about. HubSpot’s business card scanner accurately maps the text on your business cards to their corresponding HubSpot properties 98% of the time. In cases where it doesn’t, if you update the text to map to the correct property, the machine learning model will recognize that change, and improve its prediction the next time around.
Want to connect with others on HubSpot tips, tricks, and updates? Head over to the HubSpot Community to join a conversation or start one of your own.
Originally published Dec 5, 2019 10:00:00 AM, updated December 05 2019