Targeting messages for digitized therapy with generative converter model
By using a generative converter model to generate messages and fine-tune them based on the status and feedback data of the end user, the problem of inflexible message content in the prior art is solved, and the compliance of user interaction and treatment plans is improved.
Patent Information
- Application Number
- CN202410178480.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-09-28
- Filing Date
- 2024-02-09
- Publication Date
- 2025-03-28
AI Technical Summary
The prior art cannot effectively adjust the message content dynamically in digital treatment, resulting in the message being not flexible and robust enough, unable to adapt to the status changes and feedback of end users, resulting in low user interaction and poor compliance.
Generative converter model is used to generate messages, and the user's status, behavior, preferences and feedback data are used to fine-tune the model, and dynamically adjust the message content to adapt to user changes.
It improves the flexibility and personalization of messages, enhances the compliance of user interaction and treatment plans, and optimizes the use of computing resources and network bandwidth.
Smart Images

Figure CN119724601A_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to U.S. patent application No. 18 / 374,483, filed on September 28, 2023, entitled “Targeted Generation of Messages for Digital Therapy Using a Generative Transducer Model,” the entire contents of which are incorporated herein by reference. Background Art
[0003] In a networked environment, a server may send messages to an end-user device to provide various information to the end-user. The messages may be manually created by a content provider associated with the server and may be part of a predefined, fixed, and linear sequence of messages selected by the server for the end-user using various criteria. The predefined sequence may not be appropriate for certain applications. For example, in the context of digital therapy, the predefined message sequence may not take into account changes in the end-user's state, such as improvement or deterioration of the end-user's condition or compliance with the digital therapy.
[0004] Since the sequence is selected and set at the beginning of the end user's treatment plan, the sequence will not take into account feedback from the user in a flexible and robust manner. When the message contains interactive elements that the end user wants to interact with as part of the treatment plan, the static nature of the sorting and the content within the message itself will be particularly problematic. In addition, since the content for these messages may have been created individually and manually, creating the content will be resource intensive. It may also lack scalability for a wider audience and at the same time not be specific enough for the condition of a specific end user. The lack of flexibility, scalability and specificity in the rules for manually creating and selecting messages will result in computing resources (e.g., processors and memory) and network bandwidth being wasted due to providing invalid messages. From a human-computer interaction (HCI) perspective, these problems will lead to a lack of user interaction and low compliance. Summary of the invention
[0005] To address these and other challenges, messaging services can leverage generative artificial intelligence (AI) (e.g., a generative transformer model) to generate messages for end users to address their specific conditions for digital therapy applications. Messages created using such a generative transformer model (e.g., a large language model or a text-to-image model) can include content to be presented via an end user's device to prevent, mitigate, or address the end user's condition. Generative transformer models can be trained using general and domain-specific corpora (e.g., text or text associated with other content patterns including images, videos, audio, or multimedia content) and pre-built messages to generate messages for the end user's specific condition and rules selected from pre-built messages. In addition, using feedback, the model can be further fine-tuned to output the content of the message that takes into account the behavior, preferences, and other characteristics of a specific user to facilitate the digital therapy regimen.
[0006] When generating a message, the service can generate a prompt according to a template using information associated with a specific user and parameters that define content generation. The information may include, for example, the user's condition, state, behavior, preferences, and responses to previous messages. The message definition parameters may identify, for example, the time to present the message, the difficulty setting of the message, and previously generated or provided messages. The template for the prompt may include a set of strings (e.g., words, phrases, and other texts) and placeholders for inserting information about the user and message definition parameters. By generating, the service can apply the prompt to a generative transformer model to output the content of the message. The message may include, for example, the content of a notification to a terminal user associated with a treatment plan for a condition, or the content of an instruction for a terminal user to perform a specified activity to achieve an endpoint associated with solving the condition, or the content of a psychoeducation class for providing clinical training to the terminal user. The message may also include the time when the message is sent or presented.
[0007] Using the output from the generative transformer model, the service can send a message containing the content output by the generative transformer model for presentation on an end-user device. The message can be sent or presented on the end-user device at a time defined by the output content. An application running on the end-user device can present the content of the message. When the message is presented via the end-user device, the message can guide the end-user to perform activities that advance the digital treatment plan. The application on the end-user device can monitor the end-user's interaction with the message or the application itself. The interaction can include, for example, an indication that a specific activity has been performed or input of the user's reaction to the message presentation, as well as other responses. Using the detected interaction, the application can generate and send a response to provide to the message service.
[0008] Once a response from the end-user device is received, the messaging service can use the response to update the generative transformer model itself. The messaging service can parse the response of the end-user device to generate feedback data. The feedback data can include information such as the content included in the message provided to the user and an indication of whether the user performs an activity specified in the content of the message. The feedback data can be used to update the generative transformer model itself. For example, the messaging service can use the feedback data to calculate a loss metric as a function of the feedback data, and then use the loss metric to update the weights in the generative transformer model. The feedback data can also be used to generate subsequent prompts when creating messages for the end-user using the generative transformer model. For example, when generating a prompt, the service can add at least a portion of the feedback data as part of the user information or message generation parameters. When creating a prompt that is input to the generative transformer model, the service can combine feedback data from any number of previously presented messages.
[0009] In this way, the messaging service can iteratively and continuously consider feedback from message presentation to the end user when generating subsequent content using the generative transformer model. Incorporating feedback data by the service can allow for the generation of new content that is more relevant to the changing state and preferences of the end user, relative to a predefined and fixed sequence of content as in other approaches. In the context of digital therapeutics, the generation of new content will take into account changes to the end user's state, such as improvement or deterioration of the end user's condition or progression through a therapeutic regimen.
[0010] Furthermore, by using a generative transformer model, services can generate content specifically targeted to the end user's condition and state in a flexible manner, and can extend personalized content to a broad audience. The achievement of flexibility, scalability, and specificity can optimize or reduce the consumption of computing resources (e.g., processors and memory) and network bandwidth that would otherwise be wasted by providing ineffective content. From a human-computer interaction (HCI) perspective, content generated by leveraging a generative transformer model can result in higher quality interactions by users with applications. Furthermore, increased engagement can lead to higher levels of user compliance with treatment regimens, resulting in a greater likelihood of preventing, alleviating, or treating the end user's condition.
[0011] Various aspects of the present disclosure relate to systems, methods, and computer-readable media for providing messages for resolving a condition in a user. A computing system may identify (i) a condition of a user to be resolved, and (ii) one or more parameters that define a message presented via an application that implements an endpoint associated with the user's condition. The computing system may generate a prompt based on a template using the condition and the one or more parameters. The computing system may apply the prompt to a generative model including a plurality of weights to output a message identifying at least one activity that implements the endpoint. The generative model is established by the following steps: identifying a plurality of corpora, each of the plurality of corpora including a corresponding first data set; applying at least a portion of the corresponding first data set of each of the plurality of corpora to a generative model to generate a corresponding second data set; for each of the plurality of corpora, comparing a first distribution of tokens in at least a portion of the corresponding first data set with a second distribution of tokens in the corresponding second data set; and updating one or more of the plurality of weights in the generative model based on the comparison. The computing system may provide a message for presentation to prompt a user to perform an activity via an application that implements the endpoint to resolve the condition.
[0012] In some embodiments, the computing system may receive a response identifying an activity performed by the user in response to the presentation of the message. The computing system may determine one or more second parameters to define the message to be presented to the user based on the response.
[0013] In some embodiments, the computing system can retrieve multiple candidate messages from a database based on an endpoint implemented as a user resolution situation. In some embodiments, the computing system can identify one or more parameters comprising the multiple candidate messages to define the message to be presented. In some embodiments, the computing system can apply a prompt to a generative model to select a message from the multiple candidate messages. In some embodiments, a set of rules can be used to train the generative model, and the set of rules defines the selection from the multiple candidate messages based on at least one of the following items: (i) user behavior, (ii) user preferences, or (iii) user profile information.
[0014] In some embodiments, the computing system may apply a prompt to the generative model to generate a message. At least one of the multiple corpora for training the generative model may include multiple data sets associated with the situation to be solved. In some embodiments, the computing system may update the user's generative model using a response by the user via the execution of the application identification activity in response to the presentation of the message. In some embodiments, the computing system may apply a prompt including multiple text strings to the generative model to generate a message including visual content. At least one of the multiple corpora for training the generative model may include text data and visual data.
[0015] In some embodiments, the computing system may apply a second prompt to a generative model to output a second message for the course, the second message identifying information for the user to implement an endpoint. In some embodiments, a computing system using a tokenizer may convert multiple strings of prompts into multiple tokens for generating a message. In some embodiments, the tokenizer may be trained using a second corpus of text data associated with multiple conditions to be resolved and multiple endpoints that implement at least one of the multiple conditions. In some embodiments, the user may use medication to resolve the condition in a manner consistent with the conversation portion in which the message is provided. In some embodiments, the computing system may use a delivery model for the user to determine the time to present the message to the user. In some embodiments, the message may include at least one of a short message service (SMS) message, a multimedia message service (MMS) message, or an in-application message. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The above and other objects, aspects, features and advantages of the present disclosure will become more apparent and better understood by referring to the following description in conjunction with the accompanying drawings, in which:
[0017] Figure 1 depicts a block diagram of a system for generating a message directed to addressing a condition in a user in accordance with an illustrative embodiment;
[0018] Figure 2 depicts a block diagram of a process for training a generative transformer model in a system for generating a target message in accordance with an illustrative embodiment;
[0019] Figure 3 depicts a block diagram of a process for applying hints to a generative transformer model to generate messages in a system for generating target messages in accordance with an illustrative embodiment;
[0020] Figure 4 depicts a block diagram of a process for sending a message to a user device in a system to generate a targeted message in accordance with an illustrative embodiment;
[0021] Figure 5 depicts a block diagram of a process for updating a generative transformer model in a system to generate a target message in accordance with an illustrative embodiment;
[0022] Figure 6 A flowchart depicting a method of generating a message directed to resolving a condition in a user according to an illustrative embodiment; and
[0023] Figure 7 is a block diagram of a server system and a client computer system in accordance with an illustrative embodiment. DETAILED DESCRIPTION
[0024] In order to read the description of the following embodiments, it will be helpful to list the various parts of the specification and their respective contents below:
[0025] Section A describes systems and methods for providing messages directed to resolving a condition in a user; and
[0026] Section B describes a network and computing environment that can be used to practice the embodiments described herein.
[0027] A. Systems and methods for providing messages directed to resolving conditions in users
[0028] Reference now Figure 1 , which depicts a block diagram of a system 100 for generating messages directed to addressing a condition in a user. In overview, the system 100 may include at least one session management service 105 and a set of user devices 110A-110N (hereinafter generally referred to as user devices 110) communicatively coupled to each other via at least one network 115. At least one user device 110 (e.g., the depicted first user device 110A) may include at least one application 120. The application 120 may include or provide at least one user interface 125, at least one user interface 125 having one or more user interface (UI) elements 130A-130N (hereinafter generally referred to as user interface elements 130). The session management system 105 may include at least one model trainer 140, at least one prompt creator 145, at least one message generator 150, at least one session processor 155, at least one feedback processor 160, and at least one generative transformer model 165, among other things. The session management system 105 may include or have access to at least one database 135. The database 135 may store, maintain, or otherwise include one or more user profiles 170A-170N (hereinafter generally referred to as user profiles 170), one or more messages 175A-175N (hereinafter generally referred to as messages 175), one or more rules 180A-180N (hereinafter generally referred to as rules 180), and one or more templates 185A-185N (hereinafter generally referred to as templates 185), etc. The functionality of the application 120 on the user device 110 may be partially performed on the session management system 105, and vice versa.
[0029] In more detail, the session management system 105 (sometimes generally referred to herein as a messaging service) can be any computing device that includes one or more processors coupled to memory and software and is capable of performing the various processes and tasks described herein. The session management system 105 can communicate with one or more user devices 110 and a database 175 via a network 115. The session management service 105 can be located, positioned in, or otherwise associated with at least one computer system. The computer system can correspond to a data center, a branch office, or a site where one or more computers corresponding to the session management system 105 are located.
[0030] Within the session management system 105, the model trainer 140 can train, improve, or update the generative transformer model 165 related to the session initiated by the user of the application 120. The prompt creator 145 can generate prompts using the conditions and one or more parameters derived from the one or more templates 185. The message generator 150 can generate messages 175 by feeding the prompts into the generative transformer model 165. The session processor 155 can provide the messages 175 related to the session initiated by the user of the application 120 on the respective user devices 110. The feedback processor 160 can generate feedback using the responses from the user devices 110 to update the generative transformer model 165.
[0031] The generative transformer model 165 may receive an input in the form of a set of strings (e.g., from a text input) to output content in one or more modes (e.g., in the form of a text string, audio content, an image, a video, or multimedia content). The generative transformer model 165 may be a machine learning model based on a transformer model (e.g., a generative pre-trained model or a bidirectional encoder representation from a transformer). The generative transformer model 165 may be a large language model (LLM), a text-to-image model, a text-to-audio model, or a text-to-video model, among others. In some embodiments, the generative transformer model 165 may be part of the conversation management system 105 (e.g., as depicted in the figure). In some embodiments, the generative transformer model 165 may be part of a server that is separate from the conversation management system 105 and communicates with the conversation management system 105 via the network 115.
[0032] The generative transformer model 165 may include a set of weights arranged across a set of layers according to a transformer architecture. Under this architecture, the generative transformer model 165 may include at least one word segmentation layer (sometimes referred to herein as a tokenizer), at least one input embedding layer, at least one position encoder, at least one encoder stack, at least one decoder stack, and at least one output layer, wherein these layers and stacks are interconnected to each other (e.g., via forward, backward, or skip connections). In some embodiments, the generative transformer layer 165 may lack an encoder stack (e.g., for a decoder-only architecture) or lack a decoder stack (e.g., for an encoder-only model architecture). The word segmentation layer may convert a set of raw inputs in the form of strings into a corresponding set of word vectors (also referred to herein as word units or vectors) in an n-dimensional feature space. The input embedding layer may generate a set of embeddings using the set of word vectors. Each embedding may be a low-dimensional representation of a corresponding word vector, and may capture the semantic and grammatical information of a string associated with the word vector. The position encoder may generate a position encoding for each input embedding according to a change in the position of the corresponding word vector or by expanding the string within the input string group.
[0033] Next, in the generative transformer model 165, the encoder stack may include a set of encoders. Each encoder may include at least one attention layer and at least one feedforward layer, etc. The attention layer (e.g., a multi-head self-attention layer) may calculate an attention score for each input embedding to indicate the degree of attention to which the embedding is to be focused, and generate a weighted sum of the input embedding group. The feedforward layer may apply a linear transformation (e.g., a rectified linear unit (ReLU)) with a nonlinear activation to the output of the attention layer. The output may be fed to another encoder in the encoder stack in the generative transformer layer 165. When the encoder is a terminal encoder in the encoder stack, the output may be fed to a decoder stack.
[0034] The decoder stack may include at least one attention layer, at least one encoder-decoder attention layer, and at least one feedforward layer, among others. In the decoder stack, an attention layer (e.g., a multi-head self-attention layer) may calculate an attention score for each output embedding (e.g., an embedding generated according to a target or expected output). The encoder-decoder attention layer may combine inputs from an attention layer in the decoder stack and outputs from one of the encoders in the encoder stack, and may calculate an attention score based on the combined inputs. The feedforward layer may apply a linear transformation (e.g., a rectified linear unit (ReLU)) with a nonlinear activation to the output of the encoder-decoder attention layer. The output of the decoder may be fed to another decoder in the decoder stack. When the decoder is a terminal decoder in the decoder stack, the output may be fed to the output layer.
[0035] The output layer of the generative transformer model 165 may include, among other things, at least one linear layer and at least one activation layer. The linear layer may be a fully connected layer that performs a linear transformation on the output from the decoder stack to calculate a word-gram score. The activation layer may apply an activation function (e.g., Softmax, sigmoid, or modified linear unit) to the output of the linear function to convert the word-gram score into a probability (or distribution). The probability may represent the likelihood of an output word-gram occurring for a given input word-gram. The output layer may use the probabilities to select output words (e.g., at least a portion of the output text, image, audio, video, or multimedia content with the highest probability). This is repeated on the input word-gram group, and the resulting output word-gram group may be used to form the output of the entire generative transformer model 165. Although primarily described herein in terms of a transformer model, the conversation management system 105 may also use other machine learning models to generate and output content.
[0036] The user device 110 (sometimes referred to herein as an end-user computing device) can be any computing device that includes one or more processors coupled to a memory and software and is capable of performing the various processes and tasks described herein. The user device 110 can communicate with the session management system 105 and the database 135 via the network 115. The user device 110 can be a smart phone, other mobile phone, tablet computer, wearable computing device (e.g., smart watch, glasses), or laptop computer. The user device 110 can be used to access the application 120. In some embodiments, the application 120 can be downloaded and installed on the user device 110 (e.g., via a digital distribution platform). In some embodiments, the application 120 can be a web application having resources accessible via the network 115.
[0037] The application 120 executed on the user device 110 can be a digital therapeutic application and can provide a session (sometimes referred to herein as a therapeutic session) for addressing at least one condition of the user. The user's condition can include, for example, chronic pain (e.g., associated with or including arthritis, migraine, fibromyalgia, back pain, Lyme disease, endometriosis, repetitive stress injury, irritable bowel syndrome, inflammatory bowel disease, and cancer pain), skin diseases (e.g., atopic dermatitis, psoriasis, dermatitis, and eczema), cognitive disorders (e.g., mild cognitive impairment (MCI), Alzheimer's disease, multiple sclerosis, and schizophrenia), mental health conditions (e.g., affective disorders, bipolar disorder, obsessive-compulsive disorder, borderline personality disorder, and attention-deficit / hyperactivity disorder), substance use disorders (e.g., opioid use disorder, alcohol use disorder, tobacco use disorder, or hallucinogenic disorder), and other diseases (e.g., narcolepsy and oncology), etc.
[0038] The user may simultaneously take medication, at least in part, to address the condition while being provided a session through the application 120. For example, if the medication is for pain, the user may take acetaminophen, a nonsteroidal anti-inflammatory composition, an antidepressant, an anticonvulsant, or other composition, etc. For skin conditions, the user may take steroids, antihistamines, or topical antibacterials, etc. For cognitive impairment, the user may take a cholinesterase inhibitor or mequindamine, etc. For narcolepsy, the user may take a stimulant or an antidepressant, etc. The user of the application 120 may also participate in other psychotherapy for these conditions.
[0039] Depending on the configuration on the application 120, the application 120 may include, present, or otherwise provide a user interface 145 including one or more user interface (UI) elements 130A-130N (hereinafter collectively referred to as user interface elements 130) to the user of the user device 110. The user interface elements 130 may correspond to visual components of the user interface 125, such as command buttons, text boxes, check boxes, radio buttons, menu items, and sliders. In some embodiments, the application 120 may be a digital therapy application and may provide a session (sometimes referred to as a therapy session) to an endpoint that implements a user (sometimes referred to herein as a patient, person, or subject) via the user interface 145. For example, the endpoint may be the completion of the session, the user's physical or psychological goal, the completion of a medication regimen, or an endpoint indicated by a physician or user.
[0040] The database 135 may store and maintain various resources and data associated with the session management system 105 and the applications 120. The database 135 may include a database management system (DBMS) to arrange and organize the data maintained thereon, such as user profiles 170, messages 175, rules 180, and templates 185, etc. The database 135 may communicate with the session management system 105 and one or more user devices 110 via the network 115. When executing various operations, the session management system 105 and the applications 120 may access the database 135 to retrieve identified data therefrom. When executing these operations, the session management system 105 and the applications 120 may also write data on the database 135.
[0041] On the database 135, each user profile 170 (sometimes referred to herein as a user account, user information, or subject profile) can store and maintain information related to a user of the application 120 through the user device 110. Each user profile 170 can be associated with or correspond to a corresponding user of the application 120. The user profile 170 can identify various information about the user, such as a user identifier, a condition to be resolved, information about a session conducted by the user (e.g., completed activities or courses), message preferences, user characteristic information, and progress status in resolving the condition (e.g., completed endpoints), etc. The information about the session can include various parameters of previous sessions performed by the user and can be initially empty. Message preferences can include treatment preferences and user input preferences, such as the type of message or preferred timing of the message. Message preferences can also include preferences determined by the session management system 105, such as the type of message to which the user can respond. The process can be initially set to a starting value (e.g., empty or "0") and can correspond to the alleviation, mitigation, or treatment of the condition. The user profile 170 can be continuously updated by the application 120 and the session management system 105.
[0042] In some embodiments, the user profile 170 may identify or include information about a treatment regimen performed by the user, such as treatment type (e.g., therapy, medication, or psychotherapy), duration (e.g., days, weeks, or years), and frequency (e.g., daily, weekly, quarterly, annually), etc. The user profile 170 may include at least one activity log of messages provided to the user, interactions of a user-identified feature of a particular user, and responses from a user device 110 associated with the user, etc. The user profile 170 may be stored and maintained in the database 135 using one or more files (e.g., extensible markup language (XML), comma-separated value (CSV) delimited text files, or structured query language (SQL) files). The user profile 170 may be iteratively updated as the user performs additional sessions or responds to additional messages 175.
[0043] Each message 175 may identify or include information to be presented via the user device 110. The message 175 may be in any format, such as a short message / message service (SMS), a multimedia messaging service (MMS), or as an instruction displayed via a UI element 130 of a user interface 125 via an application 120 (e.g., an in-app message), etc. The information of the message 175 may include a reminder to perform session tasks. The message 175 may be delivered periodically, such as daily, weekly, or monthly, etc. The message 175 may be derived from a pre-generated psychotherapy message library or a pre-generated participation (reminder) message library. The message 175 may include a reminder to complete a treatment session, take medication, or complete a program task for the subject. The message 175 may be personalized based on the user's activity, compliance, or performance related to the program. The message 175 may also include a mechanism for responding, such as a link, a chat box, or an instruction for responding to the message. For example, when presented via the application 120, the content of the message 175 may be presented via one or more UI elements 130 with which the user can interact.
[0044] Message 175 may include an activity to be performed by the user or a course to be participated in by the user. Message 175 identifying the activity to be performed may identify one or more interactive elements with which the user can interact to indicate or record the execution of the activity of implementing the endpoint through application 120. Message 175 for courses may include information that the user is to consume (e.g., by watching or reading) to implement the endpoint. The information may include digital therapy content to be presented to the user. For example, message 175 may include educational content that explains the relationship between exercise and mental health to the user. In some embodiments, information for message 175 may identify a set of activities to implement the endpoint. In some embodiments, message 175 for courses may include interactive elements with which the user can interact to browse information or perform activities. In some embodiments, message 175 for courses may lack interactive elements for indicating the execution of activities through application 120.
[0045] The message 175 may include any form of content, such as text, images, audio, video or multimedia content, etc., or any combination thereof. The message 175 may be stored and maintained in the database 135 using one or more files. For example, for text, the message 175 may be stored as a text file (TXT), a rich text file (RTF), an extensible markup language (XML), and a hypertext markup language (HTTP), etc. For images, the message 175 may be stored as a joint photographic experts group (JPEG) format, a portable network graphic (PNG) format, a graphics interchange format (GIF), or a scalable vector graphic (SVG). For audio, the message 175 may be stored as a waveform audio file (WAV), a moving picture expert group format (e.g., MP3 and MP4), and OggVorbis (OGG), etc. For video, the message 175 may be stored as a movie expert group format (e.g., MP3 and MP4), a QuickTime movie (MOV), and a Windows movie video (WMV), etc. For multimedia content, the message 175 may be in Audio Video Interleaved (AVI), Movie Experts Group formats (e.g., MP3 and MP4), QuickTime Movie (MOV), and Windows Movie Video (WMV), etc. The message 175 may be associated with metadata, such as a description of the content or information included in the message 175.
[0046] Each rule 180 may specify, identify, or otherwise define logic to select or identify one of the messages 175 for presentation to the user. The logic specified by the rule 180 may be derived from user behavior, user preferences, or profile information of a given user, etc. For example, when the time is between 8:00 a.m. and 10:00 a.m., the rule 180 may define the selection of a specific message 175 for a user with schizophrenia. For example, the user behavior may include the type of activity performed by the user identified in the activity log associated with the user identified in the user profile 170. The user preference may correspond to the type of message that the user prefers as identified in the user profile 170. The profile information may include other data points about the user for selecting the message 175, such as the progress of the treatment, the degree of difficulty, or the stage on the path for achieving the endpoint, etc. The rule 180 may be used by the session management service 105 to select the message 175 to provide to the end user at the user device 110. The rule 180 may be used to provide the generative transformer model 165 with basic knowledge of the domain in which it is used. The underlying knowledge in this area may correspond, for example, to information about a specific digital therapeutic treatment, such as information about the conditions addressed by and through the application 120, including chronic pain, skin pathology, cognitive impairment, mental health conditions, or substance use disorders, etc. The rules 180 may be used to train or fine-tune the generative transformer model 165 in outputting the content of the message. The rules 180 may be derived and validated from clinical trials to provide various situations for the generative transformer model 165 to generate the desired message.
[0047] Each template 185 may specify, identify, or otherwise define a set of strings into which input from the set of strings will be used to insert one or more placeholders. Templates 185 may be used to write, create, or generate prompts to be applied to the generative transformer model 165 for output. Placeholders may define or identify contribution areas within each template 185. Each contribution area may be populated with the input for a given user, depending on the corresponding condition of the input and the parameters defining the message to be presented to the end user. As an example, a template 185 may state "To a _ year old smoker. He has smoked for _ years. He has completed a course of _. In the past 3 He only smoked _ cigarettes today. Can you leave me a message _ to encourage him to finish his next _ class and not smoke today?" Templates 185 can be stored and maintained in database 135 using one or more files (e.g., text files (TXT), rich text files (RTF), extensible markup language (XML), comma-separated value (CSV) delimited text files, or structured query language (SQL) files).
[0048] Reference now Figure 2, which depicts a block diagram of a process 200 for training a generative transformer model in a system 100 to generate a target message. The process 200 may include or correspond to operations performed in the system 100 to train the generative transformer model 175. Under the process 200, the model trainer 140 executed on the conversation management system 105 may retrieve, receive, or identify a set of corpora 205A-205N (hereinafter referred to as corpora 205). Each corpus 205 may identify or include a set of texts. In some embodiments, at least one of the corpora 205 may be a generalized data set. For example, the generalized text of the corpus 205 may be obtained from a large and unstructured set of texts without focusing on a specific knowledge domain. In some embodiments, at least one of the corpora 205 may include a specific knowledge domain data set. The specific knowledge domain data set may include a set of strings identifying a set of conditions to be addressed (e.g., relevant indications for skin diseases such as atopic dermatitis, eczema, and psoriasis) and another set of strings defining a set of endpoints for at least one of these conditions (e.g., completion of an activity and taking of a medication). For example, the corpus 205 may include a set of text obtained from a clinical study, a medical journal, or a web page describing a specific condition associated with a user (e.g., schizophrenia, multiple sclerosis, or eczema), and a set of activities to be performed that will help alleviate or treat the condition. The specific knowledge domain text may also be obtained from at least a subset of the messages 175 on the database 135.
[0049] In some embodiments, at least one of corpora 205 may include an association between text and content in another mode (e.g., images, audio, video, or multimedia content, etc.). The association between text and content in other modes may come from a generalized source. For example, a generalized source of corpora 205 may be obtained from a large, predefined corpus that identifies associations between words and images. The association between text and content in other modes may come from a specific knowledge domain source. For example, the association of corpora 205 may be taken from a clinical study, a medical journal, or a web page with text and content in other modes.
[0050] Model trainer 140 may access database 135 to retrieve, obtain, or otherwise identify data to be used for training generative transformer model 175. In some embodiments, model trainer 140 may retrieve or identify one or more user profiles 170 from database 1135. Based on each user profile 170, model trainer 140 may extract or identify information about a given user, such as a user identifier, a condition to be resolved, information about a session conducted by the user, message preferences, user demographic information, and progress in resolving the condition, etc. In some embodiments, model trainer 140 may retrieve or identify a set of rules 180 from database 135. As described above, each rule 180 may specify the selection of messages 175 based on user behavior, user preferences, or profile information for a given user.
[0051] In some embodiments, the model trainer 140 may retrieve or identify a set of messages 175 stored in the database 135. Based on each message 175, the model trainer 140 may extract or identify content (e.g., text, image, audio, or multimedia content) to be presented via the message 175. In some embodiments, the model trainer 140 may access the database 135 to retrieve or identify a set of responses of a user to a previously provided message 175 (or feedback data derived therefrom). Each response may define or identify an activity performed by a user via the application 120 in response to the presentation of the corresponding message 175. For example, a response may include an indication of whether the user performed a specified activity, an indication of a favorable reaction to the message 175, one or more interactions in response to the presentation of the message 175 (e.g., user interactions via a user interface element 130 or a hyperlink included in the message 175), and a timestamp identifying the execution of the response, etc.
[0052] Using the data retrieved from the database 135, the model trainer 140 may generate, write, or otherwise create at least one additional corpus 205 with which to train the generated transformer model 175. In some embodiments, the model trainer 140 may insert, include, or otherwise add the data retrieved from the database 135 to one or more of the set of corpora 205. The generated corpus 205 may include at least a portion of the user profile 170, at least a portion of the message 175, at least a portion of the rule 180, or at least a portion of the response, or any combination thereof, etc. In some embodiments, the model trainer 140 may generate the corpus 205 using information extracted from the user profile 170. For example, the corpus 205 generated in part using information from the user profile 170 may include a set of strings describing a user condition (e.g., an indication or obstacle to be resolved via the application 120) or status (e.g., progress towards completing an activity or course), a message 175 provided to the user, and the effectiveness of the message 175 in alleviating the condition, etc.
[0053] In some embodiments, the model trainer 140 may generate the corpus 205 using the messages 175. For example, the corpus 205 generated using the messages 175 may include an association between the status of the user to whom the message 175 is addressed and the content within the message 175 itself. In some embodiments, the model trainer 140 may generate the corpus 205 using the rules 180. For example, the corpus 205 generated in part using the rules 180 may include a textual description of the logic for selecting the message 175 defined by the rules 180. In some embodiments, the model trainer 140 may generate the corpus 205 using responses from the user. For example, the corpus 205 generated in part using the responses may include a set of strings identifying the content of the message 175 and an indication of whether the user performed a specified activity when the message 175 was presented.
[0054] By identification, the model trainer 140 can use a set of corpora 205 to build or train a generative transformer model 175. In some embodiments, the model trainer 140 can initialize the generative transformer model 175. For example, the model trainer 140 can instantiate the generative transformer model 175 by assigning random values to the weights within the layer. In some embodiments, the model trainer 140 can use the set of corpora 205 to fine-tune the pre-trained generative transformer model 175 (e.g., ChatGPT, DALL·E2, and stable diffusion models). For training or fine-tuning, the model trainer 140 can define, select, or otherwise identify at least a portion of each corpus 205 as a source set, and identify at least a portion of each corpus 205 as a destination set. In some embodiments, the corpus 205 can identify or include definitions of source sets and destination sets. The source set can be used as an input to the generative transformer model 165 to produce an output to be compared with the destination set. The portion of each corpus 205 can overlap at least partially and can correspond to a subset of text strings within the corpus 205. For example, when corpus 205 contains text from messages 175 related to a particular condition, the input set may correspond to a textual description of the condition, and the output set may correspond to a text string of an activity to perform, a class to attend, a reminder to take medication, or a notification to perform a particular activity, etc. The portions of corpus 205 corresponding to the input set and the destination set may lack overlap. For example, when corpus 205 contains associations between text and images, the portion of corpus 205 used as input may correspond to the text, and the portion of corpus 205 used as destination may correspond to an image associated with the text.
[0055] For each corpus 205, the model trainer 140 may feed or apply strings from a source set of the corpus 205 into the generative transformer model 165. In an application, the model trainer 140 may process the input strings according to a set of layers in the generative transformer model 165. As described above, the generative transformer model 165 may include a word segmentation layer, an input embedding layer, a position encoder, an encoder stack, a decoder stack, and an output layer, among others. The model trainer 140 may process the input strings (words or phrases in the form of alphanumeric characters) of the source set using the word segmentation layer of the generative transformer model 165 to generate a set of word vectors for the input set. Each word vector may be a vector representation of at least one corresponding string in an n-dimensional feature space (e.g., using a word embedding table). The model trainer 140 may apply the set of word vectors to the input embedding layer to generate a corresponding set of embeddings. The model trainer 140 may identify the position of each string within the set of strings of the source set. By identifying, the model trainer 140 may apply a position encoder to the position of each string to generate a position encoding corresponding to each embedding of the string, and expand the embedding.
[0056] The model trainer 140 can apply the set of embeddings together with the corresponding set of positional encodings generated from the input corpus 205 set to the encoder stack of the generative transformer model 165. In application, the model trainer 140 can process the set of embeddings together with the corresponding set of positional encodings according to the layers (e.g., attention layers and feed-forward layers) in each encoder in the encoder block. Based on the processing, the model trainer 140 can generate another set of embeddings to feed forward to the encoders in the encoder stack. The model trainer 140 can then feed the output of the encoder stack to the decoder stack.
[0057] In conjunction, the model trainer 140 may process data (e.g., text, images, audio, video, or multimedia content) of a destination set using a separate tokenizer layer of the generative transformer model 165 to generate a set of word vectors for the destination set. The data of the destination set may have the same schema as the source set of the corpus 205, or may have a different schema than the source set of the corpus 205. Each word vector may be a vector representation of at least one corresponding string in an n-dimensional feature space (e.g., using a word embedding table). The model trainer 140 may apply the set of word vectors to an input embedding layer to generate a corresponding set of embeddings. The model trainer 140 may identify the position of each string within a set of strings of the target set. By identifying, the model trainer 140 may apply a position encoder to the position of each string to produce a position encoding corresponding to each embedding of the string, and expand the embedding.
[0058] The model trainer 140 may apply the set of embeddings along with the corresponding set of positional encodings generated from the set of destinations of the corpus 205 to the decoder stack of the generative transformer model 165. The model trainer 140 may also combine the outputs of the encoder stack in processing through the decoder stack. In application, the model trainer 140 may process the set of embeddings along with the corresponding set of positional encodings according to the layers (e.g., attention layers, encoder-decoder attention layers, feed-forward layers) in each decoder in the decoder block. The model trainer 140 may combine the outputs from the encoder with the inputs of the encoder-decoder attention layers in the decoder block. Based on this processing, the model trainer 140 may generate an output set of embeddings to be fed forward to the output layer.
[0059] Next, the model trainer 140 can feed the output from the decoder block into the output layer of the generative transformer layer 165. In the feed, the model trainer 140 can process the embedding from the decoder block according to the linear layer and the activation layer of the output layer. Through this processing, the model trainer 140 can calculate the probability of each embedding. The probability can represent the possibility of the output of a given input word element. Based on the probability, the model trainer 140 can select the output word element (e.g., at least a portion of the output text, image, audio, video or multimedia content with the highest probability) to form, generate or otherwise generate the output 210. The output 210 may include text content, image content, audio content, video content or multimedia content, etc., or any combination thereof. The output 210 can be in the same mode as the target group of the corpus 205. Although mainly described in terms of the transformer model architecture, other architectures can also be used for the generative transformer model 165 to output content.
[0060] By generation, the model trainer 140 can compare the output 210 from the generative transformer model 165 with the destination set of the corpus 205 used to generate the output 210. The comparison can be a comparison between the probabilities (or distributions) of various tokens from the content of the output 210 (e.g., words of the text output) and the probabilities of tokens in the target set of the corpus 205. For example, the model trainer 140 can determine the difference between the probability distribution of the output 210 and the target set of the corpus 205 to be compared. The probability distribution can identify the probability of each candidate token in the output 210 or the token in the target set of the corpus 205. Based on the comparison, the model trainer 140 can calculate, determine, or otherwise generate a loss metric. The loss metric can indicate the degree of deviation of the output 210 from the expected output defined by the target set of the corpus 205 used to generate the output 210. The loss metric can be calculated according to any number of loss functions, such as norm loss (e.g., L1 or L2), mean squared error (MSE), quadratic loss, cross entropy loss, or Huber loss, etc.
[0061] In some embodiments, the model trainer 140 may determine a loss metric for the output 210 based on data retrieved from the database 135. When determined, the model trainer 140 may compare the content of the output 210 with the message 175 to calculate similarity. The similarity may measure, correspond to, or indicate, for example, a level of semantic similarity (e.g., using a knowledge map when comparing the text of the message 175 and the output 210), visual similarity (e.g., using a pixel-to-pixel value comparison when comparing an image or frame of a video of the message 175 and the output 210), or audio similarity (e.g., using a correlation or cosine similarity measure between the audio of the message 175 and the output 210). The loss metric may be a function of the similarity, the rules 180, or a response indicating whether the user responded to the message 175 compared to the output 210. In general, the higher the loss metric, the more the generated output message may deviate from the preferences established by a given user, or deviate from the design of one of the rules 180. Conversely, the lower the loss metric, the less the generated output message may deviate from the preferences established by a given user and conform to one or more of the rules 180. A loss metric may be calculated to train the generative transformer model 165 to generate output content for messages with a higher probability of user engagement.
[0062] Using the loss metric, the model trainer 140 can update one or more weights in the set of layers of the generative transformer model 165. The update of the weights can be based on back propagation and an optimization function (sometimes referred to herein as an objective function) having one or more parameters (e.g., a learning rate, momentum, weight decay, and number of iterations). The optimization function can define one or more parameters to which the weights of the generative transformer model 165 will be updated. The optimization function can be based on stochastic gradient descent and can include, for example, adaptive moment estimation (Adam), implicit updates (ISGD), and adaptive gradient algorithms (AdaGrad), etc. The model trainer 140 can iteratively train the generative transformer model 165 until convergence. Once converged, the model trainer 140 can store and maintain the weight set of the set of layers of the generative transformer model 165 for use in the inference phase.
[0063] Reference now Figure 3, depicts a block diagram of a process 300 that applies a prompt to a generative transformer model to generate a message in a system 100 for generating a target message. The process 300 may include or correspond to operations performed in the system 100 to generate a message using the generative transformer model 165. Under the process 300, a prompt creator 145 executing on the session management system 105 may retrieve, obtain, or otherwise identify a user profile 170 from the database 135. The user profile 170 may be for a given user associated with a user device 110 to which a newly generated message is to be provided for presentation. Based on the user profile 170, the prompt creator 145 may extract or identify a situation to be resolved. The prompt creator 145 may also identify a user identifier (e.g., name), information about a session conducted by the user, an activity log, message preferences, user feature information, and progress in resolving the situation, etc. In some embodiments, the prompt creator 145 may identify an activity log of a user associated with the user profile 170.
[0064] In some embodiments, the prompt creator 145 may access the database 135 to retrieve or identify one or more messages 175. The prompt creator 145 may select the one or more messages 175 based on information identified from the user profile 170, such as an endpoint achieved for the user to resolve the condition. For example, the prompt creator 145 may identify a subset of messages 175 from the user profile 170 that are related to the smoking condition and the endpoint of performing a walking exercise. In some embodiments, the prompt creator 145 may retrieve or identify at least one rule 180 from the database 135. The prompt creator 145 may select at least one rule 180 based on information identified from the user profile 170. For example, the prompt creator 145 may identify a rule for selecting the message 175 that specifies that the user has a condition of an affective disorder, is three weeks into a treatment regimen, and is at a medium difficulty level.
[0065] In conjunction, the prompt creator 145 may retrieve, select, or otherwise identify at least one template 185 from the database 135. The template 185 is identified from the set of templates 185 based on information from the user profile 170, such as the situation to be resolved, activity logs, user characteristics, user identifiers, message preferences, information about conversations conducted by the user, and progress in resolving the situation, etc. In some embodiments, the prompt creator 145 may select the template 185 based on the training of the generative transformer model 165. When the generative transformer model 165 has been trained on the general corpus 205, the prompt creator 145 may select a template 185 that includes a message 175 placeholder. When the generative transformer model 165 has been trained on the corpus 205 of a specific knowledge domain, the prompt creator 145 may identify a template 185 that lacks a message 175 placeholder.
[0066] With this identification, the prompt creator 145 can write, generate, or otherwise generate at least one prompt 305 according to the template 185 using information from the user profile 170 and one or more parameters. The parameters can be used to define the generation of the message to be presented to the user. The prompt creator 145 can use the message 175 or the rule 180, etc. to determine or identify the parameters. In some embodiments, the prompt creator 145 can include at least a portion of the content of the message 175 (e.g., text, image, audio, video, or multimedia content) as part of the parameters. For example, the prompt creator 145 can use the content from the group of messages 175 as part of the parameters for generating a new message. The parameters can identify the group of messages 175 as candidate messages to be selected from for generating a new message. In some embodiments, the prompt creator 145 can identify the logic for selecting the message 175 as defined in the rule 180 as part of the parameters. For example, the prompt creator 145 can identify the time to present the message 175 according to the rule 180.
[0067] When generating, the prompt creator 145 can use the template 185 to add, insert or otherwise include information from the user profile 175 and one or more parameters into the placeholder. As described above, the template 185 can include a set of defined strings and one or more placeholders that will be inserted into the string for input to the generative transformer model 165. The string can correspond to a predetermined, fixed text to be included as part of the input prompt of the generative transformer model 165. The template 185 can define at least one placeholder as a location where information from the user profile 175 is to be inserted, and at least one other placeholder is defined as a location where one or more parameters for defining a message are to be inserted. The prompt creator 145 can parse the template 185 to find or identify the placeholders therein. For each placeholder, if the placeholder definition is to insert at least a portion of the information from the user profile 170, the prompt creator 145 can include the portion of the information from the user profile 170 into the placeholder. If the placeholder defines at least a portion of one or more parameters to be inserted, prompt creator 145 may include that portion of the one or more parameters in the placeholder in template 185. Prompt creator 145 may form and construct prompt 305 by traversing template 185 and inserting data into the placeholders.
[0068] The prompt 305 may include a set of strings 310A-310N (hereinafter collectively referred to as strings 310A-310N) that will be fed to the message generator 150 to generate a message for a given user. The set of strings 310 may be a combination of a predefined set of strings originally included in the template 185, as well as a combination of information from the user profile 170 and one or more parameters that define the generation of a new message. For example, the user profile 170 may define a user with chronic migraines that need to be addressed, and the user's activity log may identify that the user drinks 96 mL of water, eats two meals per day, and has had five migraines in the past two months. The prompt 305 generated using this user profile 170 may have a set of strings 310 including "Chronic migraine sufferer drank 96 mL of water today and ate two meals today. She has made good progress through the A, B, C, D courses and has reduced her headache severity to 5 in the past 2 months. Can you help me generate a message to help her complete one course (E course) and continue to monitor her intake?". Once completed, prompt creator 145 may transmit, pass, or otherwise provide prompt 305 to message generator 150 .
[0069] By generating, the message generator 150 can feed or apply the prompt 305 to the generative transformer model 165. In application, the message generator 150 can use the set of layers in the generative transformer model 165 to process the set of strings 310 of the prompt 305. As discussed above, the generative transformer model 165 may include a word segmentation layer, an input embedding layer, a position encoder, an encoder stack, a decoder stack, and an output layer, etc. The message generator 150 can use the word segmentation layer of the generative transformer model 165 to process the input string 310 (a word or phrase in the form of alphanumeric characters) of the prompt 305 to generate a set of word vectors (sometimes referred to as word lemmas or word lemmas herein) for the input set. Each word vector can be a vector representation of at least one corresponding string 310 in an n-dimensional feature space (e.g., using a word embedding table). The message generator 150 can apply the set of word vectors to the input embedding layer to generate a corresponding set of embeddings. The message generator 150 can identify the position of each string within the set of strings 310 of the prompt 305. Using the identification, the message generator 150 can apply a position encoder to the position of each string to generate a position encoding corresponding to each embedding of the string and expand the embedding.
[0070] The message generator 150 may apply the set of embeddings together with the corresponding set of positional encodings generated from the input set of the corpus 205 to the encoder stack of the generative transformer model 165. In application, the message generator 150 may process the set of embeddings and the corresponding set of positional encodings according to the layers (e.g., attention layers and feed-forward layers) in each encoder in the encoder block. Based on the processing, the message generator 150 may generate another set of embeddings to feed forward to the encoders in the encoder stack. The message generator 150 may then feed the output of the encoder stack to the decoder stack.
[0071] In conjunction, the message generator 150 may use a separate word unit generator layer of the generative transformer model 165 to input a starting input (sometimes referred to herein as a starting word unit) to generate one or more word vectors. Each word vector can be a vector representation of at least one corresponding string in an n-dimensional feature space (e.g., using a word embedding table). The message generator 150 may apply the set of word vectors to the input embedding layer to generate a corresponding embedding group. The message generator 150 may identify the position of each string within the set of strings of the target set. Using the identification, the message generator 150 may apply a position encoder to the position of each string to generate a position encoding corresponding to each embedding of the string, and expand the embedding.
[0072] The message generator 150 may apply the set of embeddings and the corresponding set of positional encodings generated from the decoder stack of the generative transformer model 165. The message generator 150 may also combine the output of the encoder stack in the process through the decoder stack. In application, the message generator 150 may process the set of embeddings and the corresponding set of positional encodings according to the layers (e.g., attention layers, encoder-decoder attention layers, feed-forward layers) in each decoder in the decoder block. The message generator 150 may combine the output from the encoder with the input of the encoder-decoder attention layer in the decoder block. Based on this process, the message generator 150 may generate an output set of embeddings to be fed forward to the output layer.
[0073] Next, the message generator 150 can feed the output from the decoder block into the output layer of the generative transformer layer 165. In the feed, the message generator 150 can process the embedding from the decoder block according to the linear layer and the activation layer of the output layer. Through this process, the message generator 150 can calculate the probability for each embedding. The probability can represent the possibility of the output of a given input word element. Based on the probability, the message generator 150 can select the output word element (e.g., at least a part of the output text, image, audio, video or multimedia content with the highest probability) to form, generate or otherwise generate at least a part of the message 175'. The message generator 150 can repeat the above process using the layers of the generative transformer model 165 to form the whole of the message 175'. The message 175' output by the generative transformer model 165 may include text content, image content, audio content, video content or multimedia content, etc., or any combination thereof.
[0074] Depending on the application, the message generator 150 may generate or produce a new message 175' from the generative transformer model 165. The message 175' may identify at least one activity that implements an endpoint for addressing the user's condition. For example, the prompt 305 may state, "Chronic migraine sufferer drank 96 mL of water today and ate two meals today. He has made satisfactory progress through courses A, B, C, D and has reduced the number of headaches to 5 in the past 2 months. Can you help me generate a message to help him complete a course (course E) and continue to monitor his intake?". The generated message 175' may state, "Hi! How are you? You drank 96 mL of water today and ate two meals today! You are doing well! Since taking courses A, B, C, and D, you have only had 5 migraines in the past 2 months. Keep hitting your water and caloric intake goals and let's get through these migraines! Don't forget to continue learning course E. Keep up the good work!". In some embodiments, the message 175' may be for a course and may identify information for presentation to the user. For example, the message 175' may include an explanation regarding the effects of water and caloric intake with respect to migraines. The message 175' may include new content and may differ from content included in stored messages 175 on the database 135 that may have been manually created.
[0075] In some embodiments, upon applying the prompt 305, the message generator 150 may identify or select at least one of the messages 175' from the group of messages 175 included in the string 310 of the prompt 305. The prompt 305 for selecting one of the group of messages 175 may include the content of each message 175 as one of the parameters. For example, the prompt 305 may state "Tom hasn't smoked for three days. Can you help me choose the best message below to encourage Tom to not smoke?" (A) Congratulations on your achievements so far. Keep getting stronger. (B) 3 days in a row is great, keep being disciplined when you feel the need to smoke. (C) How are you feeling today? Distraction is a great way to not want to smoke." By applying the prompt 305, the message generator 150 may process the string 310 of the prompt 305 to select one of the candidate group of messages 175 as the message 175'.
[0076] In some embodiments, the message 175' generated by the generative transformer model 165 may include text content, image content, audio content, video content, or multimedia content, etc., or any combination thereof. For example, the presentation of the message 175' may include an image of a smiling face to further encourage the user to complete their goal. In addition, the message 175' may include a video clip of a loved one, a motivational speaker, a medical professional, an influencer or therapist, etc., or any combination thereof. The multimedia content of the message 175' (e.g., a video podcast, an audio slideshow, or an animated video, etc.) may further inform the user of the user's condition, encourage the user, or provide entertainment to the user of the application 120.
[0077] By generating, the message generator 150 can store and maintain an association between the message 175' and the user on the database 135. The association can use one or more data structures stored on the database 135, using one or more data structures (e.g., arrays, matrices, lists, tables, heaps, or trees). The association can be between the user profile 170 associated with the user to whom the message 175' is to be provided and the message 175'. The message generator 150 can generate multiple messages 175' before providing and presenting to the user associated with the user profile 170.
[0078] Reference now Figure 4, which depicts a block diagram of a process 400 for sending a message to a user device 110 in a system 100 to generate a targeted message. The process 400 may include or correspond to operations performed in the system 100 to run a session in which messages are provided to user devices and responses are collected from user devices. Under the process 400, a session processor 155 executing on a session management system 105 may send, transmit, or otherwise provide a message 175' to a user device 110 associated with a user 410. For the user 410, the session processor 155 may access the database 135 to retrieve or identify a user profile 170 of a user 405 of an application 120 on the user device 110. From the user profile 170, the session manager 155 may determine or identify a corresponding message 175' for the user 405 and transmit the message 175' to the user device 110 for the application 120.
[0079] In some embodiments, the session processor 155 may receive a request from the user device 110 for a new message to be provided. The request may have been generated by the application 120 in response to an interaction by the user 405 invoking a new message. The request may identify information about the user 405, such as a user identifier (e.g., a username or account identifier), authentication credentials, a device identifier, a network address, etc. The session processor 155 may use the information received from the application 120 to find the corresponding user profile 170 for the user 405. By identifying the user profile 170, the session processor 155 may identify one or more messages 175' associated with the user profile 150.
[0080] In some embodiments, the session processor 155 may calculate, identify, or otherwise determine a time to send a message 175' to the user device 110. In some embodiments, the session processor 155 may use a delivery model for the user 405. The delivery model may define a set of times to send one or more messages 175' for presentation via the user device 110. When the current time corresponds to one of the times defined by the delivery model, the session processor 155 may determine to provide the message 175' at the current time. In some embodiments, the session processor 155 may use a user profile 170 to determine a time to send the message 175'. The user profile 170 may identify a message preference of the user 405, such as a time to send a message 175' to the user device 110. When the current time satisfies the message preference (e.g., within the time preference), the session processor 155 may determine to transmit the message 175' to the user device 110.
[0081] For transmission, the session processor 155 may generate at least one instruction for presenting a message 175' for transmission to the user device 110. The instruction may include the content of the message 175' or an identifier of the message 175'. In some embodiments, the instruction may be a code, a data packet, or a control for presenting a message to the user 405. The instruction may include processing instructions for displaying the message 175' on the application 120 through the UI element 130 of the user interface 125 (e.g., as an in-application message). The instruction may also include instructions for the user 405 to perform related to his session. For example, the instruction may display a message 175' instructing the user 405 to perform a specific activity associated with his session. In some embodiments, the instruction may be based on a message protocol, such as a short message service (SMS) or a multimedia message service (MMS). The instruction may identify the user device 110 to which the message 175' is to be sent (e.g., using a phone number or a network address) and the content of the message 175' in the payload. When generated, the session processor 155 may send the instruction to the user device 110 via the network 115.
[0082] Once received, the user device 110 may render, display, or otherwise present the message 175' via a display. For example, when the message 175' is delivered according to a messaging protocol (e.g., SMS and MMS), the user device 110 may call a messaging application (e.g., application 120 or another application) to present the message 175'. The messaging application may include a user interface (e.g., similar to user interface 125) for displaying the contents of the message 175'. In some embodiments, the application 120 (e.g., a digital therapy application) on the user device 110 may render, display, or otherwise present the message 175' via the user interface 125. For example, when the message 175' is presented via the user interface 125 of the application 120, the instructions of the message 175' may specify, identify, or define the layout (e.g., positioning, size, and color) of a single UI element 130.
[0083] By presenting, the user device 110 may monitor at least one interaction 410 of the user 405 in response to the presentation of the message 175'. In some embodiments, the user device 110 may use a messaging application to monitor interactions 410 with the message 175' when presented via a display of the user device 110. For example, the messaging application may have an event listener to monitor click events on a link that is part of the message 175' when presented. In some embodiments, the application 120 on the user device 110 may monitor one or more interactions 410 of the user 405 with the UI element 130 of the user interface 125 in response to the presentation of the message 175'. The interaction 410 may be concurrent with the presentation of the message 175'. For example, the interaction 410 may correspond to an interaction of playing a video clip included in the message 175' through a play button on the application 120. In some embodiments, the interaction 410 may be after the message 175' is presented on the user device 110. For example, after presenting the message 175' prompting the user 405 to perform a specified activity, the interaction 410 may correspond to a set of user interactions to record the completion of the specified activity. Interaction 410 may also include data (eg, text) entered by user 405 in response to a prompt of message 175'.
[0084] Once the interaction 410 is detected, the user device 110 may output, produce, or generate at least one response 415 for transmission to the session management system 105. The response 415 may indicate, include, or otherwise identify an activity performed by the user 405 via the user device 110 in response to the presentation of the message 175'. In some embodiments, the application 120 on the user device 110 may generate the response 415 using the detected interaction 410. The response 415 may identify an event associated with the interaction 410, a timestamp for presenting the message 175', a timestamp for the event, and an identifier for the user 405, among other information. The response 415 may also include data entered by the user 405 via the user interface 125 of the application 120. In some embodiments, the application 120 may maintain a timer to track the time that has elapsed since the presentation of the message 175'. The application 120 may compare the elapsed time to the time limit of the message 175'. When the elapsed time exceeds the time limit, the application 120 may generate the response 415 to indicate that the user did not interact with the message 175'. By generating, the application 120 can provide, send, or otherwise transmit a response 415 to the session management system 105 .
[0085] Reference now Figure 5, which depicts a block diagram of a process 500 for updating a generative transformer model in a system 100 to generate a target message. The process 500 may include or correspond to an operation of exporting feedback data collected from a response 415 to update a generative transformer model 165. Under the process 500, a feedback processor 160 executed on a session management system 105 may retrieve, identify, or otherwise receive a response 415 from a user device 110. Once received, the feedback processor 160 may parse the response 415 to extract or identify the information included therein. Based on the response 415, the feedback processor 160 may determine or identify the performance of an activity by a user 405 via the user device 110 (or application 120) in response to the presentation of the message 175'. The feedback processor 160 may identify whether the user 405 performed a specified activity or interaction 410 associated with the activity. In some embodiments, the feedback processor 160 may identify an event associated with the performance of the activity, a timestamp of the event, data entered by the user 405, and other information included in the response 415.
[0086] Based on the response 415, the feedback processor 160 may generate, create or otherwise generate feedback data 505. In some embodiments, the feedback processor 160 may generate the feedback data 505 for subsequent generation of a message 175' by the generative transformer model 165. In some embodiments, the feedback data 505 may identify or include information to be used as one or more parameters, which define the subsequent message generated and presented by the user 405. For example, for the subsequent message 175', the prompt creator 145 may insert the feedback data 505 into a designated placeholder in the template 185 to generate a new prompt 305 for feeding to the generative transformer model 165. The feedback data 505 may indicate or include whether the user 405 has responded to the presentation of the message 175' and the time of the response. Once generated, the feedback processor 160 may store and maintain an association between the feedback data 505 and the user profile 170 on the database 135.
[0087] In some embodiments, the feedback processor 165 may generate feedback data 505 to include information for updating the weights of the generative transformer model 165. In some embodiments, the feedback processor 165 may generate feedback data 505 in a format similar to the corpus 205 described above. The feedback data 505 may be generated to include information about the content of the message 175' and the response 415 from the user 405. In some embodiments, the feedback processor 165 may calculate, generate, or otherwise determine a performance metric that identifies or corresponds to the interaction 410 of the user 405 with the message 175' to include as part of the feedback data 505. The performance metric may indicate the extent to which the presented message 175' induces interaction. In general, more interactions with the message 175' variants may result in higher performance metrics. Conversely, fewer or no interactions with the message 175' when presented may result in lower performance metrics. Once generated, the feedback processor 165 may include the performance metric and the content of the message 175' in the feedback data 505.
[0088] In some embodiments, feedback processor 160 may apply sentiment analysis to information included in response 415 (e.g., data entered by user 405) to generate performance metrics. Natural language processing (NLP) techniques such as vocabulary analysis of sentiment-related words, support vector machines (SVMs), linear regression, or The feedback processor 160 may perform sentiment analysis using a Bayesian model, etc. The feedback processor 160 may apply a sentiment analysis algorithm to the response 415 to identify, detect, or otherwise identify the sentiment of the user 405 regarding the presented message 175'. The sentiment may include, for example, positive, negative, or neutral indications, etc. Using the identified sentiment, the feedback processor 160 may assign a value to the performance metric. For example, when the sentiment is positive, the feedback processor 160 may assign a high value. When the sentiment is negative, the feedback processor 160 may assign a low value. When the sentiment is neutral, the feedback processor 160 may assign an intermediate value.
[0089] The model trainer 140 may use the feedback data 505 to modify, adjust, or otherwise update the weights of the generative transformer model 165. The feedback data 505 may be aggregated across multiple responses 415 from a user 405 or from multiple users 405. In general, the model trainer 140 may update the weights to support the generation of the message 175' using a high performance metric, and penalize the output of the message 175' using a lower performance metric. The training or fine-tuning of the generative transformer model 165 using the feedback data 505 may be similar to the training or fine-tuning using the corpus 205 group described above. For training, the model trainer 140 may define, select, or otherwise identify at least a portion of each feedback data 505 as a source set, and identify at least a portion of each feedback data 505 as a destination set. The source set may be used as an input to the generative transformer model 165 to generate an output to be compared with the destination set. The portions of each feedback data 505 may overlap at least partially and may correspond to a subset of the text strings within the feedback data 505.
[0090] The model trainer 140 may feed or apply strings from a source set of feedback data 505 to the generative transformer model 165. In an application, the model trainer 140 may process input strings according to the set of layers in the generative transformer model 165. As described above, the generative transformer model 165 may include a word segmentation layer, an input embedding layer, a position encoder, an encoder stack, a decoder stack, and an output layer, among others. The model trainer 140 may process input strings (words or phrases in the form of alphanumeric characters) of the source set using the word segmentation layer of the generative transformer model 165 to generate a set of word vectors for the input set. Each word vector may be a vector representation of at least one corresponding string in an n-dimensional feature space (e.g., using a word embedding table). The model trainer 140 may apply the set of word vectors to the input embedding layer to generate a corresponding set of embeddings. The model trainer 140 may identify the position of each string within the set of strings of the source set. By identifying, the model trainer 140 may apply a position encoder to the position of each string to generate a position encoding corresponding to each embedding of the string, and expand the embedding.
[0091] The model trainer 140 can apply the set of embeddings together with the corresponding set of positional encodings generated according to the input set of feedback data 505 to the encoder stack of the generative transformer model 165. In application, the model trainer 140 can process the set of embeddings and the corresponding set of positional encodings according to the layers (e.g., attention layers and feedforward layers) in each encoder in the encoder block. From this processing, the model trainer 140 can generate another set of embeddings to feed forward to the encoders in the encoder stack. The model trainer 140 can then feed the output of the encoder stack to the decoder stack.
[0092] In combination, the model trainer 140 can use a separate word segmentation layer of the generative transformer model 165 to process the data of the destination set (e.g., text, image, audio, video, or multimedia content) to generate a set of word vectors for the destination set. The data of the destination set can have the same schema as the source set of feedback data 505, or can have a different schema from the source set of feedback data 505. Each word vector can be a vector representation of at least one corresponding string in an n-dimensional feature space (e.g., using a word embedding table). The model trainer 140 can apply the set of word vectors to the input embedding layer to generate a corresponding set of embeddings. The model trainer 140 can identify the position of each string within the set of strings of the target set. By identifying, the model trainer 140 can apply a position encoder to the position of each string to generate a position encoding corresponding to each embedding of the string, and expand the embedding.
[0093] The model trainer 140 may apply the set of embeddings to the decoder stack of the generative transformer model 165 along with the corresponding set of positional encodings generated according to the destination set of the feedback data 505. The model trainer 140 may also combine the outputs of the encoder stack in the processing through the decoder stack. In application, the model trainer 140 may process the set of embeddings and the corresponding set of positional encodings according to the layers (e.g., attention layers, encoder-decoder attention layers, feed-forward layers) in each decoder in the decoder block. The model trainer 140 may combine the outputs from the encoder with the inputs of the encoder-decoder attention layers in the decoder block. Based on this processing, the model trainer 140 may generate an output set of embeddings to be fed forward to the output layer.
[0094] Next, the model trainer 140 can feed the output from the decoder block into the output layer of the generative transformer layer 165. In the feed, the model trainer 140 can process the embedding from the decoder block according to the linear layer and the activation layer of the output layer. Through this processing, the model trainer 140 can calculate the probability of each embedding. The probability can represent the possibility of the output of a given input word element. Based on the probability, the model trainer 140 can select an output word element (e.g., at least a portion of the output text, image, audio, video, or multimedia content with the highest probability) to form, generate, or otherwise generate an output 510. The output 510 may include text content, image content, audio content, video content, or multimedia content, etc., or any combination thereof. The pattern of the output 510 can be the same as the target set pattern of the feedback data 505.
[0095] By generation, the model trainer 140 can compare the output 510 from the generative transformer model 165 with the destination set of feedback data 505 used to generate the output 510. The comparison can be a comparison between the probabilities (or distributions) of various word-grams from the content of the output 510 (e.g., words of the text output) and the probabilities of word-grams in the target set of feedback data 505. For example, the model trainer 140 can determine the difference between the probability distribution of the output 510 and the target set of feedback data 505. The probability distribution can identify the probability of each candidate word-gram in the output 510 or the word-gram in the target set. Based on the comparison, the model trainer 140 can calculate, determine, or otherwise generate a loss metric. The loss metric can indicate the degree of deviation of the output 510 from the expected output defined by the target set of feedback data 505 used to generate the output 510. The loss metric can be calculated according to any number of loss functions, such as norm loss (e.g., L1 or L2), mean squared error (MSE), quadratic loss, cross entropy loss, or Huber loss, etc.
[0096] In some embodiments, the model trainer 140 may determine a loss metric for the output 510 based on the performance metric determined for each message 175'. In the determination, the model trainer 140 may compare the content of the output 510 with the message 175 to calculate similarity. The similarity may measure, correspond to, or indicate, for example, semantic similarity (e.g., using knowledge mapping when comparing the text of the message 175' and the output 510), visual similarity (e.g., using pixel-to-pixel value comparison when comparing an image or frame of a video of the message 175' and the output 510), or audio similarity (e.g., using correlation or cosine similarity between the audio of the message 175' and the output 510). The loss metric may be a function of similarity and performance metric, among others. In general, the higher the loss metric, the more likely the generated output 510 is to deviate from a message 175' having a higher performance metric and be closer to a message 175' having a lower performance metric. Conversely, the lower the loss metric, the less similar the generated output 510 is to a message 175' having a higher performance metric and the less it deviates from a message 175' having a lower performance metric. A loss metric may be calculated to train the generative transformer model 165 to generate output content of messages having a higher probability of user engagement.
[0097] Using the loss metric, the model trainer 140 may update one or more weights in the set of layers of the generative transformer model 165. The update of the weights may be based on back propagation and an optimization function (sometimes referred to herein as an objective function) having one or more parameters (e.g., a learning rate, momentum, weight decay, and a number of iterations). The optimization function may define one or more parameters to which the weights of the generative transformer model 165 will be updated. The model trainer 140 may iteratively train the generative transformer model 165 until convergence. Once converged, the model trainer 140 may store and maintain the set of weights for the set of layers of the generative transformer model 165.
[0098] In this manner, the session management service 105 can iteratively and continuously consider responses 405 from presenting messages 175' to the user 405 to improve the generation of new content for subsequent messages 175'. Incorporating feedback data 505 can make the newly generated messages 175' more targeted and relevant to the user's 405 changing state (e.g., progress in resolving a condition) and preferences compared to predefined, fixed content sequences. In the context of digital therapy, the newly generated messages 175' can take into account changes in use, such as improvement or deterioration of the end user's condition or progress through a treatment regimen. By using the generative transformer model 165, content can be flexibly generated for the user 405, and personalized content can be extended to a wide audience. The flexibility, scalability, and targeting achieved can optimize or reduce the consumption of computing resources (e.g., processors and memory) and network bandwidth, which would otherwise be wasted by providing ineffective content. From a human-computer interaction (HCI) perspective, the content generated by utilizing the generative transformer model 165 can produce higher quality interactions by the user 405 with the user device 110. Furthermore, increased interaction may lead to a higher level of compliance with the treatment regimen by the user 405. Higher compliance, in turn, may lead to a greater likelihood of preventing, alleviating, or treating the end user's condition.
[0099] Reference now Figure 6, depicts a method 600 for training a generative transformer model 165 based on responses to messages transmitted to a user device 110. The method 600 may be implemented or performed using any of the components detailed herein, such as the session management service 105, the user device 110, and the database 135, among others. Under the method 600, a computing system (e.g., the session management system 105 or the user device 110 or both) may train a generative model (e.g., the generative transformer model 165) (605). The computing system may identify parameters (610). The computing system may create a prompt (e.g., the prompt 305) based on a template (e.g., the template 185) (615). The computing system may apply the prompt to the generative model (e.g., the generative transformer model 165) to generate an output message (e.g., the message 175') (620). The computing system may provide the output message to a user device (e.g., the user device 110) via an application (e.g., the application 120) (625). The message may be displayed on a user interface (e.g., user interface 125) using a user interface element (e.g., UI element 130). The computing system may receive a response (e.g., response 415) from a user (e.g., user 405) through interaction (e.g., interaction 410) with an application on the user device (630). The computing system may use the response to generate feedback data (e.g., feedback data 505) (635). The computing system may use the feedback data to train a generative model and repeat the functionality of step (605).
[0100] B. Network and computing environment
[0101] Various operations described herein can be implemented on a computer system. Figure 7 A simplified block diagram of a representative server system 700, a client computer system 714, and a network 726 that can be used to implement certain embodiments of the present disclosure is shown. In various embodiments, the server system 700 or a similar system can implement the services or servers described herein or portions thereof. The client computer system 714 or a similar system can implement the clients described herein. The system 100 described herein can be similar to the server system 700. The server system 700 can have a modular design including multiple modules 702 (e.g., blades in a blade server embodiment); although two modules 702 are shown, any number can be provided. Each module 702 can include a processing unit 704 and a local storage 706.
[0102] The one or more processing units 704 may include a single processor (which may have one or more cores) or multiple processors. In some embodiments, the processing unit 704 may include a general purpose main processor and one or more dedicated coprocessors, such as a graphics processor, a digital signal processor, etc. In some embodiments, custom circuits such as application specific integrated circuits (ASICs) or field programmable gate arrays (FPGAs) may be used to implement some or all of the processing units 704. In some embodiments, such integrated circuits execute instructions stored on the circuit itself. In other embodiments, the one or more processing units 704 may execute instructions stored in local storage 706. Any type of processor in any combination may be included in the one or more processing units 704.
[0103] The local storage 706 may include volatile storage media (e.g., DRAM, SRAM, SDRAM, etc.) and / or non-volatile storage media (e.g., magnetic disks or optical disks, flash memory, etc.). The storage media incorporated in the local storage 706 may be fixed, removable, or upgradeable as needed. The local storage 706 may be physically or logically divided into various subunits, such as system memory, read-only memory (ROM), and permanent storage devices. The system memory may be a read-write memory device or a volatile read-write memory, such as a dynamic random access memory. The system memory may store some or all of the instructions and data required by one or more processing units 704 at runtime. The read-only memory may store static data and instructions required by one or more processing units 704. The permanent storage device may be a non-volatile read-write memory device that may store instructions and data even when the module 702 is powered off. The term "storage media" as used herein includes any media in which data can be stored indefinitely (subject to coverage, electrical interference, power loss, etc.) and excludes carrier waves and transient electronic signals that propagate wirelessly or through wired connections.
[0104] In some embodiments, local storage 706 may store one or more software programs to be executed by one or more processing units 704, such as an operating system and / or programs that implement various server functions, such as functions of system 100 or any other system described herein, or any one or more other servers associated with system 100 or any other system described herein.
[0105] "Software" generally refers to a sequence of instructions that, when executed by one or more processing units 704, causes the server system 700 (or portions thereof) to perform various operations, thereby defining one or more specific machine embodiments that execute and perform the operations of the software program. Instructions may be stored as firmware residing in read-only memory and / or program code stored in non-volatile storage media, which may be read into volatile working memory for execution by one or more processing units 704. Software may be implemented as a single program or a collection of independent programs or program modules that interact as needed. One or more processing units 704 may retrieve program instructions to be executed and data to be processed from local storage 706 (or non-local storage described below) to perform the various operations described above.
[0106] In some server systems 700, multiple modules 702 may be interconnected via a bus or other interconnect 708 to form a local area network that supports communications between modules 702 and other components of the server system 700. The interconnect 708 may be implemented using a variety of technologies including server racks, hubs, routers, etc.
[0107] Wide area network (WAN) interface 710 can provide data communication capabilities between a local area network (e.g., via interconnect 708) and a network 726 (e.g., the Internet). Other technologies can be used to communicatively couple the server system to network 726, including wired (e.g., Ethernet, IEEE 802.3 standards) and / or wireless technologies (e.g., Wi-Fi, IEEE 802.11 standards).
[0108] In some embodiments, local storage 706 is intended to provide working memory for one or more processing units 704, providing fast access to programs and / or data to be processed while reducing traffic on interconnect 708. Storage for larger amounts of data can be provided on a local area network through one or more mass storage subsystems 712 that can be connected to interconnect 708. Mass storage subsystem 712 can be based on magnetic, optical, semiconductor or other data storage media. Direct attached storage, storage area networks, network attached storage, etc. can be used. Any data storage or other data collection described herein as being generated, used or maintained by a service or server can be stored in mass storage subsystem 712. In some embodiments, additional data storage resources can be accessed via wide area network interface 710 (potentially with increased latency).
[0109] The server system 700 can operate in response to requests received via the WAN interface 710. For example, one of the modules 702 can implement monitoring functions and allocate discrete tasks to other modules 702 in response to received requests. Work distribution techniques can be used. When the request is processed, the result can be returned to the requester via the WAN interface 710. This operation can be automated as a whole. In addition, in some embodiments, the wide area network interface 710 can connect multiple server systems 700 to each other, providing an extensible system that can manage a large number of activities. Other technologies for managing server systems and server farms (a collection of collaborative server systems) can be used, including dynamic resource allocation and reallocation.
[0110] The server system 700 can interact with various user-owned or user-operated devices via a wide area network such as the Internet. Examples of user-operated devices are shown in FIG. Figure 7 714. The client computing system 714 may be implemented, for example, as a consumer device such as a smartphone, other mobile phone, tablet computer, wearable computing device (e.g., smart watch, glasses), desktop computer, laptop computer, etc. For example, the client computing system 714 may communicate via a wide area network interface 720. The client computing system 714 may include computer components such as one or more processing units 716, storage 718, network interface 720, user input device 722, and user output device 724. The client computing system 714 may be a computing device implemented in various form factors, such as a desktop computer, laptop computer, tablet computer, smartphone, other mobile computing device, wearable computing device, etc.
[0111] The processing unit 716 and storage 718 may be similar to the one or more processing units 704 and local storage 706 described above. Appropriate devices may be selected based on the requirements for the client computing system 714; for example, the client computing system 714 may be implemented as a "thin" client with limited processing capabilities or as a high-power computing device. The client computing system 714 may be provided with program code executable by the one or more processing units 716 to enable various interactions with the server system 700.
[0112] The network interface 720 may provide a connection to a network 726, such as a wide area network (e.g., the Internet) to which the wide area network interface 710 of the server system 700 is also connected. In various embodiments, the network interface 720 may include a wired interface (e.g., Ethernet) and / or a wireless interface implementing various radio frequency data communication standards (e.g., Wi-Fi, Bluetooth, or a cellular data network standard (e.g., 3G, 4G, LTE, etc.)).
[0113] User input device 722 may include any one or more devices via which a user may provide signals to client computing system 714; client computing system 714 may interpret the signals as indicating a user request or information. In various embodiments, user input device 722 may include at least one of a keyboard, a touch pad, a touch screen, a mouse or other pointing device, a scroll wheel, a click wheel, a dial, a button, a switch, a keyboard, a microphone, and the like.
[0114] The user output device 724 may include any device via which the client computing system 714 can provide information to a user. For example, the user output device 724 may include a display-to-display image generated by or delivered to the client computing system 714. The display may be combined with various image generation technologies, such as a liquid crystal display (LCD), a light emitting diode (LED) display including an organic light emitting diode (OLED), a projection system, a cathode ray tube (CRT), etc., and supporting electronic devices (e.g., digital-to-analog or analog-to-digital converters, signal processors, etc.). Some embodiments may include devices such as touch screens that serve as input and output devices. In some embodiments, other user output devices 724 may be provided in addition to or in place of a display. Examples include indicator lights, speakers, tactile "display" devices, printers, etc.
[0115] Some embodiments include electronic components, such as microprocessors, memories, and storage devices, that store computer program instructions in computer-readable storage media. Many features described in this specification may be implemented as processes designated as a group of program instructions encoded on a computer-readable storage medium. When one or more processing units execute these program instructions, they cause one or more processing units to perform the various operations indicated in the program instructions. Examples of program instructions or computer codes include machine codes such as those produced by a compiler and files comprising high-level codes executed by a computer, an electronic component, or a microprocessor using an interpreter. Through suitable programming, one or more processing units 704 and 716 may provide various functions for server system 700 and client computing system 714, including any functions or other functions described herein as being executed by a server or client.
[0116] It should be understood that the server system 700 and the client computing system 714 are illustrative, and variations and modifications are possible. The computer system used in conjunction with the embodiments of the present disclosure may have other capabilities not specifically described herein. In addition, although the server system 700 and the client computing system 714 are described with reference to specific blocks, it should be understood that these blocks are defined for convenience of description, and these blocks are not intended to imply a specific physical arrangement of component parts. For example, different blocks can be but do not need to be in the same facility, the same server rack, or the same motherboard. In addition, blocks do not need to correspond to physically different components. Blocks can be configured to perform various operations, for example, by programming a processor or providing appropriate control circuits, and depending on how to obtain the initial configuration, various blocks may or may not be reconfigurable. The embodiments of the present disclosure can be implemented in various devices including electronic devices implemented using any combination of circuits and software.
[0117] Although the present disclosure has been described with respect to specific embodiments, those skilled in the art will recognize that many modifications are possible. Various computer systems and communication technologies can be used to implement embodiments of the present disclosure, including but not limited to the specific examples described herein. Any combination of dedicated components and / or programmable processors and / or other programmable devices can be used to implement embodiments of the present disclosure. The various processes described herein can be implemented on the same processor or different processors in any combination. In the case where a component is described as being configured to perform certain operations, this configuration can be implemented, for example, by designing an electronic circuit to perform the operation, by programming a programmable electronic circuit (such as a microprocessor) to perform the operation or any combination thereof. In addition, although the above-mentioned embodiments may refer to specific hardware and software components, it will be appreciated by those skilled in the art that different combinations of hardware and / or software components may also be used, and specific operations described as being implemented in hardware may also be implemented in software, and vice versa.
[0118] Computer programs incorporating various features of the present disclosure may be encoded and stored on a variety of computer-readable storage media; suitable media include disks or tapes, optical storage media such as compact disks (CDs) or digital versatile disks (DVDs), flash memory, and other non-transitory media. Computer-readable media encoded with program code may be packaged with compatible electronic devices, or the program code may be provided separately from the electronic device (e.g., via Internet download or as a separately packaged computer-readable storage medium).
[0119] Therefore, although the disclosure has been described with respect to particular embodiments, it should be understood that the disclosure is intended to cover all modifications and equivalents within the scope of the appended claims.
Claims
1. A method of providing a message directed to resolving a situation in a user, comprising: identifying, by a computing system, (i) a condition of a user to be resolved, and (ii) one or more parameters defining a message to be presented via an application implementing an endpoint associated with the condition of the user; generating, by the computing system, a prompt according to a template using the condition and the one or more parameters; Applying, by the computing system, the prompt to a generative model including a plurality of weights to output a message identifying at least one activity for implementing the endpoint, wherein the generative model is established by the following steps: identifying a plurality of corpora, each corpus in the plurality of corpora comprising a corresponding first data set; applying at least a portion of the respective first data set of each of the plurality of corpora to the generative model to generate a respective second data set; For each of the plurality of corpora, comparing a first distribution of word-grams in the at least a portion of the corresponding first data set with a second distribution of word-grams in the corresponding second data set; and updating one or more of the plurality of weights in the generative model based on the comparison; and providing, by the computing system, the message for presentation to prompt the user to perform the activity via the application implementing the endpoint to resolve the condition.
2. The method according to claim 1, further comprising: receiving, by the computing system via the application in response to presentation of the message, a response identifying the activity performed by the user; as well as One or more second parameters are determined, by the computing system, based on the response to define the message to be presented to the user.
3. The method according to claim 1, further comprising: retrieving, by the computing system, a plurality of candidate messages from a database based on the endpoint implemented to resolve the situation for the user, wherein identifying the one or more parameters further comprises: identifying the one or more parameters to include the plurality of candidate messages to define the messages to be presented; Wherein, applying the prompt further comprises: applying the prompt to the generative model to select the message from the multiple candidate messages.
4. The method according to claim 1, wherein: The generative model is trained using a set of rules that define selection from a plurality of candidate messages based on at least one of: (i) user behavior, (ii) user preferences, or (iii) user profile information.
5. The method according to claim 1, wherein: Applying the prompt also includes applying the prompt to the generative model to generate the message, wherein at least one of the plurality of corpora used to train the generative model includes a plurality of data sets associated with a situation to be solved.
6. The method according to claim 1, further comprising: The generative model for the user is updated, by the computing system via the application in response to presentation of the message, using a response identifying the activity performed by the user.
7. The method according to claim 1, wherein: Applying the prompt further comprises applying the prompt comprising a plurality of text strings to the generative model to generate the message comprising visual content, wherein at least one of the plurality of corpora used to train the generative model comprises textual data and visual data.
8. The method according to claim 1, further comprising: A second prompt is applied, by the computing system, to the generative model to output a second message for the course, the second message identifying information for the user to implement the endpoint.
9. The method according to claim 1, further comprising: A delivery model for the user is used by the computing system to determine a time to present the message to the user.
10. The method according to claim 1, wherein: The user uses medication to address the condition consistent with the conversation portion in which the message is provided, and wherein the message includes at least one of a short message service (SMS) message, a multimedia message service (MMS) message, or an in-application message.
11. A system for providing a message directed to resolving a condition in a user, comprising: One or more processors coupled to the memory and configured to: identifying (i) a condition of a user to be resolved, and (ii) one or more parameters defining a message to be presented via an application implementing an endpoint associated with the condition of the user; generating a prompt according to a template using the condition and the one or more parameters; Applying the prompt to a generative model including a plurality of weights to output a message identifying at least one activity implementing the endpoint, wherein the generative model is built by: identifying a plurality of corpora, each corpus in the plurality of corpora comprising a corresponding first data set; applying at least a portion of the respective first data set of each of the plurality of corpora to the generative model to generate a respective second data set; For each of the plurality of corpora, comparing a first distribution of word-grams in the at least a portion of the corresponding first data set with a second distribution of word-grams in the corresponding second data set; and updating one or more of the plurality of weights in the generative model based on the comparison; and The message is provided for presentation to prompt the user to perform the activity via the application implementing the endpoint to resolve the condition.
12. The system according to claim 11, wherein: The one or more processors are further configured to: receiving, via the application, a response identifying the activity performed by the user in response to presentation of the message; and One or more second parameters are determined based on the response to define the message to be presented to the user.
13. The system according to claim 11, wherein: The one or more processors are further configured to: retrieving a plurality of candidate messages from a database based on the endpoint implementing resolution of the situation for the user; identifying the one or more parameters to include the plurality of candidate messages to define a message to be presented; The prompt is applied to the generative model to select the message from the plurality of candidate messages.
14. The system according to claim 11, wherein: The generative model is trained using a set of rules that define selection from a plurality of candidate messages based on at least one of: (i) user behavior, (ii) user preferences, or (iii) user profile information.
15. The system according to claim 11, wherein: The one or more processors are further configured to apply the prompt to the generative model to generate the message, wherein at least one of the plurality of corpora used to train the generative model includes a plurality of data sets associated with a situation to be solved.
16. The system of claim 11, wherein: The one or more processors are further configured to update, via the application, the generative model of the user with a response identifying the activity performed by the user in response to the presentation of the message.
17. The system of claim 11, wherein: The one or more processors are further configured to apply a prompt comprising a plurality of text strings to the generative model to generate the message comprising visual content, wherein at least one of the plurality of corpora used to train the generative model comprises textual data and visual data.
18. The system of claim 11, wherein: The one or more processors are further configured to apply a second prompt to the generative model to output a second message for the course, the second message identifying information for the user to implement the endpoint.
19. The system of claim 11, wherein: The one or more processors are further configured to use a delivery model for the user to determine a time to present the message to the user.
20. The system of claim 11, wherein: The user uses medication to address the condition consistent with the conversation portion in which the message is provided, and wherein the message includes at least one of a short message service (SMS) message, a multimedia messaging service (MMS) message, or an in-application message.