ABSTRACT
Abstract
Methods and systems for prompting a large language model (LLM) to generate a description of an object with indications of any unsubstantiated information are disclosed. A prompt is generated to a LLM to generate a description of an object, where the prompt includes one or more object attributes to include in the generated description. The prompt also includes an instruction for the LLM to annotate any portions of the generated description that are, involve, and/or include unsubstantiated information according to a defined format. The prompt is provided to the LLM and the generated description is received. The generated description is parsed to identify, based on the defined format, one or more annotated portions indicating unsubstantiated information. The generated description is presented for display via a user device.
Description
CROSS-REFERENCE TO RELATED APPLICATIONS
The present disclosure claims priority from U.S. provisional patent No. 63/483,668, filed Feb. 7, 2023, entitled âMETHODS AND SYSTEMS FOR GENERATION OF TEXT USING LARGE LANGUAGE MODEL WITH INDICATIONS OF UNSUBSTANTIATED INFORMATION; and U.S. provisional patent No. 63/482,399, filed Jan. 31, 2023, entitled âMETHODS AND SYSTEMS FOR GENERATION OF TEXT USING LARGE LANGUAGE MODEL WITH INDICATIONS OF ABSENT INFORMATIONâ, the entireties of which are all hereby incorporated by reference.
FIELD
The present disclosure relates to machine learning, and, more particularly, to generation of prompts to large language models (LLM), and, yet more particularly, to prompting an LLM to include indications of unsubstantiated information in the generated text that can be parsed.
BACKGROUND
A large language model (LLM) is a type of machine learning (ML) model that is capable of generating text output, including natural language text output. A LLM may be provided with a prompt, which may be a natural language instruction that instructs the LLM to generate a desired output, including natural language text or other generative output in various desired formats.
SUMMARY
Large language model (LLM)-based services for generating text, in general, may generate an output (e.g., text) that is factually incorrect or otherwise unsubstantiable (sometimes referred to as the âhallucinationâ phenomenon).
A human user may not realize that the generated text contains errors (e.g., the user has not read the text closely or the user does not have access to the facts necessary to identify the errors). Additionally, it may not be practical for a human to closely review every word of a LLM-generated text for potential errors, particularly if the LLM is being used to generate a large number of text outputs.
Conventionally, to generate a description of an object (e.g., a location, an image, a video, a piece of music, a tangible thing, etc.), a user may prompt a LLM to generate an object description. The prompt to the LLM may be simply a list of the object attributes including the object name and optionally other attributes. The prompt may then be inputted into the LLM and the generated text may be directly outputted to the user from the LLM. However, the generated text from the LLM may include text that the LLM is not able to justify or substantiate.
In various examples, the present disclosure provides a technical solution that generates a prompt to cause the LLM to annotate (according to a defined format) any portions of the generated text that were generated with unsubstantiated information. In this way, text that could benefit from human attention can be automatically identified. The LLM is prompted with instructions to annotate the generated text using a defined annotation syntax that can be parsed by a parser, in order to automate or simplify the review process. This reduces the quantity of text that requires close review by a human and reduces the risk of an error being inadvertently missed.
In some examples, the present disclosure provides an automated parser and a user interface (UI) that processes the generated text from the LLM. The UI may provide a convenient way for a user to supply input where there is unsubstantiated information in the generated text, and may enable more efficient user interactions than simply providing a block of editable text. Additionally, the UI may ensure that a user has reviewed/confirmed the generated text before the text is published.
In some examples, the unsubstantiated information in the generated text may be automatically or semi-automatically indicated, completed, substantiated, supplemented, and/or otherwise provided by the disclosed systems and methods. For example, information about an object may be queried and retrieved from an object database to complete or otherwise provide information in place of and/or in addition to the unsubstantiated information (e.g., to complete, substantiate or supplement the unsubstantiated information) in an object description generated by the LLM. This may enable a complete and accurate object description to be automatically or semi-automatically generated, with little or no user input required and with reduced risk of inaccurate information being inadvertently introduced into the object description by the LLM.
In an example aspect, the present disclosure describes a system comprising a processing unit configured to execute computer-readable instructions to cause the system to: generate a prompt to a large language model (LLM) to generate a description of an object, the prompt including one or more object attributes to include in the generated description, and also including an instruction for the LLM to annotate, according to a defined format, any portions of the generated description that include unsubstantiated information; provide the prompt to the LLM and receive the generated description; parse the generated description to identify, based on the defined format, one or more annotated portions indicating unsubstantiated information; and present the generated description for display via a user device.
In an example of the preceding example system, the generated description may be presented in a user interface (UI) in which at least one of the identified one or more annotated portions is modifiable.
In an example of the preceding example system, the processing unit may be configured to execute computer-readable instructions to further cause the system to, prior to presenting the UI: identify, for a given one annotated portion in the generated description, an unsubstantiated object attribute; query a database to search for the unsubstantiated object attribute; modify the generated description by replacing the given one annotated portion with a found object attribute received in a response to the query; and present the modified generated description in the UI.
In an example of the preceding example system, there may be a plurality of found object attributes received in the response to the query, and the generated description may be modified by replacing the given one annotated portion with a UI element for selecting one of the plurality of found object attributes.
In an example of some of the preceding example systems, the UI further may include an input field for receiving user input to edit the one or more annotated portions.
In an example of the preceding example system, the processing unit may be configured to execute computer-readable instructions to further cause the system to: identify at least two annotated portions in the generated description requiring a same user input; provide one input field for receiving user input to edit the at least two annotated portions; and update the at least two annotated portions with information inputted in the one input field.
In an example of any of the preceding example systems, the prompt to the LLM may include at least one example of an annotation according to the defined format.
In an example of the preceding example system, the at least one example may be generated by: retrieving, from a database of the system, an example object description and a set of example object attributes for an example object; modifying the example object description by replacing one selected example object attribute in the example object description with an annotation in accordance with the defined format; modifying the set of example object attributes by removing the one selected example object attribute; and generating the at least one example to include the modified set of example object attributes and the modified example object description.
In an example of any of the preceding example systems, the processing unit may be configured to execute computer-readable instructions to further cause the system to provide the prompt to the LLM as a set of tokens.
In an example of any of the preceding example systems, the LLM may be a trained generative LLM.
In an example of any of the preceding example systems, the prompt to the LLM may include instructions to generate a product description for a product, and the generated description may be the generated product description.
In an example of the preceding example system, the generated product description may be used to update a product page related to the product.
In an example of the preceding example system, the generated product description may be used to update the product page related to the product responsive to an approval received from a user device.
In another example aspect, the present disclosure describes a method including: generating a prompt to a large language model (LLM) to generate a description of an object, the prompt including one or more object attributes to include in the generated description, and also including an instruction for the LLM to annotate, according to a defined format, any portions of the generated description that include unsubstantiated information; providing the prompt to the LLM and receiving the generated description; parsing the generated description to identify, based on the defined format, one or more annotated portions indicating unsubstantiated information; and presenting the generated description for display via a user device.
In an example of the preceding example method, the generated description may be presented in a user interface (UI) in which at least one of the identified one or more annotated portions is modifiable.
In an example of the preceding example method, the method may include, prior to presenting the UI: identifying, for a given one annotated portion in the generated description, an unsubstantiated object attribute; querying a database to search for the unsubstantiated object attribute; modifying the generated description by replacing the given one annotated portion with a found object attribute received in a response to the query; and presenting the modified generated description in the UI.
In an example of the preceding example method, there may be a plurality of found object attributes received in the response to the query, and the generated description may be modified by replacing the given one annotated portion with a UI element for selecting one of the plurality of found object attributes.
In an example of some of the preceding example methods, the UI further may include an input field for receiving user input to edit the one or more annotated portions.
In an example of the preceding example method, the method may include: identifying at least two annotated portions in the generated description requiring a same user input; providing one input field for receiving user input to edit the at least two annotated portions; and updating the at least two annotated portions with information inputted in the one input field.
In an example of any of the preceding example methods, the prompt to the LLM may include at least one example of an annotation according to the defined format.
In an example of the preceding example method, the at least one example may be generated by: retrieving, from a database, an example object description and a set of example object attributes for an example object; modifying the example object description by replacing one selected example object attribute in the example object description with an annotation in accordance with the defined format; modifying the set of example object attributes by removing the one selected example object attribute; and generating the at least one example to include the modified set of example object attributes and the modified example object description.
In an example of any of the preceding example methods, the method may include providing the prompt to the LLM as a set of tokens.
In an example of any of the preceding example methods, the LLM may be a trained generative LLM.
In an example of any of the preceding example methods, the prompt to the LLM may include instructions to generate a product description for a product, and the generated description may be the generated product description.
In an example of the preceding example method, the generated product description may be used to update a product page related to the product.
In an example of the preceding example method, the generated product description may be used to update the product page related to the product responsive to an approval received from a user device.
In another example aspect, the present disclosure describes a non-transitory computer readable medium storing computer-executable instructions thereon, wherein the instructions are executable by a processing unit of a system to cause the system to: generate a prompt to a large language model (LLM) to generate a description of an object, the prompt including one or more object attributes to include in the generated description, and also including an instruction for the LLM to annotate, according to a defined format, any portions of the generated description that include unsubstantiated information; provide the prompt to the LLM and receive the generated description; parse the generated description to identify, based on the defined format, one or more annotated portions indicating unsubstantiated information; and present the generated description for display via a user device.
In an example of the preceding example non-transitory computer readable medium, the generated description may be presented in a user interface (UI) in which at least one of the identified one or more annotated portions is modifiable.
In an example of the preceding example non-transitory computer readable medium, the instructions may be executable by the processing unit to further cause the system to, prior to presenting the UI: identify, for a given one annotated portion in the generated description, an unsubstantiated object attribute; query a database to search for the unsubstantiated object attribute; modify the generated description by replacing the given one annotated portion with a found object attribute received in a response to the query; and present the modified generated description in the UI.
In an example of the preceding example non-transitory computer readable medium, there may be a plurality of found object attributes received in the response to the query, and the generated description may be modified by replacing the given one annotated portion with a UI element for selecting one of the plurality of found object attributes.
In an example of some of the preceding example non-transitory computer readable media, the UI further may include an input field for receiving user input to edit the one or more annotated portions.
In an example of the preceding example non-transitory computer readable medium, the instructions may be executable by the processing unit to further cause the system to: identify at least two annotated portions in the generated description requiring a same user input; provide one input field for receiving user input to edit the at least two annotated portions; and update the at least two annotated portions with information inputted in the one input field.
In an example of any of the preceding example non-transitory computer readable media, the prompt to the LLM includes at least one example of an annotation according to the defined format.
In an example of the preceding example non-transitory computer readable medium, the at least one example may be generated by: retrieving, from a database of the system, an example object description and a set of example object attributes for an example object; modifying the example object description by replacing one selected
CROSS-REFERENCE TO RELATED APPLICATIONS
The present disclosure claims priority from U.S. provisional patent No. 63/483,668, filed Feb. 7, 2023, entitled âMETHODS AND SYSTEMS FOR GENERATION OF TEXT USING LARGE LANGUAGE MODEL WITH INDICATIONS OF UNSUBSTANTIATED INFORMATION; and U.S. provisional patent No. 63/482,399, filed Jan. 31, 2023, entitled âMETHODS AND SYSTEMS FOR GENERATION OF TEXT USING LARGE LANGUAGE MODEL WITH INDICATIONS OF ABSENT INFORMATIONâ, the entireties of which are all hereby incorporated by reference.
FIELD
The present disclosure relates to machine learning, and, more particularly, to generation of prompts to large language models (LLM), and, yet more particularly, to prompting an LLM to include indications of unsubstantiated information in the generated text that can be parsed.
BACKGROUND
A large language model (LLM) is a type of machine learning (ML) model that is capable of generating text output, including natural language text output. A LLM may be provided with a prompt, which may be a natural language instruction that instructs the LLM to generate a desired output, including natural language text or other generative output in various desired formats.
SUMMARY
Large language model (LLM)-based services for generating text, in general, may generate an output (e.g., text) that is factually incorrect or otherwise unsubstantiable (sometimes referred to as the âhallucinationâ phenomenon).
A human user may not realize that the generated text contains errors (e.g., the user has not read the text closely or the user does not have access to the facts necessary to identify the errors). Additionally, it may not be practical for a human to closely review every word of a LLM-generated text for potential errors, particularly if the LLM is being used to generate a large number of text outputs.
Conventionally, to generate a description of an object (e.g., a location, an image, a video, a piece of music, a tangible thing, etc.), a user may prompt a LLM to generate an object description. The prompt to the LLM may be simply a list of the object attributes including the object name and optionally other attributes. The prompt may then be inputted into the LLM and the generated text may be directly outputted to the user from the LLM. However, the generated text from the LLM may include text that the LLM is not able to justify or substantiate.
In various examples, the present disclosure provides a technical solution that generates a prompt to cause the LLM to annotate (according to a defined format) any portions of the generated text that were generated with unsubstantiated information. In this way, text that could benefit from human attention can be automatically identified. The LLM is prompted with instructions to annotate the generated text using a defined annotation syntax that can be parsed by a parser, in order to automate or simplify the review process. This reduces the quantity of text that requires close review by a human and reduces the risk of an error being inadvertently missed.
In some examples, the present disclosure provides an automated parser and a user interface (UI) that processes the generated text from the LLM. The UI may provide a convenient way for a user to supply input where there is unsubstantiated information in the generated text, and may enable more efficient user interactions than simply providing a block of editable text. Additionally, the UI may ensure that a user has reviewed/confirmed the generated text before the text is published.
In some examples, the unsubstantiated information in the generated text may be automatically or semi-automatically indicated, completed, substantiated, supplemented, and/or otherwise provided by the disclosed systems and methods. For example, information about an object may be queried and retrieved from an object database to complete or otherwise provide information in place of and/or in addition to the unsubstantiated information (e.g., to complete, substantiate or supplement the unsubstantiated information) in an object description generated by the LLM. This may enable a complete and accurate object description to be automatically or semi-automatically generated, with little or no user input required and with reduced risk of inaccurate information being inadvertently introduced into the object description by the LLM.
In an example aspect, the present disclosure describes a system comprising a processing unit configured to execute computer-readable instructions to cause the system to: generate a prompt to a large language model (LLM) to generate a description of an object, the prompt including one or more object attributes to include in the generated description, and also including an instruction for the LLM to annotate, according to a defined format, any portions of the generated description that include unsubstantiated information; provide the prompt to the LLM and receive the generated description; parse the generated description to identify, based on the defined format, one or more annotated portions indicating unsubstantiated information; and present the generated description for display via a user device.
In an example of the preceding example system, the generated description may be presented in a user interface (UI) in which at least one of the identified one or more annotated portions is modifiable.
In an example of the preceding example system, the processing unit may be configured to execute computer-readable instructions to further cause the system to, prior to presenting the UI: identify, for a given one annotated portion in the generated description, an unsubstantiated object attribute; query a database to search for the unsubstantiated object attribute; modify the generated description by replacing the given one annotated portion with a found object attribute received in a response to the query; and present the modified generated description in the UI.
In an example of the preceding example system, there may be a plurality of found object attributes received in the response to the query, and the generated description may be modified by replacing the given one annotated portion with a UI element for selecting one of the plurality of found object attributes.
In an example of some of the preceding example systems, the UI further may include an input field for receiving user input to edit the one or more annotated portions.
In an example of the preceding example system, the processing unit may be configured to execute computer-readable instructions to further cause the system to: identify at least two annotated portions in the generated description requiring a same user input; provide one input field for receiving user input to edit the at least two annotated portions; and update the at least two annotated portions with information inputted in the one input field.
In an example of any of the preceding example systems, the prompt to the LLM may include at least one example of an annotation according to the defined format.
In an example of the preceding example system, the at least one example may be generated by: retrieving, from a database of the system, an example object description and a set of example object attributes for an example object; modifying the example object description by replacing one selected example object attribute in the example object description with an annotation in accordance with the defined format; modifying the set of example object attributes by removing the one selected example object attribute; and generating the at least one example to include the modified set of example object attributes and the modified example object description.
In an example of any of the preceding example systems, the processing unit may be configured to execute computer-readable instructions to further cause the system to provide the prompt to the LLM as a set of tokens.
In an example of any of the preceding example systems, the LLM may be a trained generative LLM.
In an example of any of the preceding example systems, the prompt to the LLM may include instructions to generate a product description for a product, and the generated description may be the generated product description.
In an example of the preceding example system, the generated product description may be used to update a product page related to the product.
In an example of the preceding example system, the generated product description may be used to update the product page related to the product responsive to an approval received from a user device.
In another example aspect, the present disclosure describes a method including: generating a prompt to a large language model (LLM) to generate a description of an object, the prompt including one or more object attributes to include in the generated description, and also including an instruction for the LLM to annotate, according to a defined format, any portions of the generated description that include unsubstantiated information; providing the prompt to the LLM and receiving the generated description; parsing the generated description to identify, based on the defined format, one or more annotated portions indicating unsubstantiated information; and presenting the generated description for display via a user device.
In an example of the preceding example method, the generated description may be presented in a user interface (UI) in which at least one of the identified one or more annotated portions is modifiable.
In an example of the preceding example method, the method may include, prior to presenting the UI: identifying, for a given one annotated portion in the generated description, an unsubstantiated object attribute; querying a database to search for the unsubstantiated object attribute; modifying the generated description by replacing the given one annotated portion with a found object attribute received in a response to the query; and presenting the modified generated description in the UI.
In an example of the preceding example method, there may be a plurality of found object attributes received in the response to the query, and the generated description may be modified by replacing the given one annotated portion with a UI element for selecting one of the plurality of found object attributes.
In an example of some of the preceding example methods, the UI further may include an input field for receiving user input to edit the one or more annotated portions.
In an example of the preceding example method, the method may include: identifying at least two annotated portions in the generated description requiring a same user input; providing one input field for receiving user input to edit the at least two annotated portions; and updating the at least two annotated portions with information inputted in the one input field.
In an example of any of the preceding example methods, the prompt to the LLM may include at least one example of an annotation according to the defined format.
In an example of the preceding example method, the at least one example may be generated by: retrieving, from a database, an example object description and a set of example object attributes for an example object; modifying the example object description by replacing one selected example object attribute in the example object description with an annotation in accordance with the defined format; modifying the set of example object attributes by removing the one selected example object attribute; and generating the at least one example to include the modified set of example object attributes and the modified example object description.
In an example of any of the preceding example methods, the method may include providing the prompt to the LLM as a set of tokens.
In an example of any of the preceding example methods, the LLM may be a trained generative LLM.
In an example of any of the preceding example methods, the prompt to the LLM may include instructions to generate a product description for a product, and the generated description may be the generated product description.
In an example of the preceding example method, the generated product description may be used to update a product page related to the product.
In an example of the preceding example method, the generated product description may be used to update the product page related to the product responsive to an approval received from a user device.
In another example aspect, the present disclosure describes a non-transitory computer readable medium storing computer-executable instructions thereon, wherein the instructions are executable by a processing unit of a system to cause the system to: generate a prompt to a large language model (LLM) to generate a description of an object, the prompt including one or more object attributes to include in the generated description, and also including an instruction for the LLM to annotate, according to a defined format, any portions of the generated description that include unsubstantiated information; provide the prompt to the LLM and receive the generated description; parse the generated description to identify, based on the defined format, one or more annotated portions indicating unsubstantiated information; and present the generated description for display via a user device.
In an example of the preceding example non-transitory computer readable medium, the generated description may be presented in a user interface (UI) in which at least one of the identified one or more annotated portions is modifiable.
In an example of the preceding example non-transitory computer readable medium, the instructions may be executable by the processing unit to further cause the system to, prior to presenting the UI: identify, for a given one annotated portion in the generated description, an unsubstantiated object attribute; query a database to search for the unsubstantiated object attribute; modify the generated description by replacing the given one annotated portion with a found object attribute received in a response to the query; and present the modified generated description in the UI.
In an example of the preceding example non-transitory computer readable medium, there may be a plurality of found object attributes received in the response to the query, and the generated description may be modified by replacing the given one annotated portion with a UI element for selecting one of the plurality of found object attributes.
In an example of some of the preceding example non-transitory computer readable media, the UI further may include an input field for receiving user input to edit the one or more annotated portions.
In an example of the preceding example non-transitory computer readable medium, the instructions may be executable by the processing unit to further cause the system to: identify at least two annotated portions in the generated description requiring a same user input; provide one input field for receiving user input to edit the at least two annotated portions; and update the at least two annotated portions with information inputted in the one input field.
In an example of any of the preceding example non-transitory computer readable media, the prompt to the LLM includes at least one example of an annotation according to the defined format.
In an example of the preceding example non-transitory computer readable medium, the at least one example may be generated by: retrieving, from a database of the system, an example object description and a set of example object attributes for an example object; modifying the example object description by replacing one selected example object attribute in the example object description with an annotation in accordance with the defined format; modifying the set of example object attributes by removing the one selected example object attribute; and generating the at least one example to include the modified set of example object attributes and the modified example object description.
In an example of any of the preceding example non-transitory computer readable media, the instructions may be executable by the processing unit to further cause the system to provide the prompt to the LLM as a set of tokens.
In an example of any of the preceding example non-transitory computer readable media, the LLM may be a trained generative LLM.
In an example of any of the preceding example non-transitory computer readable media, the prompt to the LLM may include instructions to generate a product description for a product, and the generated description may be the generated product description.
In an example of the preceding example non-transitory computer readable medium, the generated product description may be used to update a product page related to the product.
In an example of the preceding example non-transitory computer readable medium, the generated product description may be used to update the product page related to the product responsive to an approval received from a user device.
BRIEF DESCRIPTION OF THE DRAWINGS
Reference will now be made, by way of example, to the accompanying drawings which show example embodiments of the present application, and in which:
FIG. 1 A is a block diagram of a simplified convolutional neural network, which may be used in examples of the present disclosure;
FIG. 1 B is a block diagram of a simplified transformer neural network, which may be used in examples of the present disclosure;
FIG. 2 is a block diagram of an example computing system, which may be used to implement examples of the present disclosure;
FIGS. 3 A- 3 D are example UIs that may be provided in accordance with examples of the present disclosure;
FIG. 4 is a flowchart illustrating an example method for prompting a LLM, in accordance with examples of the present disclosure;
FIG. 5 is a block diagram of an example e-commerce platform, which may be an example implementation of the examples disclosed herein; and
FIG. 6 is an example homepage of an administrator, which may be accessed via the e-commerce platform of FIG. 5 .
Similar reference numerals may have been used in different figures to denote similar components.
DETAILED DESCRIPTION
To assist in understanding the present disclosure, some concepts relevant to neural networks and machine learning (ML) are first discussed.
Generally, a neural network comprises a number of computation units (sometimes referred to as âneuronsâ). Each neuron receives an input value and applies a function to the input to generate an output value. The function typically includes a parameter (also referred to as a âweightâ) whose value is learned through the process of training. A plurality of neurons may be organized into a neural network layer (or simply âlayerâ) and there may be multiple such layers in a neural network. The output of one layer may be provided as input to a subsequent layer. Thus, input to a neural network may be processed through a succession of layers until an output of the neural network is generated by a final layer. This is a simplistic discussion of neural networks and there may be more complex neural network designs that include feedback connections, skip connections, and/or other such possible connections between neurons and/or layers, which need not be discussed in detail here.
A deep neural network (DNN) is a type of neural network having multiple layers and/or a large number of neurons. The term DNN may encompass any neural network having multiple layers, including convolutional neural networks (CNNs), recurrent neural networks (RNNs), and multilayer perceptrons (MLPs), among others.
DNNs are often used as ML-based models for modeling complex behaviors (e.g., human language, image recognition, object classification, etc.) in order to improve accuracy of outputs (e.g., more accurate predictions) such as, for example, as compared with models with fewer layers. In the present disclosure, the term âML-based modelâ or more simply âML modelâ may be understood to refer to a DNN. Training a ML model refers to a process of learning the values of the parameters (or weights) of the neurons in the layers such that the ML model is able to model the target behavior to a desired degree of accuracy. Training typically requires the use of a training dataset, which is a set of data that is relevant to the target behavior of the ML model. For example, to train a ML model that is intended to model human language (also referred to as a language model), the training dataset may be a collection of text documents, referred to as a text corpus (or simply referred to as a corpus). The corpus may represent a language domain (e.g., a single language), a subject domain (e.g., scientific papers), and/or may encompass another domain or domains, be they larger or smaller than a single language or subject domain. For example, a relatively large, multilingual and non-subject-specific corpus may be created by extracting text from online webpages and/or publicly available social media posts. In another example, to train a ML model that is intended to classify images, the training dataset may be a collection of images. Training data may be annotated with ground truth labels (e.g. each data entry in the training dataset may be paired with a label), or may be unlabeled.
Training a ML model generally involves inputting into an ML model (e.g. an untrained ML model) training data to be processed by the ML model, processing the training data using the ML model, collecting the output generated by the ML model (e.g. based on the inputted training data), and comparing the output to a desired set of target values. If the training data is labeled, the desired target values may be, e.g., the ground truth labels of the training data. If the training data is unlabeled, the desired target value may be a reconstructed (or otherwise processed) version of the corresponding ML model input (e.g., in the case of an autoencoder), or may be a measure of some target observable effect on the environment (e.g., in the case of a reinforcement learning agent). The parameters of the ML model are updated based on a difference between the generated output value and the desired target value. For example, if the value outputted by the ML model is excessively high, the parameters may be adjusted so as to lower the output value in future training iterations. An objective function is a way to quantitatively represent how close the output value is to the target value. An objective function represents a quantity (or one or more quantities) to be optimized (e.g., minimize a loss or maximize a reward) in order to bring the output value as close to the target value as possible. The goal of training the ML model typically is to minimize a loss function or maximize a reward function.
The training data may be a subset of a larger data set. For example, a data set may be split into three mutually exclusive subsets: a training set, a validation (or cross-validation) set, and a testing set. The three subsets of data may be used sequentially during ML model training. For example, the training set may be first used to train one or more ML models, each ML model, e.g., having a particular architecture, having a particular training procedure, being describable by a set of model hyperparameters, and/or otherwise being varied from the other of the one or more ML models. The validation (or cross-validation) set may then be used as input data into the trained ML models to, e.g., measure the performance of the trained ML models and/or compare performance between them. Where hyperparameters are used, a new set of hyperparameters may be determined based on the measured performance of one or more of the trained ML models, and the first step of training (i.e., with the training set) may begin again on a different ML model described by the new set of determined hyperparameters. In this way, these steps may be repeated to produce a more performant trained ML model. Once such a trained ML model is obtained (e.g., after the hyperparameters have been adjusted to achieve a desired level of performance), a third step of collecting the output generated by the trained ML model applied to the third subset (the testing set) may begin. The output generated from the testing set may be compared with the corresponding desired target values to give a final assessment of the trained ML model's accuracy. Other segmentations of the larger data set and/or schemes for using the segments for training one or more ML models are possible.
Backpropagation is an algorithm for training a ML model. Backpropagation is used to adjust (also referred to as update) the value of the parameters in the ML model, with the goal of optimizing the objective function. For example, a defined loss function is calculated by forward propagation of an input to obtain an output of the ML model and comparison of the output value with the target value. Backpropagation calculates a gradient of the loss function with respect to the parameters of the ML model, and a gradient algorithm (e.g., gradient descent) is used to update (i.e., âlearnâ) the parameters to reduce the loss function. Backpropagation is performed iteratively, so that the loss function is converged or minimized. Other techniques for learning the parameters of the ML model may be used. The process of updating (or learning) the parameters over many iterations is referred to as training. Training may be carried out iteratively until a convergence condition is met (e.g., a predefined maximum number of iterations has been performed, or the value outputted by the ML model is sufficiently converged with the desired target value), after which the ML model is considered to be sufficiently trained. The values of the learned parameters may then be fixed and the ML model may be deployed to generate output in real-world applications (also referred to as âinferenceâ).
In some examples, a trained ML model may be fine-tuned, meaning that the values of the learned parameters may be adjusted slightly in order for the ML model to better model a specific task. Fine-tuning of a ML model typically involves further training the ML model on a number of data samples (which may be smaller in number/cardinality than those used to train the model initially) that closely target the specific task. For example, a ML model for generating natural language that has been trained generically on publically-available text corpuses may be, e.g., fine-tuned by further training using the complete works of Shakespeare as training data samples (e.g., where the intended use of the ML model is generating a scene of a play or other textual content in the style of Shakespeare).
FIG. 1 A is a simplified diagram of an example CNN 10 , which is an example of a DNN that is commonly used for image processing tasks such as image classification, image analysis, object segmentation, etc. An input to the CNN 10 may be a 2D RGB image 12 .
The CNN 10 includes a plurality of layers that process the image 12 in order to generate an output, such as a predicted classification or predicted label for the image 12 . For simplicity, only a few layers of the CNN 10 are illustrated including at least one convolutional layer 14 . The convolutional layer 14 performs convolution processing, which may involve computing a dot product between the input to the convolutional layer 14 and a convolution kernel. A convolutional kernel is typically a 2D matrix of learned parameters that is applied to the input in order to extract image features. Different convolutional kernels may be applied to extract different image information, such as shape information, color information, etc.
The output of the convolution layer 14 is a set of feature maps 16 (sometimes referred to as activation maps). Each feature map 16 generally has smaller width and height than the image 12 . The set of feature maps 16 encode image features that may be processed by subsequent layers of the CNN 10 , depending on the design and intended task for the CNN 10 . In this example, a fully connected layer 18 processes the set of feature maps 16 in order to perform a classification of the image, based on the features encoded in the set of feature maps 16 . The fully connected layer 18 contains learned parameters that, when applied to the set of feature maps 16 , outputs a set of probabilities representing the likelihood that the image 12 belongs to each of a defined set of possible classes. The class having the highest probability may then be outputted as the predicted classification for the image 12 .
In general, a CNN may have different numbers and different types of layers, such as multiple convolution layers, max-pooling layers and/or a fully connected layer, among others. The parameters of the CNN may be learned through training, using data having ground truth labels specific to the desired task (e.g., class labels if the CNN is being trained for a classification task, pixel masks if the CNN is being trained for a segmentation task, text annotations if the CNN is being trained for a captioning task, etc.), as discussed above.
Some concepts in ML-based language models are now discussed. It may be noted that, while the term âlanguage modelâ has been commonly used to refer to a ML-based language model, there could exist non-ML language models. In the present disclosure, the term âlanguage modelâ may be used as shorthand for ML-based language model (i.e., a language model that is implemented using a neural network or other ML architecture), unless stated otherwise. For example, unless stated otherwise, âlanguage modelâ encompasses LLMs.
A language model may use a neural network (typically a DNN) to perform natural language processing (NLP) tasks such as language translation, image captioning, grammatical error correction, and language generation, among others. A language model may be trained to model how words relate to each other in a textual sequence, based on probabilities. A language model may contain hundreds of thousands of learned parameters or in the case of a large language model (LLM) may contain millions or billions of learned parameters or more.
In recent years, there has been interest in a type of neural network architecture, referred to as a transformer, for use as language models. For example, the Bidirectional Encoder Representations from Transformers (BERT) model, the Transformer-XL model and the Generative Pre-trained Transformer (GPT) models are types of transformers. A transformer is a type of neural network architecture that uses self-attention mechanisms in order to generate predicted output based on input data that has some sequential meaning (i.e., the order of the input data is meaningful, which is the case for most text input). Although transformer-based language models are described herein, it should be understood that the present disclosure may be applicable to any ML-based language model, including language models based on other neural network architectures such as recurrent neural network (RNN)-based language models.
FIG. 1 B is a simplified diagram of an example transformer 50 , and a simplified discussion of its operation is now provided. The transformer 50 includes an encoder 52 (which may comprise one or more encoder layers/blocks connected in series) and a decoder 54 (which may comprise one or more decoder layers/blocks connected in series). Generally, the encoder 52 and the decoder 54 each include a plurality of neural network layers, at least one of which may be a self-attention layer. The parameters of the neural network layers may be referred to as the parameters of the language model.
The transformer 50 may be trained on a text corpus that is labelled (e.g., annotated to indicate verbs, nouns, etc.) or unlabelled. LLMs may be trained on a large unlabelled corpus. Some LLMs may be trained on a large multi-language, multi-domain corpus, to enable the model to be versatile at a variety of language-based tasks such as generative tasks (e.g., generating human-like natural language responses to natural language input).
An example of how the transformer 50 may process textual input data is now described. Input to a language model (whether transformer-based or otherwise) typically is in the form of natural language as may be parsed into tokens. It should be appreciated that the term âtokenâ in the context of language models and NLP has a different meaning from the use of the same term in other contexts such as data security. Tokenization, in the context of language models and NLP, refers to the process of parsing textual input (e.g., a character, a word, a phrase, a sentence, a paragraph, etc.) into a sequence of shorter segments that are converted to numerical representations referred to as tokens (or âcompute tokensâ). Typically, a token may be an integer that corresponds to the index of a text segment (e.g., a word) in a vocabulary dataset. Often, the vocabulary dataset is arranged by frequency of use. Commonly occurring text, such as punctuation, may have a lower vocabulary index in the dataset and thus be represented by a token having a smaller integer value than less commonly occurring text. Tokens frequently correspond to words, with or without whitespace appended. In some examples, a token may correspond to a portion of a word. For example, the word âlowerâ may be represented by a token for [low] and a second token for [er]. In another example, the text sequence âCome here, look!â may be parsed into the segments [Come], [here], [,], [look] and [!], each of which may be represented by a respective numerical token. In addition to tokens that are parsed from the textual sequence (e.g., tokens that correspond to words and punctuation), there may also be special tokens to encode non-textual information. For example, a [CLASS] token may be a special token that corresponds to a classification of the textual sequence (e.g., may classify the textual sequence as a poem, a list, a paragraph, etc.), a [EOT] token may be another special token that indicates the end of the textual sequence, other tokens may provide formatting information, etc.
In FIG. 1 B , a short sequence of tokens 56 corresponding to the text sequence âCome here, look!â is illustrated as input to the transformer 50 . Tokenization of the text sequence into the tokens 56 may be performed by some pre-processing tokenization module such as, for example, a byte pair encoding tokenizer (the âpreâ referring to the tokenization occurring prior to the processing of the tokenized input by the LLM), which is not shown in FIG. 1 B for simplicity. In general, the token sequence that is inputted to the transformer 50 may be of any length up to a maximum length defined based on the dimensions of the transformer 50 (e.g., such a limit may be 2048 tokens in some LLMs). Each token 56 in the token sequence is converted into an embedding vector 60 (also referred to simply as an embedding). An embedding 60 is a learned numerical representation (such as, for example, a vector) of a token that captures some semantic meaning of the text segment represented by the token 56 . The embedding 60 represents the text segment corresponding to the token 56 in a way such that embeddings corresponding to semantically-related text are closer to each other in a vector space than embeddings corresponding to semantically-unrelated text. For example, assuming that the words âlookâ, âseeâ, and âcakeâ each correspond to, respectively, a âlookâ token, a âseeâ token, and a âcakeâ token when tokenized, the embedding 60 corresponding to the âlookâ token will be closer to another embedding corresponding to the âseeâ token in the vector space, as compared to the distance between the embedding 60 corresponding to the âlookâ token and another embedding corresponding to the âcakeâ token. The vector space may be defined by the dimensions and values of the embedding vectors. Various techniques may be used to convert a token 56 to an embedding 60 . For example, another trained ML model may be used to convert the token 56 into an embedding 60 . In particular, another trained ML model may be used to convert the token 56 into an embedding 60 in a way that encodes additional information into the embedding 60 (e.g., a trained ML model may encode positional information about the position of the token 56 in the text sequence into the embedding 60 ). In some examples, the numerical value of the token 56 may be used to look up the corresponding embedding in an embedding matrix 58 (which may be learned during training of the transformer 50 ).
The generated embeddings 60 are input into the encoder 52 . The encoder 52 serves to encode the embeddings 60 into feature vectors 62 that represent the latent features of the embeddings 60 . The encoder 52 may encode positional information (i.e., information about the sequence of the input) in the feature vectors 62 . The feature vectors 62 may have very high dimensionality (e.g., on the order of thousands or tens of thousands), with each element in a feature vector 62 corresponding to a respective feature. The numerical weight of each element in a feature vector 62 represents the importance of the corresponding feature. The space of all possible feature vectors 62 that can be generated by the encoder 52 may be referred to as the latent space or feature space.
Conceptually, the decoder 54 is designed to map the features represented by the feature vectors 62 into meaningful output, which may depend on the task that was assigned to the transformer 50 . For example, if the transformer 50 is used for a translation task, the decoder 54 may map the feature vectors 62 into text output in a target language different from the language of the original tokens 56 . Generally, in a generative language model, the decoder 54 serves to decode the feature vectors 62 into a sequence of tokens. The decoder 54 may generate output tokens 64 one by one. Each output token 64 may be fed back as input to the decoder 54 in order to generate the next output token 64 . By feeding back the generated output and applying self-attention, the decoder 54 is able to generate a sequence of output tokens 64 that has sequential meaning (e.g., the resulting output text sequence is understandable as a sentence and obeys grammatical rules). The decoder 54 may generate output tokens 64 until a special [EOT] token (indicating the end of the text) is generated. The resulting sequence of output tokens 64 may then be converted to a text sequence in post-processing. For example, each output token 64 may be an integer number that corresponds to a vocabulary index. By looking up the text segment using the vocabulary index, the text segment corresponding to each output token 64 can be retrieved, the text segments can be concatenated together and the final output text sequence (in this example, âViens ici, regarde!â) can be obtained.
Although a general transformer architecture for a language model and its theory of operation have been described above, this is not intended to be limiting. Existing language models include language models that are based only on the encoder of the transformer or only on the decoder of the transformer. An encoder-only language model encodes the input text sequence into feature vectors that can then be further processed by a task-specific layer (e.g., a classification layer). BERT is an example of a language model that may be considered to be an encoder-only language model. A decoder-only language model accepts embeddings as input and may use auto-regression to generate an output text sequence. Transformer-XL and GPT-type models may be language models that are considered to be decoder-only language models.
Because GPT-type language models tend to have a large number of parameters, these language models may be considered LLMs. An example GPT-type LLM is GPT-3. GPT-3 is a type of GPT language model that has been trained (in an unsupervised manner) on a large corpus derived from documents available to the public online. GPT-3 has a very large number of learned parameters (on the order of hundreds of billions), is able to accept a large number of tokens as input (e.g., up to 2048 input tokens), and is able to generate a large number of tokens as output (e.g., up to 2048 tokens). GPT-3 has been trained as a generative model, meaning that it can process input text sequences to predictively generate a meaningful output text sequence. ChatGPT is built on top of a GPT-type LLM, and has been fine-tuned with training datasets based on text-based chats (e.g., chatbot conversations). ChatGPT is designed for processing natural language, receiving chat-like inputs and generating chat-like outputs.
A computing system may access a remote language model (e.g., a cloud-based language model), such as ChatGPT or GPT-3, via a software interface (e.g., an application programming interface (API)). Additionally or alternatively, such a remote language model may be accessed via a network such as, for example, the Internet. In some implementations such as, for example, potentially in the case of a cloud-based language model, a remote language model may be hosted by a computer system as may include a plurality of cooperating (e.g., cooperating via a network) computer systems such as may be in, for example, a distributed arrangement. Notably, a remote language model may employ a plurality of processors (e.g., hardware processors such as, for example, processors of cooperating computer systems). Indeed, processing of inputs by an LLM may be computationally expensive/may involve a large number of operations (e.g., many instructions may be executed/large data structures may be accessed from memory) and providing output in a required timeframe (e.g., real-time or near real-time) may require the use of a plurality of processors/cooperating computing devices as discussed above.
Inputs to an LLM may be referred to as a prompt, which is a natural language input that includes instructions to the LLM to generate a desired output. A computing system may generate a prompt that is provided as input to the LLM via its API. As described above, the prompt may optionally be processed or pre-processed into a token sequence prior to being provided as input to the LLM via its API. A prompt can include one or more examples of the desired output, which provides the LLM with additional information to enable the LLM to better generate output according to the desired output. Additionally or alternatively, the examples included in a prompt may provide inputs (e.g., example inputs) corresponding to/as may be expected to result in the desired outputs provided. A one-shot prompt refers to a prompt that includes one example, and a few-shot prompt refers to a prompt that includes multiple examples. A prompt that includes no examples may be referred to as a zero-shot prompt.
FIG. 2 illustrates an example computing system 400 , which may be used to implement examples of the present disclosure, such as a prompt generation engine to generate prompts to be provided as input to a language model such as a LLM. Additionally or alternatively, one or more instances of the example computing system 400 may be employed to execute the LLM. For example, a plurality of instances of the example computing system 400 may cooperate to provide output using an LLM in manners as discussed above.
The example computing system 400 includes at least one processing unit, such as a processor 402 , and at least one physical memory 404 . The processor 402 may be, for example, a central processing unit, a microprocessor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a dedicated logic circuitry, a dedicated artificial intelligence processor unit, a graphics processing unit (GPU), a tensor processing unit (TPU), a neural processing unit (NPU), a hardware accelerator, or combinations thereof. The memory 404 may include a volatile or non-volatile memory (e.g., a flash memory, a random access memory (RAM), and/or a read-only memory (ROM)). The memory 404 may store instructions for execution by the processor 402 , to the computing system 400 to carry out examples of the methods, functionalities, systems and modules disclosed herein.
The computing system 400 may also include at least one network interface 406 for wired and/or wireless communications with an external system and/or network (e.g., an intranet, the Internet, a P2P network, a WAN and/or a LAN). A network interface may enable the computing system 400 to carry out communications (e.g., wireless communications) with systems external to the computing system 400 , such as a language model residing on a remote system.
The computing system 400 may optionally include at least one input/output (I/O) interface 408 , which may interface with optional input device(s) 410 and/or optional output device(s) 412 . Input device(s) 410 may include, for example, buttons, a microphone, a touchscreen, a keyboard, etc. Output device(s) 412 may include, for example, a display, a speaker, etc. In this example, optional input device(s) 410 and optional output device(s) 412 are shown external to the computing system 400 . In other examples, one or more of the input device(s) 410 and/or output device(s) 412 may be an internal component of the computing system 400 .
A computing system, such as the computing system 400 of FIG. 2 , may access a remote system (e.g., a cloud-based system) to communicate with a remote language model or LLM hosted on the remote system such as, for example, using an application programming interface (API) call. The API call may include an API key to enable the computing system to be identified by the remote system. The API call may also include an identification of the language model or LLM to be accessed and/or parameters for adjusting outputs generated by the language model or LLM, such as, for example, one or more of a temperature parameter (which may control the amount of randomness or âcreativityâ of the generated output) (and/or, more generally some form of random seed as serves to introduce variability or variety into the output of the LLM), a minimum length of the output (e.g., a minimum of 10 tokens) and/or a maximum length of the output (e.g., a maximum of 1000 tokens), a frequency penalty parameter (e.g., a parameter which may lower the likelihood of subsequently outputting a word based on the number of times that word has already been output), a âbest ofâ parameter (e.g., a parameter to control the number of times the model will use to generate output after being instructed to, e.g., produce several outputs based on slightly varied inputs). The prompt generated by the computing system is provided to the language model or LLM and the output (e.g., token sequence) generated by the language model or LLM is communicated back to the computing system. In other examples, the prompt may be provided directly to the language model or LLM without requiring an API call. For example, the prompt could be sent to a remote LLM via a network such as, for example, as or in message (e.g., in a payload of a message).
In the example of FIG. 2 , the computing system 400 may store in the memory 404 computer-executable instructions, which may be executed by a processing unit such as the processor 402 , to implement one or more embodiments disclosed herein. For example, the memory 404 may store instructions for implementing prompt generator 500 and/or text-editor 550 applications. In some examples, the computing system 400 may be a server of an online platform that provides the prompt generator 500 and text-editor 550 as web-based or cloud-based services that may be accessible by a user device (e.g., via communications over a wireless network). In some examples, the computing system 400 may be a user device that provides the text-editor 550 as a software application while another embodiment of the computing system 400 may be a server of the online platform that provides the prompt generator 500 . Other such variations may be possible without departing from the subject matter of the present application.
In the example shown, the computing system 400 may store, in the storage unit 414 , an optional object database 560 storing data about a plurality of objects. For example, the object database 560 may include, for each object, data about one or more object attributes (e.g., object name, object size, object type, object features, etc.). Object attribute(s) for a given object may for example, be stored in a lookup table that can be referenced using the name of the object, a unique identifier (e.g., identification number) of the object, etc. Each object attribute of a given object may be stored as a text string (which may include one or more words). It should be noted that the object database 560 may store other data related to each object, such as an image of the object, a user or account associated with the object, etc.
The data stored in the object database 560 may be labeled by category. It may be noted that the stored data may be unstructured. Additionally, instead of being labeled by category, the data may be labeled by fields or types. For example, each object may have at least an object attribute in the category [object name]. Additional object attributes may include attributes in categories such as [color], [owner], [size], etc. As an example, the object database 560 may store the following object attributes related to a chair: [object name] âergonomic chairâ, [color] âblackâ, [material] âleatherâ.
The object database 560 may be queried by, for example, the prompt generator 500 and/or the text-editor 550 , as discussed further below. In some examples, the object database 560 may not be stored locally on the computing system 400 but may instead be a remote database accessible by the computing system 400 (e.g., via a wired or wireless communication link, for example using the network interface 406 ).
In various examples, the present disclosure provides methods and systems for prompting a LLM to generate a text, such as an object description, in which any portions of the text that were generated with unsubstantiated information are annotated according to a defined format. The generated text may be parsed, based on the defined format, to identify any text portions that are, involve, and/or include unsubstantiated information. This may enable computer-assisted completion of the generated text using accurate information and may avoid the inadvertent inclusion of inaccurate information in the generated text.
To assist in understanding the present disclosure, the hallucination phenomenon is first discussed. In ML-based models (including LLMs), the term hallucination may refer to output that is generated by the trained model that appears to be correct for the task (e.g., fits expected sentence structure and rules of grammar, in the case of a text generation task) but that is actually not justified or substantiated by the training data (or by data otherwise input into or available to the LLM). The present disclosure addresses this problem in the context of LLMs, however it should be understood that examples disclosed herein may be used to address the challenge of hallucination in other types of ML-based models.
There may be different reasons why a LLM generates text with u
CLAIMS
Claims ( 24 )
The invention claimed is:
1 . A system comprising:
a processing unit configured to execute computer-readable instructions to cause the system to:
generate a prompt to a large language model (LLM) to generate a description of an object, the prompt including one or more object attributes to include in the generated description, and also including an instruction for the LLM to annotate, according to a defined format, any portions of the generated description that include unsubstantiated information;
provide the prompt to the LLM;
causing the LLM to generate the generated description; receive the generated description;
parse the generated description to identify, based on the defined format, one or more annotated portions indicating unsubstantiated information; and
present the generated description for display via a user device.
2 . The system of claim 1 , wherein the generated description is presented in a user interface (UI) in which at least one of the identified one or more annotated portions is modifiable.
3 . The system of claim 2 , wherein the processing unit is configured to execute computer-readable instructions to further cause the system to, prior to presenting the UI:
identify, for a given one annotated portion in the generated description, an unsubstantiated object attribute; query a database to search for the unsubstantiated object attribute; modify the generated description by replacing the given one annotated portion with a found object attribute received in a response to the query; and present the modified generated description in the UI.
4 . The system of claim 3 , wherein there is a plurality of found object attributes received in the response to the query, and wherein the generated description is modified by replacing the given one annotated portion with a UI element for selecting one of the plurality of found object attributes.
5 . The system of claim 2 , wherein the UI further includes an input field for receiving user input to edit the one or more annotated portions.
6 . The system of claim 5 , wherein the processing unit is configured to execute computer-readable instructions to further cause the system to:
identify at least two annotated portions in the generated description requiring a same user input; provide one input field for receiving user input to edit the at least two annotated portions; and update the at least two annotated portions with information inputted in the one input field.
7 . The system of claim 1 , wherein the prompt to the LLM includes at least one example of an annotation according to the defined format.
8 . The system of claim 7 , wherein the at least one example is generated by:
retrieving, from a database of the system, an example object description and a set of example object attributes for an example object; modifying the example object description by replacing one selected example object attribute in the example object description with an annotation in accordance with the defined format; modifying the set of example object attributes by removing the one selected example object attribute; and generating the at least one example to include the modified set of example object attributes and the modified example object description.
9 . The system of claim 1 , wherein the processing unit is configured to execute computer-readable instructions to further cause the system to provide the prompt to the LLM as a set of tokens.
10 . The system of claim 1 , wherein the LLM is a trained generative LLM.
11 . The system of claim 1 , wherein the prompt to the LLM includes instructions to generate a product description for a product, and the generated description is the generated product description.
12 . The system of claim 11 , wherein the generated product description is used to update a product page related to the product.
13 . The system of claim 12 , wherein the generated product description is used to update the product page related to the product responsive to an approval received from a user device.
14 . A method comprising:
generating a prompt to a large language model (LLM) to generate a description of an object, the prompt including one or more object attributes to include in the generated description, and also including an instruction for the LLM to annotate, according to a defined format, any portions of the generated description that include unsubstantiated information;
providing the prompt to the LLM;
causing the LLM to generate the generated description; receiving the generated description;
parsing the generated description to identify, based on the defined format, one or more annotated portions indicating unsubstantiated information; and
presenting the generated description for display via a user device.
15 . The method of claim 14 , wherein the generated description is presented in a user interface (UI) in which at least one of the identified one or more annotated portions is modifiable.
16 . The method of claim 15 , further comprising, prior to presenting the UI:
identifying, for a given one annotated portion in the generated description, an unsubstantiated object attribute; querying a database to search for the unsubstantiated object attribute; modifying the generated description by replacing the given one annotated portion with a found object attribute received in a response to the query; and presenting the modified generated description in the UI.
17 . The method of claim 16 , wherein there is a plurality of found object attributes received in the response to the query, and wherein the generated description is modified by replacing the given one annotated portion with a UI element for selecting one of the plurality of found object attributes.
18 . The method of claim 17 , further comprising:
identifying at least two annotated portions in the generated description requiring a same user input; providing one input field for receiving user input to edit the at least two annotated portions; and updating the at least two annotated portions with information inputted in the one input field.
19 . The method of claim 14 , wherein the prompt to the LLM includes at least one example of an annotation according to the defined format.
20 . The method of claim 19 , wherein the at least one example is generated by:
retrieving, from a database, an example object description and a set of example object attributes for an example object; modifying the example object description by replacing one selected example object attribute in the example object description with an annotation in accordance with the defined format; modifying the set of example object attributes by removing the one selected example object attribute; and generating the at least one example to include the modified set of example object attributes and the modified example object description.
21 . The method of claim 14 , wherein the prompt to the LLM includes instructions to generate a product description for a product, and the generated description is the generated product description.
22 . The method of claim 21 , wherein the generated product description is used to update a product page related to the product.
23 . The method of claim 22 , wherein the generated product description is used to update the product page related to the product responsive to an approval received from a user device.
24 . A non-transitory computer readable medium storing computer-executable instructions thereon, wherein the instructions are executable by a processing unit of a system to cause the system to:
generate a prompt to a large language model (LLM) to generate a description of an object, the prompt including one or more object attributes to include in the generated description, and also including an instruction for the LLM to annotate, according to a defined format, any portions of the generated description that include unsubstantiated information;
provide the prompt to the LLM;
causing the LLM to generate the generated description; and receive the generated description;
parse the generated description to identify, based on the defined format, one or more annotated portions indicating unsubstantiated information; and
present the generated description for display via a user device.
US18/180,518
2023-01-31
2023-03-08
Methods and systems for generation of text using large language model with indications of unsubstantiated information
Active
2044-01-12
US12468878B2
( en )
Priority Applications (2)
Application Number
Priority Date
Filing Date
Title
US18/180,518
US12468878B2
( en )
2023-01-31
2023-03-08
Methods and systems for generation of text using large language model with indications of unsubstantiated information
US19/352,923
US20260037719A1
( en )
2023-01-31
2025-10-08
Methods and systems for generation of text using large language model with indications of unsubstantiated information
Applications Claiming Priority (3)
Application Number
Priority Date
Filing Date
Title
US202363482399P
2023-01-31
2023-01-31
US202363483668P
2023-02-07
2023-02-07
US18/180,518
US12468878B2
( en )
2023-01-31
2023-03-08
Methods and systems for generation of text using large language model with indications of unsubstantiated information
Related Child Applications (1)
Application Number
Title
Priority Date
Filing Date
US19/352,923
Continuation
US20260037719A1
( en )
2023-01-31
2025-10-08
Methods and systems for generation of text using large language model with indications of unsubstantiated information
Publications (2)
Publication Number
Publication Date
US20240256764A1
US20240256764A1 ( en )
2024-08-01
US12468878B2
true
US12468878B2 ( en )
2025-11-11
Family
ID=91963325
Family Applications (2)
Application Number
Title
Priority Date
Filing Date
US18/180,518
Active
2044-01-12
US12468878B2
( en )
2023-01-31
2023-03-08
Methods and systems for generation of text using large language model with indications of unsubstantiated information
US19/352,923
Pending
US20260037719A1
( en )
2023-01-31
2025-10-08
Methods and systems for generation of text using large language model with indications of unsubstantiated information
Family Applications After (1)
Application Number
Title
Priority Date
Filing Date
US19/352,923
Pending
US20260037719A1
( en )
2023-01-31
2025-10-08
Methods and systems for generation of text using large language model with indications of unsubstantiated information
Country Status (1)
Country
Link
US
( 2 )
US12468878B2
( en )
Cited By (1)
* Cited by examiner, â Cited by third party
Publication number
Priority date
Publication date
Assignee
Title
US20250094628A1
( en )
*
2023-09-18
2025-03-20
Sailpoint Technologies, Inc.
System and Method for Automated Generation of Access Descriptions for Identity Governance and Administration (IGA)
Families Citing this family (19)
* Cited by examiner, â Cited by third party
Publication number
Priority date
Publication date
Assignee
Title
US20240281472A1
( en )
*
2023-02-17
2024-08-22
Snowflake Inc.
Interactive interface with generative artificial intelligence
US11983488B1
( en )
*
2023-03-14
2024-05-14
OpenAI Opco, LLC
Systems and methods for language model-based text editing
US12367641B2
( en )
*
2023-05-02
2025-07-22
Microsoft Technology Licensing, Llc
Artificial intelligence driven presenter
US20240386207A1
( en )
*
2023-05-18
2024-11-21
Noblis, Inc.
Systems and methods for detecting errors and hallucinations in generative model output data
US20240403289A1
( en )
*
2023-05-31
2024-12-05
Palantir Technologies Inc.
Large data set management with large language models
US12423509B2
( en )
*
2023-06-30
2025-09-23
Yahoo Assets Llc
Automated citations and assessment for automatically generated text
US12505299B2
( en )
*
2023-08-16
2025-12-23
Casetext, Inc.
Hallucination detection and remediation in text generation interface systems
US20250094439A1
( en )
*
2023-09-19
2025-03-20
Palantir Technologies Inc.
Large language model response optimization for data pipeline generation
US12585888B2
( en )
*
2023-11-06
2026-03-24
Snap Inc.
Automatically generating descriptions of augmented reality effects
US12602942B2
( en )
2023-11-06
2026-04-14
Snap Inc.
Model fine-tuning for automated augmented reality descriptions
US20250165543A1
( en )
*
2023-11-20
2025-05-22
Google Llc
Automatic generation of facets using a large language model
US20250181849A1
( en )
*
2023-12-05
2025-06-05
Yahoo Assets Llc
Systems and methods for smart entity cloning
US12536160B2
( en )
*
2024-01-02
2026-01-27
Wai'i, Inc.
Using a compiler to modify prompts for machine learning models used to generate database queries
US20250247303A1
( en )
*
2024-01-31
2025-07-31
Microsoft Technology Licensing, Llc
Cloud architect
CN120832660A
( en )
*
2024-04-23
2025-10-24
æ´å°äº§åæéå ¬å¸
Method, electronic device, and computer program product for generating text content
US20250356122A1
( en )
*
2024-05-20
2025-11-20
Srirajasekhar Koritala
Artificial intelligence based event generation method and system for generating memoir events based on information associated with users
US20260050972A1
( en )
*
2024-08-19
2026-02-19
Mastercard International Incorporated
Computer-implemented methods, systems comprising computer-readable media, and electronic devices for providing financial network large language model dynamic open banking services
US20260064741A1
( en )
*
2024-09-03
2026-03-05
Schlumberger Technology Corporation
Method and system for extracting information from documents with varying formats
US20260100921A1
( en )
*
2024-10-07
2026-04-09
Zoom Video Communications, Inc.
Artificial intelligence (ai)-based user interfaces
Citations (9)
* Cited by examiner, â Cited by third party
Publication number
Priority date
Publication date
Assignee
Title
US11769017B1
( en )
*
2022-12-30
2023-09-26
Google Llc
Generative summaries for search results
US20230334263A1
( en )
*
2022-04-13
2023-10-19
Abridge AI, Inc.
Automating follow-up actions from conversations
US20230394855A1
( en )
*
2022-06-01
2023-12-07
Microsoft Technology Licensing, Llc
Image paragraph generator
US20240161520A1
( en )
*
2022-11-10
2024-05-16
Salesforce, Inc.
Systems and methods for a vision-language pretraining framework
US20240242040A1
( en )
*
2023-01-18
2024-07-18
Sri International
Method and system for determining a measure of conceptual consistency in large language models
US20240242037A1
( en )
*
2023-01-13
2024-07-18
Casetext, Inc.
Generative text model interface system
US20240296295A1
( en )
*
2023-03-03
2024-09-05
Microsoft Technology Licensing, Llc
Attribution verification for answers and summaries generated from large language models (llms)
US20240419912A1
( en )
*
2023-06-13
2024-12-19
Microsoft Technology Licensing, Llc
Detecting hallucination in a language model
US20250005266A1
( en )
*
2023-06-30
2025-01-02
Yahoo Assets Llc
Automated citations and assessment for automatically generated text
2023
2023-03-08
US
US18/180,518
patent/US12468878B2/en
active
Active
2025
2025-10-08
US
US19/352,923
patent/US20260037719A1/en
active
Pending
Patent Citations (9)
* Cited by examiner, â Cited by third party
Publication number
Priority date
Publication date
Assignee
Title
US20230334263A1
( en )
*
2022-04-13
2023-10-19
Abridge AI, Inc.
Automating follow-up actions from conversations
US20230394855A1
( en )
*
2022-06-01
2023-12-07
Microsoft Technology Licensing, Llc
Image paragraph generator
US20240161520A1
( en )
*
2022-11-10
2024-05-16
Salesforce, Inc.
Systems and methods for a vision-language pretraining framework
US11769017B1
( en )
*
2022-12-30
2023-09-26
Google Llc
Generative summaries for search results
US20240242037A1
( en )
*
2023-01-13
2024-07-18
Casetext, Inc.
Generative text model interface system
US20240242040A1
( en )
*
2023-01-18
2024-07-18
Sri International
Method and system for determining a measure of conceptual consistency in large language models
US20240296295A1
( en )
*
2023-03-03
2024-09-05
Microsoft Technology Licensing, Llc
Attribution verification for answers and summaries generated from large language models (llms)
US20240419912A1
( en )
*
2023-06-13
2024-12-19
Microsoft Technology Licensing, Llc
Detecting hallucination in a language model
US20250005266A1
( en )
*
2023-06-30
2025-01-02
Yahoo Assets Llc
Automated citations and assessment for automatically generated text
Non-Patent Citations (4)
* Cited by examiner, â Cited by third party
Title
Biten, Ali Furkan, LluÃs Gómez, and Dimosthenis Karatzas. " Let there be a clock on the beach: Reducing object hallucination in image captioning. " Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision. 2022. (Year: 2022).
*
Chen, Canyu, and Kai Shu. " Can Ilm-generated misinformation be detected?. " arXiv preprint arXiv:2309.13788 (2023). (Year: 2023).
*
Liu, Tianyu, et al. " A token-level reference-free hallucination detection benchmark for free-form text generation. " arXiv preprint arXiv:2104.08704 (2021). (Year: 2021).
*
Newman, Benjamin, Prafulla Kumar Choubey, and Nazneen Rajani. " P-adapters: Robustly extracting factual information from language models with diverse prompts. " arXiv preprint arXiv:2110.07280 (2021). (Year: 2021).
*
Cited By (1)
* Cited by examiner, â Cited by third party
Publication number
Priority date
Publication date
Assignee
Title
US20250094628A1
( en )
*
2023-09-18
2025-03-20
Sailpoint Technologies, Inc.
System and Method for Automated Generation of Access Descriptions for Identity Governance and Administration (IGA)
Also Published As
Publication number
Publication date
US20240256764A1
( en )
2024-08-01
US20260037719A1
( en )
2026-02-05
Similar Documents
Publication
Publication Date
Title
US20260037719A1
( en )
2026-02-05
Methods and systems for generation of text using large language model with indications of unsubstantiated information
US12182506B2
( en )
2024-12-31
Systems and methods for dynamic large language model prompt generation
US20240256792A1
( en )
2024-08-01
Methods and systems for dynamic generation of personalized text using large language model
US12561512B2
( en )
2026-02-24
Methods and systems for prompting large language model to generate formatted output
US20250356111A1
( en )
2025-11-20
Methods and systems for prompting large language model to process inputs from multiple user elements
US12608548B2
( en )
2026-04-21
Methods and systems for parsing a mix of features and instructions into a prompt
US12411699B2
( en )
2025-09-09
Dynamic generation of user interface controls
US12579377B2
( en )
2026-03-17
Summary of reviews generated by a generative language model
US20240311192A1
( en )
2024-09-19
Methods and systems for indicating resource usage parameter for prompting a large language model (llm)
US20240256793A1
( en )
2024-08-01
Methods and systems for generating text with tone or diction corresponding to stylistic attributes of images
US12596876B2
( en )
2026-04-07
Systems and methods for improving textual descriptions using large language models
CA3169486A1
( en )
2023-08-11
Systems and methods for computer generation of a modifiable product description
US20240354710A1
( en )
2024-10-24
Methods and systems for the creation of parsers using large language models
US11657107B2
( en )
2023-05-23
Systems and methods for using keywords extracted from reviews
US20250165228A1
( en )
2025-05-22
Generation of grammar-compliant programming language code using machine learning
US20240386477A1
( en )
2024-11-21
Methods and systems for providing context for generating an online store
US20240354176A1
( en )
2024-10-24
Notification messages generated by a generative language model
US11308542B2
( en )
2022-04-19
Systems and methods for using keywords extracted from reviews
US20250166037A1
( en )
2025-05-22
Embedding-based search of an item store
US20250165125A1
( en )
2025-05-22
Methods and devices for exploring an n-dimensional embedding space using a navigation-based recommender
US20240354830A1
( en )
2024-10-24
System and Method for Identifying Complementary Objects from Images
WO2025123115A1
( en )
2025-06-19
Methods and systems for resolving and providing context for client-permissioned content
US20250148191A1
( en )
2025-05-08
Keyword extraction to generate subject lines
US20250148003A1
( en )
2025-05-08
System and Method for Modifying Search Metrics Based on Features of Interest Determined from Interactions with Images
WO2025102145A1
( en )
2025-05-22
Methods and systems for contextual chatbot operation
Legal Events
Date
Code
Title
Description
2023-03-08
FEPP
Fee payment procedure
Free format text : ENTITY STATUS SET TO UNDISCOUNTED (ORIGINAL EVENT CODE: BIG.); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY
2023-04-19
AS
Assignment
Owner name : SHOPIFY INC., CANADA
Free format text : ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:BEAUCHAMP, DANIEL;REEL/FRAME:063370/0519
Effective date : 20230414
Owner name : SHOPIFY (USA) INC., DELAWARE
Free format text : ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:MASCHMEYER, RUSS;REEL/FRAME:063370/0443
Effective date : 20230322
2023-04-24
STPP
Information on status: patent application and granting procedure in general
Free format text : DOCKETED NEW CASE - READY FOR EXAMINATION
2023-05-26
AS
Assignment
Owner name : SHOPIFY (USA) INC., NEW YORK
Free format text : ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:MASCHMEYER, RUSS;REEL/FRAME:063770/0597
Effective date : 20230523
2023-07-11
AS
Assignment
Owner name : SHOPIFY INC., CANADA
Free format text : ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:SHOPIFY (USA) INC.;REEL/FRAME:064208/0906
Effective date : 20230630
2024-01-17
AS
Assignment
Owner name : SHOPIFY INC., CANADA
Free format text : ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:SHOPIFY (USA) INC.;REEL/FRAME:066153/0569
Effective date : 20230927
2025-03-12
STPP
Information on status: patent application and granting procedure in general
Free format text : NON FINAL ACTION MAILED
2025-07-07
STPP
Information on status: patent application and granting procedure in general
Free format text : NOTICE OF ALLOWANCE MAILED -- APPLICATION RECEIVED IN OFFICE OF PUBLICATIONS
2025-10-08
STPP
Information on status: patent application and granting procedure in general
Free format text : PUBLICATIONS -- ISSUE FEE PAYMENT RECEIVED
2025-10-09
STPP
Information on status: patent application and granting procedure in general
Free format text : PUBLICATIONS -- ISSUE FEE PAYMENT VERIFIED
2025-10-29
STCF
Information on status: patent grant
Free format text : PATENTED CASE