Chatbot Conversation Engines — Different Approaches

In this post we look at 4 different kinds of conversation engines that can be used for chatbots. The kind you choose to use can determine the power and flexibility of your final product — and ultimately how scalable it will be in handling diverse and myriad conversational flows. What is a conversation engine? To explain this, first we first have to understand a little about how chatbots work. Chatbots are software constructs that accept any kind of text input from users, with the intention of returning a reply, usually some kind of information that users are interested in....

January 29, 2021 · Joel Tok

One Host, Multiple Vue Apps

Problem We want to be able to access different VueJS frontend applications from the same host, differentiated by a base-path for each app. For example, on an example host prototypes.com, we want to host 2 applications: alpha and beta. Both these applications should be accessible from separate base paths, prototypes.com/alpha and prototypes.com/beta, routed through the same reverse-proxy. Example Let us illustrate the above with a simple example. Let us assume we have the following barebones application structure....

December 29, 2020 · Joel Tok

Flutter Desktop — a Hello World App for Linux, MacOS and Windows

There are many tutorials out there that teach you how to get started in Flutter for mobile. But resources on Flutter for desktop are still lacking. Today I will walk you through the steps of creating a Hello World! App on Flutter Desktop. Note: The following commands have been tested on Linux and MacOS only, since those are the OSes that I personally use. Setting up Flutter for Desktop First install Flutter for your desktop operating system....

November 8, 2020 · Joel Tok

Python3 asyncio – create_task errors fail silently

Asynchronous programming came to python awhile back, formally encapsulated in the asyncio module. This is a python library that allows developers to utilise an asynchronous pattern in writing code using the async-await pattern. While full-featured and mature, I personally encountered a confusing edge case when using create_task to spin off background tasks. Let’s start off with a working example: The above code runs some asynchronous task code, and initiates an event loop that polls an api periodically....

October 12, 2020 · Joel Tok

Flutter Camera - An Example with Detailed Explanations and Pitfalls

Introduction Working in Flutter to build my new mobile app (now defunct) ZapCam has been an amazing experience. For those who do not know, Flutter is an open-sourced cross-platform mobile app development framework, developed by Google and written in Dart. Developing in it has been surprisingly elegant. The type system of Dart is clean and expressive, and Flutter itself offers many development tools that come prepackaged that makes development, building and deploying for device a total breeze....

October 6, 2020 · Joel Tok

Performance Benchmarking: Pandas DataFrame vs Python List of Dictionaries

Problem While in the initial stages of a project, sometimes we have to choose between storing data with Pandas DataFrames or in native python lists of dictionaries. Both data structures look similar enough to perform the same tasks - we can even look at lists of dictionaries as simply a less complex Pandas DataFrame (each row in a DataFrame corresponds to each dictionary in the list). The question then arises: given the increased complexity and overhead of a Pandas DataFrame, is it true then that we should always default to using python Lists of dictionaries when performance is the primary consideration?...

May 31, 2020 · Joel Tok

Converting F.relu() to nn.ReLU() in PyTorch

I have been using PyTorch extensively in some of my projects lately, and one of the things that has confused me was how to go about implementing a hidden layer of Rectified Linear Units (ReLU) using the nn.ReLU() syntax. I was already using the functional F.relu() syntax, and wanted to move away from this into a more OOP-approach. The following is a straightforward example on the way to convert an F....

April 28, 2020 · Joel Tok

Chatbots: Reducing the chatbot conversation design feedback loop by 99%

When I first started working on a Facebook messenger chatbot back in early ’18, one of the key issues we faced was how inflexible it was for business to make changes to chatbot conversations. In fact, changes took anywhere from 2-3 days at best, to a month at worst — a pretty unbearably long feedback loop. Through a series of major changes to the underlying architecture, this average of 2 weeks was brought down to barely 20 minutes....

March 3, 2019 · Joel Tok