Live data from Hacker News

Building a chatbot on Facebook Messenger with Ruby on Rails

tutorials.botsfloor.com

1–10 of 25 posts

Re: Building a chatbot on Facebook Messenger with Ruby on Rails

#4
Erm .. what is the point of Rails here? This can be done with Rack, Sinatra, Node, Go.

I really like Rails, but I get a bit annoyed when people use it everywhere even where it is not a good fit e.g. no need of activerecord, no server side templates or other 70% of Rails feature set, it is all just there adding to bloat without any usage.

Re: Building a chatbot on Facebook Messenger with Ruby on Rails

#6
In this case, why even use api.ai? The sample cases seems very simple to just do some basic regexp instead?

I've done my own Raspberry "bot" using speak synthesizer and STT and some basic plain ruby. Using regexp it handles _a_lot_ of scenarios just by simple regexp for words such as "rain", "weather" (which then is enough to understand that I'm asking for the weather). Combined with "today" or "tomorrow" it can tell weather at different times.

I was also intrigued by using api.ai in my case but It just felt overkill.

(Perhaps I've just missed the whole point here).

Re: Building a chatbot on Facebook Messenger with Ruby on Rails

#7
post #6

In this case, why even use api.ai? The sample cases seems very simple to just do some basic regexp instead? I've done my own Raspberry "bot" using speak synthesizer and STT and some basic plain ruby. Using regexp it handles _a_lot_ of scenarios just by simple regexp for words such as "rain", "weather" (which then is enough to understand that I'm asking for the weather). Combined with "today" or "tomorrow" it can tell…

I will make the disclaimer that I don't think I am an "expert", but I do some coaching for API.AI and have been helping a couple of clients build out simple chatbots.

I keep hearing this question a lot, and I think right now the best way to teach chatbot programming seems to be by using the simplest examples and this is a little misleading (is that all?). You can use regexp to build out a chatbot, but it might be a good idea to consider some pros/cons of using a service like API.AI.

Under the hood, API.AI (and similar bot programming frameworks) allow you to go much further:

1. Their entity matching system will let you start with a few examples and then keep matching many more similar examples (remember Google Sets?) without you explicitly defining every single one of them. The best example for this seems to be the food/recipe & geographical locations stuff for now, but if they can get it right for more domains that can be quite useful.

2. There is a way to use templated definitions of "here is what the user might say" which is quite powerful. Sure, you could probably do the same yourself, but think about it: you will be handling so many corner cases with such a system that if there were a prebuilt service already doing that work for you (and which is improving quite rapidly) you could probably build it out faster with the external service.

3. There is also enough flexibility where you can add webhooks (like the author has done) and basically put a lot of business logic into your chatbot.

4. Assuming API.AI will soon be acquiring some of the ML knowledge which Google already has, it is reasonable to expect that the intent mapping (the process of figuring out what the user said) will only keep getting better.

Having said that, here are some advantages of rolling out your own:

1. You don't typically get the full picture of what is going on under the hood with an external service. Unlike the case where you write your own code, this means when things fail (and they will), you sometimes don't know what is the cause, and worse, how to get around it.

2. There is always the inherent risk that the service you rely on might shut down some day :-(

3. The current tooling around moving your chatbot from staging to production in API.AI is fraught with risk. I don't know if it is the same with the other ones too. If you roll out your own chatbot, you don't have such issues.

4. There are also some features which have been added to API.AI which are sort of all or nothing. A good example is the small-talk feature which you can import into an agent. The trouble is, you cannot really customize it much, so when it doesn't give you the behavior you expect, it can become a bit of a liability.

Hope that helps!

Re: Building a chatbot on Facebook Messenger with Ruby on Rails

#8
post #5
post #3

Can someone explain to me, please, why we see so many bot-related topics recently?

Because they are currently somewhere near the maximum in the hype cycle. https://en.wikipedia.org/wiki/Hype_cycle

Is it just a hype, or is there any real advantage for the user? From the point of view of the interaction, why should I chat with a bot instead of using a more classical gui? I'm asking because i teach ux/hci, and a student just asked me to be her supervisor for a chatbot based interface, and I'm trying to understand if - in a user centered perspective - this approach makes sense

Re: Building a chatbot on Facebook Messenger with Ruby on Rails

#9
For those of you who are interested in chatbots and Ruby, we open sourced Clarke, the framework we are using at Applidium to architecture them: https://github.com/applidium/clarke

And if you're more interested in the thought process behind, we did a presentation of what led us to this architecture https://docs.google.com/presentation/d/1kGiHfMMjf-OL7ZUODttu...

If you have any question or feedback they're very welcome :-)

Re: Building a chatbot on Facebook Messenger with Ruby on Rails

#10
post #5

Earlier quoted context omitted.

Because they are currently somewhere near the maximum in the hype cycle. https://en.wikipedia.org/wiki/Hype_cycle

Is it just a hype, or is there any real advantage for the user? From the point of view of the interaction, why should I chat with a bot instead of using a more classical gui? I'm asking because i teach ux/hci, and a student just asked me to be her supervisor for a chatbot based interface, and I'm trying to understand if - in a user centered perspective - this approach makes sense

It depends on use case. Chatbot can be powerful option in parallel to web and mobile app for some of the cases.

Some example - I am using Poncho bot that sends me weather update every day in morning and evening. So that way I don't need to install other app or need to open site and check everytime.

Same way, Machaoo bot sends me match score update on a regular interval.

Post reply on HN