Inspiration

A Stanford researcher found that students in high-achieving communities who spend too much time on homework experience more stress, physical health problems, a lack of balance and even alienation from society. link. Researchers in university labs, and employees in workplaces with jobs that require researching solutions to problems are equally stressful (one would imagine)! Interacting with a chatbot in a team environment may provide a fun solution to this problem!

Unless all your answers can be found on StackOverflow and github, we all turn to our trusted friend, Google. The only problem being that Google gives us 15 gazillion answers to each of our questions. Wait, I know what you're thinking ... What about that summary answer for simple questions that appears on top of the search results. Yes! That's good! Now try something a little more complicated. How about asking Google the total length of all roads in germany. Chances are that the first link (Wiki?) has your answer, but all we really want is a simple answer (to a complex question). That's where BotsHisName, the bot, steps in.

What it does

Answers questions to seemingly complex questions within Glip. Do you have a homework group that you work with on Glip? What about a workplace group for discussing and collaborating on research. You can ask questions like:

  • approximate pi to 6 digits
  • how many molecules are in 10 grams of ATP
  • gamma(x) integral representation
  • 32 coin tosses
  • cubic fit 20.9,23.2,26.2,26.4,16.3,-12.2,-60.6,-128.9
  • when was the airbag invented?
  • stock MSFT,AAPL,GOOG
  • what is the relativistic momentum of an electron with speed=0.8c
  • NACA 3012 airfoil
  • what is the total length of all roads in germany?
  • what is the distance between earth and neptune in lightyears
  • tell me a physics joke

How I built it

The glip bot is build using Ring Central Glip API's, the Botkit library, and the Wolfram Alpha API. Glip provides a very convenient botkit adaptor that takes the burden away from actually interacting with the back end communication channels. This let me focus on the bot itself. For questions in the format "question .......", the bot uses two Wolfram Aplha APIs (a simple answer one, and a more detailed, multi layered answer for tough questions). Testing was performed using a local ngrok server.

Challenges I ran into

Running the server locally caused some communication delays, but apart from that, no real issues!

Accomplishments that I'm proud of

The implementation is powerful, given that it uses the entire Wolfram Alpha Engine. Users may ask BotsHisName questions about science, math, engineering, medical terms, linguistics, events in history, personalities, stock values, and even "airplanes above me right now"! Unlike most other bots that respond to specifically coded requests in a certain format, using a powerful, generic API backend means that a simple implementation can give users multiple answers.

What I learned

I learned how to set up a conversational bot from scratch using hubot and botkit, got introduced to Glip's vast set of APIs and how to automate my bot testing (locally). This has been really rewarding!

What's next for BotsHisName

Immediate improvements I can think of are solving a question with the user as a team. Botkits conversational interface can be used for answering ill-formed questions through guided resolution. BotsHisName might also go rogue and build itself another bot; only time will tell ....

Built With

Share this project:
×

Updates