In a previous example I created a Facebook Messenger chatbot. This project built on that to create a chat client that could offer nutritional advice on different ingredients.
However we decided that rather than build this in Facebook we would build a custom on-site chatbot so that we could reach a bigger audience and keep people engaged in the site while chatting.
A database of different foods and nutrients was created so that editors could easily manage the content which the bot would use to create responses. In order to keep the responses as quick as possible, the data was loaded in to a Solr search index. This gave the added benefit of being able to offer suggestions for misspelled words and do fuzzy-searches. Also, Solr is lightning fast and great at handling multiple requests.