
Ask HN: Recommended reading for building a chatbot? - jakobov
I need to build a basic chatbot for a side-project. Ideally I am looking for a guide for hackers.<p>Google is not returning any relevant results, just marketing spam...<p>Any suggestions?
======
eindiran
I assume you want to use a text interface rather than a voice interface?

Do you have any constraints on the programming language you'll use? I'm going
to assume that you'll be okay using Python in my answer.

If you were looking in to a voice interface, I'd highly recommend checking out
"Designing Voice User Interfaces: Principles of Conversational Experiences" by
Cathy Pearl[0], but you should know it's not really a how-to guide for
hackers, but a set of principles for designing the interface/what the user
experience should be like.

For text-based interfaces, there appear to be a few similar books, but I
haven't read any of them and can't recommend them. For example, see "Designing
Chatbots: Creating Conversational Experiences" by Amir Shevat.[1]

For the technical/implementation side of things, I'd recommend that you start
searching using search terms like NLP and NLU, rather than "chatbot" on its
own. A great place to start is with a toolkit like Rasa or spaCy for Python
and look up some tutorials on how to use them.

If the chatbot is quite basic, I'd recommend starting with bare spaCy and
using the built-in models. A tutorial like this should get you started:
[https://apps.worldwritable.com/tutorials/chatbot/](https://apps.worldwritable.com/tutorials/chatbot/)

If the required bot is a little more involved, you can use Rasa NLU as well.
Check out this tutorial for an example:
[https://towardsdatascience.com/building-a-conversational-
cha...](https://towardsdatascience.com/building-a-conversational-chatbot-for-
slack-using-rasa-and-python-part-1-bca5cc75d32f)

Are there any particular things that you know your chatbot will need to be
able to do? Extract and recognize product names in the user's response? Handle
ambiguity/anaphora resolution? Respond correctly to commands and questions
from the user? The behaviors you want from your bot will help shape how you go
about building it, so if you can give me a better idea of what you need, I can
give you more specific advice on that front.

[0] [https://www.amazon.com/Designing-Voice-User-Interfaces-
Conve...](https://www.amazon.com/Designing-Voice-User-Interfaces-
Conversational/dp/1491955414/)

[1] [https://www.amazon.com/Designing-Bots-Creating-
Conversationa...](https://www.amazon.com/Designing-Bots-Creating-
Conversational-Experiences/dp/1491974826/)

------
peterbozso
The Microsoft Bot Framework is a code-first bot creation tool:
[https://dev.botframework.com/](https://dev.botframework.com/) The learning
curve is steeper than other similar solutions', because you actually need to
write code, but if you are familiar with C# or JS, the possibilities are much
wider than with the others. The official docs are pretty good, in the design
section it also explains some base concepts of conversation design, not just
how to use the SDK-s: [https://docs.microsoft.com/en-us/azure/bot-service/bot-
servi...](https://docs.microsoft.com/en-us/azure/bot-service/bot-service-
design-principles?view=azure-bot-service-4.0)

~~~
wethebestcoder
Having heard about this while never using it and having used other "hot"
frameworks that Microsoft gave up on (Xamarin) and having checked out hyped
products that turned out to be underdeveloped (windows iot) I have doubts
about how good their chat framework is since the future didn't turn out to be
all about chat bots like they said it would.

Have you used it? What do you think? Be honest.

------
turbo_fart_box
Dialogflow + Manychat + serverless. Use that as your build platform and spend
time building something usable then writing tonnes of code. Manychat has some
nice videos too

------
gitgud
I learnt a lot just looking and _hacking_ at these [1] Glitch examples, all
sorts of methods used here not just a single library/technology stack...

[1] [https://glitch.com/@glitch/bots](https://glitch.com/@glitch/bots)

------
cdnsteve
Have you checked out dialogflow from gcp? Can get up and running really
quickly.

