Determining device assistant manner of reply
The exemplary embodiments disclose a method, a computer program product, and a computer system for replying to user commands. The present invention may include receiving a command for information from one or more devices of a user. The present invention may include collecting preferences of the user from a database and collecting user context from the one or more devices. The present invention may include identifying an appropriate manner of reply for the command based on the presences of the user and the user context. The present invention may include generating the appropriate reply to the command based on an identified manner of reply for the command using one or more machine learning models. The present invention may include transmitting the appropriate reply to the one or more devices of the user.
1 . A computer-implemented method for replying to user commands, the method comprising:
receiving a command for information from a first user of one or more devices, wherein the one or more devices are associated with at least two users;
collecting preferences of the first user from a database and collecting user context from the one or more devices;
extracting a plurality of features of the command based on the preferences and the user context collected, wherein the plurality of features include at least a topic and an activity corresponding to the command;
identifying an appropriate manner of reply for the command using one or more machine learning models based on the plurality of features extracted, wherein the one or more machine learning models is trained to weight the plurality of features according to a correlation with the appropriate manner of reply, and wherein the appropriate manner of reply indicates a completeness of the information to include in an appropriate reply to the first user;
generating the appropriate reply to the command based on an identified manner of reply for the command using the one or more machine learning models, wherein the appropriate reply to the command is a hint, wherein prior to a transmitting of the appropriate reply to the first user of the one or more devices, notifying an administrator of the appropriate reply, and receiving a confirmation or approval of the appropriate reply from the administrator;
transmitting the appropriate reply to the first user of the one or more devices following the approval of the appropriate reply by the administrator;
determining a usefulness of the hint based on feedback received from the first user, wherein the feedback is utilized in adjusting the one or more machine learning models for the first user;
anticipating a new command for information from a second user based on the second user entering a geofence of the one or more devices;
collecting preferences of the second user from the database and user context data for the second user from the one or more devices;
retrieving, from a queue, at least two or more hints and an answer to the new command based on the plurality of appropriate replies identified for the new command using the one or more machine learning models, wherein the one or more machine learning models utilize at least the preferences of the second user and the user context data for the second user collected from the one or more devices in anticipation of the new command;
transmitting a first hint of the two or more hints to the second user;
transmitting, in response to negative feedback received for the first hint, a second hint of the two or more hints to the second user;
transmitting the answer to the second user of the one or more devices; and
determining whether the answer to the new command is helpful to the second user based on an interaction of the second user with the answer, retraining the one or more machine learning models for the second user based on the interaction of the second user with the answer and the feedback associated with the at least two or more hints.
2 . The method of claim 1 , wherein identifying the appropriate manner of the reply for the command further comprises:
collecting training data from previous commands or questions previously received from the first user and template sentences, wherein the previous commands or the questions and the template sentences are labeled with an appropriate reply;
extracting one or more training features from the training data; and
training the one or more machine learning models to identify the appropriate manner of the reply for the command by weighing the plurality of features of the command based on a weighting of the one or more training features extracted from the training data from the previous commands or the questions labeled with the appropriate reply.
3 . The method of claim 2 , wherein the one or more training features are selected from a group consisting of: topics, importance, urgency, tone, actions, activities, pointing, waving, eye directions, and eye movements.
4 . The method of claim 2 , wherein the one or more training features are extracted from the training data received from one or more sensors associated with one or more Internet of Things (IoT) devices, and wherein the one or more training features are analyzed using the one or more machine learning models.
5 . The method of claim 1 , wherein the approval from the administrator is received via visual feedback from a smart device of the administrator.
6 . The method of claim 1 , further comprising:
identifying the plurality of appropriate replies the new command based on the preferences of the second user and the user context data for the second user collected in anticipation of the new command.
7 . The method of claim 6 , further comprising:
generating the answer to the new command based on the plurality of appropriate replies identified for the new command using the one or more machine learning models, wherein the one or more machine learning models are trained for each of the at least two users of the one or more devices.
8 . The method of claim 1 , further comprising:
receiving approval from the administrator for the at least two or more hints and the answer.
9 . The method of claim 1 , wherein the user context collected from the one or more devices includes at least audio context and video context, and wherein the preferences collected for the first user include at least calendar data and academic data.
10 . The method of claim 9 , further comprising:
determining the topic is an academic topic and the activity is an academic assignment corresponding to the command based on the user context and the preferences collected for the first user.
11 . The method of claim 9 , wherein the plurality of features further include an urgency, a tone, and an eye direction of the first user, and wherein the urgency and the tone are determined based on the audio context and the eye direction is determined based on the video context.
12 . A computer program product for replying to user commands, the computer program product comprising:
one or more non-transitory computer-readable storage media and program instructions stored on the one or more non-transitory computer-readable storage media capable of performing a method, the method comprising:
receiving a command for information from a first user of one or more devices, wherein the one or more devices are associated with at least two users;
collecting preferences of the first user from a database and collecting user context from the one or more devices;
extracting a plurality of features of the command based on the preferences and the user context collected, wherein the plurality of features include at least a topic and an activity corresponding to the command;
identifying an appropriate manner of reply for the command using one or more machine learning models based on the plurality of features extracted, wherein the one or more machine learning models is trained to weight the plurality of features according to a correlation with the appropriate manner of reply, and wherein the appropriate manner of reply indicates a completeness of the information to include in an appropriate reply to the first user;
generating the appropriate reply to the command based on an identified manner of reply for the command using the one or more machine learning models, wherein the appropriate reply to the command is a hint, wherein prior to a transmitting of the appropriate reply to the first user of the one or more devices, notifying an administrator of the appropriate reply, and receiving a confirmation or approval of the appropriate reply from the administrator;
transmitting the appropriate reply to the first user of the one or more devices following the approval of the appropriate reply by the administrator;
determining a usefulness of the hint based on feedback received from the first user, wherein the feedback is utilized in adjusting the one or more machine learning models for the first user;
anticipating a new command for information from a second user based on the second user entering a geofence of the one or more devices;
collecting preferences of the second user from the database and user context data for the second user from the one or more devices;
retrieving, from a queue, at least two or more hints and an answer to the new command based on the plurality of appropriate replies identified for the new command using the one or more machine learning models, wherein the one or more machine learning models utilize at least the preferences of the second user and the user context data for the second user collected from the one or more devices in anticipation of the new command;
transmitting a first hint of the two or more hints to the second user;
transmitting, in response to negative feedback received for the first hint, a second hint of the two or more hints to the second user;
transmitting the answer to the second user of the one or more devices; and
determining whether the answer to the new command is helpful to the second user based on an interaction of the second user with the answer, retraining the one or more machine learning models for the second user based on the interaction of the second user with the answer and the feedback associated with the at least two or more hints.
13 . The computer program product of claim 12 , wherein identifying the appropriate manner of the reply for the command further comprises:
collecting training data from previous commands or questions previously received from the first user and template sentences, wherein the previous commands or the questions and the template sentences are labeled with an appropriate reply;
extracting one or more training features from the training data; and
training the one or more machine learning models to identify the appropriate manner of the reply for the command by weighing the plurality of features of the command based on a weighting of the one or more training features extracted from the training data from the previous commands or the questions labeled with the appropriate reply.
14 . The computer program product of claim 13 , wherein the one or more training features are selected from a group consisting of: topics, importance, urgency, tone, actions, activities, pointing, waving, eye directions, and eye movements.
15 . The computer program product of claim 12 , wherein the user context collected from the one or more devices includes at least audio context and video context, and wherein the preferences collected for the first user include at least calendar data and academic data.
16 . The computer program product of claim 15 , further comprising:
determining the topic is an academic topic and the activity is an academic assignment corresponding to the command based on the user context and the preferences collected for the first user.
17 . The computer program product of claim 15 , wherein the plurality of features further include an urgency, a tone, and an eye direction of the first user, and wherein the urgency and the tone are determined based on the audio context and the eye direction is determined based on the video context.
18 . A computer system for replying to user commands, the computer system comprising:
one or more computer processors, one or more computer-readable storage media, and program instructions stored on the one or more of the computer-readable storage media for execution by at least one of the one or more processors capable of performing a method, the method comprising:
receiving a command for information from a first user of one or more devices, wherein the one or more devices are associated with at least two users;
collecting preferences of the first user from a database and collecting user context from the one or more devices;
extracting a plurality of features of the command based on the preferences and the user context collected, wherein the plurality of features include at least a topic and an activity corresponding to the command;
identifying an appropriate manner of reply for the command using one or more machine learning models based on the plurality of features extracted, wherein the one or more machine learning models is trained to weight the plurality of features according to a correlation with the appropriate manner of reply, and wherein the appropriate manner of reply indicates a completeness of the information to include in an appropriate reply to the first user;
generating the appropriate reply to the command based on an identified manner of reply for the command using the one or more machine learning models, wherein the appropriate reply to the command is a hint, wherein prior to a transmitting of the appropriate reply to the first user of the one or more devices, notifying an administrator of the appropriate reply, and receiving a confirmation or approval of the appropriate reply from the administrator;
transmitting the appropriate reply to the first user of the one or more devices following the approval of the appropriate reply by the administrator;
determining a usefulness of the hint based on feedback received from the first user, wherein the feedback is utilized in adjusting the one or more machine learning models for the first user;
anticipating a new command for information from a second user based on the second user entering a geofence of the one or more devices;
collecting preferences of the second user from the database and user context data for the second user from the one or more devices;
retrieving, from a queue, at least two or more hints and an answer to the new command based on the plurality of appropriate replies identified for the new command using the one or more machine learning models, wherein the one or more machine learning models utilize at least the preferences of the second user and the user context data for the second user collected from the one or more devices in anticipation of the new command;
transmitting a first hint of the two or more hints to the second user;
transmitting, in response to negative feedback received for the first hint, a second hint of the two or more hints to the second user;
transmitting the answer to the second user of the one or more devices; and
determining whether the answer to the new command is helpful to the second user based on an interaction of the second user with the answer, retraining the one or more machine learning models for the second user based on the interaction of the second user with the answer and the feedback associated with the at least two or more hints.
19 . The computer system of claim 18 , wherein identifying the appropriate manner of the reply for the command further comprises:
collecting training data from previous commands or questions previously received from the first user and template sentences, wherein the previous commands or the questions and the template sentences are labeled with an appropriate reply;
extracting one or more training features from the training data; and
training the one or more machine learning models to identify the appropriate manner of the reply for the command by weighing the plurality of features of the command based on a weighting of the one or more training features extracted from the training data from the previous commands or the questions labeled with the appropriate reply.