Building Your Own Supernatural Sidekick

Teasing with Siri…

We’re stepping into an era where everyone can have a sidekick, or an assistant, or an entity to help us do things. Better than Batman’s Robin, Han Solo’s Chewbecca, or even Sherlock Holmes’ Dr.Watson, your sidekick can have some supernatural abilities to assist you in your daily life, like:

  • Can tell you if you’ll need to pack your raincoat to your trip this Saturday.
  • Can predict the precise time, down to the minute, when your wife is going to arrive home from office.
  • Can uncover a secret, off-menu, dish of the restaurant that you take your client to dinner.
  • Can steer you away from a roadblock on the way to your important meeting
  • The list goes on and on and on…

All you have to do is to “plug in” those abilities to your sidekick.

Major from Ghost In The Shell

Build-Your-Sidekick 101

Apart from the most critical step in building your own sidekick: Choose Your Sidekick Name, you just need to do a few more things:

  1. Setup the communication with your sidekick
  2. Plug the supernatural abilities into your sidekick

For each of the step, I will lay it out for you in both High Level Concept and Examples of Implementations. Cool? Let’s do it.

Photo by Rhett Wesley on Unsplash
  1. Setup the communication with your sidekick

High Level Concept

There are basically 2 ways to choose from: you wanna “talk” or you wanna “type”. Telepathy or mind-reading would be cool, but sorry it’s not available now. This is very much personal preference. For me, I prefer “type” since I can silently communicate with my sidekick, and you would agree that seeing or reading your sidekick’s response beats hearing it.

Where I live, we normally use Line as our primary chat app. But it’s the same world-wide, whether you are using WhatsApp, Facebook Messenger, WeChat, Skype, etc. We spend hours and hours everyday typing away with our friends and our loved ones. But no matter what your favorite chat apps are, they are fundamentally the same.

This step, all we need to do is to teach your sidekick to understand what we are telling it to do. Your sidekick has to understand natural languages, read the intentions, and know what and how to respond. Nowadays it’s not about just programming and putting in every conditions, but mostly we rely on Machine Learning. We setup a set of Intents, we train your sidekick to understand them and how to respond to them. We train your sidekick some more, your sidekick would eventually gain better and better understanding and better reaction to those Intents that you communicate. That’s it.

Examples of Implementations

There are tons of tools or platforms on the Internet that we can use. But our most favorite is Google’s Dialogflow. It’s a tool of choice for many developers due to its ease-of-use, which can be integrated with many platforms, backed by Google. In most cases, people use it to create ChatBot with Line, MSN Messenger, etc. You can even use it with Google Assistant or Amazon’s Alexa, if you’d like.

You can choose Languages, create Intents, train with sample sentences or phrases. You do not need to put in all the combination of sentences or exact words. Since Dialogflow is based on Machine Learning, it would learn and understand your sentences.

If you put in enough Intents to your sidekick, it would eventually has its own personalities. You can shape your sidekick to be humorous, wise, straight-talker, it’s up to you.

“Any sufficiently advanced technology is indistinguishable from magic.”

Arthur C. Clarke

2. Plug the supernatural abilities into your sidekick

Like The Matrix, if you want your sidekick to have some special abilities, you’d just plug it into the abilities of your choice.

Like Arthur C. Clarke once said, it’s actually technology. There are so many providers of these abilities in the Internet, and they provide a “socket” for your “plug”, which are mostly called API.

Application Programming Interface (API) is a way for your sidekick to use those providers’ abilities, without having to develop those abilities yourself. Your sidekick just need to talk to those APIs the right way, and it will get the results you want.

Let me re-use the supernatural abilities that we talked about earlier, and break them down for you:

  • Can tell you if you’ll need to pack your raincoat to your trip this Saturday.

Meaning: Your sidekick uses Weather Forecast API to tell you the probabilities of raining at a particular location and date.

  • Can predict the precise time, down to the minute, when your wife is going to arrive home from office.

Meaning: Your sidekick uses Traffic Condition & Routes API to tell you how long it takes to travel from point A to point B with traffic conditions.

  • Can uncover a secret, off-menu, dish of the restaurant that you take your client to dinner.

Meaning: Your sidekick uses Places and Reviews API to provide you the reviews, comments & advice from patrons of that restaurant.

  • Can steer you away from a roadblock on the way to your important meeting

Meaning: Your sidekick uses Directions API to give you directions while traveling to avoid traffic, dead-end, or road blocks.

There are all kinds of APIs, in almost everything you can think of.

  • Shopping for a new headphone to be used at the gym? There’s an API that you can get a product review and recommendation, along with rating score between 0–5 stars.
  • Ordering food in a language you don’t know anything about? There’s API to translate between languages, plus some APIs to give you some description of that particular dish, thrown in some ingredients list for good measure.
  • The list goes on and on and on…

You just need to know who’s providing what abilities. And just plug your sidekick into that particular API.

Photo by Scott Rodgerson on Unsplash

Examples of Implementations

Again, there are tons of tools or platforms on the Internet that we can use. I will give you some providers based on the above examples:

Google: There are literally hundreds of services provided by Google, for examples Maps, Routes, Places, Translate, Image Recognition, Text/Speech Conversion.

https://developers.google.com/products/

Dark Sky: Global Weather Forecast

https://darksky.net/dev

Walmart: That’s right. Plug to Walmart’s products information & reviews.

https://developer.walmartlabs.com

After the communication with your sidekick established, you just need to plug in those abilities. One of the well recognized ways to do it is through Server Side functions, in which we love to use Firebase’s Cloud Functions.

If you have some skills in Node.js, you’ll be able to write these functions to connect to those APIs, format the data in the way that you want, and let your sidekick communicate the results to you.

Or you may connect it to your Server Side functions, through Webhook. So you can have more latitude of utilizing other libraries.

You can format results anyway you want, whether to be some Text with Emoji, status code, write to database, map to pictures. Just the way you like it.

Meet my sidekick: TacoBot

Taco is my chihuahua, and I love him dearly. He also has supernatural abilities, especially his digital self: “TacoBot”.

I also build TacoBot using Dialogflow and create a personality just like my Taco. He’s very cute, loves to eat, can make some jokes, bilingual (English/Thai), and never sleeps. He’s there for me and my family 24×7, ready to help.

  • My mom is Thai and cannot speak English, but my brother-in-law is American, so TacoBot can assist in translation between Thai/English without having to copy/paste from Google Translation.
  • TacoBot can tell my mom should she dry her clothes under the sun today, based on raining forecast.
  • TacoBot can tell my wife should she start cooking our dinner now, based on the traffic conditions from my office to home.
  • TacoBot can tell me should I take my prospective clients to a cafe I haven’t been before, based on the ratings/reviews.

I can add more and more abilities to TacoBot by just plugging him into more APIs. Who knows, one day he may dominate the world.

You can also create your own sidekick, with the supernatural abilities you like, who’ll be there to help you 24×7.

Wrap Up

If you are following me this far, I am happy to give you a gift: Yellow Pages of API Directory.

https://www.programmableweb.com/apis/directory

Some of them may sound simple and not of much value, but the limit is only one’s imagination. We may be able to create something that is of extremely high value, or solving humanity’s problems, or even saving the world.

If you are interested in creating your own sidekick with these abilities, my company, Sigma Genesis, can provide some assistance. Just visit us at https://sigmagenesis.com or email us at support@sigmagenesis.com



Slides Download (.ppsx)

View Article on Medium

Building Your Own Supernatural Sidekick



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.