Large language model performance evaluation and modification
At least one processor may receive conversation data comprising a user input and a response to the user input generated by a large language model (LLM). The at least one processor may detect a behavior gap between the conversation data and at least one test conversation data comprising human-to-human communication samples. Based on the behavior gap, the at least one processor may retrain the LLM and/or provide an alternative response workflow for responding to the user input.
1 . A method comprising:
receiving, by at least one processor, conversation data comprising a user input included in a prompt to a large language model (LLM) and a response to the user input generated by the LLM;
detecting, by the at least one processor, a behavior gap between the conversation data and at least one test conversation data comprising human-to-human communication samples,
the detecting comprising detecting:
at least one overused dialog act indicated by at least one of a misalignment of LLM dialog acts with dialog acts found in the at least one test conversation data and a use of more dialog acts per turn than found in the at least one test conversation data,
at least one overused tool use indicated by at least one of a different LLM tool selection than selections found in the at least one test conversation data and a more frequent LLM tool use than uses found in the at least one test conversation data, and
at least one overused external knowledge use indicated by a more frequent LLM direct copying than copying found in the at least one test conversation data and a lower LLM compression ratio than a compression ratio found in the at least one test conversation data;
determining, by the at least one processor, an alternative response workflow configured to generate a second response to the user input having a second behavior gap that is less than the behavior gap, the determining comprising configuring the LLM to produce the second response without incorporating the at least one overused element; and
causing, by the at least one processor, generation of the second response to the user input by the LLM and presentation of the second response in a user interface in response to the prompt to the LLM.
2 . The method of claim 1 , wherein the detecting the at least one dialog act comprises prompting a test LLM with a dialog act system prompt and the conversation data and receiving the at least one dialog act in a response generated by the test LLM.
3 . The method of claim 1 , wherein the detecting at least one tool use comprises prompting a test LLM with a tool use system prompt and the conversation data and receiving an indication of the at least one tool use in a response generated by the test LLM.
4 . The method of claim 1 , wherein the detecting at least one external knowledge use comprises detecting copying of external knowledge into the response to the user input.
5 . The method of claim 1 , wherein the detecting at least one external knowledge use comprises determining a compression ratio of at least a portion of the response to the user input over referenced external knowledge.
6 . The method of claim 1 , wherein the determining comprises:
receiving, by the at least one processor, second conversation data comprising the user input and the second response to the user input generated by a second LLM;
detecting, by the at least one processor, the second behavior gap between the second conversation data and at the least one test conversation data comprising human-to-human communication samples;
determining, by the at least one processor, that the second behavior gap is less than the behavior gap; and
causing, by the at least one processor, output of the second response to the user input by the second LLM.
7 . The method of claim 1 , wherein the alternative response workflow comprises injecting at least one known human dialog act into the second response.
8 . A system comprising:
at least one processor; and
at least one non-transitory computer-readable medium storing instructions that, when executed by the at least one processor, cause the at least one processor to perform processing comprising:
receiving conversation data comprising a user input included in a prompt to a large language model (LLM) and a response to the user input generated by the LLM;
detecting a behavior gap between the conversation data and at least one test conversation data comprising human-to-human communication samples, the detecting comprising detecting:
at least one overused dialog act indicated by at least one of a misalignment of LLM dialog acts with dialog acts found in the at least one test conversation data and a use of more dialog acts per turn than found in the at least one test conversation data,
at least one overused tool use indicated by at least one of a different LLM tool selection than selections found in the at least one test conversation data and a more frequent LLM tool use than uses found in the at least one test conversation data, and
at least one overused external knowledge use indicated by a more frequent LLM direct copying than copying found in the at least one test conversation data and a lower LLM compression ratio than a compression ratio found in the at least one test conversation data;
determining an alternative response workflow configured to generate a second response to the user input having a second behavior gap that is less than the behavior gap, the determining comprising configuring the LLM to produce the second response without incorporating the at least one overused element; and
causing generation of the second response to the user input by the LLM and presentation of the second response in a user interface in response to the prompt to the LLM.
9 . The system of claim 8 , wherein the detecting the at least one dialog act comprises prompting a test LLM with a dialog act system prompt and the conversation data and receiving the at least one dialog act in a response generated by the test LLM.
10 . The system of claim 8 , wherein the detecting at least one tool use comprises prompting a test LLM with a tool use system prompt and the conversation data and receiving an indication of the at least one tool use in a response generated by the test LLM.
11 . The system of claim 8 , wherein the detecting at least one external knowledge use comprises detecting copying of external knowledge into the response to the user input.
12 . The system of claim 8 , wherein the detecting at least one external knowledge use comprises determining a compression ratio of at least a portion of the response to the user input over referenced external knowledge.
13 . The system of claim 8 , wherein the determining comprises:
receiving second conversation data comprising the user input and the second response to the user input generated by a second LLM;
detecting the second behavior gap between the second conversation data and at the least one test conversation data comprising human-to-human communication samples;
determining that the second behavior gap is less than the behavior gap; and
causing output of the second response to the user input by the second LLM.
14 . The system of claim 8 , wherein the alternative response workflow comprises injecting at least one known human dialog act into the second response.