Always when you receive a suggestion of two or three prepared replies on a message that you received in one of your apps, it is the ML Smart Reply API working in the background. This is the simplest, easiest way to describe the main task of this Application Programming Interface. With one touch on the suggested replies you provide an answer, same as the one written by a human person. How is this possible? How to apply this when developing an iOS mobile app?
The Smart Reply API enables the application to automatically generate appropriate replies to received messages. This option offers the possibility for the user of the application to reply as quickly as possible. Also, with the prepared suggestions it makes it easier to answer on devices with limited possibilities for data input.
Main Features
- The suggested replies by the Smart Reply API are always helpful for the users of the app. This is the case because the API generates them from the conversation in total, and not only from the last received message.
- Additionally, the model of the API is on the device which generates the responses quickly, without the need to send the messages to a remote server.
Limitations
- The ML Kit Smart Reply API offers the possibility to reply to a message only if it detects that the used language is English. Otherwise, it doesnโt provide any suggestions.
- Another limitation is the fact that this API is basically created for casual conversations in consumer apps. That is why when used in another environment might not be appropriate.
So, with all of these taken into consideration, the approach is the following: (1) Smart Reply goes through 10 of the last messages in the conversation in order to collect enough information and form a reply; (2) Next, it checks if the used language is English, and only if it is, starts with the creation of suggested replies; (3) Than, it compares whether the suggested messages are of some sensitive topic; and (4) Finally, if the language is English and there arenโt any sensitive topics, the API provides up to three suggested replies to a message for the user.
ML Kit offers detailed guidelines for those who would like to apply this type of API in their applications. We might go into more details in some of our future posts, however, you can read more on their website.
Have any questions?