Systems and methods for computer generation of a modifiable product description
Generative language models are able to generate a sequence of text that may closely mimic a native human speaker's own generated text. However, technical challenges exist when implementing a generative language model for generating product descriptions. The model may output certain inaccuracies due to the predictive nature of generating the output. Further, the model does not have the ability to identify words from the product description that a merchant may want to modify, nor the ability to provide meaningful alternatives to such words. In some embodiments, a natural language processor might be built and/or trained using classification data. The natural language processor may identify one or more words and/or phrases in a product description as a candidate for modification. The product description might then be displayed on a merchant-facing user interface with an indication that the candidate for modification may be modified.
1 . A computer-implemented method comprising:
providing a prompt to a generative language machine learning model;
responsive to the prompt, the generative language machine learning model generating a sequence of tokens, each token of the sequence based on one or more previous tokens in the sequence, and each token associated with a respective segment of a description;
sequentially outputting a plurality of segments represented by the sequence of tokens to generate a product description;
during a process of generating a given segment of the plurality of segments, the given segment associated with a given token corresponding to a first entry of a logits vector generated by the generative language machine learning model, storing in a memory a different token associated with an alternative segment, the different token corresponding to a second entry of the logits vector but not selected and included as part of the sequence of tokens generated by the generative language machine learning model and therefore not used to form part of the product description, the different token having been determined by the generative language machine learning model to be associated with a lower probability than the given token;
processing the product description to identify the given segment of the product description as a candidate for modification; and
providing content for presentation, the content including the product description and an alternative word or phrase that may be substituted in place of the candidate for modification,
wherein the alternative word or phrase that may be substituted in place of the candidate for modification is the alternative segment that is associated with the different token stored in memory and determined by the generative machine learning model to be associated with a lower probability than the given token.
2 . The computer-implemented method of claim 1 , wherein generating the product description comprises:
receiving the prompt to provide to the generative language machine learning model, the prompt including text corresponding to the product.
3 . The computer-implemented method of claim 2 , wherein the prompt further includes one or both of an example product title and an example product description.
4 . The computer-implemented method of claim 1 , wherein the generative language machine learning model sequentially outputs the plurality of segments of the product description, each next segment determined by the generative language machine learning model as being associated with a highest probability of being the next segment.
5 . The computer-implemented method of claim 1 , wherein the alternative word or phrase that may be substituted in place of the candidate for modification is determined based on use of the alternative word or phrase in relation to other products.
6 . The computer-implemented method of claim 1 further comprising:
processing an image depicting the product to obtain an attribute related to the product as depicted in the image; and
including, in the content, a particular word or phrase associated with the attribute.
7 . The computer-implemented method of claim 6 further comprising modifying the product description to include the particular word or phrase associated with the attribute.
8 . The computer-implemented method of claim 6 , wherein the alternative word or phrase that may be substituted in place of the candidate for modification is the particular word or phrase associated with the attribute.
9 . A system comprising:
at least one processor; and
a memory storing processor-executable instructions that, when executed, cause the at least one processor to:
provide a prompt to a generative language machine learning model to cause the generative language machine learning model to generate a sequence of tokens responsive to the prompt, each token of the sequence based on one or more previous tokens in the sequence, and each token associated with a respective segment of a description;
sequentially output a plurality of segments represented by the sequence of tokens to generate a product description;
during a process of generating a given segment of the plurality of segments, the given segment associated with a given token corresponding to a first entry of a logits vector generated by the generative language machine learning model, store in a memory a different token associated with an alternative segment, the different token corresponding to a second entry of the logits vector but not selected and included as part of the sequence of tokens generated by the generative language machine learning model and therefore not used to form part of the product description, the different token having been determined by the generative language machine learning model to be associated with a lower probability than the given token;
process the product description to identify the given segment of the product description as a candidate for modification; and
provide content for presentation, the content including the product description and an alternative word or phrase that may be substituted in place of the candidate for modification,
wherein the alternative word or phrase that may be substituted in place of the candidate for modification is the alternative segment that is associated with the different token stored in memory and determined by the generative machine learning model to be associated with a lower probability than the given token.
10 . The system of claim 9 , wherein the at least one processor is further configured to:
receive the prompt to provide to the generative language machine learning model, the prompt including text corresponding to the product.
11 . The system of claim 9 , wherein the at least one processor is configured to use the generative language machine learning model to sequentially output the plurality of segments of the product description, and wherein each next segment is associated with a highest probability of being the next segment.
12 . The system of claim 9 , wherein the alternative word or phrase that may be substituted in place of the candidate for modification is determined based on use of the alternative word or phrase in relation to other products.
13 . The system of claim 9 , wherein the at least one processor is further configured to:
process an image depicting the product to obtain an attribute related to the product as depicted in the image; and
include, in the content, a particular word or phrase associated with the attribute.
14 . The system of claim 13 wherein the at least one processor is further configured to modify the product description to include the particular word or phrase.
15 . The system of claim 13 , wherein the alternative word or phrase that may be substituted in place of the candidate for modification is the particular word or phrase associated with the attribute.
16 . A non-transitory computer readable medium having stored thereon computer-executable instructions that, when executed by a computer, cause the computer to perform operations comprising:
providing a prompt to a generative language machine learning model;
responsive to the prompt, the generative language machine learning model generating a sequence of tokens, each token of the sequence based on one or more previous tokens in the sequence, and each token associated with a respective segment of a description;
sequentially outputting a plurality of segments represented by the sequence of tokens to generate a product description;
during a process of generating a given segment of the plurality of segments, the given segment associated with a given token corresponding to a first entry of a logits vector generated by the generative language machine learning model, storing in a memory a different token associated with an alternative segment, the different token corresponding to a second entry of the logits vector but not selected and included as part of the sequence of tokens generated by the generative language machine learning model and therefore not used to form part of the product description, the different token having been determined by the generative language machine learning model to be associated with a lower probability than the given token;
processing the product description to identify the given segment of the product description as a candidate for modification; and
providing content for presentation, the content including the product description and an alternative word or phrase that may be substituted in place of the candidate for modification,
wherein the alternative word or phrase that may be substituted in place of the candidate for modification is the alternative segment that is associated with the different token stored in memory and determined by the generative machine learning model to be associated with a lower probability than the given token.
17 . The non-transitory computer readable medium of claim 16 , wherein the generative language machine learning model sequentially outputs the plurality of segments of the product description, each next segment determined by the generative machine learning language model as being associated with a highest probability of being the next segment.
18 . The non-transitory computer readable medium of claim 16 , wherein the instructions, when executed by the computer, further cause the computer to perform operations comprising:
processing an image depicting the product to obtain an attribute related to the product as depicted in the image; and
including, in the content, a particular word or phrase associated with the attribute.
19 . The non-transitory computer readable medium of claim 18 , wherein the instructions, when executed by the computer, further cause the computer to perform operations comprising:
modifying the product description to include the particular word or phrase associated with the attribute.
20 . The non-transitory computer readable medium of claim 18 , wherein the alternative word or phrase that may be substituted in place of the candidate for modification is the particular word or phrase associated with the attribute.