Intelligent digital content generation using first party data
Aspects of the present disclosure provide systems, methods, and computer-readable storage media that support intelligent digital content generation using first-party data. For example, a system may extract features from items of first-party data to generate a vector table of vectorized embeddings. A user prompt may be vectorized and input to a machine learning (ML) model to generate a result vector that is a similar to the prompt vector in a latent space representation of the vector database. The system may compare the result vector to the prompt vector, and based on a result of the comparison, output either a sourced digital content item or an unsourced digital content item. The sourced digital content item may be generated by generative ML model(s) based on the result vector, and the unsourced digital content item may be generated by generative ML model(s) based on a custom prompt derived from the prompt vector.
1 . A method for intelligent digital content generation using first-party data, the method comprising:
generating, by one or more processors, a prompt vector based on a user prompt input by a user, the user prompt representing a question to be answered based on information indicated by first-party data;
providing, by the one or more processors, the prompt vector as input data to a first machine learning (ML) model to generate a result vector,
wherein the result vector output by the first ML model, for the prompt vector, is a similar vector from a latent space representation of a vector database that is generated from the first-party data;
determining, by the one or more processors, if a distance score between the prompt vector and the result vector satisfies a threshold;
generating, by the one or more processors, a sourced digital content item or an unsourced digital content item based on the determination,
wherein the sourced digital content item is generated by a one or more generative ML models based on the prompt vector if the distance score satisfies the threshold, and
wherein the unsourced digital content item is generated by the one or more generative ML models based on a custom prompt if the distance score fails to satisfy the threshold, and
wherein the custom prompt is based on the prompt vector and the custom prompt is generated by:
reformatting the prompt vector into the custom prompt for digital content generation by the generative ML models by extracting informational elements from the user prompt, and combining the extracted informational elements with a prompt template that includes text formatted according to a configuration of the one or more generative ML models;
receiving, by the one or more processors from the user, a rating indicating successfulness of the unsourced digital content item in answering the question represented by the user prompt;
providing, by the one or more processors, the rating as feedback data for training the first ML model and the one or more generative ML models to adjust the threshold,
wherein, when the rating indicates that the unsourced digital content item was unsuccessful in answering the question, adjusting the threshold such that the sourced digital content item is generated when the distance score indicates a closer match between the prompt vector and the result vector according to the threshold; and
enabling, on a user device, a display of the one or more of the generated sourced digital content item and the generated unsourced digital content item to the user.
2 . The method of claim 1 , wherein determining if the distance score between the prompt vector and the result vector satisfies the threshold comprises determining whether a cosine distance between the prompt vector and the result vector satisfies the threshold.
3 . The method of claim 1 , further comprising, based on the distance score satisfying the threshold:
providing, by the one or more processors, input data based on the prompt vector and the result vector to the one or more generative ML models to generate the sourced digital content item.
4 . The method of claim 3 , further comprising:
outputting, by the one or more processors, identification of a digital content item of the first-party data that corresponds to the result vector as a source of the sourced digital content item.
5 . The method of claim 1 , further comprising:
outputting, by the one or more processors, an indication that the unsourced digital content item is an unsourced output with respect to the first-party data.
6 . The method of claim 1 , wherein the one or more generative ML models are trained based on third-party data that does not include the first-party data.
7 . The method of claim 1 , wherein:
the first-party data comprises a plurality of text documents;
the one or more generative ML models comprise one or more large language models (LLMs); and
the sourced digital content item and the unsourced digital content item comprise text content.
8 . The method of claim 1 , further comprising, for each of one or more digital content items of the first-party data:
extracting, by the one or more processors, one or more respective features to generate one or more vector embeddings; and
generating, by the one or more processors, the vector database based on a plurality of vector embeddings associated with the first-party data.
9 . A system for intelligent digital content generation using first-party data, the system comprising:
a memory; and
one or more processors communicatively coupled to the memory, the one or more processors configured to:
generate a prompt vector based on a user prompt input by a user, the user prompt representing a question to be answered based on information indicated by first-party data;
provide the prompt vector as input data to a first machine learning (ML) model to generate a result vector,
wherein the result vector output by the first ML model, for the prompt vector, is a similar vector from a latent space representation of a vector database that is generated from the first-party data;
determine if a distance score between the prompt vector and the result vector satisfies a threshold;
generate a sourced digital content item or an unsourced digital content item based on the determination,
wherein the sourced digital content item is generated by a one or more generative ML models based on the prompt vector if the distance score satisfies the threshold, and
wherein the unsourced digital content item is generated by the one or more generative ML models based on a custom prompt if the distance score fails to satisfy the threshold, and
wherein the custom prompt is based on the prompt vector and the custom prompt is generated by:
reformatting the prompt vector into the custom prompt for digital content generation by the generative ML models by extracting informational elements from the user prompt, and combining the extracted informational elements with a prompt template that includes text formatted according to a configuration of the one or more generative ML models;
receive from the user, a rating indicating successfulness of the unsourced digital content item in answering the question represented by the user prompt;
provide the rating as feedback data for training the first ML model and the one or more generative ML models to adjust the threshold,
wherein, when the rating indicates that the unsourced digital content item was unsuccessful in answering the question, adjusting the threshold such that the sourced digital content item is generated when the distance score indicates a closer match between the prompt vector and the result vector according to the threshold; and
enable on a user device, a display of the one or more of the generated sourced digital content item and the generated unsourced digital content item to the user.
10 . The system of claim 9 , wherein the one or more generative ML models comprise multiple generative ML models, and wherein the sourced digital content item and the unsourced digital content item are generated by different ML models of the one or more generative ML models.
11 . The system of claim 9 , wherein the one or more generative ML models comprise a single generative ML model, and wherein the sourced digital content item and the unsourced digital content item are generated by the single generative ML model.
12 . The system of claim 9 , wherein the first ML model comprises one or more neural networks (NNs) or one or more support vector machines (SVMs).
13 . The system of claim 9 , wherein the one or more generative ML models comprise one or more neural networks (NNs) or one or more support vector machines (SVMs).
14 . The system of claim 9 , further comprising:
one or more databases communicatively coupled to the one or more processors, the one or more databases configured to store the first-party data, the vector database, one or more parameters corresponding to the first ML model, one or more parameters corresponding to the one or more generative ML models, or a combination thereof.
15 . A non-transitory computer-readable storage device comprising instructions that, when executed by one or more processors, cause the one or more processors to perform operations for intelligent digital content generation using first-party data, the operations comprising:
generating a prompt vector based on a user prompt input by a user, the user prompt representing a question to be answered based on information indicated by first-party data;
providing the prompt vector as input data to a first machine learning (ML) model to generate a result vector,
wherein the result vector output by the first ML model, for the prompt vector, is a similar vector from a latent space representation of a vector database that is generated from the first-party data;
determining if a distance score between the prompt vector and the result vector satisfies a threshold;
generating a sourced digital content item or an unsourced digital content item based on the determination,
wherein the sourced digital content item is generated by a one or more generative ML models based on the prompt vector if the distance score satisfies the threshold, and
wherein the unsourced digital content item is generated by the one or more generative ML models based on a custom prompt if the distance score fails to satisfy the threshold, and
wherein the custom prompt is based on the prompt vector and the custom prompt is generated by:
reformatting the prompt vector into the custom prompt for digital content generation by the generative ML models by extracting informational elements from the user prompt, and combining the extracted informational elements with a prompt template that includes text formatted according to a configuration of the one or more generative ML models;
receiving, by the one or more processors from the user, a rating indicating successfulness of the unsourced digital content item in answering the question represented by the user prompt;
providing, by the one or more processors, the rating as feedback data for training the first ML model and the one or more generative ML models to adjust the threshold,
wherein, when the rating indicates that the unsourced digital content item was unsuccessful in answering the question, adjusting the threshold such that the sourced digital content item is generated when the distance score indicates a closer match between the prompt vector and the result vector according to the threshold; and
enabling, on a user device, a display of the one or more of the generated sourced digital content item and the generated unsourced digital content item to the user.
16 . The non-transitory computer-readable storage device of claim 15 , wherein:
the first-party data represents a plurality of human responses regarding one or more topics;
the sourced digital content item represents information from one of the plurality of human responses; and
the unsourced digital content item represents information from a simulated response associated with the one or more topics.
17 . The non-transitory computer-readable storage device of claim 16 , wherein the operations further comprise:
executing a virtual assistant tool, the virtual assistant tool configured to simulate human interactions with a user.
18 . The non-transitory computer-readable storage device of claim 17 , wherein the virtual assistant tool is further configured to:
enable the user to input a question as the user prompt; and
output the sourced digital content item or the unsourced digital content item as an answer to the question.