Method and device for expanding inference context
The method extends inference context by sharing results between models through an extensible database, ensuring conversational continuity and personalized responses, addressing the challenge of context loss in generative AI systems.
Patent Information
- Application Number
- PCT/KR2025/005923
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-31
- Filing Date
- 2025-04-30
- Publication Date
- 2026-01-02
AI Technical Summary
Existing generative AI systems struggle to maintain conversational continuity across different inference models or sessions, leading to a loss of context and suboptimal user experience in activities requiring continuous information exchange.
A method and device that extend the inference context by sharing inference results between different inference models through an extensible inference database, allowing for personalized and context-aware responses by integrating user input prompts with related data from previous conversations.
Enhances user experience by maintaining conversational continuity and providing personalized, contextually relevant responses across different sessions and models, improving information accessibility and reducing the need for repetitive user input.
Smart Images

Figure KR2025005923_02012026_PF_FP_ABST
Abstract
Description
Method and device for extending inference context
[0001] The present disclosure relates to a method and device for extending an inference context. Embodiments of the present disclosure relate to a method and device capable of extending an inference context by sharing inference results between different inference models to process user input prompts (e.g., user utterances).
[0002] Generative AI can generate natural, high-quality content by understanding the context of a conversation based on natural language input prompts from the user. Generative AI based on a Large Language Model (LLM) learns the relationships between words, phrases, and sentences in large-scale text data collected from the internet and elsewhere, enabling it to generate contextually appropriate responses to user input prompts.
[0003] Generative AI can perform a variety of functions, including answering user questions, engaging in conversational interactions, summarizing documents, and generating creative writing, across diverse fields such as education, information provision, entertainment, and technical support. Furthermore, generative AI can enhance educational utility and information accessibility by answering questions on a wide range of topics and assisting with complex problem-solving.
[0004] The present disclosure relates to a method and device for extending an inference context. Embodiments of the present disclosure relate to a method and device capable of extending an inference context by sharing inference results between different inference models to process user input prompts.
[0005] In order to solve the above-described technical problem, according to one embodiment of the present disclosure, an electronic device may include: a communication circuit; at least one processor including a processing circuit; and a memory including one or more storage media storing instructions. When the instructions are individually or collectively executed by the at least one processor, the electronic device may cause the electronic device to determine an inference model from among at least one inference model; determine a context vector based on a user input prompt; selectively determine at least one reference vector based on the user input prompt based on a quality of the determined inference model; retrieve related data from an inference database based on the context vector and the reference vector; generate an integrated prompt including the user input prompt and the related data; obtain an inference result from the determined inference model based on the integrated prompt; and update the inference database based on the user input prompt and the inference result.
[0006] In addition, according to one embodiment of the present disclosure, a method for expanding an inference context of an electronic device may include an operation of determining an inference model from among at least one inference model; an operation of determining a context vector based on a user input prompt; an operation of selectively determining at least one reference vector based on the user input prompt based on a quality of the determined inference model; an operation of searching for related data in an inference database based on the context vector and the reference vector; an operation of generating an integrated prompt including the user input prompt and the related data; an operation of obtaining an inference result from the determined inference model based on the integrated prompt; and an operation of updating the inference database based on the user input prompt and the inference result.
[0007] In addition, according to one embodiment of the present disclosure, a computer-readable recording medium having recorded thereon a program for performing the method may be included.
[0008] According to various embodiments of the present disclosure, by sharing user conversations between different inference models through an extensible inference database, responses optimized for the individual can be generated based on the user's preferences, interests, previous questions, etc., thereby improving the user experience and providing the user with the information he or she needs more quickly and accurately.
[0009] According to various embodiments of the present disclosure, conversational continuity can be maintained between services based on different inference models or across different sessions, allowing users to continue conversations without losing the context of previous conversations even when using different sessions or different inference model services. This conversational continuity can further enhance the user experience, particularly in activities requiring continuous information exchange and interaction, such as project work, education, and research.
[0010] For example, if a user seeks advice on setting exercise goals, managing their diet, or managing stress through a health and wellness tracking application, personalized recommendations can be provided based on the user's previous activities and interactions. If the user previously inquired about meditation techniques to help manage stress, the system can then provide more personalized meditation guidance or health advice, taking into account the user's stress level and lifestyle.
[0011] For example, in an online education platform, when a learner asks questions and learns about a specific topic, the platform can reference their previous questions and interactions to provide a more in-depth and personalized learning experience. When a learner raises a question about a specific scientific topic, the platform can consider their previous learning progress and interests to suggest questions that can guide them to the next step, or provide additional resources for areas they struggled to understand. This allows learners to tailor their learning to their own pace and style, creating personalized learning paths.
[0012] Various embodiments of the present disclosure can improve information accessibility by making it easier to access related information on previously encountered topics or questions. Various embodiments of the present disclosure can eliminate the need for users to repeatedly request the same information, and can provide more in-depth and relevant, personalized responses to users' questions.
[0013] For example, shopping applications utilizing AR technology allow users to virtually experience products while shopping. Specifically, personalized product recommendations or virtual demonstrations can be provided based on previous conversations about product types or brands the user has shown interest in. For example, if a user has previously expressed interest in luxury watches, an AR shopping application could offer the user the opportunity to virtually try on a new collection of luxury timepieces, providing a more personalized shopping experience. Furthermore, AR vision sensors can identify items of interest and record them along with tag information. When matching information is found, the application can provide not only text information but also image information recorded with the tag.
[0014] According to various embodiments of the present disclosure, by obtaining contextual information from an extensible inference database and additionally obtaining reference information associated with the contextual information, generating an integrated prompt that augments a user input prompt and providing it to an inference model, the inference response quality can be improved even for an inference model with low response quality.
[0015] The effects that can be obtained from the exemplary embodiments of the present disclosure are not limited to the effects mentioned above, and other effects not mentioned can be clearly derived and understood by those skilled in the art to which the exemplary embodiments of the present disclosure pertain from the following description. In other words, unintended effects resulting from implementing the exemplary embodiments of the present disclosure can also be derived by those skilled in the art from the exemplary embodiments of the present disclosure.
[0016] FIGS. 1a, 1b, 1c and 1d are conceptual diagrams of an inference context extension method according to one embodiment of the present disclosure.
[0017] FIG. 2a and FIG. 2b illustrate inference results that can be obtained when an inference context is expanded according to one embodiment of the present disclosure.
[0018] Figure 3 illustrates the inference result according to the prior art without expanding the inference context.
[0019] FIG. 4 is a block diagram of an electronic device according to one embodiment of the present disclosure.
[0020] FIG. 5a and FIG. 5b schematically illustrate inference extension according to data processing level according to one embodiment of the present disclosure.
[0021] FIGS. 6A and 6B are schematic flowcharts of a method for expanding an inference context in an electronic device according to one embodiment of the present disclosure.
[0022] FIG. 7 is a schematic flowchart of a method for storing and updating an inference database when the data processing level is 0 according to one embodiment of the present disclosure.
[0023] FIG. 8 is a schematic flowchart of a method for storing and updating an inference database through inference expansion when the data processing level is 1 or higher according to one embodiment of the present disclosure.
[0024] FIGS. 9A and 9B illustrate UI screens displaying inference results based on some of the relevant data retrieved from the inference database selected by the user according to one embodiment of the present disclosure.
[0025] FIG. 10 is a block diagram of an electronic device within a network environment according to various embodiments.
[0026] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the drawings so that those skilled in the art can easily implement the present disclosure. However, the present disclosure may be implemented in various different forms and is not limited to the embodiments described herein. In connection with 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 conciseness.
[0027] FIGS. 1a, 1b, 1c and 1d are conceptual diagrams of an inference context extension method according to one embodiment of the present disclosure.
[0028] A method for expanding an inference context according to one embodiment can obtain an inference result based on a previous user context by generating an integrated prompt including a previous conversation content (or related data) having a predetermined degree of similarity or higher with a user input prompt in an inference database.
[0029] Referring to FIG. 1A, an electronic device that extends an inference context may receive a prompt from a user (111). The prompt may be data input for an inference model to generate output. Components of the prompt may include at least one of an instruction that instructs a specific task or instruction to be performed by the inference model, external information that can adjust the inference model, context information that refers to additional context, input data corresponding to a question for which an answer is sought, and output data that refers to the type or format of the output. The prompt does not have to include all components, and may include information such as instructions or questions to be conveyed to the inference model, as well as other detailed information such as input or examples.
[0030] According to one embodiment, the electronic device may determine an inference model from among at least one available inference model (112). The electronic device may determine the inference model from among the at least one inference model based on the quality of the inference model and status information of the electronic device. The quality of the inference model may be determined based on at least one of the size of the inference model and an inference result benchmarking score. The status information of the electronic device may include at least one of a network status and a resource status. The resource status may include at least one of memory availability, performance of at least one processor of the electronic device, and battery availability. For example, if the electronic device is currently in a state where it is difficult to use a network, an on-device AI that can be used without a network connection may be determined as the inference model from among the at least one inference model.
[0031] In one embodiment, the electronic device can determine a context vector based on a user input prompt. The electronic device can determine the context vector by converting the user input prompt into an embedding vector (114). The context vector can include an embedding vector corresponding to a word or combination of words within the user input prompt that best describes the user input prompt, a sentence or phrase that summarizes the user input prompt, or the like.
[0032] According to one embodiment, the electronic device may selectively determine at least one reference vector based on the quality of the determined inference model, and optionally based on a user input prompt (115). For example, if the determined inference model is small in size, such as an on-device AI, the electronic device may additionally determine at least one reference vector based on the user input prompt to improve the quality of the inference response. The electronic device may determine the at least one reference vector by generating at least one keyword based on the user input prompt and generating an embedding vector corresponding to the at least one keyword.
[0033] Referring to FIG. 1B, the electronic device can search for related data (123) in the inference database (122) based on the context vector and the reference vector. The electronic device can search for related data (123) (or previous conversations) having a similarity (or correlation criterion) or higher in the inference database (122) based on the context vector and the reference vector. The electronic device can search for context data and reference data having an embedding vector having a similarity or higher than the predetermined level of embedding vector of each of the context vector and the reference vector. Accordingly, the related data (123) can include at least one of context data searched for based on the context vector and reference data searched for based on the reference vector in the inference database (122).
[0034] According to one embodiment, the inference database (122) may include at least one database record.
[0035] Each database record may include text keywords (key in FIG. 1b) corresponding to all or part of keywords in conversations with all inference models (e.g., LLM, on-device AI) previously used by the user, embedding vectors (embedding in FIG. 1b) corresponding to the keywords, and inference results (value in FIG. 1b) obtained from the inference models. The inference database (122) may store previous inference results without modification, or may store them after modifying them, such as by extracting, adding, and summarizing them, according to the user's settings or system conditions. The context data and the reference data may be selected based on user selection to select only the necessary data. The correlation criterion may be preset by user input or system settings, or may be dynamically set based on the amount of the context data and the reference data. The correlation criterion may be updated based on the user's partial selection of the context data and the reference data, thereby reflecting user-specific tendencies.
[0036] Referring to FIG. 1c, the electronic device may generate an integrated prompt including at least one of the user input prompt and the related data (131). The electronic device may further generate a soft prompt to generate the integrated prompt. The soft prompt may include information preset for each inference model for further explanation of context data or reference data. The soft prompt may be determined based on suitability among frequently used values generated in advance, or may be determined based on artificial intelligence learning, but is not limited thereto. A UI screen for displaying an inference result based on a user selection from among related data searched from an inference database will be described below with reference to FIG. 9.
[0037] According to one embodiment, the electronic device may obtain an inference result from the determined inference model based on the integrated prompt. The electronic device may display the user input prompt and the inference result on a UI screen (132). The electronic device may additionally display the context data and reference data used by the inference model for inference on the UI screen.
[0038] Referring to FIG. 1d, the electronic device can update the inference database (122) based on the user input prompt and the inference result (141, 142). In this case, a recursive inference process can be further performed based on the data processing level. This allows for obtaining an expanded inference result and updating the inference database (122).
[0039] In one embodiment, the context of a previous conversation can be maintained continuously even when a user uses a different session or different inference model by storing and updating the conversation content with the inference model in an inference database and sharing the inference database among multiple inference models. This ensures the continuity of the conversation even when the inference model or session changes, and generates a customized response without requiring the user to input additional information from a previous conversation to convey the previous context. In one embodiment, the inference database can be used to analyze the user's previously expressed interests, preferred answering style, and past question topics, and generate a customized response tailored to the user's tendencies and needs.
[0040] FIG. 2a and FIG. 2b illustrate inference results that can be obtained when an inference context is expanded according to one embodiment of the present disclosure.
[0041] According to one embodiment, a conversation context that has a predetermined similarity level or higher with the current user input prompt among previous conversations may be acquired from an inference database to generate an integrated prompt that augments the current user input prompt. According to one embodiment, an inference result that matches the context of the user's previous conversations may be obtained based on the integrated prompt. The inference database may further include information on the time at which the conversation was created, as well as words and sentences corresponding to the previous conversation context. When determining similarity with the user input prompt based on the conversation creation time information, weighting may be assigned based on the conversation creation time. For example, recently created conversation context may be given a higher weighting in determining similarity.
[0042] For example, Figure 2a illustrates the inference results of an inference model that reflects the user's preferences and interests. If the user has recently engaged in conversations on topics such as food, cooking, or diet, the conversations are stored in the inference database, and conversations that have a predetermined similarity level or higher with the current user input prompt can be searched from the inference database.
[0043] For example, if a user recently engaged in a conversation about diet, protein, and weight loss, database records corresponding to diet, protein, and weight loss can be stored in the inference database, as shown in Figure 2b. When a user input prompt related to the stored conversation is entered, the corresponding database records can be searched in the inference database. This allows for the generation of an integrated prompt containing the user input prompt and the inference database search results, and the acquisition of an inference result from the inference model based on the integrated prompt. Accordingly, the inference result may include responses based on the user's previous conversation, such as interests or hobbies.
[0044] Figure 3 illustrates the inference result according to the prior art without expanding the inference context.
[0045] Unlike the inference result of Fig. 2a, the inference result of Fig. 3 shows that it is generated based only on the current user input prompt.
[0046] FIG. 4 is a block diagram of an electronic device according to one embodiment of the present disclosure.
[0047] According to one embodiment, in the operation of the electronic device (400) described with reference to FIG. 4, parts that overlap with those described in the aforementioned drawings (FIGS. 1A to 3) may be omitted. The electronic device (400) may include additional components in addition to the illustrated components, or may omit at least one of the illustrated components.
[0048] According to one embodiment, the electronic device (400) may include a communication circuit (not shown), at least one processor (not shown) including a processing circuit; and a memory (not shown) including one or more storage media for storing instructions. The at least one processor may execute at least one instruction constituting each of an Inference Context Manager (420), an Inference DB Manager (430), a Context Splitter (440), a System Data Manager (450), an Inference Request Handler (460), an On-Device AI (470), and an LLM (480) module.
[0049] According to one embodiment, the Inference Context Manager (420) may include a Prompt Analyzer (421), an Embedding Handler (422), a Prompt Generator (424), and a Database Controller (423).
[0050] According to one embodiment, the Inference Context Manager (420) can obtain a user input prompt based on user input.
[0051] According to one embodiment, the Prompt Analyzer (421) can extract at least one keyword by dividing the user input prompt into words, phrases, and sentences.
[0052] In one embodiment, the Embedding Handler (422) can determine a context vector by converting a user input prompt into an embedding vector. The Embedding Handler (422) can determine at least one reference vector by converting each of the at least one keyword into an embedding vector. The Embedding Handler (422) can convert text data such as words and sentences, and other types of raw data, into numerical vectors in a form that the electronic device (400) can understand and process. The Embedding Handler (422) can mathematically calculate relationships between data by representing high-dimensional data as low-dimensional dense vectors, and can mathematically calculate semantic similarities between text data.
[0053] According to one embodiment, the database controller (DB Controller) (423) can search for related data in the inference database (Inference DB) (431) based on the context vector and the reference vector. The database controller (DB Controller) (423) can search for related data in the inference database (Inference DB) (431) through the inference database manager (430). The electronic device (400) can search for context data and reference data having an embedding vector having a predetermined degree of similarity or higher with the embedding vector of each of the context vector and the reference vector. Referring to FIG. 4, the inference database (Inference DB) (431) is located within the electronic device (400), but may exist outside the electronic device (400), such as in the cloud. It will be understood by those skilled in the art that the location of the inference database (122) and the database management method may vary.
[0054] According to one embodiment, the System Data Manager (450) may acquire system data from at least one sensor included in the electronic device (400). The system data may include at least one of location data, day of the week data, and time data. The Prompt Generator (424) may further include tag information corresponding to the system data to generate the integrated prompt. The tag information may include text information corresponding to the system data. For example, when a user makes a location-related query such as 'from here~~', the corresponding location information may be acquired, and text information indicating a location corresponding to the location information may be acquired as tag information. If the tag information continuously acquired by the System Data Manager (450) overlaps with an existing user context, for example, if information collected by a GPS sensor is the same as tag information already acquired by the System Data Manager (450), such as the user's home, the duplicated tag information may be deleted. In addition, if multiple previously collected system data collectively indicate a single meaning, for example, if GPS data collected over a certain period of time indicates a place (e.g., a company) with a single meaning, the multiple previously collected GPS data can be expressed as a single representative value, and tag information corresponding to the representative value can be obtained. The embedding handler (422) can determine an embedding vector corresponding to the tag information. The embedding vector corresponding to the tag information can be transmitted to the database controller (DB Controller) (423).The database controller (DB Controller) (423) can search for related data in the inference database (Inference DB) (431) based on the embedding vector corresponding to the tag information.
[0055] According to one embodiment, the prompt generator (424) can generate an integrated prompt including at least one of the user input prompt and the related data. The prompt generator (424) can generate the integrated prompt by selecting related data having a predetermined degree of similarity or higher with the user input prompt among the related data, summarizing the related data, or selecting some of the related data based on user input, taking into account the size of the integrated prompt that the determined inference model can process. The prompt generator (424) can further generate the integrated prompt by adding a soft prompt. The soft prompt can include information preset for each inference model for further explanation of context data or reference data.
[0056] According to one embodiment, the Inference Request Handler (460) may request an inference result by transmitting the integrated prompt to the on-device AI (470) or the LLM (480). The method of determining the on-device AI (470) or the LLM (480) among at least one inference model is as described above with reference to FIG. 1A, but is not limited thereto. The Inference Request Handler (460) may obtain an inference result corresponding to the integrated prompt from the on-device AI (470) or the LLM (480). The on-device AI (470) is an inference model existing within the electronic device (400) and may provide an inference result within the electronic device (400) even without a network connection. The LLM (480) is an inference model that performs inference based on the cloud and may provide an inference result to the electronic device (400) via a network. The user input prompt and the inference result may be configured and displayed as a UI screen. The above UI screen can additionally display context data and reference data used by the inference model for inference. The inference results can also be transmitted to the Inference Context Manager (420).
[0057] According to one embodiment, the embedding handler (422) may determine at least one embedding vector corresponding to the user input prompt and the inference result. The inference result may be classified into words, phrases, sentences, etc. and determined as at least one embedding vector. The at least one embedding vector corresponding to the user input prompt and the inference result may be transmitted to the database controller (DB Controller) (423).
[0058] According to one embodiment, the database controller (DB Controller) (423) can add, delete, and update records in the inference database (Inference DB) (431) through the inference database manager (Inference DB Manager) (430). The database controller (DB Controller) (423) can update the inference database (Inference DB) (431) based on the at least one embedding vector. According to one embodiment, the database controller (DB Controller) (423) can update the inference database through the inference database manager (Inference DB Manager) (430). If there is an existing database record that matches the embedding vector by a predetermined degree of similarity or higher, the existing inference result and the newly updated inference result can be merged to update the inference database (Inference DB) (431). At this time, in order to remove duplication of the merged inference result, the merged inference result can be transmitted to a predetermined inference model (e.g., a large-scale language model), and an inference result with semantic duplication removed can be obtained and updated in the inference database (Inference DB) (431). Alternatively, the merged inference results can be divided into at least one keyword to determine an embedding vector, and then an inference result with semantic redundancy removed can be obtained from the merged inference result based on the similarity of the embedding vector, and the result can be updated in the inference database (Inference DB) (431). It will be understood by those skilled in the art that the method for removing redundancy from the merged inference result is not limited thereto.
[0059] According to one embodiment, the context splitter (440) can expand the inference result based on the data processing level and update the expanded inference result in the inference database (Inference DB) (431). The data processing level may be a level that determines how much the current inference result is expanded and stored when storing the inference result in the inference database (Inference DB) (431). The higher the data processing level, the more expanded inference result can be obtained through a proportional number of recursive inference processes.
[0060] For example, when the data processing level is 0, the inference result obtained from the inference model can be stored as one database record in the inference database (Inference DB) (431). For example, when the data processing level is 1 or higher, the user prompt and the inference result can be divided into at least one text of a predetermined unit based on the data processing level. The context splitter (440) can obtain each second inference result from one of the at least one inference model based on each of the at least one text. The context splitter (440) can convert each of the at least one text into at least one embedding vector. The context splitter (440) can update the text, the embedding vector, and the second inference result in the inference database (Inference DB) (431).
[0061] The above data processing level may be set by user input, preset in the electronic device (400), or based on the quality of the inference model in use and the quality of at least one currently available inference model. For example, if the currently used inference model is of low quality, such as on-device AI, and a current LLM inference model is available, the data processing level may be set to 1 or higher to further expand the current inference results and store them in the inference database (Inference DB) (431).
[0062] FIG. 5a and FIG. 5b schematically illustrate inference extension according to data processing level according to one embodiment of the present disclosure.
[0063] Referring to FIGS. 5a and 5b, when the data processing level is 0 (520), a user input prompt can be generated as one embedding vector, and one database record including the user input prompt, the embedding vector, and the inference result obtained from the inference model can be stored in the inference database.
[0064] Referring to FIGS. 5A and 5B, when the data processing level is 2 (530), first, at least one keyword is extracted from the inference result corresponding to the data processing level 0, and a new inference result (i.e., an inference result corresponding to the data processing level 1) can be obtained based on the at least one keyword. At this time, the inference model used to obtain the new inference result may be an inference model currently used by the user, or an inference model selected based on system settings, application settings, or user input, but is not limited thereto. Next, at least one keyword is extracted from the inference result corresponding to the data processing level 1, and another new inference result (i.e., an inference result corresponding to the data processing level 2) can be obtained based on the at least one keyword.
[0065] In one embodiment, a recursive inference process can be performed based on the data processing level. This allows for the acquisition of expanded inference results and updating of the expanded inference results in the inference database. For example, even when inference results are obtained through on-device AI with relatively low inference capabilities, the expanded inference results can be obtained through a recursive inference process based on the data processing level.
[0066] FIGS. 6A and 6B are schematic flowcharts of a method for expanding an inference context in an electronic device according to one embodiment of the present disclosure.
[0067] According to one embodiment, the electronic device may be an electronic device corresponding to the electronic device (400) illustrated in FIG. 4. In the operations of the electronic device described in FIGS. 6A and 6B, portions overlapping with those described in FIG. 4 may be omitted. Some of the operations illustrated in FIGS. 6A and 6B may be omitted, and operations not illustrated in FIGS. 6A and 6B may be added.
[0068] Referring to FIG. 6A, in operation 611 according to one embodiment, the electronic device (400) may obtain a user input prompt based on a user input.
[0069] In operation 612 according to one embodiment, the electronic device (400) may determine an inference model from among at least one inference model. The electronic device (400) may determine an inference model from among the at least one inference model based on the quality of the inference model and status information of the electronic device (400). The quality of the inference model may be determined based on at least one of a size of the inference model and an inference result benchmarking score. The status information of the electronic device (400) may include at least one of a network status and a resource status. The resource status may include at least one of memory availability, performance of at least one processor of the electronic device (400), and battery availability.
[0070] In operation 613 according to one embodiment, the electronic device (400) may determine a context vector based on the user input prompt. The electronic device may determine the context vector by converting the user input prompt into an embedding vector. The context vector may include an embedding vector corresponding to a word or combination of words within the user input prompt that best describes the user input prompt, a sentence or phrase that summarizes the user input prompt, or the like.
[0071] In operation 614 according to one embodiment, the electronic device (400) may optionally determine at least one reference vector based on the quality of the determined inference model, and optionally based on a user input prompt. The electronic device (400) may determine at least one reference vector by extracting at least one keyword based on the user input prompt and converting it into an embedding vector.
[0072] In operation 615 according to one embodiment, the electronic device (400) may search for related data in an inference database based on the context vector and the reference vector. The electronic device may search for related data having a predetermined similarity (or correlation criterion) or higher in the inference database based on the context vector and the reference vector. The electronic device (400) may search for context data and reference data having an embedding vector having a predetermined similarity or higher with the embedding vector of each of the context vector and the reference vector.
[0073] Referring to FIG. 6B, in operation 621 according to one embodiment, the electronic device (400) may determine whether a result of searching for related data exists in the inference database. If related data is found, the process may proceed to operation 622, and if related data is not found, the process may proceed to operation 625.
[0074] In operation 622 according to one embodiment, the electronic device (400) may determine whether the relevant data exceeds the input range of the inference model. If the input range of the inference model is exceeded, the process may proceed to operation 623, and if the input range of the inference model is not exceeded, the process may proceed to operation 624.
[0075] In operation 623 according to one embodiment, the electronic device (400) may reduce relevant data by considering the size of the integrated prompt that the inference model can process. The method of reducing relevant data may include, but is not limited to, selecting relevant data having a predetermined similarity level or higher with the user input prompt, summarizing the relevant data, or selecting some of the relevant data based on user input.
[0076] In operation 624 according to one embodiment, the electronic device (400) may generate an integrated prompt including the user input prompt and the related data.
[0077] In operation 625 according to one embodiment, the electronic device (400) may transmit a user input prompt or an integrated prompt to the inference model. If no relevant data is found in operation 621, the electronic device (400) may transmit the user input prompt to the inference model. If relevant data is found in operation 621, the electronic device (400) may transmit the integrated prompt to the inference model.
[0078] In operation 626 according to one embodiment, the electronic device (400) can obtain an inference result from the inference model.
[0079] In operation 627 according to one embodiment, the electronic device (400) may update the inference database based on the user input prompt and the inference result. In this case, a recursive inference process may be further performed based on the data processing level. This allows for obtaining an extended inference result and updating the inference database with the extended inference result. Obtaining the extended inference result and updating the inference database based on the data processing level will be described below with reference to FIGS. 7 and 8.
[0080] FIG. 7 is a schematic flowchart of a method for storing and updating an inference database when the data processing level in an electronic device is 0 according to an embodiment of the present disclosure. FIG. 8 is a schematic flowchart of a method for storing and updating an inference database through data expansion when the data processing level in an electronic device is 1 or higher according to an embodiment of the present disclosure.
[0081] According to one embodiment, the electronic device may be an electronic device corresponding to the electronic device (400) illustrated in FIG. 4. In the operations of the electronic device described in FIGS. 7 and 8, portions overlapping with those described in FIG. 4 may be omitted. Some of the operations illustrated in FIGS. 7 and 8 may be omitted, and operations not illustrated in FIGS. 7 and 8 may be added.
[0082] Referring to FIG. 7, when the data processing level is 0, an embedding vector for a user input prompt can be obtained, and one database record including the user input prompt, the embedding vector, and the inference result obtained from the inference model can be stored in the inference database.
[0083] In operation 710 according to one embodiment, the electronic device (400) may obtain an embedding vector for a user input prompt.
[0084] In operation 720 according to one embodiment, the electronic device (400) may determine whether an identical database record exists in the inference database based on the embedding vector. If an identical database record exists, the electronic device may proceed to operation 730, and if an identical database record does not exist, the electronic device may proceed to operation 750.
[0085] In operation 730 according to one embodiment, the electronic device (400) may post-process the inference result and the existing database record. If there is an existing database record that matches the embedding vector by a predetermined degree of similarity or higher, the existing inference result and the newly updated inference result may be merged into one. At this time, in order to remove duplication in the merged inference result, the merged inference result may be transmitted to a predetermined inference model (e.g., a large-scale language model) to obtain an inference result with semantic duplication removed. Alternatively, the merged inference result may be divided into at least one keyword to determine an embedding vector, and then, based on the similarity of the embedding vector, the inference result with semantic duplication removed may be obtained from the merged inference result. It will be understood by those skilled in the art that various post-processing methods for removing duplication are not limited thereto.
[0086] In operation 740 according to one embodiment, the electronic device (400) can update the user input prompt, the embedding vector, and the post-processing result as one database record in the inference database.
[0087] In operation 750 according to one embodiment, the electronic device (400) may store the user input prompt, the embedding vector, and the inference result as one database record in an inference database.
[0088] Referring to FIG. 8, the electronic device (400) can expand the inference result based on the data processing level and update the expanded inference result in the inference database. The data processing level may be a level that determines how much the current inference result is expanded and stored when storing the inference result in the inference database. The higher the data processing level, the more expanded inference result can be obtained through a proportional number of recursive inference processes.
[0089] In operation 810 according to one embodiment, the electronic device (400) may separate the user input prompt and the inference result into at least one text unit based on a data processing level.
[0090] In operation 820 according to one embodiment, the electronic device (400) can obtain each second inference result based on at least one text from a predetermined inference model.
[0091] In operation 830 according to one embodiment, the electronic device (400) can convert at least one text into at least one embedding vector, respectively.
[0092] In operation 840 according to one embodiment, the electronic device (400) may determine whether an identical database record exists in the inference database based on the embedding vector. If an identical database record exists, the electronic device may proceed to operation 850, and if an identical database record does not exist, the electronic device may proceed to operation 870.
[0093] In operation 850 according to one embodiment, the electronic device (400) may post-process the second inference result and the existing database record. If there is an existing database record that matches the embedding vector by a predetermined degree of similarity or higher, the existing inference result and the second inference result to be newly updated may be merged into one. At this time, in order to remove duplication of the merged inference result, the merged inference result may be transmitted to a predetermined inference model (e.g., a large-scale language model) and an inference result with semantic duplication removed may be obtained. Alternatively, the merged inference result may be divided into at least one keyword to determine an embedding vector, and then, based on the similarity of the embedding vector, an inference result with semantic duplication removed may be obtained from the merged inference result. It will be understood by those skilled in the art that various post-processing methods for removing duplication are not limited thereto.
[0094] In operation 860 according to one embodiment, the electronic device (400) can update the text, embedding vector, and post-processing results in the inference database.
[0095] In operation 870 according to one embodiment, the electronic device (400) may store the text, the embedding vector, and the second inference result in an inference database.
[0096] Operations 810 to 870 can be repeated recursively up to the data processing level while increasing the data processing level by 1, thereby obtaining more extended inference results and storing them in the inference database.
[0097] FIGS. 9A and 9B illustrate UI screens displaying inference results based on some of the relevant data retrieved from the inference database selected by the user according to one embodiment of the present disclosure.
[0098] According to one embodiment, the electronic device (400) can obtain a user input prompt based on user input.
[0099] In one embodiment, the electronic device (400) can determine a context vector based on a user input prompt. The electronic device (400) can determine the context vector by converting the user input prompt into an embedding vector. The electronic device (400) can determine at least one reference vector by extracting at least one keyword based on the user input prompt and converting it into an embedding vector.
[0100] The electronic device (400) can search for related data in the inference database (122) based on the context vector and the reference vector. The electronic device (400) can search for related data having a similarity (or correlation reference value) or higher in the inference database based on the context vector and the reference vector. The electronic device (400) can search for context data and reference data having an embedding vector having a similarity or higher than a predetermined level with respect to the embedding vectors of each of the context vector and the reference vector. Accordingly, the related data can include at least one of context data searched based on the context vector and reference data searched based on the reference vector in the inference database (122).
[0101] Referring to FIG. 9A, when related data is retrieved from the inference database (122), the electronic device (400) may display a predetermined icon (911) indicating that related data (922) has been retrieved. When a user clicks on the predetermined icon (911), the electronic device (400) may display a UI (922) configured to include each item of related data (922) and a selection controller GUI resource (e.g., a check box). The electronic device (400) may generate an integrated prompt including selected related data and a user input prompt based on user input.
[0102] Referring to FIG. 9b, the electronic device (400) can obtain and display an inference result from the inference model based on the generated integrated prompt (930).
[0103] Although not shown, in one embodiment, the electronic device (400) can generate an integrated prompt by adding user information associated with a user account. Based on the integrated prompt with the added user information, the electronic device (400) can obtain and display customized inference results based on the user information from the inference model.
[0104] In one embodiment, the electronic device (400) can generate an integrated prompt by adding a user profile generated in each conversation session. Based on the integrated prompt with the added user profile, the electronic device (400) can obtain and display inference results based on previous conversations accumulated within a single session from an inference model.
[0105] FIG. 10 is a block diagram of an electronic device within a network environment according to various embodiments.
[0106] FIG. 10 is a block diagram of an electronic device (1001) within a network environment (1000) according to various embodiments. Referring to FIG. 10, in the network environment (1000), the electronic device (1001) may communicate with the electronic device (1002) via a first network (1098) (e.g., a short-range wireless communication network), or may communicate with at least one of the electronic device (1004) or the server (1008) via a second network (1099) (e.g., a long-range wireless communication network). According to one embodiment, the electronic device (1001) may communicate with the electronic device (1004) via the server (1008). According to one embodiment, the electronic device (1001) may include a processor (1020), a memory (1030), an input module (1050), an audio output module (1055), a display module (1060), an audio module (1070), a sensor module (1076), an interface (1077), a connection terminal (1078), a haptic module (1079), a camera module (1080), a power management module (1088), a battery (1089), a communication module (1090), a subscriber identification module (1096), or an antenna module (1097). In some embodiments, the electronic device (1001) may omit at least one of these components (e.g., the connection terminal (1078)), or may have one or more other components added. In some embodiments, some of these components (e.g., sensor module (1076), camera module (1080), or antenna module (1097)) may be integrated into a single component (e.g., display module (1060)).
[0107] The processor (1020) may, for example, execute software (e.g., a program (1040)) to control at least one other component (e.g., a hardware or software component) of the electronic device (1001) connected to the processor (1020) and perform various data processing or operations. According to one embodiment, as at least a part of the data processing or operations, the processor (1020) may store commands or data received from other components (e.g., a sensor module (1076) or a communication module (1090)) in a volatile memory (1032), process the commands or data stored in the volatile memory (1032), and store result data in a non-volatile memory (1034). According to one embodiment, the processor (1020) may include a main processor (1021) (e.g., a central processing unit or an application processor) or an auxiliary processor (1023) (e.g., a graphics processing unit, a neural processing unit (NPU), an image signal processor, a sensor hub processor, or a communication processor) that can operate independently or together with the main processor (1021). For example, when the electronic device (1001) includes the main processor (1021) and the auxiliary processor (1023), the auxiliary processor (1023) may be configured to use less power than the main processor (1021) or to be specialized for a given function. The auxiliary processor (1023) may be implemented separately from the main processor (1021) or as a part thereof.
[0108] The auxiliary processor (1023) may control at least a portion of functions or states associated with at least one component (e.g., the display module (1060), the sensor module (1076), or the communication module (1090)) of the electronic device (1001), for example, on behalf of the main processor (1021) while the main processor (1021) is in an inactive (e.g., sleep) state, or together with the main processor (1021) while the main processor (1021) is in an active (e.g., application execution) state. In one embodiment, the auxiliary processor (1023) (e.g., an image signal processor or a communication processor) may be implemented as a part of another functionally related component (e.g., a camera module (1080) or a communication module (1090)). In one embodiment, the auxiliary processor (1023) (e.g., a neural network processing unit) may include a hardware structure specialized for processing artificial intelligence models. The artificial intelligence models may be generated through machine learning. This learning can be performed, for example, on the electronic device (1001) itself where the artificial intelligence model is executed, or can be performed through a separate server (e.g., server (1008)). The learning algorithm can 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 can include multiple artificial neural network layers.The artificial neural network may be one of 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, or alternatively to, a hardware structure, an artificial intelligence model may include a software structure.
[0109] The memory (1030) can store various data used by at least one component (e.g., the processor (1020) or the sensor module (1076)) of the electronic device (1001). The data can include, for example, software (e.g., the program (1040)) and input data or output data for commands related thereto. The memory (1030) can include volatile memory (1032) or non-volatile memory (1034).
[0110] The program (1040) may be stored as software in memory (1030) and may include, for example, an operating system (1042), middleware (1044), or an application (1046).
[0111] The input module (1050) can receive commands or data to be used in a component of the electronic device (1001) (e.g., a processor (1020)) from an external source (e.g., a user) of the electronic device (1001). The input module (1050) can include, for example, a microphone, a mouse, a keyboard, a key (e.g., a button), or a digital pen (e.g., a stylus pen).
[0112] The audio output module (1055) can output audio signals to the outside of the electronic device (1001). The audio output module (1055) can include, for example, a speaker or a receiver. The speaker can be used for general purposes, such as multimedia playback or recording playback. The receiver can be used to receive incoming calls. In one embodiment, the receiver can be implemented separately from the speaker or as part of the speaker.
[0113] The display module (1060) can visually provide information to an external party (e.g., a user) of the electronic device (1001). The display module (1060) may include, for example, a display, a holographic device, or a projector, and a control circuit for controlling the device. In one embodiment, the display module (1060) may include a touch sensor configured to detect a touch, or a pressure sensor configured to measure the intensity of a force generated by the touch.
[0114] The audio module (1070) can convert sound into an electrical signal, or vice versa, convert an electrical signal into sound. According to one embodiment, the audio module (1070) can acquire sound through the input module (1050), output sound through the sound output module (1055), or an external electronic device (e.g., electronic device (1002)) (e.g., speaker or headphone) directly or wirelessly connected to the electronic device (1001).
[0115] The sensor module (1076) can detect the operating status (e.g., power or temperature) of the electronic device (1001) or the external environmental status (e.g., user status) and generate an electrical signal or data value corresponding to the detected status. According to one embodiment, the sensor module (1076) can include, for example, a gesture sensor, a gyro sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a proximity sensor, a color sensor, an IR (infrared) sensor, a biometric sensor, a temperature sensor, a humidity sensor, or an illuminance sensor.
[0116] The interface (1077) may support one or more designated protocols that may be used to directly or wirelessly connect the electronic device (1001) to an external electronic device (e.g., the electronic device (1002)). In one embodiment, the interface (1077) may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, an SD card interface, or an audio interface.
[0117] The connection terminal (1078) may include a connector through which the electronic device (1001) may be physically connected to an external electronic device (e.g., the electronic device (1002)). In one embodiment, the connection terminal (1078) may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (e.g., a headphone connector).
[0118] The haptic module (1079) can convert electrical signals into mechanical stimuli (e.g., vibration or movement) or electrical stimuli that a user can perceive through tactile or kinesthetic sensations. In one embodiment, the haptic module (1079) can include, for example, a motor, a piezoelectric element, or an electrical stimulation device.
[0119] The camera module (1080) can capture still images and videos. In one embodiment, the camera module (1080) may include one or more lenses, image sensors, image signal processors, or flashes.
[0120] The power management module (1088) can manage power supplied to the electronic device (1001). According to one embodiment, the power management module (1088) can be implemented as, for example, at least a part of a power management integrated circuit (PMIC).
[0121] A battery (1089) may power at least one component of the electronic device (1001). In one embodiment, the battery (1089) may include, for example, a non-rechargeable primary battery, a rechargeable secondary battery, or a fuel cell.
[0122] The communication module (1090) may support the establishment of a direct (e.g., wired) communication channel or a wireless communication channel between the electronic device (1001) and an external electronic device (e.g., electronic device (1002), electronic device (1004), or server (1008)), and the performance of communication through the established communication channel. The communication module (1090) may operate independently from the processor (1020) (e.g., application processor) and may include one or more communication processors that support direct (e.g., wired) communication or wireless communication. According to one embodiment, the communication module (1090) may include a wireless communication module (1092) (e.g., a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module) or a wired communication module (1094) (e.g., a local area network (LAN) communication module, or a power line communication module). Any of these communication modules may communicate with an external electronic device (1004) via a first network (1098) (e.g., a short-range communication network such as Bluetooth, wireless fidelity (WiFi) direct, or infrared data association (IrDA)) or a second network (1099) (e.g., a long-range communication network such as 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 (1092) may use subscriber information (e.g., an international mobile subscriber identity (IMSI)) stored in the subscriber identification module (1096) to verify or authenticate the electronic device (1001) within a communication network such as the first network (1098) or the second network (1099).
[0123] The wireless communication module (1092) can support 5G networks and next-generation communication technologies following the 4G network, such as NR access technology (new radio access technology). NR access technology can support high-speed transmission of high-capacity data (eMBB (enhanced mobile broadband)), minimizing terminal power and connecting multiple terminals (mMTC (massive machine type communications)), or high reliability and low latency (URLLC (ultra-reliable and low-latency communications)). The wireless communication module (1092) can support, for example, a high-frequency band (e.g., mmWave band) to achieve a high data transmission rate. The wireless communication module (1092) may support various technologies for securing performance in a high-frequency band, such as beamforming, massive multiple-input and multiple-output (MIMO), full dimensional MIMO (FD-MIMO), array antenna, analog beam-forming, or large scale antenna. The wireless communication module (1092) may support various requirements specified in the electronic device (1001), an external electronic device (e.g., the electronic device (1004)), or a network system (e.g., the second network (1099)). According to one embodiment, the wireless communication module (1092) can support a peak data rate (e.g., 20 Gbps or more) for eMBB realization, a loss coverage (e.g., 164 dB or less) for mMTC realization, or a U-plane latency (e.g., 0.5 ms or less for downlink (DL) and uplink (UL), or 1 ms or less for round trip) for URLLC realization.
[0124] The antenna module (1097) can transmit or receive signals or power to or from an external device (e.g., an external electronic device). In one embodiment, the antenna module (1097) may include an antenna including a radiator formed of a conductor or a conductive pattern formed on a substrate (e.g., a PCB). In one embodiment, the antenna module (1097) 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 the first network (1098) or the second network (1099), may be selected from the plurality of antennas, for example, by the communication module (1090). A signal or power may be transmitted or received between the communication module (1090) and an external electronic device via the at least one selected antenna. In some embodiments, in addition to the radiator, another component (e.g., a radio frequency integrated circuit (RFIC)) may be additionally formed as a part of the antenna module (1097).
[0125] According to various embodiments, the antenna module (1097) may form a mmWave antenna module. In one embodiment, the mmWave antenna module may include a printed circuit board, an RFIC disposed on or adjacent a first side (e.g., a bottom side) of the printed circuit board and capable of supporting a designated high frequency band (e.g., a mmWave band), and a plurality of antennas (e.g., an array antenna) disposed on or adjacent a second side (e.g., a top side or a side side) of the printed circuit board and capable of transmitting or receiving signals in the designated high frequency band.
[0126] At least some of the above components can be interconnected and exchange signals (e.g., commands or data) with each other via a communication method between peripheral devices (e.g., a bus, GPIO (general purpose input and output), SPI (serial peripheral interface), or MIPI (mobile industry processor interface)).
[0127] According to one embodiment, commands or data may be transmitted or received between the electronic device (1001) and an external electronic device (1004) via a server (1008) connected to a second network (1099). Each of the external electronic devices (1002 or 1004) may be the same or a different type of device as the electronic device (1001). According to one embodiment, all or part of the operations executed in the electronic device (1001) may be executed in one or more of the external electronic devices (1002, 1004, or 1008). For example, when the electronic device (1001) is to perform a certain function or service automatically or in response to a request from a user or another device, the electronic device (1001) may, instead of or in addition to executing the function or service itself, request one or more external electronic devices to perform the function or at least a part of the service. One or more external electronic devices that receive the request may execute at least a portion of the requested function or service, or an additional function or service related to the request, and transmit the result of the execution to the electronic device (1001). The electronic device (1001) may process the result as is or additionally and provide it as at least a portion of a response to the request. For this purpose, cloud computing, distributed computing, mobile edge computing (MEC), or client-server computing technology may be used, for example. The electronic device (1001) may provide an ultra-low latency service by using distributed computing or mobile edge computing, for example. In another embodiment, the external electronic device (1004) may include an Internet of Things (IoT) device. The server (1008) may be an intelligent server utilizing machine learning and / or a neural network.According to one embodiment, an external electronic device (1004) or server (1008) may be included within the second network (1099). The electronic device (1001) may be applied to intelligent services (e.g., smart homes, smart cities, smart cars, or healthcare) based on 5G communication technology and IoT-related technology.
[0128] According to one embodiment of the present disclosure, an electronic device may include: a communication circuit; at least one processor including a processing circuit; and a memory including one or more storage media storing instructions. When the instructions are individually or collectively executed by the at least one processor, the instructions may cause the electronic device to determine an inference model from among at least one inference model; determine a context vector based on a user input prompt; selectively determine at least one reference vector based on a quality of the determined inference model, based on the user input prompt; retrieve related data from an inference database based on the context vector and the reference vector; generate an integrated prompt including the user input prompt and the related data; obtain an inference result from the determined inference model based on the integrated prompt; and update the inference database based on the user input prompt and the inference result.
[0129] According to one embodiment, when the instructions are individually or collectively executed by the at least one processor, the electronic device may cause: the electronic device to determine an inference model from among the at least one inference model based on a quality of the inference model and status information of the electronic device. The quality of the inference model is determined based on at least one of a size of the inference model and an inference result benchmarking score; the status information of the electronic device includes at least one of a network status and a resource status; and the resource status may include at least one of a memory availability, a performance of the at least one processor, and a battery availability.
[0130] According to one embodiment, when the instructions are individually or collectively executed by the at least one processor, the electronic device may cause: if the quality of the determined inference model is below a predetermined standard, to extract at least one keyword from the user input prompt; and to convert each of the at least one keyword into at least one embedding vector to determine the at least one reference vector.
[0131] According to one embodiment, the related data may include at least one context data retrieved based on the context vector and one reference data retrieved based on the reference vector in the inference database.
[0132] According to one embodiment, when the instructions are individually or collectively executed by the at least one processor, the electronic device may cause: the electronic device to generate the integrated prompt by selecting a portion of the related data that has a predetermined degree of similarity or greater with the user input prompt, summarizing the related data, or selecting a portion of the related data based on a user input, taking into account the size of the integrated prompt that the determined inference model can process.
[0133] According to one embodiment, when the instructions are individually or collectively executed by the at least one processor, the electronic device may cause: to segment the user prompt and the inference result into at least one text of a predetermined unit based on a data processing level; to obtain each second inference result from one of the at least one inference model based on each of the at least one text; to convert each of the at least one text into at least one embedding vector; and to update the text, the embedding vector, and the second inference result in the inference database.
[0134] In one embodiment, the data processing level may be set by user input, preset in the electronic device, or set based on the quality of the determined inference model and the quality of at least one currently available inference model.
[0135] According to one embodiment, the electronic device further comprises at least one sensor; and when the instructions are individually or collectively executed by the at least one processor, the electronic device may cause the electronic device to: obtain system data from the at least one sensor; and further include tag information corresponding to the system data to generate the integrated prompt. The system data may include at least one of location data, day of the week data, and time data; and the tag information may correspond to the system data.
[0136] In addition, according to one embodiment of the present disclosure, a method for expanding an inference context of an electronic device may include an operation of determining an inference model from among at least one inference model; an operation of determining a context vector based on a user input prompt; an operation of selectively determining at least one reference vector based on the user input prompt based on a quality of the determined inference model; an operation of searching for related data in an inference database based on the context vector and the reference vector; an operation of generating an integrated prompt including the user input prompt and the related data; an operation of obtaining an inference result from the determined inference model based on the integrated prompt; and an operation of updating the inference database based on the user input prompt and the inference result.
[0137] According to one embodiment, the operation of selectively determining at least one reference vector based on the quality of the determined inference model and based on a user input prompt may include: extracting at least one keyword from the user input prompt when the quality of the inference model is below a predetermined standard; and converting each of the at least one keyword into at least one embedding vector to determine the at least one reference vector.
[0138] Electronic devices according to the various embodiments disclosed in this document may take various forms. Electronic devices may include, for example, display devices, portable communication devices (e.g., smartphones), computer devices, portable multimedia devices, portable medical devices, cameras, wearable devices, or home appliances. Electronic devices according to the embodiments of this document are not limited to the aforementioned devices.
[0139] The various embodiments of this document and the terminology used herein are not intended to limit the technical features described in this document to specific embodiments, but should be understood to include various modifications, equivalents, or substitutes of the embodiments. For example, a component expressed in the singular should be understood to include a concept including plural components unless the context clearly indicates only the singular. It should be understood that the term "and / or" used in this document encompasses any and all possible combinations of one or more of the listed items. The terms "comprise," "have," "consist of," and the like used in this disclosure are intended to specify only the presence of a feature, component, part, or combination thereof described in this disclosure, and the use of such terms does not exclude the presence or addition of one or more other features, components, parts, or combinations thereof. 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" can each include any one of the items listed together in that phrase, or all possible combinations thereof. Terms such as "first", "second", or "first" or "second" may be used merely to distinguish the corresponding element from other corresponding elements and do not limit the corresponding elements in any other respect (e.g., importance or order).
[0140] The terms "part" or "module" used in various embodiments of this document may include units implemented in hardware, software, or firmware, and may be used interchangeably with terms such as logic, logic block, component, or circuit. The "part" or "module" may be an integrally formed component or a minimum unit or part of the component that performs one or more functions. For example, according to one embodiment, the "part" or "module" may be implemented in the form of an application-specific integrated circuit (ASIC).
[0141] The term “if” as used in various embodiments of this document may be interpreted to mean “when”, “when”, “in response to determining”, or “in response to detecting”, depending on the context. Similarly, “if it is determined that” or “if ~ is detected” may be interpreted to mean “upon determining”, “in response to determining”, or “upon detecting”, or “in response to detecting”, depending on the context.
[0142] The program executed by the electronic device (400) described in this document may be implemented as hardware components, software components, and / or a combination of hardware components and software components. The program may be executed by any system capable of executing computer-readable instructions.
[0143] Software may include a computer program, code, instructions, or a combination of one or more of these, which can configure a processing device to perform a desired operation or command the processing device, either independently or collectively. Software may be implemented as a computer program including instructions stored on a computer-readable storage medium. Examples of the computer-readable storage medium include magnetic storage media (e.g., read-only memory (ROM), random-access memory (RAM), floppy disks, hard disks, etc.) and optical reading media (e.g., CD-ROMs, digital versatile discs (DVDs)). The computer-readable storage medium may be distributed across network-connected computer systems so that the computer-readable code can be stored and executed in a distributed manner. Computer programs can be distributed online (e.g., by 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 an intermediary server.
[0144] According to various embodiments, each component (e.g., a module or a program) of the above-described components may include one or more entities, and some of the entities may be separated and placed in other components. According to various embodiments, one or more components or operations of the aforementioned components may be omitted, or one or more other components or operations may be added. Alternatively or additionally, a plurality of components (e.g., a module or a program) may be integrated into a single component. In such a case, the integrated component may perform one or more functions of each of the plurality of components identically or similarly to those performed by the corresponding component among the plurality of components prior to the integration. According to various embodiments, the operations performed by a module, program, or other component 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 electronic devices, communication circuit; At least one processor comprising a processing circuit; and Comprising a memory comprising one or more storage media for storing instructions; When said instructions are individually or collectively executed by said at least one processor, said electronic device causes: Determine an inference model among at least one inference model; Determine a context vector based on user input prompts; Optionally, based on the quality of the determined inference model, at least one reference vector is determined based on a user input prompt; Retrieving relevant data from an inference database based on the context vector and the reference vector; Generate an integrated prompt including the user input prompt and the related data; Obtaining an inference result from the determined inference model based on the above integrated prompt; An electronic device that causes the inference database to be updated based on the user input prompt and the inference result.
2. In paragraph 1, When said instructions are individually or collectively executed by said at least one processor, said electronic device causes: Causing the determination of an inference model among the at least one inference model based on the quality of the inference model and the status information of the electronic device; The quality of the above inference model is determined based on at least one of the size of the above inference model and the inference result benchmarking score; The status information of the electronic device includes at least one of a network status and a resource status; An electronic device, wherein the resource status includes at least one of memory availability, performance of the at least one processor, and battery availability.
3. In paragraph 1, When said instructions are individually or collectively executed by said at least one processor, said electronic device causes: If the quality of the above-determined inference model is below a predetermined standard, extracting at least one keyword from the user input prompt; An electronic device that causes the at least one reference vector to be determined by converting each of the at least one keyword into at least one embedding vector.
4. In paragraph 1, An electronic device, wherein the related data includes at least one context data retrieved based on the context vector and one reference data retrieved based on the reference vector in the inference database.
5. In paragraph 4, When said instructions are individually or collectively executed by said at least one processor, said electronic device causes: An electronic device that causes the integrated prompt to be generated by selecting some of the related data that have a predetermined degree of similarity or higher with the user input prompt, summarizing the related data, or selecting some of the related data based on user input, taking into account the size of the integrated prompt that the determined inference model can process.
6. In paragraph 1, When said instructions are individually or collectively executed by said at least one processor, said electronic device causes: Separating the user prompt and the inference result into at least one text unit based on a data processing level; Obtaining each second inference result from one of the at least one inference model based on each of the at least one text; Converting each of the above at least one text into at least one embedding vector; An electronic device that causes the text, the embedding vector, and the second inference result to be updated in the inference database.
7. In paragraph 6, An electronic device wherein the data processing level is set by user input, preset in the electronic device, or set based on the quality of the determined inference model and the quality of at least one currently available inference model.
8. In paragraph 1, comprising at least one more sensor; When said instructions are individually or collectively executed by said at least one processor, said electronic device causes: Obtaining system data from at least one sensor; Causing the integrated prompt to be generated by further including tag information corresponding to the above system data; The above system data includes at least one of location data, day of the week data, and time data; An electronic device wherein the above tag information is text information corresponding to the above system data.
9. In a method for extending the inference context of an electronic device, The act of determining an inference model among at least one inference model; The action of determining a context vector based on user input prompts; An operation of determining at least one reference vector, optionally based on the quality of the determined inference model, and based on a user input prompt; An operation of retrieving related data from an inference database based on the context vector and the reference vector; An action to generate an integrated prompt including the user input prompt and the related data; An operation of obtaining an inference result from the determined inference model based on the integrated prompt; and A method comprising updating the inference database based on the user input prompt and the inference result.
10. In paragraph 9, Optionally, based on the quality of the above-determined inference model, an operation of determining at least one reference vector based on a user input prompt. An operation of extracting at least one keyword from the user input prompt when the quality of the above inference model is below a predetermined standard; and A method comprising the operation of determining at least one reference vector by converting each of the at least one keyword into at least one embedding vector.
Citation Information
Patent Citations
Infolding Type Hinge Device
KR1020230006319A
Context-sensitive search using a deep learning model
KR102354716B1
Methods for optimizing prompting information for generative AI
KR102672166B1
Ball-valve open and close device using spiral cam groove and ball
KR102682673B1