Electronic device and control method therefor
The electronic device addresses the challenge of unclear user requests in AI models by using neural network models to modify and identify appropriate APIs, ensuring accurate responses that align with user intent.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- SAMSUNG ELECTRONICS CO LTD
- Filing Date
- 2025-11-11
- Publication Date
- 2026-05-28
AI Technical Summary
Conventional technologies struggle to accurately identify user intent behind unclear and ambiguous user requests in AI models, leading to inappropriate API calls and suboptimal responses, especially when user requests lack contextual information.
An electronic device equipped with a processor that utilizes an API search model, rewrite model, and language model to modify unclear user requests, identify appropriate APIs, and provide accurate responses by leveraging a database of predefined APIs, history information, and natural language understanding.
The device efficiently and accurately identifies user intent by modifying requests to align with contextual information, ensuring appropriate API calls and responses that match user intent, even with unclear initial requests.
Smart Images

Figure KR2025018538_28052026_PF_FP_ABST
Abstract
Description
Electronic device and control method thereof
[0001] The present disclosure relates to an electronic device and a method for controlling an electronic device, and specifically to an electronic device capable of providing a response to a user request and a method for controlling the same.
[0002] Recently, the development of technologies for artificial intelligence models, such as Large Language Models (LLMs), has been accelerating. In particular, technologies designed to provide diverse information and functions that align with user intent, even when users freely input requests (or queries), are currently receiving significant attention.
[0003] However, it has been pointed out that according to conventional technology, when a very unclear and ambiguous user request is input, there are limitations in clearly identifying the user's intent hidden behind the request and providing a response.
[0004] In particular, when a conversation continues between a user and an AI model, subsequent user requests are frequently entered under the assumption that the model is aware of previously input background or contextual information; while this can be considered a natural conversational style, if such information is omitted, there is a possibility that the meaning of the user request may be interpreted ambiguously.
[0005] In addition, in a technology that provides a response to a user request by calling the API corresponding to the user request among multiple predefined APIs (application programming interfaces) through an artificial intelligence model, accurately and appropriately calling the API is an important issue. However, if the user request is unclear, the appropriate API will not be called, and as a result, the user may not be provided with the information or functions required according to the user request.
[0006] To address the above problems, one could consider increasing the amount of training data and investing longer training times for artificial intelligence models; however, collecting vast amounts of data is not an easy task, and increasing the size of the AI model to process complex data is not an efficient solution.
[0007] The present disclosure is intended to solve the problems of the prior art as described above, and the purpose of the present disclosure is to provide an electronic device and a method for controlling the same that can modify a user request and provide a response to the modified user request when the user request is unclear.
[0008] According to one or more embodiments of the present disclosure for achieving the purpose described above, an electronic device comprises a memory for storing at least one instruction and a processor for executing said at least one instruction. When a user request including voice or text is obtained, the processor obtains information about a plurality of candidate APIs related to the user request based on a database of a plurality of predefined application programming interfaces (APIs) to provide a response to said user request. If one or more APIs corresponding to the user request among the plurality of candidate APIs are not identified, the processor obtains information about said modified user request based on said user request, history information about said user request, and information about said candidate APIs. Based on the information about said modified user request, the processor identifies an API corresponding to said modified user request among the plurality of candidate APIs. Based on the information about said modified user request, the processor provides the response to said user request based on the information about said identified API.
[0009] Meanwhile, the processor inputs the user request into a learned API search model to obtain information about the plurality of candidate APIs from the database, and the information about the plurality of candidate APIs may include information about the name of each of the plurality of candidate APIs related to the user request, information about the parameters of each of the plurality of candidate APIs, and information about the description of each of the plurality of candidate APIs.
[0010] Meanwhile, if one or more APIs corresponding to the user request are identified among the plurality of candidate APIs, the processor provides the response to the user request based on information regarding the one or more APIs, and if one or more APIs among the plurality of candidate APIs are not identified, the processor inputs the information regarding the user request and the plurality of candidate APIs into a learned rewrite model to obtain information regarding the modified user request.
[0011] Meanwhile, the processor obtains information about the modified user request by modifying the user request through the rewrite model to include information about at least one parameter related to at least one of the plurality of candidate APIs, and the information about the modified user request may include a second text resulting from modifying the first text included in the user request.
[0012] Meanwhile, the processor inputs information regarding the modified user request into a learned language model to set at least one parameter-specific detail for calling the identified API, and can obtain a call result for the identified API by calling the identified API based on the set detail.
[0013] Meanwhile, if the user request includes a user query, the processor obtains a text response to the user query based on the result of the call and can provide the response by providing the text response.
[0014] Meanwhile, if the user request includes a control request for a user terminal, the processor may obtain a control command corresponding to the user request based on the call result and provide information regarding the control command.
[0015] Meanwhile, the processor can obtain the text response by converting some of the information included in the call result into text.
[0016] Meanwhile, the above language model includes a natural language understanding model and a natural language generation model, and the processor obtains the call result through the natural language understanding model, and if the call result corresponds to a preset type, inputs the call result into the rewrite model to obtain a modified call result, and inputs the modified call result into the natural language generation model to obtain the text response.
[0017] Meanwhile, the processor can train the API search model, rewrite model, and language model based on the modified user request and the response.
[0018] According to one or more embodiments of the present disclosure for achieving the purpose described above, a control method for an electronic device comprises: a step of obtaining information about a plurality of candidate APIs related to the user request based on a database of a plurality of predefined application programming interfaces (APIs) to provide a response to the user request when a user request including voice or text is obtained; a step of obtaining information about the modified user request based on the user request, history information about the user request, and information about the plurality of candidate APIs if one or more APIs corresponding to the user request among the plurality of candidate APIs are not identified; a step of identifying an API corresponding to the modified user request among the plurality of candidate APIs based on the information about the modified user request; and a step of providing the response to the user request based on the information about the identified API.
[0019] Meanwhile, the step of obtaining information about the plurality of candidate APIs includes the step of inputting the user request into a learned API search model to obtain information about the plurality of candidate APIs from the database, and the information about the plurality of candidate APIs may include information about the name of each of the plurality of candidate APIs related to the user request, information about the parameters of each of the plurality of candidate APIs, and information about the description of each of the plurality of candidate APIs.
[0020] Meanwhile, the control method of the electronic device further includes the step of providing the response to the user request based on information regarding the one or more APIs when one or more APIs corresponding to the user request among the plurality of candidate APIs are identified, and the step of obtaining information regarding the modified user request may include the step of inputting information regarding the user request and the plurality of candidate APIs into a learned rewrite model to obtain information regarding the modified user request when one or more APIs among the plurality of candidate APIs are not identified.
[0021] Meanwhile, the step of obtaining information about the modified user request includes the step of obtaining information about the modified user request by modifying the user request through the rewrite model to include information about at least one parameter related to at least one of the plurality of candidate APIs, and the information about the modified user request may include a second text resulting from modifying the first text included in the user request.
[0022] Meanwhile, the step of providing the above response may include the step of inputting information regarding the modified user request into a learned language model to set at least one parameter-specific detail for calling the identified API, and the step of obtaining a call result for the identified API by calling the identified API based on the set detail.
[0023] Meanwhile, the step of providing the above response may further include, if the user request includes a user query, the step of obtaining a text response to the user query based on the call result and the step of providing the response by providing the text response.
[0024] Meanwhile, the step of providing the above response may further include, if the user request includes a control request for a user terminal, the step of obtaining a control command corresponding to the user request based on the call result and the step of providing the response by providing information about the control command.
[0025] Meanwhile, the step of providing the above response may further include the step of obtaining the text response by converting some information included in the call result into text.
[0026] Meanwhile, the above language model includes a natural language understanding model and a natural language generation model, and the control method of the electronic device may include the step of obtaining the call result through the natural language understanding model, the step of inputting the call result into the rewrite model to obtain a modified call result when the call result corresponds to a preset type, and the step of inputting the modified call result into the natural language generation model to obtain the text response.
[0027] Meanwhile, the control method of the electronic device may further include the step of training the API search model, the rewrite model, and the language model based on the modified user request and the response.
[0028] Other aspects, features, and advantages of one or more embodiments according to the present disclosure will become more apparent from the following detailed description, together with the accompanying drawings.
[0029] FIG. 1 is a block diagram briefly illustrating the configuration of an electronic device according to one or more embodiments of the present disclosure,
[0030] FIG. 2 is a block diagram briefly illustrating a plurality of neural network models and input / output data according to one or more embodiments of the present disclosure,
[0031] FIG. 3 is a block diagram showing in detail a plurality of neural network models and input / output data according to one or more embodiments of the present disclosure,
[0032] FIG. 4 is a drawing for illustrating a user interface provided according to one or more embodiments of the present disclosure,
[0033] FIG. 5 is a block diagram showing in detail the configuration of an electronic device according to one or more embodiments of the present disclosure, and,
[0034] FIG. 6 is a flowchart illustrating a method for controlling an electronic device according to one or more embodiments of the present disclosure.
[0035] The embodiments described herein are subject to various modifications and may have various forms; specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the scope of specific embodiments and should be understood to include various modifications, equivalents, and / or alternatives of the embodiments of the present disclosure. In relation to the description of the drawings, similar reference numerals may be used for similar components.
[0036] In describing the present disclosure, if it is determined that a detailed description of related known functions or configurations could unnecessarily obscure the essence of the present disclosure, such detailed description is omitted.
[0037] Additionally, the following embodiments may be modified in various other forms, and the scope of the technical concept of the present disclosure is not limited to the following embodiments. Rather, these embodiments are provided to make the present disclosure more faithful and complete and to fully convey the technical concept of the present disclosure to those skilled in the art.
[0038] The terms used in this disclosure are used merely to describe specific embodiments and are not intended to limit the scope of the rights. Singular expressions include plural expressions unless the context clearly indicates otherwise.
[0039] In the present disclosure, expressions such as “have,” “may have,” “include,” or “may include” indicate the presence of such features (e.g., numerical values, functions, actions, or components such as parts) and do not exclude the presence of additional features.
[0040] In the present disclosure, expressions such as “A or B,” “at least one of A or / and B,” or “one or more of A or / and B” may include all possible combinations of items listed together. For example, “A or B,” “at least one of A and B,” or “at least one of A or B” may refer to cases including (1) at least one A, (2) at least one B, or (3) both at least one A and at least one B.
[0041] Expressions such as "first," "second," "first," or "second" used in this disclosure may modify various components regardless of order and / or importance, and are used only to distinguish one component from another and do not limit said components.
[0042] Where it is stated that a certain component (e.g., a first component) is "(operatively or communicatively) coupled with / to" or "connected to" another component (e.g., a second component), it should be understood that the said certain component may be directly connected to the said other component or connected through another component (e.g., a third component).
[0043] On the other hand, when it is stated that a certain component (e.g., a first component) is "directly connected" or "directly coupled" to another component (e.g., a second component), it may be understood that no other component (e.g., a third component) exists between said certain component and said other component.
[0044] As used in this disclosure, the expression “configured to” may be replaced, depending on the context, with, for example, “suitable for,” “having the capacity to,” “designed to,” “adapted to,” “made to,” or “capable of.” The term “configured to” may not necessarily mean only “specifically designed to” in hardware.
[0045] Instead, in some situations, the expression “device configured to do something” may mean that the device is “capable of doing something” together with other devices or components. For example, the phrase “processor configured (or set) to perform A, B, and C” may mean a dedicated processor for performing those operations (e.g., an embedded processor), or a generic-purpose processor (e.g., a CPU or application processor) capable of performing those operations by executing one or more software programs stored in a memory device.
[0046] In the embodiments, a 'module' or 'part' performs at least one function or operation and may be implemented in hardware or software, or a combination of hardware and software. Additionally, a plurality of 'modules' or a plurality of 'parts' may be integrated into at least one module and implemented by at least one processor, except for the 'module' or 'part' that needs to be implemented in specific hardware.
[0047] Meanwhile, the various elements and areas in the drawings are depicted schematically. Accordingly, the technical concept of the present invention is not limited by the relative sizes or spacing depicted in the attached drawings.
[0048] Hereinafter, embodiments according to the present disclosure are described in detail with reference to the attached drawings so that those skilled in the art can easily implement them.
[0049] FIG. 1 is a block diagram briefly illustrating the configuration of an electronic device (100) according to one or more embodiments of the present disclosure. FIG. 2 is a block diagram briefly illustrating a plurality of neural network models and input / output data according to one or more embodiments of the present disclosure.
[0050] As illustrated in FIG. 1, the electronic device (100) may include memory (110) and a processor (120).
[0051] The ‘electronic device (100)’ according to the present disclosure may modify a user request and provide a response to the modified user request when the user request is unclear. For example, the electronic device (100) may be implemented as a server device, but is not limited thereto, and may be implemented as a device such as a smartphone, PC, etc.
[0052] At least one instruction regarding an electronic device (100) may be stored in the memory (110). Additionally, an operating system (O / S) for operating the electronic device (100) may be stored in the memory (110). Furthermore, various software programs or applications for operating the electronic device (100) may be stored in the memory (110) according to various embodiments of the present disclosure. Additionally, the memory (110) may include semiconductor memory such as flash memory or magnetic storage media such as a hard disk.
[0053] Specifically, various software modules for operating an electronic device (100) according to various embodiments of the present disclosure may be stored in the memory (110), and the processor (120) may control the operation of the electronic device (100) by executing the various software modules stored in the memory (110). That is, the memory (110) is accessed by the processor (120), and reading, writing, modifying, deleting, updating, etc. of data by the processor (120) may be performed.
[0054] Meanwhile, in the present disclosure, the term memory (110) may be used to include memory (110), ROM, RAM, or a memory card (e.g., micro SD card, memory stick) mounted in the processor (120).
[0055] In one or more embodiments, the memory (110) may store information regarding user requests, a database of multiple APIs, multiple candidate APIs, modified user requests, and responses to user requests. Additionally, the memory (110) may store various data regarding a neural network model according to the present disclosure. Furthermore, various information necessary within the scope of achieving the purpose of the present disclosure may be stored in the memory (110), and the information stored in the memory (110) may be updated upon receipt from an external device or input by a user.
[0056] The processor (120) controls the overall operation of the electronic device (100). Specifically, the processor (120) is connected to the configuration of the electronic device (100) including a memory (110), and can control the overall operation of the electronic device (100) by executing at least one instruction stored in the memory (110) as described above.
[0057] The processor (120) can be implemented in various ways. For example, the processor (120) can be implemented as at least one of an Application Specific Integrated Circuit (ASIC), an embedded processor, a microprocessor, hardware control logic, a hardware Finite State Machine (FSM), or a Digital Signal Processor (DSP). Meanwhile, in this disclosure, the term processor (120) may be used to include a CPU (Central Processing Unit), a GPU (Graphic Processing Unit), and a MPU (Micro Processor Unit), etc.
[0058] In one or more embodiments, the processor (120) can use a neural network model to modify an unclear user request and provide a response to the modified user request.
[0059] As illustrated in FIG. 2, a plurality of neural network models according to the present disclosure may include an API search model, a rewrite model, and a language model. For convenience of explanation, the following description will be based on the premise that the electronic device (100) includes all of the plurality of neural network models, but the present disclosure is not limited thereto. The plurality of neural network models may be implemented as a single integrated model; however, for clarity of explanation, the following description will be based on the premise that the neural network model includes a plurality of neural network models.
[0060] The processor (120) can receive a user request including voice or text. Specifically, the processor (120) may receive a user request from an external device (e.g., smartphone, PC) such as a user terminal, or may receive a user request that is directly input into the electronic device (100).
[0061] "User request" is a collective term for user input that includes the user's intent. Specifically, a user request may include a user query to obtain information using a neural network model. Additionally, a user request may include a user command to control a user terminal using a neural network model. For example, a user request could be text representing a user query such as "Tell me the weather tomorrow," or text representing a user command such as "Set an alarm in 30 minutes."
[0062] A case where the user request includes voice (i.e., user voice) refers to a case where the user request is obtained as a voice signal based on the user's utterance, and in this case, the processor (120) can obtain a user request including text by inputting the obtained voice signal into a voice recognition model to obtain text corresponding to the voice signal.
[0063] The processor (120) can obtain information about multiple candidate APIs related to a user request based on a database of multiple predefined APIs (application programming interfaces) to provide a response to a user request.
[0064] "API" refers to an interface (protocol or mechanism) that enables different systems or applications to exchange data and use functions. In particular, the API according to the present disclosure may be defined so that a neural network model can provide a response to a user request using various data, systems, or applications. Each of the plurality of APIs may correspond to various functions that can be performed by the neural network model.
[0065] 'Database for APIs (API database)' is a term used to collectively refer to various data regarding APIs. Specifically, the database for APIs may include a list of multiple APIs along with documents containing descriptions for each API. If the list of APIs targeted by the service changes, the processor (120) can identify candidate APIs based on the updated database for APIs.
[0066] For example, multiple APIs included in the API database may include information regarding the name of each API, information regarding the parameters of each API, and information regarding the description of each API. Additionally, the API database may include the types and examples of the parameters.
[0067] 'Parameters for an API' are elements that identify each API and refer to values provided as input to perform specific actions or obtain desired data when calling an API. To call an API, it is required that slots corresponding to the parameters associated with that API be filled. For example, if the API is a "weather API," the associated parameters may be "date" and "location." In this case, if the user request includes information such as "Seoul" and "December 18," the API can be called when the slots are filled with "date=December 1" and "location=Seoul".
[0068] As illustrated in FIG. 2, the processor (120) inputs a user request into a learned API search model to obtain information about a plurality of candidate APIs from a database of APIs.
[0069] An 'API search model' refers to a neural network model trained to analyze an input user request and extract a list of multiple candidate APIs from a database of APIs. Specifically, the API search model analyzes the meaning contained in the input user request to identify multiple candidate APIs corresponding to the user request, and can obtain information regarding each of the multiple candidate APIs from the database of APIs.
[0070] Since the information regarding multiple candidate APIs is extracted from the API database, similar to the information regarding multiple APIs, the information regarding multiple candidate APIs may include information on the name of each of the multiple candidate APIs related to the user request, information on the parameters of each of the multiple candidate APIs, and information on the description of each of the multiple candidate APIs.
[0071] For example, the API search model may be a Large Language Model (LLM) and may be implemented as a classification model or a search engine. In the above, information on multiple candidate APIs may be obtained through statistical methods or rule-based methods such as keyword matching. Since the API search model performs relatively simple tasks, it may be desirable to implement it so that its size is smaller compared to the rewrite model and language model described later.
[0072] If one or more APIs corresponding to a user request among multiple candidate APIs are not identified, the processor (120) can obtain information about a modified user request based on the user request, history information about the user request, and information about multiple candidate APIs.
[0073] Here, 'history information' refers collectively to information related to an acquired user request and acquired prior to that user request being entered. History information may include various information acquired within a threshold time prior to the acquisition of the user request.
[0074] Specifically, the history information may include information about other user requests obtained before the user request was obtained, user requests modified according to the present disclosure, responses obtained according to the present disclosure, etc., and may be updated whenever each of these pieces of information is obtained, as illustrated in FIG. 2. For example, the history information may include information about a conversation including successive user requests and responses thereto.
[0075] The processor (120) can identify whether there is an API among a plurality of candidate APIs that corresponds to a user request. If one or more APIs among the plurality of candidate APIs that correspond to a user request are identified, the processor (120) can provide a response to the user request based on information regarding the one or more APIs. In other words, if one or more APIs among the plurality of candidate APIs that correspond to a user request are identified, a response to the user request can be provided based on calling the identified one or more APIs, so there is no need to modify the user request to correspond to a predefined API.
[0076] Conversely, if one or more APIs corresponding to the user request are not identified among multiple candidate APIs, information regarding the user request and the multiple candidate APIs can be input into a trained rewrite model to obtain information regarding the modified user request. In other words, if one or more APIs corresponding to the user request are not identified among multiple candidate APIs, the API cannot be called, so it is necessary to modify the user request to correspond to a predefined API.
[0077] If one or more APIs corresponding to a user request among multiple candidate APIs are not identified, as illustrated in FIG. 2, the processor (120) inputs information about the user request and multiple candidate APIs into a learned rewrite model to obtain information about the modified user request.
[0078] A 'rewrite model' refers to a neural network model trained to rewrite (or modify, change, or supplement) a user request so that it corresponds to at least one of multiple candidate APIs. Since the rewrite model is used when one or more of the multiple candidate APIs are not identified, the rewrite model can be described as a model that rewrites a user request so that one or more of the multiple candidate APIs are identified.
[0079] If the user request can be modified by correcting grammatical errors in the user request or by using information stored in memory (110) (e.g., current time), the rewrite model may modify the user request without using history information. Meanwhile, the rewrite model may be implemented to perform the process of identifying the API corresponding to the modified user request among a plurality of candidate APIs.
[0080] Specifically, the rewrite model can obtain information about a modified user request by modifying the user request to include information about at least one parameter related to at least one of a plurality of candidate APIs. The information about the modified user request may include a second text resulting from modifying a first text included in the user request. That is, the output of the rewrite model may be text information, but is not limited thereto, and may include all information for an API call.
[0081] For example, if the user request is "make a dinner appointment," the processor (120) can identify "MakeReservation" and "MakeAppointment" as multiple candidate APIs based on a database of APIs. In this case, "MakeReservation" may be related to parameters such as "Name," "Date," "Time," and "Location," and "MakeAppointment" may be related to parameters such as "Name," "Date," "Time," "Location," and "Attendees." Based on history information, the processor (120) can obtain a modified user request such as "make a reservation for Cheolsu and AAA restaurant on September 11, 2024 at 5:00 PM."
[0082] The processor (120) can identify an API corresponding to the modified user request among a plurality of candidate APIs based on information regarding the modified user request. And, the processor (120) can provide a response to the user request based on information regarding the identified API.
[0083] As illustrated in FIG. 2, the processor (120) inputs information about a modified user request into a learned language model to identify an API corresponding to the modified user request (so-called API selection process) and can set at least one parameter-specific detail for calling the identified API (so-called slot filling process). Then, the processor (120) can obtain a call result for the identified API by calling the identified API based on the set detail.
[0084] A 'language model' refers to a neural network model trained to understand user requests and obtain responses to them. Specifically, a language model can perform natural language understanding of user requests or modified user requests, identify APIs corresponding to the user requests, obtain the results of calls to those identified APIs, and provide a response to the user request based on the call results. A language model may perform both API selection and slot filling, but the API selection process may also be performed by a rewrite model.
[0085] For example, a language model could be a neural network model referred to as a so-called Large Language Model (LLM), or a neural network model referred to as an artificial intelligence assistant. However, language models are not limited to a specific type.
[0086] Here, the 'call result' for an API can collectively refer to data / information, etc., obtained by calling (executing) the API. For example, the call result may be structured data such as JSON (JavaScript Object Notation) or XML (eXtensible Markup Language).
[0087] In one or more embodiments, if the user request includes a user query, the processor (120) may obtain a text response to the user query based on the call result and provide a response to the user request by providing the text response.
[0088] In one or more embodiments, if the user request includes a control request for a user terminal, the processor (120) may obtain a control command corresponding to the user request based on the call result and provide a response to the user request by providing information about the control command. For example, the processor (120) may convert the call result into a control command in a manner consistent with a protocol for the user terminal and then transmit the converted control command to the user terminal.
[0089] The embodiments described above will be explained with specific examples below. For example, when a first user request "Make a dental appointment for tomorrow at 10:00 AM" is obtained, the processor (120) can obtain a modified first user request "Created a dental appointment for September 11, 2024 at 10:00 AM" using a rewrite model. In this example, modifications such as changing the word "tomorrow" to "September 11, 2024" can be performed without history information regarding the user request. When the modified first user request is obtained, the processor (120) can obtain a first response "Created a dental appointment for tomorrow" based on the modified first user request.
[0090] After the first user request, the modified first user request, and the first response as described above are stored in the history information, when a second user request, “Ah, not 10 o’clock, but 11 o’clock,” is obtained, the processor (120) can identify, based on information about multiple candidate APIs, that at least one of the multiple candidate APIs related to “schedule reservation” is related to parameters such as ‘date’, ‘time’, and ‘place’.
[0091] And, based on the history information, the processor (120) can obtain a modified second user request, "Delete the dental appointment schedule for 10:00 AM on November 10, 2024, and create the dental appointment schedule for 11:00 AM on November 10, 2024." This example is based on the premise that the API for "changing schedules" is not defined and only APIs related to "adding schedules" and "deleting schedules" are defined, and it is obvious that depending on which APIs are defined, a second user request different from the example second user request may be obtained.
[0092] When a modified second user request is obtained, the processor (120) can obtain a second response, "I have modified tomorrow's dental appointment schedule," based on the modified second user request by performing a process as described later.
[0093] According to the embodiments described above with reference to FIGS. 1 and FIG. 2, the electronic device (100) can provide a response that matches the user's intent by modifying an unclear user request. Specifically, the electronic device (100) can enable a neural network model to efficiently and accurately identify the user's intent by modifying the user request to reflect background information and context information of the conversation.
[0094] Updating neural network models is a difficult problem, whereas updating API databases is relatively easy. However, by performing the process of identifying candidate APIs and modifying user requests based on the API database according to the present disclosure, changes to APIs can be reflected in the service in an efficient manner.
[0095] FIG. 3 is a block diagram showing in detail a plurality of neural network models and input / output data according to one or more embodiments of the present disclosure.
[0096] As illustrated in FIG. 3, the language model according to the present disclosure may include a natural language understanding model (NLU model) and a natural language generation model (NLG model).
[0097] As illustrated in FIG. 3, the processor (120) inputs information about a modified user request into a natural language understanding model to perform natural language understanding of the modified user request and can obtain a call result (API response or function response) for an API corresponding to the modified user request. The processor (120) inputs the call result into a natural language generation model to obtain a text response to the user request.
[0098] In one or more embodiments, the processor (120) may obtain a text response by converting some information included in the call result into text. The call result may include various information as structured data as described above, but it may be desirable for the text response provided to the user to be more simplified than the call result. Accordingly, the processor (120) may obtain a text response by converting only some information into text, rather than converting all information included in the call result into text.
[0099] In the example given in FIG. 1, when a modified second user request is obtained, such as "Deleted the dental appointment schedule for 10:00 AM on November 10, 2024, and created the dental appointment schedule for 11:00 AM on November 10, 2024," the result of calling the API based thereon may include various information such as the modified second user request, but the processor (120) can obtain a simplified text response such as "Modified the dental appointment schedule for tomorrow" using a natural language generation module and provide it to the user.
[0100] In one or more embodiments, the call result obtained through the natural language understanding model may be modified (rewritten) depending on whether it corresponds to a preset type. If the call result obtained through the natural language understanding model corresponds to a preset type, the processor (120) may input the call result into a rewriting model, as shown in FIG. 3, to obtain a modified call result. Then, the processor (120) may input the modified call result into a natural language generation model to obtain a text response corresponding to the modified call result as a response to a user request.
[0101] Here, the pre-configured types may include a type indicating that the call result is about the language model's own response (e.g., a rejection of a user request) and a type indicating that the call result requires information about additional parameters.
[0102] For example, if the call result is simple data including text, numbers, etc., there is no need to modify the call result. However, if the call result relates to its own response, such as a rejection of a user request, or indicates that information regarding additional parameters is required, the process modifies the call result to correspond to one or more candidate APIs and can obtain a text response corresponding to the modified call result as a response to the user request.
[0103] Meanwhile, the processor (120) can train an API search model, a rewrite model, and a language model based on modified user requests and responses. If the language model includes a natural language understanding model and a natural language generation model, the processor (120) can train the natural language understanding model and the natural language generation model based on modified user requests and responses. The training method is not limited to specific examples and may include, for example, supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning.
[0104] Meanwhile, although the API search model, rewrite model, and language model (natural language understanding model and natural language generation model) have been described above, at least two of these models may be implemented as a single integrated model.
[0105] According to the embodiments described above with reference to FIG. 3, the electronic device (100) can provide a simplified text response with consideration for the convenience of the user, and can provide a text response that matches the user's intent by modifying the result of the call to the API.
[0106] Additionally, the electronic device (100) can improve the performance of neural network models by training the neural network models based on history information, and this effect can be further enhanced as the number of input user requests increases and the history information is continuously updated accordingly.
[0107] FIG. 4 is a drawing for illustrating a user interface provided according to one or more embodiments of the present disclosure.
[0108] As illustrated in FIG. 4, the user interface according to the present disclosure may be a chat interface that displays a user request entered by a user and a response provided by an electronic device (100). If the electronic device (100) is a server for providing a response to a user request and the user input is entered through a user terminal, the user interface may be provided through the user terminal.
[0109] The messages in FIG. 4 are displayed according to the order in which they are input or provided. The messages of User X (410, 430) in FIG. 4 represent text corresponding to a user request, and the messages of Chatbot Y (420, 450) in FIG. 4 represent a response provided by the electronic device (100). The message of Chatbot Y (440) in FIG. 4 may not be provided to the user.
[0110] As illustrated in FIG. 4, when a first user request "Tell me the business hours of Art Museum A tomorrow (410)" is received, the processor (120) may provide a first response "The business hours of Art Museum A tomorrow are from 9:00 AM to 6:00 PM (420)". In this case, the first user request may correspond to one or more of the candidate APIs, and thus the processor (120) may provide the first response without modifying the first user request.
[0111] After the first response is provided, a second user request, "Tell me the weather (430)." may be obtained. In this case, the second user request may not correspond to one or more of the multiple candidate APIs, and thus the processor (120) may perform a modification on the second user request.
[0112] When a second user request, "Tell me the weather (430)," is obtained, the processor (120) can identify multiple candidate APIs related to "weather" through an API search model and obtain information about the identified candidate APIs. The processor (120) can obtain a modified second user request, "Tell me the weather in Seoul tomorrow (440)," through a rewrite model based on the fact that the candidate APIs require parameters such as "date" and "place." Then, the processor (120) inputs the modified second user request into a language model to obtain a second response, "The expected temperature is between 20 and 25 degrees, and the probability of precipitation is 90% (450)," and provide it to the user.
[0113] Meanwhile, whether to display information about multiple candidate APIs and the modified second user request in the user interface may vary depending on the embodiment. In particular, since the modified user request is merely internal data intended to help the language model better understand, whether to provide the modified user request to the user may vary depending on the service configuration. In FIG. 4, the message (440) is shown as a dotted line to indicate that the modified second user request is not displayed.
[0114] Although not illustrated in FIG. 4, if a third user request "No, not tomorrow, but today" is obtained after a second response is provided, the processor (120) can modify the third user request to obtain a modified third user request "Tell me the weather in Seoul tomorrow." In this case, the processor (120) can obtain the first user request, the second user request, the first response, and the second response included in the history information, as well as the modified third user request based on the modified second user request.
[0115] FIG. 5 is a block diagram showing in detail the configuration of an electronic device (100) according to one or more embodiments of the present disclosure.
[0116] As illustrated in FIG. 5, an electronic device (100) according to one or more embodiments of the present disclosure may further include a communication unit (130), an input unit (140), and an output unit (150), in addition to a memory (110) and a processor (120). However, the configurations illustrated in FIG. 1 and FIG. 5 are merely exemplary, and it is understood that in practicing the present disclosure, new configurations may be added or some configurations may be omitted in addition to the configurations illustrated in FIG. 1 and FIG. 5.
[0117] The communication unit (130) includes a circuit and can perform communication with an external device. Specifically, the processor (120) can receive various data or information from an external device connected through the communication unit (130) and can also transmit various data or information to the external device.
[0118] The communication unit (130) may include at least one of a WiFi module, a Bluetooth module, a wireless communication module, an NFC module, and an Ultra-Wide Band (UWB) module. Specifically, the WiFi module and the Bluetooth module can each perform communication using the WiFi method and the Bluetooth method. When using the WiFi module or the Bluetooth module, various connection information such as SSID is first transmitted and received, and then various information can be transmitted and received after establishing a communication connection using this information.
[0119] In addition, the wireless communication module can perform communication according to various communication standards such as IEEE, Zigbee, 3G (3rd Generation), 3GPP (3rd Generation Partnership Project), LTE (Long Term Evolution), and 5G (5th Generation). Furthermore, the NFC module can perform communication using the NFC (Near Field Communication) method, which utilizes the 13.56 MHz band among various RF-ID frequency bands such as 135 kHz, 13.56 MHz, 433 MHz, 860~960 MHz, and 2.45 GHz. Additionally, the UWB module can accurately measure the Time of Arrival (ToA), which is the time it takes for a pulse to reach a target, and the Angle of Arrival (AoA), which is the angle of arrival of the pulse at the transmitting device, through communication between UWB antennas. Accordingly, precise distance and location recognition within an error range of tens of centimeters indoors is possible.
[0120] In one or more embodiments, the processor (120) may receive a user request from an external device through a communication unit (130). When a response to the user request is obtained, the processor (120) may control the communication unit (130) to transmit the obtained response to an external device. Additionally, the processor (120) may receive various data regarding a neural network model, data included in an API database (particularly when there is a change in the API database), etc. from an external device through the communication unit (130).
[0121] The input unit (140) includes a circuit, and the processor (120) can receive user commands to control the operation of the electronic device (100) through the input unit (140). Specifically, the input unit (140) may be composed of components such as a microphone, a camera, and a remote control signal receiver. Additionally, the input unit (140) may be implemented as a touch screen included in a display. In particular, the microphone can receive a voice signal and convert the received voice signal into an electrical signal.
[0122] The output unit (150) includes a circuit, and the processor (120) can output various functions that the electronic device (100) can perform through the output unit (150). Also, the output unit (150) may include at least one of a display, a speaker, and an indicator.
[0123] The display can output image data under the control of the processor (120). Specifically, the display can output an image stored in the memory (110) under the control of the processor (120). In particular, the display according to one or more embodiments of the present disclosure may display a user interface stored in the memory (110). The display may be implemented as an LCD (Liquid Crystal Display Panel), OLED (Organic Light Emitting Diodes), etc., and the display may also be implemented as a flexible display, a transparent display, etc. depending on the case. However, the display according to the present disclosure is not limited to a specific type.
[0124] The speaker can output audio data under the control of the processor (120). The indicator can be lit under the control of the processor (120). Specifically, the indicator can be lit in various colors under the control of the processor (120). For example, the indicator can be implemented using LEDs (Light Emitting Diodes), LCDs (Liquid Crystal Display Panels), VFDs (Vacuum Fluorescent Displays), etc., but is not limited thereto.
[0125] In one or more embodiments, the processor (120) may receive a user request through the input unit (140). When a user request is received, the processor (120) may control the display to display text corresponding to the received user request on the user interface (e.g., the user interface of FIG. 4). Additionally, when a response to the user request is obtained, the processor (120) may control the output unit (150) to output the obtained response. The processor (120) may control the display to display text corresponding to the obtained response on the user interface.
[0126] FIG. 6 is a flowchart illustrating a control method of an electronic device (100) according to one or more embodiments of the present disclosure.
[0127] Referring to FIG. 6, the electronic device (100) can receive a user request including voice or text (S610). The electronic device (100) may receive a user request from an external device such as a user terminal (e.g., smartphone, PC), or may receive a user request that is directly input into the electronic device (100).
[0128] When a user request is obtained as a voice signal based on the user's speech, the electronic device (100) can obtain a user request including text by inputting the obtained voice signal into a voice recognition model to obtain text corresponding to the voice signal.
[0129] The electronic device (100) can obtain information about multiple candidate APIs related to a user request based on a database of multiple predefined APIs to provide a response to a user request (S620). Specifically, the electronic device (100) can obtain information about multiple candidate APIs from a database of APIs by inputting the user request into a learned API search model.
[0130] The electronic device (100) can identify whether there is an API among a plurality of candidate APIs that corresponds to a user request (S630). If one or more APIs among the plurality of candidate APIs that correspond to a user request are identified (S630-Y), the electronic device (100) can provide a response to the user's user request based on information about the identified APIs (S660).
[0131] In other words, when one or more APIs corresponding to a user request are identified among multiple candidate APIs, no modification is performed on the user request, so the electronic device (100) can provide a response to the user request before modification based on information about the APIs corresponding to the user request before modification.
[0132] If one or more APIs corresponding to a user request among multiple candidate APIs are not identified (S630-N), the electronic device (100) can obtain information about a modified user request based on the user request, history information about the user request, and information about multiple candidate APIs (S640). The electronic device (100) can obtain information about a modified user request by inputting the user request and information about multiple candidate APIs into a learned rewrite model.
[0133] The electronic device (100) can identify an API corresponding to the modified user request among a plurality of candidate APIs based on information regarding the modified user request (S650). Then, the electronic device (100) can provide a response to the user request based on information regarding the identified API (S660).
[0134] In other words, if one or more APIs corresponding to a user request among multiple candidate APIs are not identified, the user request is modified, so the electronic device (100) can provide a response to the modified user request based on information about the API corresponding to the modified user request.
[0135] In one or more embodiments, if the user request includes a user query, the electronic device (100) may obtain a text response to the user query based on the call result and provide a response to the user request by providing the text response.
[0136] In one or more embodiments, if the user request includes a control request for a user terminal, the electronic device (100) may obtain a control command corresponding to the user request based on the result of the call and provide a response to the user request by providing information about the control command.
[0137] Meanwhile, the control method of the electronic device (100) according to the above-described embodiment may be implemented as a program and provided to the electronic device (100). In particular, the program including the control method of the electronic device (100) may be stored and provided on a non-transitory computer-readable medium.
[0138] Specifically, in a non-transient computer-readable recording medium comprising a program for executing a control method of an electronic device (100), the control method of the electronic device (100) may include: a step of obtaining information about a plurality of candidate APIs related to a user request based on a database of predefined application programming interfaces (APIs) to provide a response to a user request when a user request including voice or text is obtained; a step of obtaining information about a modified user request based on a user request, history information about the user request, and information about the plurality of candidate APIs if one or more APIs corresponding to the user request among the plurality of candidate APIs are not identified; a step of identifying an API corresponding to the modified user request among the plurality of candidate APIs based on information about the modified user request; and a step of providing a response to a user request based on information about the identified API.
[0139] Although a method for controlling an electronic device (100) and a computer-readable recording medium including a program for executing the method for controlling the electronic device (100) have been briefly described above, this is merely to avoid redundant descriptions, and it is obvious that various embodiments of the electronic device (100) can also be applied to a method for controlling the electronic device (100) and a computer-readable recording medium including a program for executing the method for controlling the electronic device (100).
[0140] The artificial intelligence-related function according to the present disclosure is operated through the processor (120) and memory (110) of the electronic device (100).
[0141] The processor (120) may be composed of one or more processors (120). In this case, the one or more processors (120) may include at least one of a CPU (Central Processing Unit), a GPU (Graphic Processing Unit), and an NPU (Neural Processing Unit), but are not limited to the examples of the processor (120) described above.
[0142] The CPU is a general-purpose processor (120) capable of performing not only general operations but also artificial intelligence operations, and can efficiently execute complex programs through a multi-layer cache structure. The CPU is advantageous for a serial processing method that enables organic linkage between previous and next calculation results through sequential calculations. The general-purpose processor (120) is not limited to the examples described above, except for cases where it is specified as the CPU described above.
[0143] A GPU is a processor (120) for large-scale computations, such as floating-point operations used in graphics processing, and can perform large-scale computations in parallel by integrating a large number of cores. In particular, a GPU may be advantageous for parallel processing methods such as convolution operations compared to a CPU. Additionally, a GPU can be used as a co-processor (120) to complement the functions of a CPU. The processor (120) for large-scale computation is not limited to the examples described above, except for cases where it is specified as the aforementioned GPU.
[0144] The NPU is a processor (120) specialized for artificial intelligence computation using an artificial neural network, and each layer constituting the artificial neural network can be implemented in hardware (e.g., silicon). At this time, since the NPU is designed to be specialized according to the specifications required by the company, it has a lower degree of freedom compared to a CPU or GPU, but it can efficiently process the artificial intelligence computation required by the company. Meanwhile, as a processor (120) specialized for artificial intelligence computation, the NPU can be implemented in various forms such as a TPU (Tensor Processing Unit), an IPU (Intelligence Processing Unit), a VPU (Vision Processing Unit), etc. The artificial intelligence processor (120) is not limited to the examples described above, except for cases specified as the aforementioned NPU.
[0145] Additionally, one or more processors (120) may be implemented as a System on Chip (SoC). In this case, the SoC may further include, in addition to one or more processors (120), a memory (110) and a network interface such as a bus for data communication between the processor (120) and the memory (110).
[0146] When a plurality of processors (120) are included in a System on Chip (SoC) included in an electronic device (100), the electronic device (100) can perform operations related to artificial intelligence (e.g., operations related to learning or inference of an artificial intelligence model) by using some of the processors (120) among the plurality of processors (120). For example, the electronic device (100) can perform operations related to artificial intelligence by using at least one of a GPU, NPU, VPU, TPU, or hardware accelerator specialized for artificial intelligence operations such as convolution operations or matrix multiplication operations among the plurality of processors (120). However, this is merely one embodiment, and it is obvious that operations related to artificial intelligence can be processed using a CPU or a general-purpose processor (120).
[0147] Additionally, the electronic device (100) can perform operations related to artificial intelligence functions using multi-cores (e.g., dual cores, quad cores, etc.) included in a single processor (120). In particular, the electronic device (100) can perform artificial intelligence operations such as convolution operations and matrix multiplication operations in parallel using multi-cores included in the processor (120).
[0148] One or more processors (120) control input data to be processed according to predefined operation rules or artificial intelligence models stored in memory (110). The predefined operation rules or artificial intelligence models are characterized by being created through learning.
[0149] Here, being created through learning means that a predefined rule of operation or an artificial intelligence model of desired characteristics is created by applying a learning algorithm to a number of learning data. Such learning may be performed on the device itself where the artificial intelligence according to the present disclosure is executed, or it may be performed through a separate server / system.
[0150] An artificial intelligence model may be composed of multiple neural network layers. At least one layer has at least one weight value and performs the layer's operation through the result of the operation of the previous layer and at least one defined operation. Examples of neural networks include CNN (Convolutional Neural Network), DNN (Deep Neural Network), RNN (Recurrent Neural Network), RBM (Restricted Boltzmann Machine), DBN (Deep Belief Network), BRDNN (Bidirectional Recurrent Deep Neural Network), Deep Q-Networks, and Transformers; however, the neural networks in this disclosure are not limited to the aforementioned examples except where specified.
[0151] A learning algorithm is a method of training a specific target device (e.g., a robot) using a number of learning data to enable the target device to make decisions or predictions on its own. Examples of learning algorithms include supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, and the learning algorithms in this disclosure are not limited to the aforementioned examples except where specified.
[0152] A device-readable storage medium may be provided in the form of a non-transitory storage medium. Here, 'non-transitory storage medium' simply means that it 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. For example, a 'non-transitory storage medium' may include a buffer in which data is stored temporarily.
[0153] According to one or more embodiments, 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 an application store (e.g., Play Store). TM It can be distributed online (e.g., downloaded or uploaded) through ) or directly between two user devices (e.g., smartphones). In the case of online distribution, at least a portion of the computer program product (e.g., downloadable app) may be temporarily stored or temporarily created in a device-readable storage medium such as the memory (110) of the manufacturer's server, the application store's server, or the relay server.
[0154] Each component (e.g., module or program) according to the various embodiments of the present disclosure as described above may be composed of a single or multiple entities, and some of the aforementioned sub-components may be omitted, or other sub-components may be further included in the various embodiments. Generally or additionally, some components (e.g., module or program) may be integrated into a single entity to perform the same or similar functions as those performed by each of the respective components prior to integration.
[0155] Operations performed by a module, program, or other component according to various embodiments may be executed sequentially, in parallel, iteratively, or heuristically, or at least some operations may be executed in a different order, omitted, or other operations may be added.
[0156] Meanwhile, the terms “part” or “module” as used in this disclosure include a unit composed of hardware, software, or firmware, and may be used interchangeably with terms such as logic, logic block, component, or circuit, for example. A “part” or “module” may be a component formed integrally, or a minimum unit or part thereof that performs one or more functions. For example, a module may be composed of an application-specific integrated circuit (ASIC).
[0157] Various embodiments of the present disclosure may be implemented as software comprising instructions stored on a machine-readable storage medium (e.g., a computer). The machine may include an electronic device (e.g., an electronic device (100)) according to the disclosed embodiments, which is a device capable of calling instructions stored from the storage medium and operating according to the called instructions.
[0158] When the above instruction is executed by a processor, the processor may perform the function corresponding to the instruction directly or by using other components under the control of the processor. The instruction may include code generated or executed by a compiler or an interpreter.
[0159] Although preferred embodiments of the present disclosure have been illustrated and described above, the present disclosure is not limited to the specific embodiments described above. It is understood that various modifications can be made by those skilled in the art without departing from the essence of the present disclosure as claimed in the claims, and such modifications should not be understood individually from the technical spirit or perspective of the present disclosure.
Claims
1. In an electronic device, Memory for storing at least one instruction; and A processor that executes at least one of the above instructions; comprising, The above processor is, When a user request including voice or text is obtained, information regarding a plurality of candidate APIs related to the user request is obtained based on a database of a plurality of predefined APIs (application programming interfaces) to provide a response to the user request, and If one or more APIs corresponding to the user request among the plurality of candidate APIs are not identified, information regarding the modified user request is obtained based on the user request, history information regarding the user request, and information regarding the plurality of candidate APIs. Based on the information regarding the modified user request above, identify the API corresponding to the modified user request among the plurality of candidate APIs, and An electronic device that provides the response to the user request based on information regarding the identified API.
2. In Paragraph 1, The above processor is, The above user request is input into a trained API search model to obtain information about the plurality of candidate APIs from the database, and An electronic device comprising information regarding the plurality of candidate APIs, including information regarding the name of each of the plurality of candidate APIs related to the user request, information regarding the parameters of each of the plurality of candidate APIs, and information regarding the description of each of the plurality of candidate APIs.
3. In Paragraph 2, The above processor is, When one or more APIs corresponding to the user request are identified among the plurality of candidate APIs, the response to the user request is provided based on information regarding the one or more APIs. An electronic device that, if one or more of the plurality of candidate APIs are not identified, inputs information about the user request and the plurality of candidate APIs into a learned rewrite model to obtain information about the modified user request.
4. In Paragraph 3, The above processor is, Through the above rewrite model, information about the modified user request is obtained by modifying the user request to include information about at least one parameter related to at least one of the plurality of candidate APIs. An electronic device comprising information regarding the above-mentioned modified user request, including a second text resulting from modifying the first text included in the above-mentioned user request.
5. In Paragraph 4, The above processor is, Information regarding the above modified user request is input into a learned language model to set at least one parameter-specific detail for calling the above identified API, and An electronic device that obtains a call result for the identified API by calling the identified API based on the details set above.
6. In Paragraph 5, The above processor is, If the above user request includes a user query, a text response for the user query is obtained based on the result of the above call, and An electronic device that provides the response by providing the text response.
7. In Paragraph 5, The above processor is, If the above user request includes a control request for a user terminal, a control command corresponding to the user request is obtained based on the result of the call, and An electronic device that provides the response by providing information regarding the above control command.
8. In Paragraph 6, The above processor is, An electronic device that obtains the text response by converting some information included in the result of the above call into text.
9. In Paragraph 6, The above language model includes a natural language understanding model and a natural language generation model, and The above processor is, The above call result is obtained through the above natural language understanding model, and If the above call result corresponds to a preset type, the above call result is input into the above rewrite model to obtain a modified call result, and An electronic device that inputs the modified call result into the natural language generation model to obtain the text response.
10. In Paragraph 5, The above processor is, An electronic device that trains the API search model, rewrite model, and language model based on the above modified user request and the above response.
11. In a method for controlling an electronic device, When a user request including voice or text is obtained, a step of obtaining information on a plurality of candidate APIs related to the user request based on a database of a plurality of predefined APIs (application programming interfaces) to provide a response to the user request; If one or more APIs corresponding to the user request among the plurality of candidate APIs are not identified, a step of obtaining information about the modified user request based on the user request, history information regarding the user request, and information about the plurality of candidate APIs; A step of identifying an API corresponding to the modified user request among the plurality of candidate APIs based on information regarding the modified user request; and A method for controlling an electronic device comprising the step of providing the response to the user request based on information regarding the identified API.
12. In Paragraph 11, The step of obtaining information on the above-mentioned plurality of candidate APIs is, The step of inputting the above user request into a trained API search model to obtain information about the plurality of candidate APIs from the database; A method for controlling an electronic device that includes information regarding the plurality of candidate APIs, information regarding the name of each of the plurality of candidate APIs related to the user request, information regarding the parameters of each of the plurality of candidate APIs, and information regarding the description of each of the plurality of candidate APIs.
13. In Paragraph 12, The control method of the above electronic device is, The method further includes the step of providing the response to the user request based on information regarding the one or more APIs when one or more APIs corresponding to the user request are identified among the plurality of candidate APIs; A method for controlling an electronic device comprising: a step of obtaining information about the modified user request, wherein if one or more of the plurality of candidate APIs are not identified, information about the user request and the plurality of candidate APIs is input into a learned rewrite model to obtain information about the modified user request.
14. In Paragraph 13, The step of obtaining information regarding the above-mentioned modified user request is, The method includes the step of obtaining information about the modified user request by modifying the user request through the rewrite model to include information about at least one parameter related to at least one of the plurality of candidate APIs; Information regarding the above-mentioned modified user request is a method for controlling an electronic device comprising a second text resulting from modifying a first text included in the above-mentioned user request.
15. In Paragraph 14, The step of providing the above response is, A step of inputting information regarding the above modified user request into a learned language model to set at least one parameter-specific detail for calling the above identified API; and A method for controlling an electronic device comprising: a step of obtaining a call result for the identified API by calling the identified API based on the details set above.