Electronic device, non-transitory computer-readable storage medium, and method for generating prompts for language models on basis of user prompts
Patent Information
- Application Number
- PCT/KR2025/022838
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-03-14
- Filing Date
- 2025-12-26
- Publication Date
- 2026-08-27
Smart Images

Figure KR2025022838_27082026_PF_FP_ABST
Abstract
Description
Electronic device for generating prompts for language models based on user prompts, non-transient computer-readable storage medium, and method
[0001] The following descriptions relate to an electronic device, a non-transient computer-readable storage medium, and a method for generating prompts for language models based on user prompts.
[0002] A language model can be used for natural language interpretation. For example, the language model can receive natural language-based input (e.g., a user query). For example, the language model can generate an output response for the natural language-based input by performing natural language interpretation in relation to the natural language-based input.
[0003] The information described above may be provided as related art for the purpose of aiding understanding of the present disclosure. No claim or determination is made as to whether any of the foregoing may be applied as prior art related to the present disclosure.
[0004] An electronic device is provided. The electronic device may include at least one processor comprising a processing circuit and a memory comprising one or more storage media for storing instructions. The instructions may cause the electronic device to receive input for a user prompt through the electronic device when executed individually or collectively by the at least one processor. The instructions may cause the electronic device to identify keywords including a first keyword and a second keyword from the user prompt based on the input when executed individually or collectively by the at least one processor. The instructions may cause the electronic device to determine first correlation data between at least one keyword for a first trained model available for natural language processing and the keywords including the first keyword and the second keyword when executed individually or collectively by the at least one processor. The above instructions may cause the electronic device to determine, when executed individually or collectively by the at least one processor, at least one keyword for a second trained model available for natural language processing and second correlation data between the keywords including the first keyword and the second keyword. The above instructions may cause the electronic device to determine, when executed individually or collectively by the at least one processor, a first prompt to be applied to the first trained model as a first text corresponding to the first keyword, based on the first correlation data and the second correlation data.The above instructions may cause the electronic device to determine, based on the first correlation data and the second correlation data, a second prompt to be applied to the second trained model as a second text corresponding to the second keyword, when executed individually or collectively by the at least one processor. The above instructions may cause the electronic device to obtain the response of the first trained model based on the first prompt and the response of the second trained model based on the second prompt when executed individually or collectively by the at least one processor. The above instructions may cause the electronic device to determine an output response for the user prompt based on the response of the first trained model and the response of the second trained model when executed individually or collectively by the at least one processor.
[0005] A non-transient computer-readable storage medium is provided. The non-transient computer-readable storage medium may store one or more programs. The one or more programs may include instructions that cause the electronic device to receive input for a user prompt through the electronic device when executed by the electronic device. The one or more programs may include instructions that cause the electronic device to identify keywords including a first keyword and a second keyword from the user prompt based on the input when executed by the electronic device. The one or more programs may include instructions that cause the electronic device to determine first correlation data between at least one keyword for a first trained model available for natural language processing and the keywords including the first keyword and the second keyword when executed by the electronic device. The above one or more programs may include instructions that cause the electronic device to determine, when executed by the electronic device, at least one keyword for a second trained model available for natural language processing and second correlation data between the keywords including the first keyword and the second keyword. The above one or more programs may include instructions that cause the electronic device to determine, when executed by the electronic device, a first prompt to be applied to the first trained model as a first text corresponding to the first keyword, based on the first correlation data and the second correlation data.The above one or more programs may include instructions that cause the electronic device to determine, when executed by the electronic device, a second prompt to be applied to the second trained model as a second text corresponding to the second keyword, based on the first correlation data and the second correlation data. The above one or more programs may include instructions that cause the electronic device to obtain a response of the first trained model based on the first prompt and a response of the second trained model based on the second prompt, when executed by the electronic device. The above one or more programs may include instructions that cause the electronic device to determine an output response for the user prompt based on the response of the first trained model and the response of the second trained model, when executed by the electronic device.
[0006] A method is provided. The method may be performed by an electronic device. The method may include an operation of receiving input for a user prompt through the electronic device. The method may include an operation of identifying keywords including a first keyword and a second keyword from the user prompt based on the input. The method may include an operation of determining first correlation data between at least one keyword for a first trained model available for natural language processing and the keywords including the first keyword and the second keyword. The method may include an operation of determining second correlation data between at least one keyword for a second trained model available for natural language processing and the keywords including the first keyword and the second keyword. The method may include an operation of determining a first prompt to be applied to the first trained model as a first text corresponding to the first keyword based on the first correlation data and the second correlation data. The method may include an operation of determining a second prompt to be applied to the second trained model as a second text corresponding to the second keyword based on the first correlation data and the second correlation data. The above method may include an operation of obtaining a response from the first trained model based on the first prompt and a response from the second trained model based on the second prompt. The above method may include an operation of determining an output response for the user prompt based on the response from the first trained model and the response from the second trained model.
[0007] In relation to the description of the drawings, the same or similar reference numerals may be used for identical or similar components.
[0008] Figure 1 is a schematic view of an exemplary electronic device.
[0009] Figure 2 illustrates an example of an environment that generates an output response for a user prompt based on the user prompt through language models.
[0010] FIG. 3 illustrates examples of signalings that are triggered to generate output responses for a user prompt by determining prompts for language models according to the user prompt.
[0011] Figure 4 is a flowchart illustrating a method for determining table data based on keywords for language models.
[0012] Figure 5 illustrates an example of an environment that performs correlation analysis between keywords for language models to determine table data.
[0013] FIG. 6 is a flowchart illustrating a method for generating an output response for a user prompt by determining prompts for language models according to the user prompt.
[0014] Figures 7a and 7b are examples of environments in which an output response for a user prompt is provided to the user based on the user prompt.
[0015] FIG. 8 is a block diagram of an electronic device in a network environment according to various embodiments.
[0016] FIG. 9 is a schematic diagram of an exemplary artificial intelligence (AI) system according to one embodiment.
[0017] Hereinafter, embodiments of the present disclosure are described in detail with reference to the drawings so that those skilled in the art can easily practice them. However, the present disclosure may be embodied in various different forms and is not limited to the embodiments described herein. In relation to the description of the drawings, the same or similar reference numerals may be used for identical or similar components. Furthermore, in the drawings and related descriptions, descriptions of well-known functions and configurations may be omitted for clarity and brevity.
[0018] Figure 1 is a schematic view of an exemplary electronic device.
[0019] According to one embodiment, with reference to FIG. 1, the electronic device (101) may include at least one processor (110), memory (120), display (130), speaker (140), and communication circuit (150). The electronic device (101) may include at least a part of the electronic device (801) of FIG. 8 or correspond to at least a part of the electronic device (801) of FIG. 8.
[0020] According to one embodiment, at least one processor (110) may include a processing circuit. At least one processor (110) may include a single processor or multiple processors. At least one processor (110) may control the memory (120) and / or one or more components (e.g., a display (130), a speaker (140), and a communication circuit (150)) of the electronic device (101). For example, at least one processor (110) may include at least a part of the processor (820) of FIG. 8 or correspond to at least a part of the processor (820) of FIG. 8.
[0021] According to one embodiment, the memory (120) may store one or more programs configured to be executed individually and / or collectively by at least one processor (110). The one or more programs may include instructions. The instructions may cause an electronic device (101) to perform operations described with reference to FIGS. 2 through 7b. The memory (120) may include one or more storage media. At least some of the one or more programs may be available to manage, control, and / or execute a trained model available for natural language processing, which is described below. For example, the memory (120) may include at least some of the memory (830) of FIG. 8 or correspond to at least some of the memory (830) of FIG. 8.
[0022] According to one embodiment, the display (130) can visually provide information to an external (e.g., user) of the electronic device (101). For example, the display (130) may include a display panel and / or a touch sensor. For example, the display panel may be used to display visual information (e.g., images, screens, objects, UI (user interface), GUI (graphic user interface) and / or visual objects). For example, the display panel may have a display area capable of receiving touch input. For example, the touch sensor may be used to obtain data about an external object located on the display panel. For example, the touch sensor may be located within or on the display panel to provide an area of the display panel capable of receiving the touch input. For example, the touch sensor may be configured to obtain data about contact points on at least a portion of the area. For example, the display (130) may include at least a part of the display module (860) of FIG. 8 or correspond to at least a part of the display module (860) of FIG. 8.
[0023] According to one embodiment, the speaker (140) can output sound to the outside of the electronic device (101) (e.g., a user) based on audio data identified by at least one processor (110). For example, the speaker (140) may include at least a part of the sound output module (855) of FIG. 8 or correspond to at least a part of the sound output module (855) of FIG. 8.
[0024] According to one embodiment, the communication circuit (150) may support the establishment of a direct (e.g., wired) communication channel or a wireless communication channel between an electronic device (101) and an external electronic device (e.g., electronic device (802), electronic device (804), and server (808)), and the performance of communication through the established communication channel. For example, the communication circuit (150) may include at least a part of the communication module (890) of FIG. 8 or correspond to at least a part of the communication module (890) of FIG. 8.
[0025] According to one embodiment, an electronic device (101) may receive input for a user prompt. The electronic device (101) may generate an output response for the user prompt based on responses from two or more domain-specific language models according to the user prompt. For example, by generating the output response for the user prompt based on the responses of the domain-specific language models, the electronic device (101) may reduce the time required to train the language model and the amount of training data compared to a general-purpose language model.
[0026] According to one embodiment, the electronic device (101) can determine correlation data between the keywords of the user prompt and the keywords for each of the domain-specific language models. The electronic device (101) can determine a prompt for each of the domain-specific language models based on the correlation data. For example, the electronic device (101) can increase the consistency between the output response for the user prompt and the user's intent by determining the prompt for each of the domain-specific language models based on the correlation data.
[0027] According to one embodiment, the electronic device (101) can mitigate the occurrence of an output response requiring additional user input by applying the response of the domain-specific language model to another domain-specific language model, based on the fact that at least one slot among the slots for the response of the domain-specific language model corresponds to an empty slot. For example, the electronic device (101) can further maximize user convenience regarding input of the user prompt by mitigating the occurrence of the output response requiring additional input.
[0028] Figure 2 illustrates an example of an environment that generates an output response for a user prompt based on the user prompt through language models.
[0029] According to one embodiment, with reference to FIG. 2, an environment (200) is shown that generates an output response for a user prompt based on the user prompt through trained models available for nature language processing (NLP).
[0030] According to one embodiment, the environment (200) may include trained models (201) available for natural language processing and a domain interaction system (210) for managing, controlling, and / or executing the trained models (201). For example, the domain interaction system (210) may be described as at least one program that is executed by at least one processor (110) and stored in memory (120).
[0031] According to one embodiment, the trained models (201) may include a first trained model (201-1) available for natural language processing, a second trained model (201-2) available for natural language processing, a third trained model (201-3) available for natural language processing, …, and an Nth trained model (201-N) available for natural language processing ('N' is a natural number greater than or equal to '4'). The number of trained models available for natural language processing is not limited to that shown in FIG. 2. The present disclosure is applicable to an environment including two or more trained models.
[0032] According to one embodiment, each of the first to N trained models (201-1, 201-2, 201-3, …, 201-N) may be described as a domain-specific language model trained for natural language processing regarding different domains. By example, without limitation, the first trained model (201-1) may be a domain-specific language model trained for natural language processing regarding a domain corresponding to sports. By example, without limitation, the second trained model (201-2) may be a domain-specific language model trained for natural language processing regarding a domain corresponding to health care. By example, without limitation, the third trained model (201-3) may be a domain-specific language model trained for natural language processing regarding a domain corresponding to information technology (IT). In one embodiment, each of the first to N trained models (201-1, 201-2, 201-3, …, 201-N) may be a model computed by at least one processor (110) of the electronic device (101). In one embodiment, each of the first to N trained models (201-1, 201-2, 201-3, …, 201-N) may be described as a model computed within an external electronic device (e.g., a server (808)). In one embodiment, each of the first to N trained models (201-1, 201-2, 201-3, …, 201-N) may be described as a model computed within different external electronic devices. For example, each of the first to N trained models (201-1, 201-2, 201-3, …, 201-N) may include a computational model designed to simulate the neural activity of an organism and / or a program for performing calculations of said computational model.In one embodiment, each of the first to N trained models (201-1, 201-2, 201-3, …, 201-N) can be described as a domain-specific language model registered in an electronic device (101) according to the user's subscription information for an artificial intelligence (AI) service.
[0033] According to one embodiment, an electronic device (101) can obtain a user prompt from an input for a user prompt using a domain interaction system (210). For example, the electronic device (101) can receive an input for the user prompt (e.g., a user's speech) through a microphone (e.g., a microphone of an input module (850)). For example, the electronic device (101) can receive an input for the user prompt (e.g., text) through a keyboard (e.g., a keyboard of an input module (850)). For example, the user prompt may be described as text information regarding a user's input (e.g., a user's question and / or request) to be applied to a language model. The electronic device (101) can identify keywords of the user prompt from the user prompt based on the input using the domain interaction system (210). For example, the keywords of the user prompt may include a first keyword and a second keyword. For example, when the electronic device (101) corresponds to the user prompt “I got injured while doing the bradford press,” it can identify the first keyword of the user prompt as “bradford press” and the second keyword of the user prompt as “injured.”
[0034] According to one embodiment, the electronic device (101) can obtain keywords for trained models (201) using a domain interaction system (210). For example, the at least one keyword for the first trained model (201-1) may include one or more keywords associated with a domain corresponding to a sport (e.g., World Cup, Bradford Press, and broadcast). For example, keyword information for the at least one keyword for the first trained model (201-1) may be included in the manifest information of the first trained model (201-1) regarding the purpose and function of the first trained model (201-1). For example, the manifest information may be described as information regarding the attributes, manner, settings, and / or metadata of the trained model (e.g., language model). As an example without limitation, metadata included in the manifest information may include keyword information for at least one keyword defined for the trained model. For example, the at least one keyword for the second trained model (201-2) may include one or more keywords associated with a domain corresponding to healthcare (e.g., treatment, MRI (magnetic resonance imaging), and cold). For example, keyword information for the at least one keyword for the second trained model (201-2) may be included in the manifest information of the second trained model (201-2) regarding the purpose and function of the second trained model (201-2). For example, the at least one keyword for the third trained model (201-3) may include one or more keywords associated with a domain corresponding to information technology (IT) (e.g., software, AI, and media).For example, keyword information for at least one keyword for the third trained model (201-3) may be included in the manifest information of the third trained model (201-3) regarding the purpose and function of the third trained model (201-3).
[0035] According to one embodiment, the domain interaction system (210) may include a domain selection unit (220) and an output response generation unit (230). For example, the domain selection unit (220) may be described as a program for identifying (or selecting) one or more trained models among the trained models (201) to which the user prompt is to be applied. For example, the output response generation unit (230) may be described as a program for generating an output response of the user prompt based on the user prompt through the one or more trained models.
[0036] According to one embodiment, the domain selection unit (220) may include a correlation calculation unit (221) and a table data generation unit (222). For example, the correlation calculation unit (221) may be described as a program for performing correlation analysis between keywords for trained models (201). For example, the table data generation unit (222) may be described as a program for generating table data based on the correlation analysis.
[0037] According to one embodiment, the electronic device (101) can determine the correlation level between the keywords for the trained models (201) by performing a correlation analysis between the keywords for the trained models (201) using a correlation calculation unit (221). For example, the electronic device (101) can perform a correlation analysis between at least one keyword for the k-th trained model (201-K) and the keywords for the first to Nth trained models (201-1, 201-2, 201-3, …, 201-N) excluding the k-th trained model (201-K) ('K' is a natural number greater than or equal to '1' and less than or equal to 'N'). For example, the electronic device (101) can determine, by performing the correlation analysis, the correlation level between at least one keyword for the k-th trained model (201-K) and the keywords for the first to Nth trained models (201-1, 201-2, 201-3, …, 201-N) excluding the k-th trained model (201-K) as a first correlation level or a second correlation level. For example, the second correlation level may be greater than the first correlation level.
[0038] According to one embodiment, the electronic device (101) can generate table data based on the correlation analysis performed by the correlation calculation unit (221) using the table data generation unit (222). For example, the table data may include table data for each of the first to Nth trained models (201-1, 201-2, 201-3, …, 201-N). For example, the table data for the Kth trained model (201-K) may indicate the correlation level between keywords for the Kth trained model (201-K) and the first to Nth trained models (201-1, 201-2, 201-3, …, 201-N). For example, the correlation level between keywords for the k-th trained model (201-K) and the first to Nth trained models (201-1, 201-2, 201-3, …, 201-N) excluding the k-th trained model (201-K) may correspond to a correlation level determined by the correlation analysis (e.g., the first correlation level or the second correlation level). For example, the correlation level between at least one keyword for the k-th trained model (201-K) and the k-th trained model (201-K) may correspond to a third correlation level greater than the second correlation level. A method for generating table data will be described later with reference to FIGS. 4 and 5.
[0039] According to one embodiment, the electronic device (101) can identify one or more trained models to which the user prompt is to be applied among the trained models (201) based on the keywords of the table data and the user prompt, using a domain selection unit (220). For example, the electronic device (101) can identify one or more trained models (e.g., the first trained model (201-1), the second trained model (201-2), and the third trained model (201-3)) corresponding to at least one keyword of the user prompt among the first to Nth trained models (201-1, 201-2, 201-3, …, 201-N) based on the table data as the trained models to which the user prompt is to be applied.
[0040] According to one embodiment, the output response generation unit (230) may include a prompt generation unit (231), a prompt response processing unit (232), and a response output determination unit (233). For example, the prompt generation unit (231) may be described as a program for generating one or more prompts for each of one or more trained models among the trained models (201). For example, the prompt response processing unit (232) may be described as a program for processing the responses of the one or more trained models. For example, the response output determination unit (233) may be described as a program for determining whether to provide the responses of the one or more trained models to the user as output responses for the user prompt.
[0041] According to one embodiment, the electronic device (101) can determine correlation data between keywords for one or more trained models identified by the domain selection unit (220) among the trained models (201) and keywords of the user prompt by using a prompt generation unit (231). The electronic device (101) can generate a prompt for each of the one or more trained models based on the correlation data. For example, the electronic device (101) can determine correlation data between at least one keyword for each of the first trained model (201-1), the second trained model (201-2), and the third trained model (201-3) and keywords of the user prompt. For example, the electronic device (101) can determine a prompt to be applied to each of the first trained model (201-1), the second trained model (201-2), and the third trained model (201-3) based on the correlation data. As an example not limited to, the prompt generating unit (231) may include an opinion filler for adjusting the context of the prompt.
[0042] According to one embodiment, the electronic device (101) can determine first correlation data between at least one keyword for a first trained model (201-1) and the keywords of the user prompt based on the identification of the keywords of the user prompt. For example, the first correlation data may include a first correlation value and a second correlation value. For example, the first correlation value of the first correlation data may represent a correlation level between the at least one keyword for the first trained model (201-1) and the first keyword of the user prompt. For example, the second correlation value of the first correlation data may represent a correlation level between the at least one keyword for the first trained model (201-1) and the second keyword of the user prompt.
[0043] According to one embodiment, the electronic device (101) may determine second correlation data between at least one keyword for a second trained model (201-2) and the keywords of the user prompt based on the identification of the keywords of the user prompt. For example, the second correlation data may include a first correlation value and a second correlation value. For example, the first correlation value of the second correlation data may represent a correlation level between the at least one keyword for the second trained model (201-2) and the first keyword of the user prompt. For example, the second correlation value of the second correlation data may represent a correlation level between the at least one keyword for the second trained model (201-2) and the second keyword of the user prompt.
[0044] According to one embodiment, the electronic device (101) may determine third correlation data between at least one keyword for a third trained model (201-3) and the keywords of the user prompt based on the identification of the keywords of the user prompt. For example, the third correlation data may include a first correlation value and a second correlation value. For example, the first correlation value of the third correlation data may represent a correlation level between the at least one keyword for the third trained model (201-3) and the first keyword of the user prompt. For example, the second correlation value of the third correlation data may represent a correlation level between the at least one keyword for the third trained model (201-3) and the second keyword of the user prompt.
[0045] According to one embodiment, the first correlation value of the first correlation data, the first correlation value of the second correlation data, and the first correlation value of the third correlation data may be determined based on the first keyword of the user prompt and the table data. For example, the second correlation value of the first correlation data, the second correlation value of the second correlation data, and the second correlation value of the third correlation data may be determined based on the second keyword of the user prompt and the table data. For example, the table data may include information on the correlation level between the at least one keyword for the first trained model (201-1) and the at least one keyword for the second trained model (201-2), information on the correlation level between the at least one keyword for the second trained model (201-2) and the at least one keyword for the third trained model (201-3), and information on the correlation level between the at least one keyword for the first trained model (201-1) and the at least one keyword for the third trained model (201-3).
[0046] According to one embodiment, the first keyword (e.g., Bradford Press) of the user prompt may correspond to the at least one keyword (e.g., Bradford Press) for the first trained model (201-1). For example, the second keyword (e.g., injured) of the user prompt may correspond to the at least one keyword (e.g., treatment) for the second trained model (201-2).
[0047] According to one embodiment, the electronic device (101) may determine, based on the first correlation data and the second correlation data, a first prompt to be applied to a first trained model (201-1) as a first text corresponding to the first keyword, and a second prompt to be applied to a second trained model (201-2) as a second text corresponding to the second keyword. For example, the first prompt may be determined as a prompt requesting information about Bradford Press, and the second prompt may be determined as a prompt requesting treatment advice.
[0048] According to one embodiment, if the first correlation value of the first correlation data is greater than the first correlation value of the second correlation data, the first keyword of the user prompt may have a greater correlation level with the at least one keyword for the first trained model (201-1) than with the at least one keyword for the second trained model (201-2). For example, the electronic device (101) may determine the first prompt to be applied to the first trained model (201-1) as the first text corresponding to the first keyword, based on the first correlation value of the first correlation data being greater than the first correlation value of the second correlation data. For example, if the second correlation value of the second correlation data is greater than the second correlation value of the first correlation data, the second keyword of the user prompt may have a greater correlation level with the at least one keyword for the second trained model (201-2) than with the at least one keyword for the first trained model (201-1). For example, the electronic device (101) can determine the second prompt to be applied to the second trained model (201-2) as the second text corresponding to the second keyword based on the second correlation value of the second correlation data which is greater than the second correlation value of the first correlation data.
[0049] According to one embodiment, if the second correlation value of the first correlation data is greater than the first threshold value, the second keyword of the user prompt may have a correlation level greater than the correlation level corresponding to the first threshold value and the at least one keyword for the first trained model (201-1). For example, the electronic device (101) may determine the first prompt to be applied to the first trained model (201-1) as the first text corresponding to the first keyword and the second keyword, based on the first correlation value of the first correlation data being greater than the first correlation value of the second correlation data and the second correlation value of the first correlation data being greater than the first threshold value. For example, if the first correlation value of the second correlation data is greater than the first threshold value, the first keyword of the user prompt may have a correlation level greater than the correlation level corresponding to the first threshold value and the at least one keyword for the second trained model (201-2). For example, the electronic device (101) can determine the second prompt to be applied to the second trained model (201-2) as the second text corresponding to the first keyword and the second keyword, based on the second correlation value of the second correlation data which is greater than the second correlation value of the first correlation data and the first correlation value of the second correlation data which is greater than the first threshold value.
[0050] According to one embodiment, if the second correlation value of the first correlation data is smaller than the second threshold value, the second keyword of the user prompt may have a correlation level smaller than the correlation level corresponding to the second threshold value and the at least one keyword for the first trained model (201-1). For example, the electronic device (101) may determine the first text corresponding to the first keyword, excluding the second keyword, to be applied to the first trained model (201-1) based on the first correlation value of the first correlation data which is larger than the first correlation value of the second correlation data and the second correlation value of the first correlation data which is smaller than the second threshold value. For example, if the first correlation value of the second correlation data is smaller than the second threshold value, the first keyword of the user prompt may have a correlation level smaller than the correlation level corresponding to the second threshold value and the at least one keyword for the second trained model (201-2). For example, the electronic device (101) may determine the second prompt to be applied to the second trained model (201-2) as the second text corresponding to the second keyword, excluding the first keyword, based on the second correlation value of the second correlation data which is greater than the second correlation value of the first correlation data and the first correlation value of the second correlation data which is smaller than the second threshold value. For example, the electronic device (101) may refrain from determining the third prompt to be applied to the third trained model (201-3) based on the first correlation value of the third correlation data which is smaller than the second threshold value and the second correlation value of the third correlation data which is smaller than the second threshold value.
[0051] According to one embodiment, the electronic device (101) can generate information corresponding to Table 1 below by using the opinion filler of the prompt generation unit (231).
[0052] Trained Model Opinion 1st Trained Model (sport) 1. Request information regarding Bradford Press from the 1st Trained Model (sport). 2. A request for treatment consultation is needed from the 2nd Trained Model (health care). 2nd Trained Model (health care) 1. Request information regarding Bradford Press from the 1st Trained Model (sport). 2. Request treatment consultation from the 2nd Trained Model (health care). 3rd Trained Model (IT) 1. Request information regarding Bradford Press from the 1st Trained Model (sport). 2. A request for treatment consultation is needed from the 2nd Trained Model (health care).
[0053] According to one embodiment, the electronic device (101) can increase the consistency between the output response for the user prompt and the user's intent by determining the prompt for each of the domain-specific language models based on the correlation data.
[0054] According to one embodiment, the electronic device (101) can obtain the response of each of the prompt-based trained models (201) using a prompt response processing unit (232). For example, the electronic device (101) can obtain the response of the first trained model (201-1) based on the first prompt and the response of the second trained model (201-2) based on the second prompt. As an example without limitation, the prompt response processing unit (232) may include a parameter filler for compensating slots for the responses of the trained models (201). For example, a slot may be described as a variable used to fill information defined in a sentence.
[0055] According to one embodiment, the electronic device (101) can generate information corresponding to Table 2 below by using a parameter filler of the prompt response processing unit (232).
[0056] Trained Model Response Trained Model 1 (sport) 1. Response from Trained Model 1 (sport): "The Bradford press is a shoulder exercise, and..." Trained Model 2 (health care) 1. Response from Trained Model 2 (health care): "How did you get injured?"
[0057] According to one embodiment, the electronic device (101) can identify whether at least one slot among the slots for the response of each of the trained models (201) corresponds to an empty slot by using the response output determining unit (233). For example, an empty slot may be described as a slot in which information defined in a sentence is not filled. For example, the electronic device (101) can identify that a response having said empty slot requires additional input from the user based on identifying that at least one slot among the slots for the response of each of the trained models (201) corresponds to an empty slot. For example, the electronic device (101) can identify that a response of the first trained model (201-1) (e.g., “The Bradford press is a shoulder exercise, and…”) does not require additional input from the user. For example, the electronic device (101) can identify that a response of the second trained model (201-2) (e.g., “How were you injured?”) requires additional input from the user.
[0058] According to one embodiment, the electronic device (101) can determine an output response for the user prompt based on the response of each of the trained models (201) using an output response generating unit (230), based on identifying that the slots for the response of each of the trained models (201) do not correspond to empty slots. For example, the electronic device (101) can determine an output response for the user prompt based on the response of the first trained model (201-1) and the response of the second trained model (201-2).
[0059] According to one embodiment, the electronic device (101) may apply the response of a trained model having an empty slot to another trained model based on identifying that at least one slot among the slots for the response of each of the trained models (201) corresponds to an empty slot. For example, the response of the first trained model (201-1) based on the first prompt may be the first response of the first trained model (201-1) (e.g., “The Bradford press is a shoulder exercise, and ….”). For example, the response of the second trained model (201-2) based on the second prompt may be the first response of the second trained model (201-2) (e.g., “How did you get injured?”). For example, the electronic device (101) may identify that at least one slot for the first response of the second trained model (201-2) corresponds to an empty slot. For example, the electronic device (101) may, based on the identification of at least one slot, obtain a second response of the first trained model (201-1) based on the first response of the second trained model (201-2) (e.g., “Performing a Bradford press in an incorrect posture can cause back pain.”), and obtain a second response of the second trained model (201-2) based on the second response of the first trained model (201-1) (e.g., “If you have injured your back, apply a cold compress to the affected area and see a doctor as soon as possible for proper treatment.”). For example, the electronic device (101) may determine the output response for the user prompt based on the first response of the first trained model (201-1) and the second response of the second trained model (201-2). For example, the output response for the above user prompt is, “The Bradford press is a shoulder exercise, but performing it with incorrect form can cause back pain. If you injure your back, apply a cold compress to the affected area and see a doctor as soon as possible for proper treatment.”It could be.
[0060] According to one embodiment, the electronic device (101) may provide an output response for a user prompt to the user. For example, the user prompt may be a first user prompt. For example, the output response of the first user prompt may be determined before an input for a second user prompt is received through the electronic device (101). The input for the first user prompt and the input for the second user prompt may be received sequentially through the electronic device (101).
[0061] According to one embodiment, the electronic device (101) may display an output response for a user prompt through a display (130). For example, the user prompt may be a first user prompt. For example, the output response of the first user prompt may be displayed before an input for a second user prompt is received through the electronic device (101). The input for the first user prompt and the input for the second user prompt may be received consecutively through the electronic device (101).
[0062] According to one embodiment, the electronic device (101) may output an output response for a user prompt through a speaker (140). For example, the user prompt may be a first user prompt. For example, the output response of the first user prompt may be output before an input for a second user prompt is received through the electronic device (101). The input for the first user prompt and the input for the second user prompt may be received consecutively through the electronic device (101).
[0063] According to one embodiment, the electronic device (101) can mitigate the occurrence of the output response for a user prompt requiring additional user input by applying the response of the domain-specific language model to another domain-specific language model based on the fact that at least one slot among the slots for the response of the domain-specific language model corresponds to an empty slot. For example, the electronic device (101) can maximize user convenience regarding input of the user prompt by mitigating the occurrence of the output response requiring additional input.
[0064] FIG. 3 illustrates examples of signalings that are triggered to generate output responses for a user prompt by determining prompts for language models according to the user prompt.
[0065] Referring to FIG. 3, according to one embodiment, in operation 311, a user (301) may provide at least one input to the application (302) of the electronic device (101) for registering (or subscribing) the first trained model (201-1) and the second trained model (201-2) among the trained models (201) within the electronic device (101) in relation to the application (or application software) (302). For example, the first training model (201-1) and the second trained model (201-2) may each be a domain-specific language model that is executed by different external electronic devices and trained for different domains. However, it is not limited thereto. For example, the first training model (201-1) and the second trained model (201-2) may be executed by a single external electronic device. For example, the first training model (201-1) and the second trained model (201-2) may be executed by at least one processor (110) of the electronic device (101). The description of FIG. 3 below is based on an example in which the first training model (201-1) and the second trained model (201-2) are executed by different external electronic devices. For example, the application (302) may be described as a software program associated with a user prompt. For example, the application (302) may be a software program that is executed by at least one processor (110) and stored in memory (120).
[0066] According to one embodiment, in operation 312, the electronic device (101) may request keyword information for the first trained model (201-1) and the second trained model (201-2) from external electronic devices (303) using an application (302) based on the at least one input for registering the first trained model (201-1) and the second trained model (201-2). For example, the electronic device (101) may transmit a request to transmit first keyword information for at least one keyword for the first trained model (201-1) based on the input for registering the first trained model (201-1) through a communication circuit (150) to a first external electronic device among the external electronic devices (303) that executes the first trained model (201-1). For example, the electronic device (101) may request a second external electronic device among the external electronic devices (303) that executes the second trained model (201-2) to transmit second keyword information for at least one keyword for the second trained model (201-2) based on an input for registering the second trained model (201-2).
[0067] According to one embodiment, in operation 313, the first external electronic device may transmit the first keyword information to the electronic device (101) based on the request to transmit the first keyword information for the at least one keyword for the first trained model (201-1). For example, the first keyword information may be included in the manifest information of the first trained model (201-1) regarding the purpose and function of the first trained model (201-1). The electronic device (101) may receive the first keyword information through the communication circuit (150) using the application (302). The second external electronic device may transmit the second keyword information to the electronic device (101) based on the request to transmit the second keyword information for the at least one keyword for the second trained model (201-2). For example, the second keyword information may be included in the manifest information of the second trained model (201-2) regarding the purpose and function of the second trained model (201-2). The electronic device (101) may receive the second keyword information through the communication circuit (150) using the application (302).
[0068] According to one embodiment, in operation 314, the user (301) may provide input for a user prompt to an application (302) of the electronic device (101). For example, the electronic device (101) may receive the input for the user prompt (e.g., user speech) through a microphone (e.g., a microphone of the input module (850)). For example, the electronic device (101) may receive the input for the user prompt (e.g., text) through a keyboard (e.g., a keyboard of the input module (850)).
[0069] According to one embodiment, in operation 315, the electronic device (101) may provide the user prompt, the first keyword information, and the second keyword information from the application (302) to the domain selection unit (220) based on the input for the user prompt.
[0070] According to one embodiment, in operation 316, the electronic device (101) can identify the at least one keyword for the first trained model (201-1) based on the first keyword information using the domain selection unit (220). The electronic device (101) can identify the at least one keyword for the second trained model (201-2) based on the second keyword information using the domain selection unit (220). The electronic device (101) can perform a correlation analysis between the at least one keyword for the first trained model (201-1) and the at least one keyword for the second trained model (201-2) using the domain selection unit (220). The electronic device (101) can generate table data based on the correlation analysis using the domain selection unit (220). For example, the electronic device (101) can identify (or select) a first trained model (201-1) and a second trained model (201-2) to which the user prompt is to be applied among the trained models (201) based on the table data and keywords of the user prompt using the domain selection unit (220).
[0071] According to one embodiment, in operation 317, the electronic device (101) may provide a request from the domain selection unit (220) to the output response generation unit (230) to generate prompts for the first trained model (201-1) and the second trained model (201-2) identified among the trained models (201).
[0072] According to one embodiment, in operation 318, the electronic device (101) can determine a first prompt to be applied to a first trained model (201-1) and a second prompt to be applied to a second trained model (201-2) based on the request to generate the prompts using an output response generator (230). For example, the electronic device (101) can determine first correlation data between the at least one keyword for the first trained model (201-1) and the keywords of the user prompt using an output response generator (230). For example, the electronic device (101) can determine second correlation data between the at least one keyword for the second trained model (201-2) and the keywords of the user prompt using an output response generator (230). For example, the electronic device (101) can determine the first prompt and the second prompt based on the first correlation data and the second correlation data.
[0073] According to one embodiment, in operation 319, the electronic device (101) can transmit the first prompt through the communication circuit (150) to the first external electronic device among the external electronic devices (303) that executes the first trained model (201-1). The electronic device (101) can transmit the second prompt through the communication circuit (150) to the second external electronic device among the external electronic devices (303) that executes the second trained model (201-2).
[0074] According to one embodiment, in operation 320, the first external electronic device can obtain a response from the first trained model (201-1) by applying the first prompt to the first trained model (201-1). The first external electronic device can transmit the response of the first trained model (201-1) to the electronic device (101). The electronic device (101) can receive the response of the first trained model (201-1) through the communication circuit (150). The second external electronic device can obtain a response from the second trained model (201-2) by applying the second prompt to the second trained model (201-2). The second external electronic device can transmit the response of the second trained model (201-2) to the electronic device (101). The electronic device (101) can receive the response of the second trained model (201-2) through the communication circuit (150).
[0075] According to one embodiment, in operation 321, the electronic device (101) can identify the response of the first trained model (201-1) and the response of the second trained model (201-2) using the output response generating unit (230). The electronic device (101) can generate an output response for the user prompt based on the response of the first trained model (201-1) and the response of the second trained model (201-2) using the output response generating unit (230).
[0076] According to one embodiment, in operation 322, the electronic device (101) can provide the output response for the user prompt from the output response generating unit (230) to the application (302).
[0077] According to one embodiment, in operation 323, the electronic device (101) may provide the output response for the user prompt to the user (301) using an application (302). In one embodiment, the electronic device (101) may provide the output response for the user prompt to the user (301) by displaying it through a display (130). In one embodiment, the electronic device (101) may provide the output response for the user prompt to the user (301) by outputting it through a speaker (140).
[0078] Figure 4 is a flowchart illustrating a method for determining table data based on keywords for language models.
[0079] In the following embodiments, each operation may be performed sequentially, but is not necessarily performed sequentially. For example, the order of each operation may be changed, and at least two operations may be performed in parallel.
[0080] Referring to FIG. 4, according to one embodiment, in operation 401, at least one processor (110) can identify whether there are keywords for the trained models (201). For example, each of the trained models (201) can be described as a domain-specific language model executed by different external electronic devices. For example, at least one processor (110) can identify whether there is at least one keyword for the first trained model (201-1) by identifying whether first keyword information for at least one keyword for the first trained model (201-1) is stored within an external electronic device executing the first trained model (201-1). For example, the first keyword information may be included in the manifest information of the first trained model (201-1) regarding the purpose and function of the first trained model (201-1). For example, at least one processor (110) can identify whether at least one keyword for the second trained model (201-2) exists by identifying whether second keyword information for at least one keyword for the second trained model (201-2) is stored in an external electronic device executing the second trained model (201-2). For example, the second keyword information may be included in the manifest information of the second trained model (201-2) regarding the purpose and function of the second trained model (201-2).
[0081] According to one embodiment, in operation 402, at least one processor (110) may determine keywords for said at least one trained model based on identifying that keywords for said at least one trained model among the trained models (201) do not exist. For example, at least one processor (110) may determine said keywords for said at least one trained model based on information about said at least one trained model (e.g., name information).
[0082] According to one embodiment, at least one processor (110) can obtain keyword information regarding keywords for the trained models (201) from external electronic devices executing the trained models (201) based on the identification that keywords for the trained models (201) exist.
[0083] According to one embodiment, in operation 403, at least one processor (110) may perform a correlation analysis between keywords for a trained model (e.g., a first trained model (201-1)) included in the trained models (201) and keywords for another trained model (e.g., a second trained model (201-2)) that is distinct from the trained model among the trained models (201). Based on the correlation analysis, at least one processor (110) may determine the correlation level between the keywords for the trained model and the keywords for the other trained model as a first correlation level or a second correlation level. For example, the second correlation level may be greater than the first correlation level. For example, the correlation level between a keyword for the first trained model (201-1) (e.g., Bradford Press) and a keyword for the second trained model (201-2) (e.g., MRI) may correspond to the first correlation level. For example, the correlation level between a keyword for the first trained model (201-1) (e.g., Bradford Press) and a keyword for the second trained model (201-2) (e.g., Treatment) may correspond to the second correlation level.
[0084] According to one embodiment, in operation 404, at least one processor (110) may determine table data based on the correlation analysis between the trained model (e.g., first trained model (201-1)) and the other trained model (e.g., second trained model (201-2)). For example, the table data for the first trained model (201-1) may indicate the correlation level between keywords for the first trained model (201-1) and the first to Nth trained models (201-1, 201-2, 201-3, …, 201-N). For example, the correlation level between keywords for the first trained model (201-1) and the first to Nth trained models (201-1, 201-2, 201-3, …, 201-N) excluding the first trained model (201-1) may correspond to a correlation level determined by the correlation analysis (e.g., the first correlation level or the second correlation level). For example, the correlation level between at least one keyword for the first trained model (201-1) and the first trained model (201-1) may correspond to a third correlation level greater than the second correlation level. For example, the table data for the second trained model (201-2) may represent the correlation level between keywords for the second trained model (201-2) and the first to Nth trained models (201-1, 201-2, 201-3, …, 201-N). For example, the correlation level between keywords for the second trained model (201-2) and the first to Nth trained models (201-1, 201-2, 201-3, …, 201-N) excluding the second trained model (201-2) may correspond to the correlation level determined by the correlation analysis (e.g., the first correlation level or the second correlation level).For example, the correlation level between at least one keyword for the second trained model (201-2) and the second trained model (201-2) may correspond to the third correlation level which is greater than the second correlation level.
[0085] Figure 5 illustrates an example of an environment that performs correlation analysis between keywords for language models to determine table data.
[0086] According to one embodiment, with reference to FIG. 5, an environment (500) is illustrated that includes first keyword information (510) for at least one keyword for a first trained model (201-1), second keyword information (520) for at least one keyword for a second trained model (201-2), and third keyword information (530) for at least one keyword for a third trained model (201-3). The first trained model (201-1) is a domain-specific language model trained on a domain corresponding to sports. The second trained model (201-2) is a domain-specific language model trained on a domain corresponding to healthcare. The third trained model (201-3) is a domain-specific language model trained on a domain corresponding to information technology (IT).
[0087] According to one embodiment, the first keyword information (510) may include information regarding a keyword (511) corresponding to the World Cup, a keyword (512) corresponding to the Bradford Press, and a keyword (513) corresponding to broadcasting. The second keyword information (520) may include information regarding a keyword (521) corresponding to treatment, a keyword (522) corresponding to MRI, and a keyword (523) corresponding to a cold. The third keyword information (530) may include information regarding a keyword (531) corresponding to software (S / W), a keyword (532) corresponding to artificial intelligence (AI), and a keyword (533) corresponding to media.
[0088] According to one embodiment, the electronic device (101) can identify the correlation level between keywords (511), keywords (512), and keywords (513) for a first trained model (201-1) and keywords (521), keywords (522), and keywords (523) for a second trained model (201-2) based on first keyword information (510) and second keyword information (520). For example, the correlation level between keyword (511) and keyword (522), the correlation level between keyword (511) and keyword (523), the correlation level between keyword (512) and keyword (522), the correlation level between keyword (512) and keyword (523), the correlation level between keyword (513) and keyword (521), the correlation level between keyword (513) and keyword (522), and the correlation level between keyword (513) and keyword (523) can each correspond to a first correlation level. For example, a double arrow (541) and a double arrow (542) can indicate that the correlation level between keywords corresponds to a second correlation level that is greater than the first correlation level. For example, the correlation level between keyword (511) and keyword (521) and the correlation level between keyword (512) and keyword (521) can each correspond to the second correlation level.
[0089] According to one embodiment, the electronic device (101) can identify the correlation levels between the keywords (521), keywords (522), and keywords (523) for the second trained model (201-2) and the keywords (531), keywords (532), and keywords (533) for the third trained model (201-3) based on the second keyword information (520) and the third keyword information (530). For example, the correlation level between the keyword (521) and the keyword (531), the correlation level between the keyword (521) and the keyword (532), the correlation level between the keyword (521) and the keyword (533), the correlation level between the keyword (523) and the keyword (531), the correlation level between the keyword (523) and the keyword (532), and the correlation level between the keyword (523) and the keyword (533) can each correspond to the first correlation level. For example, the two-way arrow (543), the two-way arrow (544), and the two-way arrow (545) may indicate that the correlation level between the keywords corresponds to the second correlation level, which is greater than the first correlation level. For example, the correlation level between keyword (522) and keyword (531), the correlation level between keyword (522) and keyword (532), and the correlation level between keyword (522) and keyword (533) may each correspond to the second correlation level.
[0090] According to one embodiment, the electronic device (101) can identify the correlation level between the keywords (511), keywords (512), and keywords (513) for the first trained model (201-1) and the keywords (531), keywords (532), and keywords (533) for the third trained model (201-3) based on the first keyword information (510) and the third keyword information (530). For example, the correlation level between keyword (511) and keyword (531), the correlation level between keyword (511) and keyword (532), the correlation level between keyword (511) and keyword (533), the correlation level between keyword (512) and keyword (531), the correlation level between keyword (512) and keyword (532), the correlation level between keyword (512) and keyword (533), the correlation level between keyword (513) and keyword (531), and the correlation level between keyword (513) and keyword (532) may each correspond to the first correlation level. For example, a double arrow (546) may indicate that the correlation level between keywords corresponds to the second correlation level, which is greater than the first correlation level. For example, the correlation level between keyword (513) and keyword (533) may correspond to the second correlation level.
[0091] According to one embodiment, the electronic device (101) can determine table data based on the correlation level between keywords for the trained models (201). Table 3 below is an example of table data for the first trained model (SPORT), the second trained model (HEALTH CARE), and the third trained model (IT). Referring to Table 3 below, the table data for the first trained model (SPORT) can represent the correlation level between the first trained model (SPORT) and the keywords (511, 512, 513, 521, 522, 523, 531, 532, 533). Table data for the second trained model (HEALTH CARE) may indicate the correlation level between the second trained model (HEALTH CARE) and keywords (511, 512, 513, 521, 522, 523, 531, 532, 533). Table data for the third trained model (IT) may indicate the correlation level between the third trained model (IT) and keywords (511, 512, 513, 521, 522, 523, 531, 532, 533). 'L' may indicate the first correlation level, 'M' may indicate the second correlation level which is higher than the first correlation level, and 'H' may indicate the third correlation level which is higher than the second correlation level.
[0092] 511512513521522523531532533SPORTHHHMLLLLMHEALTHCAREMMLHHHMMMITLLMMMMHHH
[0093] FIG. 6 is a flowchart illustrating a method for generating an output response for a user prompt by determining prompts for language models according to the user prompt.
[0094] In the following embodiments, each operation may be performed sequentially, but is not necessarily performed sequentially. For example, the order of each operation may be changed, and at least two operations may be performed in parallel.
[0095] Referring to FIG. 6, according to one embodiment, in operation 601, at least one processor (110) may receive input for a user prompt through an electronic device (101). For example, at least one processor (110) may receive input for the user prompt (e.g., user speech) through a microphone (e.g., a microphone of an input module (850)). For example, at least one processor (110) may receive input for the user prompt (e.g., text) through a keyboard (e.g., a keyboard of an input module (850)). For example, the user prompt may be described as text information regarding user input (e.g., a user's question and / or request) to be applied to a language model. At least one processor (110) may obtain the user prompt from the input for the user prompt.
[0096] According to one embodiment, in operation 602, at least one processor (110) can identify keywords of the user prompt from the user prompt based on the input. For example, the keywords of the user prompt may include a first keyword and a second keyword. For example, if the user prompt corresponds to “I got injured while doing the bradford press,” at least one processor (110) can identify the first keyword of the user prompt as “bradford press” and identify the second keyword of the user prompt as “injured.”
[0097] According to one embodiment, in operation 603, at least one processor (110) may determine first correlation data between at least one keyword for the first trained model (201-1) and the keywords of the user prompt including the first keyword and the second keyword. For example, the first correlation data may include a first correlation value and a second correlation value. For example, the first correlation value of the first correlation data may represent a correlation level between the at least one keyword for the first trained model (201-1) and the first keyword of the user prompt. For example, the second correlation value of the first correlation data may represent a correlation level between the at least one keyword for the first trained model (201-1) and the second keyword of the user prompt. By example, without limitation, the first trained model (201-1) may be a domain-specific language model trained for natural language processing regarding a domain corresponding to sports.
[0098] According to one embodiment, in operation 604, at least one processor (110) may determine second correlation data between at least one keyword for the second trained model (201-2) and the keywords of the user prompt including the first keyword and the second keyword. For example, the second correlation data may include a first correlation value and a second correlation value. For example, the first correlation value of the second correlation data may represent a correlation level between the at least one keyword for the second trained model (201-2) and the first keyword of the user prompt. For example, the second correlation value of the second correlation data may represent a correlation level between the at least one keyword for the second trained model (201-2) and the second keyword of the user prompt. By example, without limitation, the second trained model (201-2) may be a domain-specific language model trained for natural language processing regarding a domain corresponding to healthcare.
[0099] According to one embodiment, in operation 605, at least one processor (110) may determine, based on the first correlation data and the second correlation data, a first prompt to be applied to a first trained model (201-1) as a first text corresponding to the first keyword, and a second prompt to be applied to a second trained model (201-2) as a second text corresponding to the second keyword. For example, the first keyword of the user prompt (e.g., Bradford Press) may correspond to the at least one keyword (e.g., Bradford Press) for the first trained model (201-1). For example, the second keyword of the user prompt (e.g., Injured) may correspond to the at least one keyword (e.g., Treatment) for the second trained model (201-2).
[0100] According to one embodiment, if the first correlation value of the first correlation data is greater than the first correlation value of the second correlation data, the first keyword of the user prompt may have a greater correlation level with the at least one keyword for the first trained model (201-1) than with the at least one keyword for the second trained model (201-2). For example, at least one processor (110) may determine the first prompt to be applied to the first trained model (201-1) as the first text corresponding to the first keyword, based on the first correlation value of the first correlation data being greater than the first correlation value of the second correlation data. For example, if the second correlation value of the second correlation data is greater than the second correlation value of the first correlation data, the second keyword of the user prompt may have a greater correlation level with the at least one keyword for the second trained model (201-2) than with the at least one keyword for the first trained model (201-1). For example, at least one processor (110) can determine the second prompt to be applied to the second trained model (201-2) as the second text corresponding to the second keyword, based on the second correlation value of the second correlation data which is greater than the second correlation value of the first correlation data.
[0101] According to one embodiment, if the second correlation value of the first correlation data is greater than the first threshold value, the second keyword of the user prompt may have a correlation level greater than the correlation level corresponding to the first threshold value and the at least one keyword for the first trained model (201-1). For example, at least one processor (110) may determine the first prompt to be applied to the first trained model (201-1) as the first text corresponding to the first keyword and the second keyword, based on the first correlation value of the first correlation data being greater than the first correlation value of the second correlation data and the second correlation value of the first correlation data being greater than the first threshold value. For example, if the first correlation value of the second correlation data is greater than the first threshold value, the first keyword of the user prompt may have a correlation level greater than the correlation level corresponding to the first threshold value and the at least one keyword for the second trained model (201-2). For example, at least one processor (110) can determine the second prompt to be applied to the second trained model (201-2) as the second text corresponding to the first keyword and the second keyword, based on the second correlation value of the second correlation data which is greater than the second correlation value of the first correlation data and the first correlation value of the second correlation data which is greater than the first threshold value.
[0102] According to one embodiment, if the second correlation value of the first correlation data is smaller than the second threshold value, the second keyword of the user prompt may have a correlation level smaller than the correlation level corresponding to the second threshold value and the at least one keyword for the first trained model (201-1). For example, at least one processor (110) may determine the first prompt to be applied to the first trained model (201-1) as the first text corresponding to the first keyword, excluding the second keyword, based on the first correlation value of the first correlation data being larger than the first correlation value of the second correlation data and the second correlation value of the first correlation data being smaller than the second threshold value. For example, if the first correlation value of the second correlation data is smaller than the second threshold value, the first keyword of the user prompt may have a correlation level smaller than the correlation level corresponding to the second threshold value and the at least one keyword for the second trained model (201-2). For example, at least one processor (110) may determine the second prompt to be applied to the second trained model (201-2) as the second text corresponding to the second keyword, excluding the first keyword, based on the second correlation value of the second correlation data being larger than the second correlation value of the first correlation data and the first correlation value of the second correlation data being smaller than the second threshold value.
[0103] According to one embodiment, in operation 606, at least one processor (110) may obtain a response from a first trained model (201-1) based on the first prompt and a response from a second trained model (201-2) based on the second prompt. For example, the response of the first trained model (201-1) may be, “The Bradford press is a shoulder exercise, and ….” For example, the response of the second trained model (201-2) may be, “How did you get injured?”
[0104] According to one embodiment, in operation 607, at least one processor (110) can identify whether at least one slot among the slots for the response of the first trained model (201-1) and the slots for the response of the second trained model (201-2) corresponds to an empty slot. For example, a slot can be described as a variable used to fill information defined in a sentence. For example, an empty slot can be described as a slot in which the information defined in the sentence is not filled. For example, at least one processor (110) can identify that a response having an empty slot requires additional input from a user based on identifying that at least one slot among the slots for the response of the first trained model (201-1) and the slots for the response of the second trained model (201-2) corresponds to an empty slot. For example, at least one processor (110) can identify that the response of the first trained model (201-1) (e.g., “The Bradford press is a shoulder exercise, …”) does not require additional input from the user. For example, at least one processor (110) can identify that the response of the second trained model (201-2) (e.g., “How did you get injured?”) requires additional input from the user.
[0105] According to one embodiment, in operation 608, at least one processor (110) can determine an output response for the user prompt based on the response of the first trained model (201-1) and the response of the second trained model (201-2), based on identifying that at least one of the slots for the response of the first trained model (201-1) and the slots for the response of the second trained model (201-2) does not correspond to an empty slot.
[0106] According to one embodiment, in operation 609, at least one processor (110) may apply the response of the training model having the empty slot to another training model based on identifying that at least one of the slots for the response of the first training model (201-1) and the slots for the response of the second training model (201-2) corresponds to an empty slot. For example, the response of the first training model (201-1) based on the first prompt may be the first response of the first training model (201-1) (e.g., “The Bradford press is a shoulder exercise, and ….”). For example, the response of the second training model (201-2) based on the second prompt may be the first response of the second training model (201-2) (e.g., “How did you get injured?”). For example, at least one processor (110) can identify that at least one slot for the first response of the second trained model (201-2) corresponds to an empty slot. For example, based on the identification of the at least one slot, at least one processor (110) can obtain the second response of the first trained model (201-1) based on the first response of the second trained model (201-2) (e.g., “Performing a Bradford press in an incorrect posture can cause back pain.”).
[0107] According to one embodiment, in operation 610, at least one processor (110) can obtain a response of the trained model based on the response of the other trained model. For example, at least one processor (110) can obtain a second response of the second trained model (201-2) based on the second response of the first trained model (201-1) (e.g., "If you have injured your back, apply a cold compress to the affected area and see a doctor as soon as possible for proper treatment."). In operation 607, at least one processor (110) can identify that at least one of the slots for the second response of the second trained model (201-2) does not correspond to an empty slot. In operation 608, at least one processor (110) may determine the output response for the user prompt based on the first response of the first trained model (201-1) and the second response of the second trained model (201-2). For example, the output response for the user prompt may be, “The Bradford press is a shoulder exercise, but if performed with incorrect posture, it can cause back pain. If you have injured your back, apply a cold compress to the affected area and see a doctor as soon as possible for proper treatment.” For example, operations 609 and 610 may be performed repeatedly until at least one of the slots for the response of the first trained model (201-1) and the slots for the response of the second trained model (201-2) in operation 607 does not correspond to an empty slot.
[0108] Figures 7a and 7b are examples of environments in which an output response for a user prompt is provided to the user based on the user prompt.
[0109] According to one embodiment, with reference to FIG. 7a, an environment (700a) is shown in which an output response for a user prompt is displayed via a display (130) based on an input (e.g., text) for the user prompt. An electronic device (101) may receive an input for the user prompt (710a) via a keyboard (e.g., a keyboard of an input module (850)). The electronic device (101) may display an output response (720a) for the user prompt (710a) via a display (130) based on the input for the user prompt (710a). Although not shown in FIG. 7a, within the environment (700a), the electronic device (101) may display name information (e.g., sport, health care) of the trained models used to generate the output response (720a) via the display (130). The output response (720a) can be described as an output response that does not require additional input from the user.
[0110] According to one embodiment, with reference to FIG. 7b, an environment (700b) is illustrated in which an output response for a user prompt is output through a speaker (140) based on an input for a user prompt (e.g., a user’s speech). An electronic device (101) may receive a speech of a user (701) corresponding to an input for a user prompt (710b) through a microphone (e.g., a microphone of an input module (850). An electronic device (101) may output an output response (720b) for a user prompt (710b) through a speaker (140) based on the input for the user prompt (710b). The output response (720b) may be described as an output response that does not require additional input from the user (701).
[0111] According to one embodiment, the electronic device (101) may correspond to the electronic device (801) described with reference to FIG. 8 below.
[0112] FIG. 8 is a block diagram of an electronic device in a network environment according to various embodiments.
[0113] According to one embodiment, with reference to FIG. 8, in a network environment (800), an electronic device (801) may communicate with an electronic device (802) through a first network (898) (e.g., a short-range wireless communication network) or with at least one of an electronic device (804) or a server (808) through a second network (899) (e.g., a long-range wireless communication network). According to one embodiment, the electronic device (801) may communicate with the electronic device (804) through the server (808). According to one embodiment, the electronic device (801) may include a processor (820), memory (830), input module (850), sound output module (855), display module (860), audio module (870), sensor module (876), interface (877), connection terminal (878), haptic module (879), camera module (880), power management module (888), battery (889), communication module (890), subscriber identification module (896), or antenna module (897). In some embodiments, at least one of these components (e.g., connection terminal (878)) may be omitted from the electronic device (801), or one or more other components may be added. In some embodiments, some of these components (e.g., sensor module (876), camera module (880), or antenna module (897)) may be integrated into a single component (e.g., display module (860)).
[0114] According to one embodiment, the processor (820) can control at least one other component (e.g., a hardware or software component) of the electronic device (801) connected to the processor (820) by executing software (e.g., a program (840)), and can perform various data processing or operations. According to one embodiment, as at least part of the data processing or operations, the processor (820) can store commands or data received from other components (e.g., a sensor module (876) or a communication module (890)) in volatile memory (832), process the commands or data stored in volatile memory (832), and store the resulting data in non-volatile memory (834). According to one embodiment, the processor (820) may include a main processor (821) (e.g., a central processing unit or an application processor) or an auxiliary processor (823) that can operate independently or together with it (e.g., a graphics processing unit, a neural processing unit (NPU), an image signal processor, a sensor hub processor, or a communication processor). For example, if the electronic device (801) includes a main processor (821) and an auxiliary processor (823), the auxiliary processor (823) may be configured to use lower power than the main processor (821) or to be specialized for a designated function. The auxiliary processor (823) may be implemented separately from the main processor (821) or as part thereof.
[0115] According to one embodiment, the auxiliary processor (823) may control at least some of the functions or states associated with at least one component of the electronic device (801) (e.g., display module (860), sensor module (876), or communication module (890)) on behalf of the main processor (821) while the main processor (821) is in an inactive (e.g., sleep) state, or together with the main processor (821) while the main processor (821) is in an active (e.g., application execution) state. According to one embodiment, the auxiliary processor (823) (e.g., image signal processor or communication processor) may be implemented as part of another functionally related component (e.g., camera module (880) or communication module (890)). According to one embodiment, the auxiliary processor (823) (e.g., neural network processing unit) may include a hardware structure specialized for processing an artificial intelligence model. The artificial intelligence model may be generated through machine learning. Such learning may be performed, for example, on the electronic device (801) itself where the artificial intelligence model is executed, or through a separate server (e.g., server (808)). The learning algorithm may include, for example, supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, but is not limited to the examples described above. The artificial intelligence model may include a plurality of artificial neural network layers.An artificial neural network may be a deep neural network (DNN), a convolutional neural network (CNN), a recurrent neural network (RNN), a restricted Boltzmann machine (RBM), a deep belief network (DBN), a bidirectional recurrent deep neural network (BRDNN), a deep Q-network, or a combination of two or more of the above, but is not limited to the examples described above. In addition to the hardware structure, the artificial intelligence model may include a software structure, either additionally or substantially.
[0116] According to one embodiment, the number of processors (820) may be one or more. For example, the processor (820) may have the structure of a multi-core processor such as a dual core, a quad core, or a hexa core.
[0117] According to one embodiment, the processor (820) can control the operations of the electronic device (801) by executing instructions stored in the memory (830). For example, the processor (820) may correspond to a plurality of processors that divide and collectively perform a plurality of operations among the processors.
[0118] According to one embodiment, the memory (830) may store various data used by at least one component of the electronic device (801) (e.g., processor (820) or sensor module (876)). The data may include, for example, input data or output data for software (e.g., program (840)) and related instructions. The memory (830) may include volatile memory (832) or non-volatile memory (834).
[0119] According to one embodiment, the program (840) may be stored as software in memory (830) and may include, for example, an operating system (842), middleware (844), or an application (846).
[0120] According to one embodiment, the input module (850) may receive commands or data to be used for a component of the electronic device (801) (e.g., processor (820)) from outside the electronic device (801) (e.g., user). The input module (850) may include, for example, a microphone, a mouse, a keyboard, a key (e.g., a button), or a digital pen (e.g., a stylus pen).
[0121] According to one embodiment, the sound output module (855) can output an audio signal to the outside of the electronic device (801). The sound output module (855) may include, for example, a speaker or a receiver. The speaker may be used for general purposes, such as multimedia playback or recording playback. The receiver may be used to receive incoming calls. According to one embodiment, the receiver may be implemented separately from the speaker or as part thereof.
[0122] According to one embodiment, the display module (860) can visually provide information to an external (e.g., user) of the electronic device (801). The display module (860) may include, for example, a display, a holographic device, or a projector and a control circuit for controlling said device. According to one embodiment, the display module (860) may include a touch sensor configured to detect a touch, or a pressure sensor configured to measure the intensity of the force generated by said touch.
[0123] According to one embodiment, the audio module (870) can convert sound into an electrical signal or, conversely, convert an electrical signal into sound. According to one embodiment, the audio module (870) can acquire sound through the input module (850) or output sound through the sound output module (855) or an external electronic device (e.g., electronic device (802)) (e.g., speaker or headphones) connected directly or wirelessly to the electronic device (801).
[0124] According to one embodiment, the sensor module (876) can detect the operating state of the electronic device (801) (e.g., power or temperature) or the external environmental state (e.g., user state) and generate an electrical signal or data value corresponding to the detected state. According to one embodiment, the sensor module (876) may include, for example, a gesture sensor, a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an accelerometer sensor, a grip sensor, a proximity sensor, a color sensor, an IR (infrared) sensor, a biosensor, a temperature sensor, a humidity sensor, or an illuminance sensor.
[0125] According to one embodiment, the interface (877) may support one or more specified protocols that can be used for the electronic device (801) to be connected directly or wirelessly to an external electronic device (e.g., electronic device (802)). According to one embodiment, the interface (877) may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, an SD card interface, or an audio interface.
[0126] According to one embodiment, the connection terminal (878) may include a connector through which the electronic device (801) can be physically connected to an external electronic device (e.g., electronic device (802)). According to one embodiment, the connection terminal (878) may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (e.g., a headphone connector).
[0127] According to one embodiment, the haptic module (879) can convert an electrical signal into a mechanical stimulus (e.g., vibration or movement) or an electrical stimulus that can be perceived by the user through tactile or kinesthetic senses. According to one embodiment, the haptic module (879) may include, for example, a motor, a piezoelectric element, or an electric stimulation device.
[0128] According to one embodiment, the camera module (880) can capture still images and video. According to one embodiment, the camera module (880) may include one or more lenses, image sensors, image signal processors, or flashes.
[0129] According to one embodiment, the power management module (888) can manage power supplied to the electronic device (801). According to one embodiment, the power management module (888) can be implemented, for example, as at least part of a power management integrated circuit (PMIC).
[0130] According to one embodiment, the battery (889) can supply power to at least one component of the electronic device (801). According to one embodiment, the battery (889) may include, for example, a non-rechargeable primary battery, a rechargeable secondary battery, or a fuel cell.
[0131] According to one embodiment, the communication module (890) may support the establishment of a direct (e.g., wired) communication channel or a wireless communication channel between an electronic device (801) and an external electronic device (e.g., electronic device (802), electronic device (804), or server (808)), and the performance of communication through the established communication channel. The communication module (890) may include one or more communication processors that operate independently of the processor (820) (e.g., application processor) and support direct (e.g., wired) communication or wireless communication. According to one embodiment, the communication module (890) may include a wireless communication module (892) (e.g., cellular communication module, short-range wireless communication module, or GNSS (global navigation satellite system) communication module) or a wired communication module (894) (e.g., LAN (local area network) communication module, or power line communication module). The corresponding communication module among these communication modules can communicate with an external electronic device (804) through a first network (898) (e.g., a short-range communication network such as Bluetooth, WiFi (wireless fidelity) direct, or IrDA (infrared data association)) or a second network (899) (e.g., a legacy cellular network, a 5G network, a next-generation communication network, the Internet, or a computer network (e.g., a LAN or WAN)). These various types of communication modules may be integrated into a single component (e.g., a single chip) or implemented as multiple separate components (e.g., multiple chips). The wireless communication module (892) can identify or authenticate the electronic device (801) within a communication network such as the first network (898) or the second network (899) using subscriber information (e.g., International Mobile Subscriber Identifier (IMSI)) stored in the subscriber identification module (896).
[0132] According to one embodiment, the wireless communication module (892) can support a 5G network after a 4G network and next-generation communication technology, for example, new radio access technology. The NR access technology can support high-speed transmission of high-capacity data (enhanced mobile broadband (eMBB)), minimization of terminal power and connection of multiple terminals (massive machine type communications (mMTC)), or high reliability and low latency (ultra-reliable and low-latency communications (URLLC)). The wireless communication module (892) can support a high-frequency band (e.g., mmWave band) to achieve a high data transmission rate, for example. The wireless communication module (892) can support various technologies for securing performance in the high-frequency band, such as beamforming, massive MIMO (multiple-input and multiple-output), full-dimensional MIMO (FD-MIMO), array antenna, analog beam-forming, or large-scale antenna. The wireless communication module (892) can support various requirements specified in the electronic device (801), external electronic device (e.g., electronic device (804)), or network system (e.g., second network (899)). According to one embodiment, the wireless communication module (892) may support a Peak data rate (e.g., 20 Gbps or more) for eMBB realization, loss coverage (e.g., 164 dB or less) for mMTC realization, or U-plane latency (e.g., downlink (DL) and uplink (UL) each 0.5 ms or less, or round trip 1 ms or less) for URLLC realization.
[0133] According to one embodiment, the antenna module (897) may transmit a signal or power to or from an external source (e.g., an external electronic device). According to one embodiment, the antenna module (897) may include an antenna comprising a radiator made of a conductor or a conductive pattern formed on a substrate (e.g., a PCB). According to one embodiment, the antenna module (897) may include a plurality of antennas (e.g., an array antenna). In this case, at least one antenna suitable for a communication method used in a communication network, such as a first network (898) or a second network (899), may be selected from the plurality of antennas, for example, by a communication module (890). The signal or power may be transmitted or received between the communication module (890) and an external electronic device through the selected at least one antenna. According to some embodiments, in addition to the radiator, other components (e.g., a radio frequency integrated circuit (RFIC)) may be additionally formed as part of the antenna module (897).
[0134] According to various embodiments, the antenna module (897) may form a mmWave antenna module. According to one embodiment, the mmWave antenna module may include a printed circuit board, an RFIC disposed on or adjacent to a first surface (e.g., bottom surface) of the printed circuit board and capable of supporting a specified high frequency band (e.g., mmWave band), and a plurality of antennas (e.g., array antennas) disposed on or adjacent to a second surface (e.g., top surface or side surface) of the printed circuit board and capable of transmitting or receiving a signal of the specified high frequency band.
[0135] According to one embodiment, at least some of the components may be connected to each other via a communication method between peripheral devices (e.g., bus, GPIO (general purpose input and output), SPI (serial peripheral interface), or MIPI (mobile industry processor interface)) and may exchange signals (e.g., commands or data) with each other.
[0136] According to one embodiment, commands or data may be transmitted or received between an electronic device (801) and an external electronic device (804) through a server (808) connected to a second network (899). Each of the external electronic devices (802, or 804) may be the same or a different type of device as the electronic device (801). According to one embodiment, all or part of the operations performed on the electronic device (801) may be performed on one or more of the external electronic devices (802, 804, or 808). For example, if the electronic device (801) needs to perform a function or service automatically or in response to a request from a user or another device, the electronic device (801) may request one or more external electronic devices to perform at least part of the function or service instead of performing the function or service itself or additionally. One or more external electronic devices that receive the above request may execute at least part of the requested function or service, or additional function or service related to the request, and transmit the result of the execution to the electronic device (801). The electronic device (801) may provide the result as is or additionally processed as at least part of the response to the request. For this purpose, for example, cloud computing, distributed computing, mobile edge computing (MEC), or client-server computing technology may be used. The electronic device (801) may provide ultra-low latency services using, for example, distributed computing or mobile edge computing. In one embodiment, the external electronic device (804) may include an Internet of Things (IoT) device. The server (808) may be an intelligent server using machine learning and / or neural networks. According to one embodiment, the external electronic device (804) or the server (808) may be included within a second network (899).The electronic device (801) can be applied to intelligent services (e.g., smart home, smart city, smart car, or healthcare) based on 5G communication technology and IoT-related technology.
[0137] FIG. 9 is a schematic diagram of an exemplary artificial intelligence (AI) system according to one embodiment.
[0138] According to one embodiment, with reference to FIG. 9, the AI system (900) may include an input / output interface (910), an AI (artificial intelligence) framework (920), a generative AI model (930), an application / service component (980), and / or a knowledge repository (990).
[0139] According to one embodiment, the input / output interface (910) may receive input. The input may include user input and / or data obtained or generated by an electronic device (e.g., the electronic device (101) or electronic device (801) described above). The data may include images, videos, and / or sensor data generated by at least one processor of the electronic device (e.g., at least one processor (110) or processor (820)), such as illuminance data around the electronic device obtained from a sensor or sensor hub (e.g., auxiliary processor (823), attitude data (or orientation data) of the electronic device, temperature inside the electronic device (e.g., display (130)), or temperature of at least one processor (110), size information of the display area of the display, and / or images obtained through an image sensor of the electronic device (e.g., included in a camera module (880)). The user input may include natural language, touch data obtained through a touch circuit included within the display panel (e.g., used to identify input from a finger and / or stylus), an image displayed (and / or to be displayed) on the display panel, and / or video. By example, without limitation, the user input may be received by an input / output interface (910) along with context information. The context information may be described as additional information obtained in relation to the user input. The context information may be related to the state at the time the user input is received (e.g., the state of the electronic device and / or the state of the surroundings of the electronic device (e.g., user state)). For example, the context information may include information about one or more software applications executed within the electronic device at the time the user input is received.For example, the above situation information may include information about the location of the electronic device (or the location of the user of the electronic device) at the time the user input is received. For example, the user input may be integrated with the situation information. For example, the user input with the situation information integrated as the input may be received by the input / output interface (910).
[0140] According to one embodiment, the input / output interface (910) may transmit (or provide) an output. The output may include a result (or result information) generated or obtained by the AI system (900) based on at least part of the input. The format of the output may vary. For example, the output may include natural language. For example, the output may include content (e.g., media content and / or multimedia content). For example, the output may include an action related to the user of the electronic device. For example, the output may have a format according to the user settings of the electronic device.
[0141] According to one embodiment, the input / output interface (910) can be described as a user question / response interface (910).
[0142] According to one embodiment, the AI framework (920) may be used to obtain information (or data) about the input from the input / output interface (910) and to control one or more components related to the AI system (900) using the obtained information.
[0143] According to one embodiment, a prompt design component (921) within an AI framework (920) can generate or obtain prompts for a generative AI model (930) (e.g., including a large language model (LLM) or a large multimodal model (LMM)) using the acquired information. For example, the prompt design component (921) may be described as an AI component that utilizes a learning algorithm and / or a neural network to provide prompts that are enhanced over time. For example, the prompt design component (921) can generate or obtain prompts by accessing a knowledge component (e.g., a knowledge repository (990)) containing user preference data, a prompt library, and / or prompt examples using the acquired information. The generated prompts may be provided to the generative AI model (930) (e.g., including an LLM or LMM).
[0144] According to one embodiment, an API / plugin management component (922) within the AI framework (920) may be used to support communication for additional information requested (or induced) in relation to the prompt provided (or to be provided) to the generative AI model (930). For example, the API / plugin management component (922) may be used to create or establish a channel for communication with various data sources (e.g., knowledge repository (990)). For example, the API / plugin management component (922) may support access to at least some of the data sources. For example, the API / plugin management component (922) may be used to request another component (e.g., application / service component (980)) that performs feedback (or response) according to the prompt. As an example without limitation, information obtained (or generated) through the API / plugin management component (922) may be provided to the prompt design component (921) for the creation of the prompt. As an example that is not limited, information obtained (or generated) through the API / plugin management component (922) can be provided to the generative AI model (930).
[0145] According to one embodiment, an improvement component (923) within the AI framework (920) can at least partially tune (or adjust) (or change) the result (e.g., content) obtained (or output) from the generative AI model (930). For example, the improvement component (923) can determine or verify whether the content obtained from the generative AI model (930) is related to the input. For example, the improvement component (923) can determine or verify whether the content obtained from the generative AI model (930) contains biased content. For example, the improvement component (923) can determine or verify whether the content obtained from the generative AI model (930) contains harmful content. For example, the improvement component (923) can support or assist in performing additional processing to improve the content obtained from the generative AI model (930). For example, the improvement component (923) may support providing a hint to the user to improve the content.
[0146] According to one embodiment, the generative AI model (930) may be described as an artificial intelligence neural network that generates feedback in response to a prompt. For example, the feedback may include additional data and / or information relative to the prompt, but relative to the prompt. For example, the feedback may include new content relative to the prompt. For example, the generative AI model (930) may include a model that generates images and / or a model that generates language. For example, the model that generates images may include a generative adversarial network (GAN) and / or a variational autoencoder (VAE). For example, the model that generates images may include a diffusion-based generative model (e.g., a transformer VAE). For example, the model that generates language may include CHAT-GPT 3 and / or CHAT-GPT 4. For example, the generative AI model (930) may include an LMM that generates the feedback by recognizing text, images, and / or speech.
[0147] By way of example, without limitation, according to one embodiment, the AI framework (920) and / or generative AI model (930) may be included within an AI module (e.g., including a processing circuit) within the electronic device. For example, the AI module may be operatively coupled with at least one processor of the electronic device (e.g., at least one processor (110) or processor (820)). For example, the AI module may be operatively coupled with a display driving circuit of the electronic device. For example, the AI module may be operatively coupled with a sensor hub of the electronic device for one or more sensors within the electronic device.
[0148] The technical problems to be solved in this disclosure are not limited to those mentioned above, and other technical problems not mentioned will be clearly understood by those skilled in the art to which this disclosure pertains.
[0149] According to one embodiment, an electronic device (e.g., electronic device (101)) as described above may include at least one processor (e.g., at least one processor (110)) comprising a processing circuit; and a memory (e.g., memory (120)) that stores instructions and includes one or more storage media. When the instructions are executed individually or collectively by the at least one processor, input for a user prompt is received through the electronic device; based on the input, keywords including a first keyword and a second keyword are identified from the user prompt; first correlation data is determined between at least one keyword for a first trained model available for natural language processing and the keywords including the first keyword and the second keyword; and second correlation data is determined between at least one keyword for a second trained model available for natural language processing and the keywords including the first keyword and the second keyword. Based on the first correlation data and the second correlation data above: determining a first prompt to be applied to the first trained model as a first text corresponding to the first keyword, and determining a second prompt to be applied to the second trained model as a second text corresponding to the second keyword; obtaining a response of the first trained model based on the first prompt and a response of the second trained model based on the second prompt; and determining an output response for the user prompt based on the response of the first trained model and the response of the second trained model.
[0150] According to one embodiment, the first correlation data may include a first correlation value representing a correlation level between the at least one keyword for the first trained model and the first keyword; and a second correlation value representing a correlation level between the at least one keyword for the first trained model and the second keyword. The second correlation data may include a first correlation value representing a correlation level between the at least one keyword for the second trained model and the first keyword; and a second correlation value representing a correlation level between the at least one keyword for the second trained model and the second keyword. When the instructions are executed individually or collectively by the at least one processor: determining the first prompt to be applied to the first trained model as the first text corresponding to the first keyword based on the first correlation value of the first correlation data which is greater than the first correlation value of the second correlation data; And, based on the second correlation value of the second correlation data which is greater than the second correlation value of the first correlation data, the electronic device may be caused to determine the second prompt to be applied to the second trained model as the second text corresponding to the second keyword.
[0151] According to one embodiment, the instructions, when executed individually or collectively by the at least one processor, may cause the electronic device to: determine the first prompt to be applied to the first trained model as the first text corresponding to the first keyword and the second keyword, based on the first correlation value of the first correlation data which is greater than the first correlation value of the second correlation data and the second correlation value of the first correlation data which is greater than the first threshold value; and determine the second prompt to be applied to the second trained model as the second text corresponding to the first keyword and the second keyword, based on the second correlation value of the second correlation data which is greater than the second correlation value of the first correlation data and the first correlation value of the second correlation data which is greater than the first threshold value.
[0152] According to one embodiment, the instructions, when executed individually or collectively by the at least one processor, may cause the electronic device to: determine the first prompt to be applied to the first trained model as the first text corresponding to the first keyword, excluding the second keyword, based on the first correlation value of the first correlation data which is greater than the first correlation value of the second correlation data and the second correlation value of the first correlation data which is less than the second threshold value; and determine the second prompt to be applied to the second trained model as the second text corresponding to the second keyword, excluding the first keyword, based on the second correlation value of the second correlation data which is greater than the second correlation value of the first correlation data and the first correlation value of the second correlation data which is less than the second threshold value.
[0153] According to one embodiment, when the instructions are executed individually or collectively by the at least one processor: determining third correlation data between the keywords, including at least one keyword for a third trained model available for natural language processing and the first keyword and the second keyword, based on the identification of the keywords; and causing the electronic device to refrain from determining a third prompt to be applied to the third trained model based on a first correlation value of the third correlation data that is less than the second threshold and a second correlation value of the third correlation data that is less than the second threshold. The first correlation value of the third correlation data may represent a correlation level between the at least one keyword for the third trained model and the first keyword. The second correlation value of the third correlation data may represent a correlation level between the at least one keyword for the third trained model and the second keyword.
[0154] According to one embodiment, the first correlation value of the first correlation data and the first correlation value of the second correlation data may be determined based on the first keyword and table data. The second correlation value of the first correlation data and the second correlation value of the second correlation data may be determined based on the second keyword and the table data. The table data may include information regarding the correlation level between the at least one keyword for the first trained model and the at least one keyword for the second trained model.
[0155] According to one embodiment, the response of the first trained model may be the first response of the first trained model. The response of the second trained model may be the first response of the second trained model. The instructions may cause the electronic device to be executed individually or collectively by the at least one processor to: identify that at least one slot for the first response of the second trained model corresponds to an empty slot; and based on the identification of the at least one slot: obtain a second response of the first trained model based on the first response of the second trained model, and obtain a second response of the second trained model based on the second response of the first trained model; and determine the output response for the user prompt based on the first response of the first trained model and the second response of the second trained model.
[0156] According to one embodiment, the user prompt may be a first user prompt. The output response may be determined before an input for a second user prompt is received through the electronic device. The input for the first user prompt and the input for the second user prompt may be received sequentially through the electronic device.
[0157] According to one embodiment, the first keyword may correspond to at least one keyword for the first trained model. The second keyword may correspond to at least one keyword for the second trained model.
[0158] According to one embodiment, a non-transient computer-readable storage medium as described above may store one or more programs. When the one or more programs are executed by an electronic device (e.g., electronic device (101)), they receive input for a user prompt through the electronic device; based on the input, they identify keywords including a first keyword and a second keyword from the user prompt; determine first correlation data between at least one keyword for a first trained model available for natural language processing and the keywords including the first keyword and the second keyword; determine second correlation data between at least one keyword for a second trained model available for natural language processing and the keywords including the first keyword and the second keyword; and based on the first correlation data and the second correlation data, determine a first prompt to be applied to the first trained model as a first text corresponding to the first keyword, and determine a second prompt to be applied to the second trained model as a second text corresponding to the second keyword; The electronic device may include instructions that cause the electronic device to obtain the response of the first trained model based on the first prompt and the response of the second trained model based on the second prompt; and to determine an output response for the user prompt based on the response of the first trained model and the response of the second trained model.
[0159] According to one embodiment, the first correlation data may include a first correlation value representing a correlation level between the at least one keyword for the first trained model and the first keyword; and a second correlation value representing a correlation level between the at least one keyword for the first trained model and the second keyword. The second correlation data may include a first correlation value representing a correlation level between the at least one keyword for the second trained model and the first keyword; and a second correlation value representing a correlation level between the at least one keyword for the second trained model and the second keyword. When the one or more programs are executed by the electronic device: based on the first correlation value of the first correlation data which is greater than the first correlation value of the second correlation data, the first prompt to be applied to the first trained model is determined as the first text corresponding to the first keyword; and may include instructions that cause the electronic device to determine the second prompt to be applied to the second trained model as the second text corresponding to the second keyword, based on the second correlation value of the second correlation data which is greater than the second correlation value of the first correlation data.
[0160] According to one embodiment, the one or more programs may include instructions that cause the electronic device to: determine, when executed by the electronic device: a first prompt to be applied to the first trained model as the first text corresponding to the first keyword and the second keyword, based on the first correlation value of the first correlation data which is greater than the first correlation value of the second correlation data and the second correlation value of the first correlation data which is greater than the first threshold value; and determine, based on the second correlation value of the second correlation data which is greater than the second correlation value of the first correlation data and the first correlation value of the second correlation data which is greater than the first threshold value, a second prompt to be applied to the second trained model as the second text corresponding to the first keyword and the second keyword.
[0161] According to one embodiment, the one or more programs may include instructions that cause the electronic device to: determine, based on the first correlation value of the first correlation data which is greater than the first correlation value of the second correlation data and the second correlation value of the first correlation data which is less than the second threshold value, the first prompt to be applied to the first trained model as the first text corresponding to the first keyword excluding the second keyword; and based on the second correlation value of the second correlation data which is greater than the second correlation value of the first correlation data and the first correlation value of the second correlation data which is less than the second threshold value, the second prompt to be applied to the second trained model as the second text corresponding to the second keyword excluding the first keyword.
[0162] According to one embodiment, the one or more programs may include instructions that, when executed by the electronic device: determine third correlation data between the keywords, including at least one keyword for a third trained model available for natural language processing and the first keyword and the second keyword, based on the identification of the keywords; and cause the electronic device to refrain from determining a third prompt to be applied to the third trained model based on a first correlation value of the third correlation data that is smaller than the second threshold and a second correlation value of the third correlation data that is smaller than the second threshold. The first correlation value of the third correlation data may represent a correlation level between the at least one keyword for the third trained model and the first keyword. The second correlation value of the third correlation data may represent a correlation level between the at least one keyword for the third trained model and the second keyword.
[0163] According to one embodiment, the first correlation value of the first correlation data and the first correlation value of the second correlation data may be determined based on the first keyword and table data. The second correlation value of the first correlation data and the second correlation value of the second correlation data may be determined based on the second keyword and the table data. The table data may include information regarding the correlation level between the at least one keyword for the first trained model and the at least one keyword for the second trained model.
[0164] According to one embodiment, the response of the first trained model may be the first response of the first trained model. The response of the second trained model may be the first response of the second trained model. The one or more programs may include instructions that cause the electronic device to: identify that at least one slot for the first response of the second trained model corresponds to an empty slot when executed by the electronic device; and based on the identification of the at least one slot: obtain a second response of the first trained model based on the first response of the second trained model, and obtain a second response of the second trained model based on the second response of the first trained model; and determine the output response for the user prompt based on the first response of the first trained model and the second response of the second trained model.
[0165] According to one embodiment, the user prompt may be a first user prompt. The output response may be determined before an input for a second user prompt is received through the electronic device. The input for the first user prompt and the input for the second user prompt may be received sequentially through the electronic device.
[0166] According to one embodiment, the first keyword may correspond to at least one keyword for the first trained model. The second keyword may correspond to at least one keyword for the second trained model.
[0167] According to one embodiment, the method as described above may be performed by an electronic device (e.g., electronic device (101)). The method comprises: receiving input for a user prompt through the electronic device; identifying keywords including a first keyword and a second keyword from the user prompt based on the input; determining first correlation data between at least one keyword for a first trained model available for natural language processing and the keywords including the first keyword and the second keyword; determining second correlation data between at least one keyword for a second trained model available for natural language processing and the keywords including the first keyword and the second keyword; determining a first prompt to be applied to the first trained model as a first text corresponding to the first keyword based on the first correlation data and the second correlation data; and determining a second prompt to be applied to the second trained model as a second text corresponding to the second keyword based on the first correlation data and the second correlation data. The method may include the operation of obtaining the response of the first trained model based on the first prompt and the response of the second trained model based on the second prompt; and the operation of determining an output response for the user prompt based on the response of the first trained model and the response of the second trained model.
[0168] According to one embodiment, the first correlation data may include a first correlation value representing a correlation level between the at least one keyword for the first trained model and the first keyword; and a second correlation value representing a correlation level between the at least one keyword for the first trained model and the second keyword. The second correlation data may include a first correlation value representing a correlation level between the at least one keyword for the second trained model and the first keyword; and a second correlation value representing a correlation level between the at least one keyword for the second trained model and the second keyword. The method may further include: an operation of determining the first prompt to be applied to the first trained model as the first text corresponding to the first keyword based on the first correlation value of the first correlation data which is greater than the first correlation value of the second correlation data; and an operation of determining the second prompt to be applied to the second trained model as the second text corresponding to the second keyword based on the second correlation value of the second correlation data which is greater than the second correlation value of the first correlation data.
[0169] The effects obtainable from the present disclosure are not limited to those mentioned above, and other unmentioned effects will be clearly understood by those skilled in the art to which the present disclosure belongs.
[0170] The electronic device according to the various embodiments disclosed in this document may be of various forms. The electronic device may include, for example, a portable communication device (e.g., a smartphone), a computer device, a portable multimedia device, a portable medical device, a camera, a wearable device, or a consumer electronics device. The electronic device according to the embodiments of this document is not limited to the devices described above.
[0171] The various embodiments of this document and the terms used therein are not intended to limit the technical features described in this document to specific embodiments, and should be understood to include various modifications, equivalents, or substitutions of said embodiments. In connection with the description of the drawings, similar reference numerals may be used for similar or related components. The singular form of a noun corresponding to an item may include one or more of said items unless the relevant context clearly indicates otherwise. In this document, phrases such as "A or B," "at least one of A and B," "at least one of A or B," "A, B or C," "at least one of A, B and C," and "at least one of A, B, or C" may each include any one of the items listed together in the corresponding phrase, or all possible combinations thereof. Terms such as "first," "second," or "first" or "second" may be used simply to distinguish said components from other said components and do not limit said components in any other aspect (e.g., importance or order). Where any (e.g., 1st) component is referred to as "coupled" or "connected" to another (e.g., 2nd) component, with or without the terms "functionally" or "communicationly," it means that said any component may be connected to said other component directly (e.g., via a wire), wirelessly, or through a third component.
[0172] The term “module” as used in the various embodiments of this document may include a unit implemented in hardware, software, or firmware, and may be used interchangeably with terms such as logic, logic block, component, or circuit, for example. A module may be a component formed integrally, or a minimum unit of said component or a part thereof that performs one or more functions. For example, according to one embodiment, a module may be implemented in the form of an application-specific integrated circuit (ASIC).
[0173] Various embodiments of the present document may be implemented as software (e.g., program (840)) comprising one or more instructions stored in a storage medium (e.g., internal memory (836) or external memory (838)) readable by a machine (e.g., electronic device (801)). For example, a processor (e.g., processor (820)) of the machine (e.g., electronic device (801)) may call at least one of the one or more instructions stored from the storage medium and execute it. This enables the machine to operate to perform at least one function according to the at least one called instruction. The one or more instructions may include code generated by a compiler or code that can be executed by an interpreter. The storage medium readable by the machine may be provided in the form of a non-transitory storage medium. Here, 'non-temporary' simply means that the storage medium is a tangible device and does not contain a signal (e.g., electromagnetic waves), and the term does not distinguish between cases where data is stored semi-permanently and cases where it is stored temporarily.
[0174] According to one embodiment, the method according to the various embodiments disclosed herein may be provided by being included in a computer program product. The computer program product may be traded between a seller and a buyer as a product. The computer program product may be distributed in the form of a device-readable storage medium (e.g., compact disc read-only memory (CD-ROM)), or distributed online (e.g., download or upload) through an application store (e.g., Play Store™) or directly between two user devices (e.g., smartphones). In the case of online distribution, at least a portion of the computer program product may be temporarily stored or temporarily created on a device-readable storage medium, such as the memory of a manufacturer's server, an application store's server, or a relay server.
[0175] According to various embodiments, each component (e.g., module or program) of the components described above may include a singular or multiple entities, and some of the multiple entities may be separated and placed in other components. According to various embodiments, one or more of the components or operations of the aforementioned components may be omitted, or one or more other components or operations may be added. Generally or additionally, multiple components (e.g., module or program) may be integrated into a single component. In this case, the integrated component may perform one or more functions of each of the multiple components in the same or similar manner as those performed by the corresponding component among the multiple components prior to integration. According to various embodiments, operations performed by the module, program, or other components may be executed sequentially, in parallel, iteratively, or heuristically, or one or more of the operations may be executed in a different order, omitted, or one or more other operations may be added.
Claims
1. In an electronic device, At least one processor including a processing circuit; and Memory that stores instructions and includes one or more storage media, When the above instructions are executed individually or collectively by the at least one processor: Receive input for a user prompt through the electronic device; Based on the above input, keywords including a first keyword and a second keyword are identified from the user prompt; Determining at least one keyword for a first trained model available for natural language processing and first correlation data between said keywords including said first keyword and said second keyword; Determining at least one keyword for a second trained model available for natural language processing and second correlation data between the keywords including the first keyword and the second keyword; Based on the above first correlation data and the above second correlation data: A first prompt to be applied to the first trained model is determined as a first text corresponding to the first keyword, and Determining the second prompt to be applied to the second trained model as the second text corresponding to the second keyword; Obtaining the response of the first trained model based on the first prompt and the response of the second trained model based on the second prompt; and To determine an output response for the user prompt based on the response of the first trained model and the response of the second trained model. The above electronic device, causing, Electronic device.
2. In Claim 1, The above first correlation data is, A first correlation value representing the correlation level between the at least one keyword and the first keyword for the first trained model; and It includes a second correlation value representing the correlation level between the at least one keyword and the second keyword for the first trained model, and The above second correlation data is, A first correlation value indicating the correlation level between the at least one keyword and the first keyword for the second trained model; and It includes a second correlation value representing the correlation level between the at least one keyword and the second keyword for the second trained model, and When the above instructions are executed individually or collectively by the at least one processor: Based on the first correlation value of the first correlation data which is greater than the first correlation value of the second correlation data, the first prompt to be applied to the first trained model is determined as the first text corresponding to the first keyword; and Based on the second correlation value of the second correlation data which is greater than the second correlation value of the first correlation data, the second prompt to be applied to the second trained model is determined as the second text corresponding to the second keyword. The above electronic device, causing, Electronic device.
3. In Claim 2, When the above instructions are executed individually or collectively by the at least one processor: Based on the first correlation value of the first correlation data that is greater than the first correlation value of the second correlation data and the second correlation value of the first correlation data that is greater than the first threshold value, the first prompt to be applied to the first trained model is determined as the first text corresponding to the first keyword and the second keyword; and Based on the second correlation value of the second correlation data which is greater than the second correlation value of the first correlation data and the first correlation value of the second correlation data which is greater than the first threshold value, the second prompt to be applied to the second trained model is determined as the second text corresponding to the first keyword and the second keyword. The above electronic device, causing, Electronic device.
4. In Claim 2, When the above instructions are executed individually or collectively by the at least one processor: Based on the first correlation value of the first correlation data that is greater than the first correlation value of the second correlation data and the second correlation value of the first correlation data that is less than the second threshold value, the first prompt to be applied to the first trained model is determined as the first text corresponding to the first keyword, excluding the second keyword; and Based on the second correlation value of the second correlation data which is greater than the second correlation value of the first correlation data and the first correlation value of the second correlation data which is less than the second threshold value, the second prompt to be applied to the second trained model is determined as the second text corresponding to the second keyword, excluding the first keyword. The above electronic device, causing, Electronic device.
5. In Claim 4, When the above instructions are executed individually or collectively by the at least one processor: Based on the identification of the above keywords, determine at least one keyword for a third trained model available for natural language processing and third correlation data between the keywords including the first keyword and the second keyword; and To refrain from determining the third prompt to be applied to the third trained model based on the first correlation value of the third correlation data that is smaller than the second threshold value and the second correlation value of the third correlation data that is smaller than the second threshold value. The above electronic device, causing, The first correlation value of the third correlation data represents the correlation level between the at least one keyword and the first keyword for the third trained model, and The second correlation value of the third correlation data represents the correlation level between the at least one keyword and the second keyword for the third trained model, Electronic device.
6. In Claim 2, The first correlation value of the first correlation data and the first correlation value of the second correlation data are determined based on the first keyword and table data, and The second correlation value of the first correlation data and the second correlation value of the second correlation data are determined based on the second keyword and the table data, and The table data above includes information on the correlation level between the at least one keyword for the first trained model and the at least one keyword for the second trained model. Electronic device.
7. In Claim 1, The response of the first trained model is the first response of the first trained model, and The response of the second trained model is the first response of the second trained model, and When the above instructions are executed individually or collectively by the at least one processor: Identifying that at least one slot for the first response of the second trained model corresponds to an empty slot; Based on the identification of at least one slot: Obtaining the second response of the first trained model based on the first response of the second trained model, and Obtaining the second response of the second trained model based on the second response of the first trained model; and To determine the output response for the user prompt based on the first response of the first trained model and the second response of the second trained model. The above electronic device, causing, Electronic device.
8. In Claim 1, The above user prompt is a first user prompt, and The above output response is determined before the input for the second user prompt is received through the electronic device, and The input for the first user prompt and the input for the second user prompt are continuously received through the electronic device, Electronic device.
9. In Claim 1, The first keyword above corresponds to at least one keyword for the first trained model, and, The second keyword above corresponds to at least one keyword for the second trained model, Electronic device.
10. In a non-transient computer-readable storage medium storing one or more programs, said one or more programs, when executed by an electronic device: Receive input for a user prompt through the electronic device; Based on the above input, keywords including a first keyword and a second keyword are identified from the user prompt; Determining at least one keyword for a first trained model available for natural language processing and first correlation data between said keywords including said first keyword and said second keyword; Determining at least one keyword for a second trained model available for natural language processing and second correlation data between the keywords including the first keyword and the second keyword; Based on the above first correlation data and the above second correlation data: A first prompt to be applied to the first trained model is determined as a first text corresponding to the first keyword, and Determining the second prompt to be applied to the second trained model as the second text corresponding to the second keyword; Obtaining the response of the first trained model based on the first prompt and the response of the second trained model based on the second prompt; and To determine an output response for the user prompt based on the response of the first trained model and the response of the second trained model. Instructions including those that cause the above electronic device Non-transient computer-readable storage media.
11. In Claim 10, The above first correlation data is, A first correlation value representing the correlation level between the at least one keyword and the first keyword for the first trained model; and It includes a second correlation value representing the correlation level between the at least one keyword and the second keyword for the first trained model, and The above second correlation data is, A first correlation value indicating the correlation level between the at least one keyword and the first keyword for the second trained model; and It includes a second correlation value representing the correlation level between the at least one keyword and the second keyword for the second trained model, and When one or more of the above programs are executed by the electronic device: Based on the first correlation value of the first correlation data which is greater than the first correlation value of the second correlation data, the first prompt to be applied to the first trained model is determined as the first text corresponding to the first keyword; and Based on the second correlation value of the second correlation data which is greater than the second correlation value of the first correlation data, the second prompt to be applied to the second trained model is determined as the second text corresponding to the second keyword. Instructions including those that cause the above electronic device Non-transient computer-readable storage media.
12. In Claim 11, When one or more of the above programs are executed by the electronic device: Based on the first correlation value of the first correlation data that is greater than the first correlation value of the second correlation data and the second correlation value of the first correlation data that is greater than the first threshold value, the first prompt to be applied to the first trained model is determined as the first text corresponding to the first keyword and the second keyword; and Based on the second correlation value of the second correlation data which is greater than the second correlation value of the first correlation data and the first correlation value of the second correlation data which is greater than the first threshold value, the second prompt to be applied to the second trained model is determined as the second text corresponding to the first keyword and the second keyword. Instructions including those that cause the above electronic device Non-transient computer-readable storage media.
13. In Claim 11, When one or more of the above programs are executed by the electronic device: Based on the first correlation value of the first correlation data that is greater than the first correlation value of the second correlation data and the second correlation value of the first correlation data that is less than the second threshold value, the first prompt to be applied to the first trained model is determined as the first text corresponding to the first keyword, excluding the second keyword; and Based on the second correlation value of the second correlation data which is greater than the second correlation value of the first correlation data and the first correlation value of the second correlation data which is less than the second threshold value, the second prompt to be applied to the second trained model is determined as the second text corresponding to the second keyword, excluding the first keyword. Instructions including those that cause the above electronic device Non-transient computer-readable storage media.
14. In Claim 13, When one or more of the above programs are executed by the electronic device: Based on the identification of the above keywords, determine at least one keyword for a third trained model available for natural language processing and third correlation data between the keywords including the first keyword and the second keyword; and To refrain from determining the third prompt to be applied to the third trained model based on the first correlation value of the third correlation data that is smaller than the second threshold value and the second correlation value of the third correlation data that is smaller than the second threshold value. Includes instructions that cause the above electronic device, The first correlation value of the third correlation data represents the correlation level between the at least one keyword and the first keyword for the third trained model, and The second correlation value of the third correlation data represents the correlation level between the at least one keyword and the second keyword for the third trained model, Non-transient computer-readable storage media.
15. In a method performed by an electronic device, The operation of receiving input for a user prompt through the electronic device; An operation to identify keywords including a first keyword and a second keyword from the user prompt based on the above input; An operation to determine first correlation data between keywords including at least one keyword for a first trained model available for natural language processing and said first keyword and said second keyword; An operation to determine second correlation data between keywords including at least one keyword for a second trained model available for natural language processing and the first keyword and the second keyword; An operation to determine a first prompt to be applied to the first trained model as a first text corresponding to the first keyword, based on the first correlation data and the second correlation data; An operation to determine a second prompt to be applied to the second trained model as a second text corresponding to the second keyword, based on the first correlation data and the second correlation data; The operation of obtaining the response of the first trained model based on the first prompt and the response of the second trained model based on the second prompt; and The operation of determining an output response for the user prompt based on the response of the first trained model and the response of the second trained model, method.