RELATED APPLICATION

This application claims priority under 35 U.S.C. § 119 to Indian Patent Application No. 201841032762, filed on Aug. 31, 2018, the content of which is incorporated by reference herein in its entirety.

BACKGROUND

A virtual assistant (e.g., a chatbot, a talkbot, a chatterbot, a bot, or an artificial conversational entity) may include a computer program that converses with a human user via auditory or textual methods. In some cases, virtual assistants are designed to simulate how a human would behave as a conversational partner. A virtual assistant may be used in a dialog system for various practical purposes including customer service or information acquisition.

SUMMARY

According to some possible implementations, a device may include one or more memories, and one or more processors, communicatively coupled to the one or more memories, to receive a first query from a user device. The one or more processors may call a first module to cause the first module to process the first query, wherein the first module uses a machine learning model to parse the first query to determine a first intent of the first query. The one or more processors may receive, from the first module, the first intent of the first query, and may call, based on the first intent, a second module to cause the second module to process the first query. The one or more processors may receive, from the second module, a first response to the first query, and may send the first response to the user device, wherein sending the first response to the user device causes the user device to display the first response. The one or more processors may receive a second query from the user device, wherein the second query is related to the first query, and may call the first module to cause the first module to process the second query, wherein the first module uses the machine learning model to parse the second query to determine a second intent of the second query and an indication that the second query is related to the first query. The one or more processors may receive, from the first module, the second intent of the second query and the indication, and may call, based on the second intent and the indication, the second module to cause the second module to process the second query. The one or more processors may receive, from the second module, a second response to the second query, and may send the second response to the user device, wherein sending the second response to the user device causes the user device to display the second response. The one or more processors may obtain first feedback regarding the first response and second feedback regarding the second response from the user device, and may update the machine learning model based on the first feedback and the second feedback.

According to some possible implementations, a non-transitory computer-readable medium may store instructions that include one or more instructions that, when executed by one or more processors of a device, cause the one or more processors to receive a query from a user device, and to process the query using a machine learning model to determine one or more categories related to the query. The one or more instructions may cause the one or more processors to send a message to the user device, wherein sending the message to the user device causes the user device to display the message, and wherein the message instructs a user of the user device to select a category of the one or more categories. The one or more instructions may cause the one or more processors to receive a selection from the user device, wherein the selection is related to the one or more categories, and to call, based on the selection, a module to cause the module to process the query. The one or more instructions may cause the one or more processors to receive from the module a response to the query, and to send the response to the user device, wherein sending the response to the user device causes the user device to display the response. The one or more instructions may cause the one or more processors to send the query, the selection, and the response to one or more servers for storage, and to retrain the machine learning model based on information stored by the one or more servers.

According to some possible implementations, a method may include receiving, by a device, a query from a user device, and processing, by the device, the query using a machine learning model to determine a set of categories related to the query. The method may include sending, by the device, a message to the user device, wherein sending the message to the user device causes the user device to display the message, and wherein the message instructs a user of the user device to select a category of the set of categories. The method may include receiving, by the device, a selection from the user device, wherein the selection is related to the set of categories, and obtaining, by the device, identification information regarding the user of the user device. The method may include calling, by the device and based on the selection and the identification information, a module to cause the module to process the query. The method may include receiving, by the device, and from the module, a response to the query. The method may include sending, by the device, the response to the user device, wherein sending the response to the user device causes the user device to display the response, and updating the machine learning model based on the query, the selection, the identification information, and the response.

