Firebase Smart Reply can be used in any case when a quick reply is needed. The most common use case is a chat application. With Smart Reply, you can easily generate replies that look natural. It speeds up the process of writing or enables you to send a quick reply when you don’t have enough time to respond with a long message.
Apps that use Smart Reply
There are several apps and websites that provide a Smart Reply functionality. Let’s take a look at the most popular ones:
Just to be clear, LinkedIn uses a custom solution, but in the end it provides three replies just like the Firebase Smart Reply service.
This is probably the best and the most recognizable example I could think of. When writing an email reply, you will always see those simple replies that you can quickly use. It’s really nice, when you don’t have to type the same message hundreds of times!
Firebase Smart Reply can be configured to use only offline data models. It is not necessary to send private messages to remote servers in order to generate smart replies. So it's a really safe solution and every privacy admirer will be pleased with it!
With all the good the Smart Reply feature brings, there are some limitations that we can’t bypass at the moment. They’re not so huge, so Smart Reply functionality is still useful even if it’s a bit limited. Maybe in the future, Google will do away with some of them! Let’s quickly talk about the limitations:
Currently, Firebase Smart Reply only supports English language. It automatically detects the language used by the user – when language other than English is used, replies won’t be generated.
Firebase Smart Replies can be used for simple conversations only. The model used in Smart Reply won’t be able to generate natural responses for more complex topics.
The Firebase Smart Reply model will not provide responses if any of sensitive topics are detected.
Implementing Firebase Smart Reply in an empty project is quite simple. You just have to install:
Remember that to make it work, you need to pass to the text messages to the suggestReplies method. That’s the minimal configuration. To make Smart Reply work better, you can pass to the suggestReplies method messages that will include the userId and isLocalUser props. It will enable Smart Reply to identify and understand messages better. If you want to improve the quality of generated replies, you can also add timestamp data to the message.
In an empty project, implementing Firebase Smart Reply for chat should take less than 2 hours. If your project is at an advanced stage, it also shouldn’t be a big deal to implement it. I would say that, in this case, it shouldn’t take you more than 3-4 hours. Of course, I am talking about just the Smart Reply functionality, but you should also consider creating a proper UI for it.
For a better understanding, you can check out the video of a sample chat app that uses Firebase Smart Reply to generate quick responses. Users can then use them by just tapping on the given answer to send it.