Urgency driven dynamic explainability
A computer-implemented method includes: receiving, by a computing device, a query from a user device; generating, by the computing device and using a machine learning model, an answer to the query; determining, by the computing device, an urgency level of the query; generating, by the computing device, an explanation of the answer based on the determined urgency level; and presenting, by the computing device, the answer and the explanation to a user via the user device.
1 . A method, comprising:
receiving, by a computing device, a query from a user device;
generating, by the computing device and using a machine learning model, an answer to the query;
determining, by the computing device, an urgency level of the query;
collecting, by the computing device, input characteristics attributes from the query which include distance, confidence, and recall values;
determining, based on the determined urgency level, an amount of an explanation to include with the answer;
generating, by the computing device, the explanation of the answer based on the determined urgency level and the input characteristics attributes; and
presenting, by the computing device, the answer and the explanation to a user via the user device, wherein the machine learning model comprises an explainable artificial intelligence machine learning model which generates metadata including evidence and a confidence level for validation,
wherein the generating the explanation comprises generating the explanation using explainable artificial intelligence.
2 . The method of claim 1 , wherein the determining the amount of the explanation comprises:
comparing the determined urgency level to a threshold value;
in response to the determined urgency level being less than the threshold value, determining a relatively greater amount of the explanation to include with the answer; and
in response to the determined urgency level being greater than the threshold value, determining a relatively lesser amount of the explanation to include with the answer.
3 . The method of claim 1 , wherein the urgency level is determined by applying natural language processing to text of the query.
4 . The method of claim 1 , wherein the urgency level is determined based on user-indicated level of urgency included with the query.
5 . The method of claim 1 , wherein the urgency level is determined based on video analysis of the query.
6 . The method of claim 1 , wherein the urgency level is determined based on voice analysis of the query.
7 . A computer program product comprising one or more computer readable storage media having program instructions collectively stored on the one or more computer readable storage media, the program instructions executable to:
receive a query from a user device;
generate, using a machine learning model, an answer to the query;
determine an urgency level of the query;
collect input characteristics attributes from the query which include distance, confidence, and recall values;
generate, using explainable artificial intelligence, an explanation of the answer based on the input characteristics attributes;
determine, based on the determined urgency level, an amount of the explanation to include with the answer; and
present the answer and the determined amount of the explanation to a user via the user device,
wherein the machine learning model comprises an explainable artificial intelligence machine learning model which generates metadata including evidence and a confidence level for validation.
8 . The computer program product of claim 7 , wherein the determining the amount of the explanation to include with the answer comprises comparing the determined urgency level to a threshold value.
9 . The computer program product of claim 8 , wherein the determining the amount of the explanation comprises:
in response to the determined urgency level being less than the threshold value, determining a relatively greater amount of the explanation to include with the answer; and
in response to the determined urgency level being greater than the threshold value, determining a relatively lesser amount of the explanation to include with the answer.
10 . The computer program product of claim 7 , wherein the urgency level is determined by applying natural language processing to text of the query.
11 . The computer program product of claim 7 , wherein the urgency level is determined based on user-indicated level of urgency included with the query.
12 . The computer program product of claim 7 , wherein the urgency level is determined based on video analysis of the query.
13 . The computer program product of claim 7 , wherein the urgency level is determined based on voice analysis of the query.
14 . A system comprising: a processor, one or more computer readable storage media, and program instructions collectively stored on the one or more computer readable storage media, the program instructions executable to:
receive a query from a user device;
generate, using a machine learning model, an answer to the query;
determine an urgency level of the query by applying natural language processing to text of the query;
collect input characteristics attributes from the query which include distance, confidence, and recall values;
generate, using explainable artificial intelligence, an explanation of the answer based on the input characteristics attributes;
determine, based on the determined urgency level, an amount of the explanation to include with the answer by comparing the determined urgency level to a threshold value;
in response to the determined urgency level being less than the threshold value, determining a relatively greater amount of the explanation to include with the answer;
in response to the determined urgency level being greater than the threshold value, determining a relatively lesser amount of the explanation to include with the answer; and
present the answer and the determined amount of the explanation to a user via the user device,
wherein the machine learning model comprises an explainable artificial intelligence machine learning model which generates metadata including evidence and a confidence level for validation.
15 . The system of claim 14 , wherein the urgency level is also determined based on user-indicated level of urgency included with the query.
16 . The system of claim 14 , wherein the urgency level is also determined based on one of voice analysis and video analysis of the query.
17 . The method of claim 1 , wherein the explainable artificial intelligence machine learning model generates a score which includes how each factor contributes to a final result of model predictions, the generation of the explanation of the answer is further based on a real time user requirement,
the determining, based on the determined urgency level, the amount of the explanation to include with the answer comprises comparing the determined urgency level to a first high threshold value and a second low threshold value which is lower than the first threshold value,
in response to the determined urgency level being equal to or less than the second low threshold value, determining a relatively greater amount of the explanation to include with the answer,
in response to the determined urgency level being equal to or greater than the first high threshold value, determine a relatively lesser amount of the explanation to include with the answer, and
in response to the determined urgency level being between the first high threshold value and the second low threshold value, determining a relatively medium amount of the explanation to include with the answer.