Advertisement
Canada markets closed
  • S&P/TSX

    22,167.03
    +59.95 (+0.27%)
     
  • S&P 500

    5,254.35
    +5.86 (+0.11%)
     
  • DOW

    39,807.37
    +47.29 (+0.12%)
     
  • CAD/USD

    0.7387
    +0.0001 (+0.01%)
     
  • CRUDE OIL

    83.11
    -0.06 (-0.07%)
     
  • Bitcoin CAD

    94,582.11
    -1,613.43 (-1.68%)
     
  • CMC Crypto 200

    885.54
    0.00 (0.00%)
     
  • GOLD FUTURES

    2,254.80
    +16.40 (+0.73%)
     
  • RUSSELL 2000

    2,124.55
    +10.20 (+0.48%)
     
  • 10-Yr Bond

    4.2060
    +0.0100 (+0.24%)
     
  • NASDAQ

    16,379.46
    -20.06 (-0.12%)
     
  • VOLATILITY

    13.01
    0.00 (0.00%)
     
  • FTSE

    7,952.62
    +20.64 (+0.26%)
     
  • NIKKEI 225

    40,369.44
    +201.37 (+0.50%)
     
  • CAD/EUR

    0.6844
    +0.0001 (+0.01%)
     

I built a bot, and now I want more bots

Screenshot,
Screenshot,

I have finally managed to replicate myself in digital form. My online alter ego suffers from a profoundly limited vocabulary and poor reading comprehension—but it’s still a start.

Credit for this feat of minor self-replication goes to an introductory course in building chatbots that can engage in basic conversations with strangers. That came at the Future.Today summit, a conference happening this week in New York. I may be nowhere near outsourcing my correspondence to a stack of algorithms, but at least I have a slightly better understanding of how these things work—and how I might want to put them to work for me.

Bots for beginners

I had the unfair advantage of getting somebody else to do the hardest work upfront: John Keefe, a data journalist with WNYC radio, set up a bot engine using such web tools as Twilio’s (TWLO) messaging service, the Botkit open-source library, and Wit.ai’s natural-language tools.

ADVERTISEMENT

My part of this Build-A-Bot workshop was simpler: Create a Google (GOOG, GOOGL) spreadsheet and then fill it out with both terms that might appear in questions along with the text my bot would answer them with. Then I had to link it to Keefe’s bot-testing page.

In keeping with my tradition of being Kryptonite to tech demos, I screwed that up. Keefe’s page ignored more than the first handful of queries I’d included in this spreadsheet and didn’t respond to the commands that were supposed to refresh its grasp of my database.

I asked Keefe for help. “Hmm, it is definitely not happy,” he commented before taking a closer look at my questions and answers. The problem turned out to be a typo—I’d entered a curly bracket instead of a parenthesis when enclosing a “regular expression” list of synonyms.

That was my first lesson in bot programming: punctuation matters. The second: Keeping the search terms brief made for a more responsive bot. I didn’t need to include “What’s Rob’s Twitter handle?” as a possible query when “Twitter?” would allow the bot to field far more questions about my Twitter presence.

Things get complicated

A screenshot of the author's bot dialogue.
A screenshot of the author's bot dialogue.

I fixed that and now have a bot capable of entry-level Q&A interaction with you and any other random person—well, for as long as Keefe keeps that page up.

My beginner’s bot is nowhere as smart as the ones you can deploy on Facebook (FB), which benefit from powerful artificial-intelligence capabilities to parse the input of humans who may disregard spelling and grammar. It also doesn’t allow for spoken input and is illiterate in emoji, stickers and GIFs.

But setting up a Facebook Messenger bot is not an exercise for laypeople. It’s reserved for developers at companies and organizations with public Facebook pages. I have a Facebook page and I wouldn’t mind having a bot to answer basic questions from readers. But until I get a lot more adept with code, I’m stuck with providing an automated response to people who send messages to my page.

The team-messaging app Slack abounds with bots, but creating those also amounts to a coding project.

You can apparently create a Twitter (TWTR) bot with less work by combining simple web tools with a Google spreadsheet, but I have yet to try that. Don’t I spend enough time on that service already?

Not for the first time, an online tool that could be useful to those of us lumped under the faceless, amorphous term “users” is largely reserved for developers instead—even though many of us could use this feature in our own lives.

Bots with benefits

A little time spent plugging questions and answers into this Google spreadsheet got me thinking about other potential applications of having a bot for a mouthpiece. Beyond answering reader questions on Facebook, the same technology could save me vast amounts of time answering PR pitches about next month’s CES gadget gathering.

Having a bot speak on your behalf in a web chat or phone call with a giant corporation would be another obvious application, something ACLU policy analyst Jay Stanley endorsed in a later Future.Today talk.

Alas, today’s customer-advocate bots can easily outstrip their programming. When my colleague Daniel Roberts tried using one to negotiate a lower Comcast rate for his mom, he had to pull the plug on the bot before things got too embarrassing.

But one use case for bots doesn’t need any subtle programming: text-messaging apps in moving cars. They all should already come set—as Google’s updated Android Auto app now does—to respond to incoming texts with a simple, canned reply: “I’m driving right now.”

Email Rob at rob@robpegoraro.com; follow him on Twitter at @robpegoraro.