U.S. markets closed
  • S&P 500

    -106.84 (-2.27%)
  • Dow 30

    -905.04 (-2.53%)
  • Nasdaq

    -353.57 (-2.23%)
  • Russell 2000

    -85.52 (-3.67%)
  • Crude Oil

    -10.24 (-13.06%)
  • Gold

    +1.20 (+0.07%)
  • Silver

    -0.40 (-1.70%)

    +0.0110 (+0.99%)
  • 10-Yr Bond

    -0.1630 (-9.91%)

    +0.0022 (+0.16%)

    -2.0790 (-1.80%)

    +130.00 (+0.24%)
  • CMC Crypto 200

    -89.82 (-6.17%)
  • FTSE 100

    -266.34 (-3.64%)
  • Nikkei 225

    -747.66 (-2.53%)

I built a bot, and now I want more bots

·Contributing Editor

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.

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.