Electronic device for processing user utterance by using common prompt, and control method thereof
The electronic device processes user utterances efficiently by using a unified prompt format through a conversational agent and LLM interaction, addressing latency issues in handling multiple tasks.
Patent Information
- Application Number
- PCT/KR2025/001139
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-16
- Filing Date
- 2025-01-21
- Publication Date
- 2025-08-07
AI Technical Summary
Conventional techniques for processing user utterances using Large Language Models (LLMs) face delays and inefficiencies when handling multiple tasks due to the need for task-specific prompts, leading to latency and the requirement for additional learning.
An electronic device processes user utterances using a unified format of prompts, generating multiple prompts sequentially to handle tasks like application and function selection, system calls, and user responses, reducing latency by leveraging a conversational agent and LLM interaction.
This approach enables efficient processing of user utterances with multiple tasks without additional learning, enhancing responsiveness and reducing latency by using a unified prompt format across tasks.
Smart Images

Figure KR2025001139_07082025_PF_FP_ABST
Abstract
Description
Electronic device for processing user utterances using common prompts and method for controlling the same
[0001] This document relates to an electronic device that processes user utterances using common prompts and a method for controlling the same.
[0002] There is a growing demand for technologies that effectively process and utilize large amounts of data using electronic devices (e.g., servers). To enhance the utility of these devices and satisfy the diverse needs of users, telecommunications service providers and electronic device manufacturers are competitively developing electronic devices that offer a variety of features and differentiate themselves from competitors. Consequently, the various functions offered through electronic devices are also becoming increasingly sophisticated.
[0003] A Large Language Model (LLM) can refer to a language model that can perform inference without fine-tuning using methods such as few-shot learning, and can have more than 10 times as many parameters (e.g., more than 100 billion parameters) as a conventional language model. According to conventional techniques, prompts input to an LLM (e.g., a conversational style with the LLM) can be generated based on a question-and-answer model. For example, if a user inputs an utterance such as "Tell me the current weather" into an electronic device (e.g., a user terminal), the user's current location can be identified according to a predefined algorithm for each task and / or domain, weather information corresponding to the current location can be obtained, and the information can be provided to the user as a result of the utterance processing. In this way, conventional techniques process user utterances according to predefined algorithms for each task and / or domain, and thus, there is a problem in that the prompts generated for a given task cannot be applied to other tasks to process the user's utterance. Accordingly, latency may occur in processing user utterances, and problems may arise where the LLM must perform new learning to process other tasks.
[0004] According to one embodiment of the present document, an electronic device (e.g., a server) may be provided that can reduce the delay time when processing a user utterance by processing the user utterance using the same format of prompt for each task.
[0005] According to one embodiment of the present document, an electronic device (e.g., a server) may be provided that can process user utterances even when the user utterance includes two or more tasks (e.g., "Set it 1 degree cooler than the outside temperature") by processing the user utterance using the same format of prompts for each task.
[0006] According to one embodiment of the present document, a method of controlling an electronic device (e.g., a server) can be provided that reduces the delay time when processing a user utterance by processing the user utterance using the same format of prompt for each task.
[0007] According to one embodiment of the present document, a control method of an electronic device may be provided that enables utterance processing even when a user utterance includes two or more tasks (e.g., "Set it 1 degree cooler than the outside temperature") by having the electronic device (e.g., a server) process the user utterance using the same format of prompts for each task.
[0008] An electronic device (e.g., a server) according to one embodiment of the present document includes at least one processor and a memory, wherein the memory, when executed by the at least one processor, causes the server to, based on acquisition of a first user utterance, generate a first prompt including a plurality of applications executable through the server and provide the first prompt to a language model, obtain a first response including at least one application selected by the language model from among the plurality of applications based on the provision of the first prompt, generate a second prompt including a plurality of functions related to at least one application included in the first response based on the acquisition of the first response and provide the second prompt to the language model, obtain a second response including at least one function selected by the language model from among the plurality of functions based on the provision of the first prompt, generate a third prompt querying whether to perform a system call or provide a response to a user based on the acquisition of the second response and provide the third prompt to the language model, and determine whether to perform the system call or provide a response to the first user based on the third response obtained according to the provision of the third prompt. It can be configured to store instructions that are set to provide a response to an utterance.
[0009] A method according to one embodiment of the present document may include, based on acquisition of a first user utterance, generating a first prompt including a plurality of applications executable through a server and providing the first prompt to a language model; based on the provision of the first prompt, obtaining a first response including at least one application selected by the language model from among the plurality of applications; based on acquisition of the first response, generating a second prompt including a plurality of functions related to at least one application included in the first response and providing the second prompt to the language model; based on the provision of the first prompt, obtaining a second response including at least one function selected by the language model from among the plurality of functions; based on acquisition of the second response, generating a third prompt querying whether to perform a system call or provide a response to a user and providing the third prompt to the language model; and based on the third response obtained according to the provision of the third prompt, providing a response to the system call or the first user utterance.
[0010] FIG. 1 is a block diagram of an electronic device within a network environment according to various embodiments of the present document.
[0011] FIG. 2 is an exemplary diagram for explaining the configuration of a conversation agent according to one embodiment of the present document.
[0012] FIG. 3 is an exemplary diagram illustrating a function or operation of an electronic device (e.g., a server) processing a user's speech using a common prompt according to one embodiment of the present document.
[0013] FIGS. 4A and 4B are exemplary diagrams illustrating an information transfer relationship between a conversational agent and a language model (e.g., LLM) according to one embodiment of the present document.
[0014] FIG. 1 is a block diagram of an electronic device (101) within a network environment (100) according to various embodiments.
[0015] Referring to FIG. 1, in a network environment (100), an electronic device (101) may communicate with an electronic device (102) via a first network (198) (e.g., a short-range wireless communication network), or may communicate with at least one of an electronic device (104) or a server (108) via a second network (199) (e.g., a long-range wireless communication network). In one embodiment, the electronic device (101) may communicate with the electronic device (104) via the server (108). According to one embodiment, the electronic device (101) may include a processor (120), a memory (130), an input module (150), an audio output module (155), a display module (160), an audio module (170), a sensor module (176), an interface (177), a connection terminal (178), a haptic module (179), a camera module (180), a power management module (188), a battery (189), a communication module (190), a subscriber identification module (196), or an antenna module (197). In some embodiments, the electronic device (101) may omit at least one of these components (e.g., the connection terminal (178)), or may have one or more other components added. In some embodiments, some of these components (e.g., the sensor module (176), the camera module (180), or the antenna module (197)) may be integrated into one component (e.g., the display module (160)).
[0016] The processor (120) may, for example, execute software (e.g., a program (140)) to control at least one other component (e.g., a hardware or software component) of the electronic device (101) connected to the processor (120) and perform various data processing or operations. According to one embodiment, as at least a part of the data processing or operations, the processor (120) may store commands or data received from other components (e.g., a sensor module (176) or a communication module (190)) in a volatile memory (132), process the commands or data stored in the volatile memory (132), and store result data in a non-volatile memory (134). According to one embodiment, the processor (120) may include a main processor (121) (e.g., a central processing unit or an application processor) or an auxiliary processor (123) (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 (121). For example, when the electronic device (101) includes the main processor (121) and the auxiliary processor (123), the auxiliary processor (123) may be configured to use less power than the main processor (121) or to be specialized for a given function. The auxiliary processor (123) may be implemented separately from the main processor (121) or as a part thereof.
[0017] The auxiliary processor (123) may control at least a portion of functions or states associated with at least one component (e.g., a display module (160), a sensor module (176), or a communication module (190)) of the electronic device (101), for example, on behalf of the main processor (121) while the main processor (121) is in an inactive (e.g., sleep) state, or together with the main processor (121) while the main processor (121) is in an active (e.g., application execution) state. In one embodiment, the auxiliary processor (123) (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 (180) or a communication module (190)). In one embodiment, the auxiliary processor (123) (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 (101) itself where the artificial intelligence model is executed, or can be performed through a separate server (e.g., server (108)). 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.
[0018] The memory (130) can store various data used by at least one component (e.g., processor (120) or sensor module (176)) of the electronic device (101). The data can include, for example, software (e.g., program (140)) and input data or output data for commands related thereto. The memory (130) can include volatile memory (132) or non-volatile memory (134).
[0019] The program (140) may be stored as software in the memory (130) and may include, for example, an operating system (142), middleware (144), or an application (146).
[0020] The input module (150) can receive commands or data to be used in a component of the electronic device (101) (e.g., a processor (120)) from an external source (e.g., a user) of the electronic device (101). The input module (150) 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).
[0021] The audio output module (155) can output audio signals to the outside of the electronic device (101). The audio output module (155) 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.
[0022] The display module (160) can visually provide information to an external party (e.g., a user) of the electronic device (101). The display module (160) may include, for example, a display, a holographic device, or a projector and a control circuit for controlling the device. According to one embodiment, the display module (160) 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.
[0023] The audio module (170) can convert sound into an electrical signal, or vice versa, convert an electrical signal into sound. According to one embodiment, the audio module (170) can acquire sound through the input module (150), output sound through the sound output module (155), or an external electronic device (e.g., electronic device (102)) (e.g., speaker or headphone) directly or wirelessly connected to the electronic device (101).
[0024] The sensor module (176) can detect the operating status (e.g., power or temperature) of the electronic device (101) 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 (176) 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.
[0025] The interface (177) may support one or more designated protocols that may be used to directly or wirelessly connect the electronic device (101) with an external electronic device (e.g., the electronic device (102)). In one embodiment, the interface (177) may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, an SD card interface, or an audio interface.
[0026] The connection terminal (178) may include a connector through which the electronic device (101) may be physically connected to an external electronic device (e.g., electronic device (102)). According to one embodiment, the connection terminal (178) may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (e.g., a headphone connector).
[0027] The haptic module (179) 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. According to one embodiment, the haptic module (179) can include, for example, a motor, a piezoelectric element, or an electrical stimulation device.
[0028] The camera module (180) can capture still images and videos. According to one embodiment, the camera module (180) may include one or more lenses, image sensors, image signal processors, or flashes.
[0029] The power management module (188) can manage power supplied to the electronic device (101). According to one embodiment, the power management module (188) can be implemented as, for example, at least a part of a power management integrated circuit (PMIC).
[0030] A battery (189) may power at least one component of the electronic device (101). In one embodiment, the battery (189) may include, for example, a non-rechargeable primary battery, a rechargeable secondary battery, or a fuel cell.
[0031] The communication module (190) may support the establishment of a direct (e.g., wired) communication channel or a wireless communication channel between the electronic device (101) and an external electronic device (e.g., electronic device (102), electronic device (104), or server (108)), and the performance of communication through the established communication channel. The communication module (190) may operate independently from the processor (120) (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 (190) may include a wireless communication module (192) (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 (194) (e.g., a local area network (LAN) communication module, or a power line communication module). Among these communication modules, the corresponding communication module can communicate with an external electronic device (104) via a first network (198) (e.g., a short-range communication network such as Bluetooth, wireless fidelity (WiFi) direct, or infrared data association (IrDA)) or a second network (199) (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 can 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 (192) can verify or authenticate the electronic device (101) within a communication network such as the first network (198) or the second network (199) by using subscriber information (e.g., an international mobile subscriber identity (IMSI)) stored in the subscriber identification module (196).
[0032] The wireless communication module (192) can support 5G networks and next-generation communication technologies following the 4G network, such as NR access technology (new radio access technology). The NR access technology can support high-speed transmission of high-capacity data (eMBB (enhanced mobile broadband)), minimization of terminal power and connection of multiple terminals (mMTC (massive machine type communications)), or high reliability and low latency (URLLC (ultra-reliable and low-latency communications)). The wireless communication module (192) can support, for example, a high-frequency band (e.g., mmWave band) to achieve a high data transmission rate. The wireless communication module (192) can 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 (192) can support various requirements specified in the electronic device (101), an external electronic device (e.g., the electronic device (104)), or a network system (e.g., the second network (199)). According to one embodiment, the wireless communication module (192) 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.
[0033] The antenna module (197) 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 (197) 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 (197) 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 (198) or the second network (199), may be selected from the plurality of antennas, for example, by the communication module (190). A signal or power may be transmitted or received between the communication module (190) 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 (197).
[0034] According to various embodiments, the antenna module (197) 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.
[0035] 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)).
[0036] According to one embodiment, commands or data may be transmitted or received between the electronic device (101) and an external electronic device (104) via a server (108) connected to a second network (199). Each of the external electronic devices (102 or 104) may be the same or a different type of device as the electronic device (101). According to one embodiment, all or part of the operations executed in the electronic device (101) may be executed in one or more of the external electronic devices (102, 104, or 108). For example, when the electronic device (101) is to perform a certain function or service automatically or in response to a request from a user or another device, the electronic device (101) 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 (101). The electronic device (101) 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 (101) may provide an ultra-low latency service by using distributed computing or mobile edge computing, for example. In another embodiment, the external electronic device (104) may include an Internet of Things (IoT) device. The server (108) may be an intelligent server utilizing machine learning and / or a neural network. According to one embodiment, the external electronic device (104) or the server (108) may be included in the second network (199).The electronic device (101) can be applied to intelligent services (e.g., smart home, smart city, smart car, or healthcare) based on 5G communication technology and IoT-related technology.
[0037] FIG. 2 is an exemplary drawing for explaining the configuration of a conversation agent (200) according to one embodiment of the present document.
[0038] Referring to FIG. 2, a conversational agent (200) according to one embodiment of the present document may include at least one module among a context manager (210), a data loader (220), and a prompt generator (230). The conversational agent module (200) according to one embodiment of the present document may be stored in an electronic device (101) (e.g., a server). Alternatively, the conversational agent module (200) according to one embodiment of the present document may be stored in an external electronic device (e.g., a user terminal).
[0039] A context manager (210) according to one embodiment of the present document can manage a parameter (e.g., "device_type") of at least one function (e.g., "search_devices"). A context manager (210) according to one embodiment of the present document can provide a parameter (e.g., "device_type") of at least one function (e.g., "search_devices") to a language model (e.g., LLM). A context manager (210) according to one embodiment of the present document can obtain a response (e.g., "device_type: air conditioner") to the provision of a parameter (e.g., "device_type") of at least one function (e.g., "search_devices") from a language model. A context manager (210) according to one embodiment of the present document can store the obtained response as a context in an electronic device (e.g., a server).
[0040] According to one embodiment of the present document, the data loader (220) may access an application list stored in an electronic device (e.g., a server) and provide the application list (222) to the language model. According to one embodiment of the present document, the data loader (220) may access a function list stored in an electronic device (e.g., a server) and provide the function list to the language model. The application list according to one embodiment of the present document may include applications (e.g., "SmartThingsApp") executable on the electronic device (101) (e.g., a server) and / or an external electronic device (e.g., a user terminal). The function list (224) according to one embodiment of the present document may include at least one function (e.g., "search_devices") executable through a specified application. According to one embodiment of the present document, the function or operation of providing the application list and the function list to the language model may also be performed by the context manager (210).
[0041] A prompt generator (230) according to one embodiment of the present document can generate prompts so that multiple tasks (e.g., a weather information acquisition task and a device control task) can be performed according to prompts of the same format. For example, the prompt generator (230) according to one embodiment of the present document can generate prompts such as "Please select a plug-in" and / or "Available functions are as follows", which are common prompts that can be commonly applied to multiple tasks. The common prompts according to one embodiment of the present document can be provided as a language model.
[0042] A conversational agent (200) according to one embodiment of the present document may be implemented as a module stored in a memory (e.g., memory (130) of FIG. 1) and controlled by at least one processor (e.g., processor (120) of FIG. 1). Alternatively, a conversational agent (200) according to one embodiment of the present document may be implemented as a module included in at least one processor (e.g., processor (120) of FIG. 1).
[0043] FIG. 3 is an exemplary drawing for explaining a function or operation of an electronic device (101) (e.g., a server) according to one embodiment of the present document to process a user's speech using a common prompt.
[0044] Referring to FIG. 3, an electronic device (101) (e.g., a server) according to one embodiment of the present document may, in operation 310, generate a first prompt including a plurality of executable applications through the server based on acquisition of a first user utterance and provide the first prompt to a language model. A conversational agent (200) (e.g., a data loader (220)) according to one embodiment of the present document may access an application list stored in the electronic device (101) (e.g., a server) and provide the application list (222) to the language model or context manager (210). The application list according to one embodiment of the present document may include applications (e.g., "SmartThingsApp") executable on the electronic device (101) (e.g., a server) and / or an external electronic device (e.g., a user terminal). The first user utterance according to one embodiment of the present document may include, for example, an utterance such as "Set the air conditioner temperature to 26 degrees." According to one embodiment of the present document, a first prompt may include a list of applications stored in an electronic device (101) (e.g., a server). According to one embodiment of the present document, the first prompt may or may not include a list of functions in addition to the list of applications. According to one embodiment of the present document, as applications executable through the electronic device (101) (e.g., a server), "SmartThingsApp" and "Samsung.weatherNews" may be included. A function or operation for providing the first prompt according to one embodiment of the present document may be performed by, for example, a context manager (210). To this end, a data loader (220) according to one embodiment of the present document may provide information about the list of applications to the context manager (210), and a prompt generator (230) may provide a generated common prompt (e.g., "Select a plug-in") to the context manager (210).According to one embodiment of the present document, the context manager (210) may generate a first prompt to be provided to the language model based on a list of applications and a common prompt (e.g., "Select a plug-in") and provide it to the language model. However, this is merely exemplary, and at least some of the elements constituting the first prompt may be provided to the language model by other modules.
[0045] An electronic device (101) (e.g., a server) according to an embodiment of the present document may, in operation 320, obtain a first response including at least one application selected by a language model from among a plurality of applications based on the provision of a first prompt. An electronic device (101) (e.g., a conversational agent (200)) according to an embodiment of the present document may obtain information about at least one application (e.g., "SmartThingsApp") selected from among a plurality of applications (e.g., "SmartThingsApp" and "Samsung.weatherNews") as a first response from a language model. The language model according to an embodiment of the present document may select at least one application based on a user's utterance.
[0046] According to one embodiment of the present document, the electronic device (101) (e.g., server) may, at operation 330, generate a second prompt including a plurality of functions related to at least one application included in the first response based on acquisition of the first response and provide the second prompt to the language model. According to one embodiment of the present document, the conversational agent (200) (e.g., data loader (220)) may access a function list stored in the electronic device (101) (e.g., server) and provide the function list (224) to the language model or context manager (210). The function list according to one embodiment of the present document may include at least one function (e.g., "search_devices", "search_bhp_intent_with_devices", "get specification_of_bhp_intent" and / or "execute_device") executable through a specified application (e.g., "SmartThingsApp"). According to one embodiment of the present document, "search_devices" may refer to a function for finding a list of controllable devices from a user utterance. According to one embodiment of the present document, "search_bhp_intent_with_devices" may refer to a function for searching for a command corresponding to the intent of a user utterance. According to one embodiment of the present document, "get specification_of_bhp_intent" may refer to a function for checking the specification of what parameters a command includes. According to one embodiment of the present document, "execute_device" may refer to a function for controlling a target device to match the intent based on the confirmation of the specification. According to one embodiment of the present document, a first user utterance may include, for example, an utterance such as "Set the air conditioner temperature to 26 degrees." According to one embodiment of the present document, a second prompt may include a list of functions stored in an electronic device (101) (e.g., a server).According to one embodiment of the present document, functions executable through a designated application (e.g., "SmartThingsApp") may include "search_devices", "search_bhp_intent_with_devices", "get specification_of_bhp_intent" and / or "execute_device". The function or operation of providing a second prompt according to one embodiment of the present document may be performed, for example, by the context manager (210). To this end, the data loader (220) according to one embodiment of the present document may provide information about a function list to the context manager (210), and the prompt generator (230) may provide a generated common prompt (e.g., "Available functions are as follows") to the context manager (210). The context manager (210) according to one embodiment of the present document may generate a first prompt to be provided to the language model based on the application list and the common prompt (e.g., "Select a plug-in") and provide the first prompt to the language model. However, this is exemplary, and at least some of the elements that constitute the second prompt may be provided as a language model by other modules.
[0047] According to an embodiment of the present document, an electronic device (101) (e.g., a server) may, in operation 340, obtain a second response including at least one function selected by a language model from among a plurality of functions based on the provision of a second prompt. According to an embodiment of the present document, an electronic device (101) (e.g., a conversational agent (200)) may obtain, from a language model, information about at least one function (e.g., "search_devices") selected from among a plurality of functions (e.g., "search_devices", "search_bhp_intent_with_devices", "get specification_of_bhp_intent" and / or "execute_device") as a second response. According to an embodiment of the present document, a language model may select at least one function (e.g., "search_devices") based on an accumulated context and a description of the plurality of functions. For example, a language model according to an embodiment of the present document may, if there is no accumulated context information transmitted from a conversational agent (200), infer and select a function to be performed first based on descriptions of multiple functions. For example, if there is a function execution result for "search_devices," a language model according to an embodiment of the present document may, if there is a function execution result for "search_devices," infer and determine (e.g., select) a function to be performed next to the currently performed function (e.g., "search_bhp_intent_with_devices") based on descriptions of multiple functions as at least one function.
[0048] According to one embodiment of the present document, the electronic device (101) (e.g., server) may, at operation 350, generate and provide to the language model a third prompt querying whether to perform a system call or provide a response to the user based on the acquisition of the second response. According to one embodiment of the present document, the electronic device (101) (e.g., conversational agent (200)) may generate and provide to the language model a third prompt querying whether to perform the requested system call when additional system information (e.g., information such as location information of the air conditioner, set temperature information) is required for processing the user's utterance, or whether to transmit an utterance processing completion response to the user when the utterance processing is completed. According to one embodiment of the present document, the electronic device (101) (e.g., conversational agent (200)) may also transmit the context acquired up to this point to the language model together with the third prompt. According to one embodiment of the present document, the language model may determine whether a system call is necessary or whether the utterance processing is completed based on the context acquired up to this point. The various embodiments described in this document may also be implemented in an external electronic device (e.g., a user terminal) that is operable and connected to an electronic device (101) (e.g., a server). For example, a conversational agent (200) according to one embodiment of this document may be stored in a user terminal, and various embodiments of this document may be implemented through communication with a server where a language model is stored.
[0049] An electronic device (101) (e.g., a server) according to one embodiment of the present document may provide a response to a system call or a first user utterance based on a third response obtained by providing a third prompt in operation 360. If an electronic device (101) (e.g., a conversational agent (200)) according to one embodiment of the present document obtains a response requesting the performance of a system call (e.g., "system-function-call"), the electronic device (101) (e.g., a conversational agent (200)) according to one embodiment of the present document may repeatedly perform operations 310 and thereafter. If an electronic device (101) (e.g., a conversational agent (200)) according to one embodiment of the present document obtains a response requesting the transmission of an utterance processing result to a user (e.g., "respond-to-user"), the electronic device (101) (e.g., a conversational agent (200)) may transmit an utterance processing result (e.g., "The air conditioner temperature was set to 26 degrees") to a user terminal.
[0050] An electronic device (101) (e.g., a conversational agent (200)) according to an embodiment of the present document may further include, between operations 340 and 350, an operation of transmitting a parameter related to at least one function selected by the language model to the language model. An electronic device (101) (e.g., a conversational agent (200)) according to an embodiment of the present document may also query a user, along with at least one parameter related to at least one function selected by the language model, whether to request additional information or to execute at least one function selected by the language model. An electronic device (101) (e.g., a conversational agent (200)) according to an embodiment of the present document may, in response to an operation of transmitting a parameter related to at least one function selected by the language model to the language model, obtain arguments corresponding to the parameters from the language model. An electronic device (101) (e.g., a conversational agent (200)) according to one embodiment of the present document may obtain a function execution request (e.g., "function_call") and an argument corresponding to at least one parameter (e.g., "air conditioner"). The electronic device (101) (e.g., a conversational agent (200)) according to one embodiment of the present document may execute at least one function based on the obtained response and store the obtained argument as a context in the context manager (210). The term "additional data" mentioned in this document may mean data obtained through the execution of at least one selected function (e.g., "search_devices"). A language model (400) according to one embodiment of the present document may provide (e.g., return) an argument requesting to request additional information from the user to the conversational agent (200) if it is determined that additional information from the user is required for the execution of the function based on a description of the function (e.g., if the selected function (e.g., "search_devices") is determined to be an incorrect or unnecessary function).
[0051] According to one embodiment of the present document, a conversational agent (200) may have obtained a response including "SmartThingsApp" as an application from a language model (400) and a response including "search_devices" as a function. According to one embodiment of the present document, a conversational agent (200) may have obtained "air conditioner" as an argument corresponding to a parameter, and may have obtained "system-function-call" for the subsequent operation execution direction, and may thus perform a function or operation of providing a list of applications to the language model (400) again. As a result of repeatedly performing such operations, if the conversational agent (200) according to one embodiment of the present document obtains "respond-to-user" from the language model, the result of processing the user's utterance may be transmitted to the user terminal.
[0052] FIG. 4a and FIG. 4b are exemplary drawings illustrating an information transfer relationship between a conversational agent (200) and a language model (e.g., LLM) according to one embodiment of the present document.
[0053] Referring to FIGS. 4A and 4B , a conversational agent (200) according to one embodiment of the present document may, in operation 405, provide an application list to a language model. The application list according to one embodiment of the present document may include applications (e.g., "SmartThingsApp" and "Samsung.weatherNews") executable on an electronic device (101) (e.g., a server) and / or an external electronic device (e.g., a user terminal). The language model (400) according to one embodiment of the present document may, in operation 410, select at least one application (e.g., "SmartThingsApp") from the application list. The language model (400) according to one embodiment of the present document may select at least one application based on the user's speech intent. The language model (400) according to one embodiment of the present document may, in operation 415, provide a first response including information on the selected application (e.g., "SmartThingsApp"). An electronic device (101) (e.g., a conversational agent (200)) according to one embodiment of the present document may obtain information about at least one application (e.g., “SmartThingsApp”) selected from among a plurality of applications (e.g., “SmartThingsApp” and “Samsung.weatherNews”) as a first response from a language model (400).
[0054] According to one embodiment of the present document, the conversational agent (200) may, in operation 420, provide a function list corresponding to the selected application to the language model (400). According to one embodiment of the present document, the conversational agent (200) (e.g., data loader (220)) may access a function list stored in an electronic device (101) (e.g., server) and provide the function list (224) to the language model (400) or the context manager (210). The function list according to one embodiment of the present document may include at least one function (e.g., "search_devices", "search_bhp_intent_with_devices", "get specification_of_bhp_intent" and / or "execute_device") executable through a specified application (e.g., "SmartThingsApp"). According to one embodiment of the present document, the language model (400) may, in operation 425, select at least one function. A language model according to one embodiment of the present document may select at least one function (e.g., "search_devices") based on accumulated context and descriptions of multiple functions. For example, if there is no accumulated context information transmitted from a conversational agent (200), the language model according to one embodiment of the present document may infer a function to be performed first based on descriptions of multiple functions and determine (e.g., select) it as at least one function. For example, if a function execution result for "search_devices" exists, the language model according to one embodiment of the present document may infer a function to be performed next (e.g., "search_bhp_intent_with_devices") based on descriptions of multiple functions and determine (e.g., select) it as at least one function.A conversational agent (200) according to one embodiment of the present document may, at operation 430, provide a second response including selected feature information to the conversational agent (200). A conversational agent (200) according to one embodiment of the present document may obtain information about at least one feature (e.g., “search_devices”) selected from among a plurality of features (e.g., “search_devices,” “search_bhp_intent_with_devices,” “get specification_of_bhp_intent,” and / or “execute_device”) as the second response from the language model (400).
[0055] In one embodiment of the present document, the conversational agent (200) may, at operation 435, provide at least one parameter for the selected function to the language model (400). In one embodiment of the present document, the conversational agent (200) may, at operation 440, determine an argument corresponding to the parameter, and in operation 445, provide a third response including the determined argument to the conversational agent (200). In one embodiment of the present document, the conversational agent (200) may also query the user, along with at least one parameter associated with at least one function selected by the language model (400), whether to request additional information or to execute at least one function selected by the language model. In response to the operation of transmitting the parameter associated with at least one function selected by the language model (400) to the language model, the conversational agent (200) may obtain an argument corresponding to the parameter from the language model (400). A conversational agent (200) according to one embodiment of the present document may obtain a function execution request (e.g., "function_call") and an argument corresponding to at least one parameter (e.g., "air conditioner"). A language model (400) according to one embodiment of the present document may infer (e.g., determine) an argument corresponding to the parameter based on a context stored in the conversational agent, a user utterance, and a description of the function.
[0056] A conversational agent (200) according to one embodiment of the present document may execute a function using at least one function (e.g., "search_devices") and an argument (e.g., "air conditioner") at operation 450. In this case, if assistance from an external device is required for executing the function, a function execution request may be transmitted to the external device and the result may be obtained. A conversational agent (200) according to one embodiment of the present document may obtain a "function response" as a result of function execution, as follows. The "function response" according to one embodiment of the present document may include information such as the presence or absence of a target device to be searched for (e.g., an air conditioner), its location, and the device name.
[0057] A conversational agent (200) according to one embodiment of the present document may, at operation 455, transmit a query as to whether utterance processing is completed. A language model (400) according to one embodiment of the present document may, at operation 460, determine whether to terminate based on a stored context. A conversational agent (200) according to one embodiment of the present document may generate a third prompt and provide it to a language model, querying whether to perform a requested system call when additional system information (e.g., information such as information on where an air conditioner is located or information on a set temperature) is required for processing a user's utterance, or whether to transmit an utterance processing completion response to the user when utterance processing is completed. A conversational agent (200) according to one embodiment of the present document may also transmit the context acquired up to this point to the language model together with the third prompt. A language model (400) according to one embodiment of the present document may determine whether a system call is necessary or whether utterance processing is completed based on the context acquired up to this point (e.g., stored in the conversational agent (200)). According to one embodiment of the present document, the language model (400) may transmit a fourth response including a response to the query to the conversational agent (200) in operation 465. If the conversational agent (200) according to one embodiment of the present document obtains a response requesting the performance of a system call (e.g., "system-function-call"), the conversational agent (200) may repeatedly perform operation 405 and subsequent operations. If the electronic device (101) (e.g., the conversational agent (200)) according to one embodiment of the present document obtains a response requesting the transmission of the speech processing result to the user (e.g., "respond-to-user"), the electronic device (101) (e.g., the conversational agent (200)) may transmit the speech processing result (e.g., "The air conditioner temperature was set to 26 degrees") to the user terminal.
[0058] According to one embodiment of the present document, the conversational agent (200) may, after operation 465, perform an operation of providing a list of functions associated with the currently executed function to the language model (400). Since the conversational agent (200) according to one embodiment of the present document knows whether a specific function has been performed, it can infer functions to be performed next. Based on this, the conversational agent (200) according to one embodiment of the present document can provide the language model (400) with a list of functions associated with the executed function (e.g., "search_devices") (e.g., a list including "search_bhp_intent_with_devices", "get specification_of_bhp_intent" and / or "execute_device"). According to one embodiment of the present document, based on the context stored in the conversational agent (400) and the information about whether a function has currently been executed, the language model (400) can infer (e.g., determine) the name of the function to be performed next, at operation 485. According to one embodiment of the present document, the language model (400) may provide information about the function name to the conversational agent (200) at operation 490. According to one embodiment of the present document, if the function name is provided from the language model (400) at operation 495a, the conversational agent (200) may be controlled by a processor (e.g., the processor (120) of FIG. 1) to perform operation 435, in other words, an operation of providing parameters for the selected function (e.g., “search_bhp_intent_with_devices”) to the language model (400), rather than operation 405. However, according to one embodiment of the present document, information about the function name may not be provided from the language model (400). In this case, the conversational agent (200) according to one embodiment of the present document may be controlled by the processor to repeatedly perform operations from operation 405 onward at operation 495b.By performing such actions (e.g., actions 470 to 495a), an effect of reducing the delay time that occurs in processing the user's speech may be produced.
[0059] According to one embodiment of the present document, when a conversational agent (200) obtains, for example, a user utterance such as "Set the air conditioner temperature 3 degrees lower than the outside temperature," it can obtain weather information using a prompt that is substantially the same format as a prompt for device control (e.g., "Set the air conditioner temperature to 26 degrees") (e.g., "Select a plug-in" and / or "Available functions are as follows"). In the prior art, when two different tasks (e.g., a first task for obtaining outside weather information and a second task for controlling the air conditioner) are included, a processing error occurs or a long delay occurs because the two tasks are performed according to different, predefined algorithms. However, according to various embodiments of the present document that use a common prompt, even when a user utterance includes two different tasks (e.g., a first task for obtaining outside weather information and a second task for controlling the air conditioner), the user's utterance can be processed with a relatively short delay. For example, a conversational agent (200) according to one embodiment of the present document can provide a list of applications to a language model and obtain a response thereto. A conversational agent (200) according to one embodiment of the present document can provide a list of functions to a language model and obtain a response thereto. A conversational agent (200) according to one embodiment of the present document can store a context, and a language model (400) can determine whether to perform the next task (e.g., a device control task) based on the stored context and the user's speech intention. A conversational agent (200) according to one embodiment of the present document can repeatedly perform the same process for the next task to process the user's speech.According to one embodiment of the present document, when a user utterance such as "Set the air conditioner temperature 3 degrees lower than outside" is obtained, a result in which the device is controlled according to the user's utterance intention can be provided with a relatively short delay time.
[0060] An electronic device (101) (e.g., a server) according to one embodiment of the present document includes at least one processor (e.g., the processor (120) of FIG. 1) and a memory (e.g., the memory (130) of FIG. 1), wherein the memory, when executed by the at least one processor, causes the server to generate a first prompt including a plurality of applications executable through the server based on acquisition of a first user utterance and provide the first prompt to a language model, obtain a first response including at least one application selected by the language model from among the plurality of applications based on the provision of the first prompt, generate a second prompt including a plurality of functions related to at least one application included in the first response based on the acquisition of the first response and provide the second prompt to the language model, obtain a second response including at least one function selected by the language model from among the plurality of functions based on the provision of the second prompt, and generate a third prompt querying whether to perform a system call or provide a response to the user based on the acquisition of the second response. The model may be configured to provide a response to the system call or the first user utterance based on a third response obtained by providing the third prompt.
[0061] According to one embodiment of the present document, the first prompt may have the same form for a second user utterance that is different from the first user utterance.
[0062] According to one embodiment of the present document, the instructions may further include instructions that, when executed, cause the server to provide a parameter for the at least one function to the language model before providing the third prompt to the language model.
[0063] According to one embodiment of the present document, the instructions may further include instructions that, when executed, cause the server to obtain from the language model a fourth response indicating whether to call the at least one function or to request additional information from the user, based on the provision of the parameters.
[0064] According to one embodiment of the present document, the instructions may further include instructions configured to cause the server, when executed, to provide a list of a plurality of functions associated with the at least one function to the language model, and, based on the provision of the list of the plurality of functions, obtain information about a function name for any one of the plurality of functions included in the list from the language model.
[0065] According to one embodiment of the present document, the instructions may further include an instruction configured to cause the server, when executed, to provide a parameter for the at least one function to the language model without generating the first prompt and the second prompt based on obtaining information about the function name.
[0066] According to one embodiment of the present document, the instructions may further include an instruction configured to cause the server, when executed, to generate the first prompt if information about the function name is not provided.
[0067] Electronic devices according to the various embodiments disclosed in this document may take various forms. Electronic devices may include, for example, 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.
[0068] The various embodiments of this document and the terminology used therein 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. In connection with the description of the drawings, similar reference numerals may be used for similar or related components. The singular form of a noun corresponding to an item may include one or more of the items, unless the context clearly indicates otherwise. In this document, each of the phrases "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 include any one of the items listed together in the corresponding phrase among those phrases, or all possible combinations thereof. Terms such as "first," "second," or "first" or "second" may be used merely to distinguish one component from another, and do not limit the components in any other respect (e.g., importance or order). When a component (e.g., a first component) is referred to as "coupled" or "connected" to another (e.g., a second component), with or without the terms "functionally" or "communicatively," it means that the component can be connected to the other component directly (e.g., wired), wirelessly, or through a third component.
[0069] The term "module" used in various embodiments of this document may include a unit implemented in hardware, software, or firmware, and may be used interchangeably with terms such as logic, logic block, component, or circuit. A module may be an integral component, or a minimum unit or part of such a component that performs one or more functions. For example, according to one embodiment, a module may be implemented in the form of an application-specific integrated circuit (ASIC).
[0070] Various embodiments of the present document may be implemented as software (e.g., a program (2540)) including one or more instructions stored in a storage medium (e.g., an internal memory (2536) or an external memory (2538)) readable by a machine (e.g., an electronic device (2501)). For example, a processor of the machine (e.g., an electronic device (2501)) may call at least one instruction among the one or more instructions stored from the storage medium and execute it. This enables the machine to operate to perform at least one function according to the at least one called instruction. The one or more instructions may include code generated by a compiler or code executable by an interpreter. The machine-readable storage medium may be provided in the form of a non-transitory storage medium. Here, "non-transitory" simply means that the storage medium is a tangible device and does not contain signals (e.g., electromagnetic waves), and the term does not distinguish between cases where data is stored semi-permanently or temporarily on the storage medium.
[0071] According to one embodiment, the method according to various embodiments disclosed in the present document may be provided as included in a computer program product. The computer program product may be traded as a product between a seller and a buyer. The computer program product may be distributed in the form of a machine-readable storage medium (e.g., compact disc read-only memory (CD-ROM)), or may be distributed online (e.g., downloaded or uploaded) via an application store (e.g., Play Store™) or directly between two user devices (e.g., smart phones). In the case of online distribution, at least a portion of the computer program product may be temporarily stored or temporarily generated in a machine-readable storage medium, such as the memory of a manufacturer's server, an application store's server, or an intermediary server.
[0072] According to one embodiment of the present document, 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 one embodiment of the present document, 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 this 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 one embodiment of the present document, 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. On the server, At least one processor, and A memory comprising: a processor configured to cause the server to: Based on the acquisition of the first user utterance, a first prompt including multiple executable applications is generated and provided to the language model through the server, Based on the provision of the first prompt, a first response is obtained that includes at least one application selected by the language model among the plurality of applications, Based on the acquisition of the first response, a second prompt including a plurality of functions related to at least one application included in the first response is generated and provided to the language model, Based on the provision of the second prompt, a second response is obtained that includes at least one feature selected by the language model from among the plurality of features, Based on the acquisition of the second response, a third prompt is generated and provided to the language model, querying whether to perform a system call or provide a response to the user, and A server characterized in that it is set to store instructions set to perform the system call or to provide the processing result for the first user utterance to the user terminal based on the third response obtained in response to the provision of the third prompt.
2. In paragraph 1, A server, wherein the first prompt has the same form for a second user utterance that is different from the first user utterance.
3. In paragraph 1 or 2, A server characterized in that the instructions further include instructions that, when executed, cause the server to provide parameters for the at least one function to the language model before providing the third prompt to the language model.
4. In any one of paragraphs 1 to 3, A server characterized in that the instructions further include instructions that, when executed, cause the server to obtain from the language model a fourth response indicating whether to call the at least one function or to request additional information from the user based on the provision of the parameters.
5. In any one of paragraphs 1 to 4, The above instructions, when executed, cause the server to provide the language model with a list of a plurality of functions associated with the at least one function; A server characterized in that it further includes an instruction set to obtain information on a function name for one of the functions included in the list from the language model based on the provision of the list of the plurality of functions.
6. In any one of paragraphs 1 to 5, A server characterized in that the instructions further include instructions that, when executed, cause the server to provide parameters for the at least one function to the language model without generating the first prompt and the second prompt based on obtaining information about the function name.
7. In any one of paragraphs 1 to 6, A server characterized in that the above instructions further include an instruction configured to cause the server, when executed, to generate the first prompt if information about the function name is not provided.
8. In a computer-readable non-transitory recording medium, the recording medium is configured to store instructions, which, when executed by at least one processor of a server, cause the server to: Based on the acquisition of the first user utterance, a first prompt including multiple executable applications is generated and provided to the language model through the server, Based on the provision of the first prompt, a first response is obtained that includes at least one application selected by the language model among the plurality of applications, Based on the acquisition of the first response, a second prompt including a plurality of functions related to at least one application included in the first response is generated and provided to the language model, Based on the provision of the first prompt, a second response is obtained that includes at least one feature selected by the language model from among the plurality of features, Based on the acquisition of the second response, a third prompt is generated and provided to the language model, querying whether to perform a system call or provide a response to the user, and A non-transitory recording medium, characterized in that it is configured to store instructions set to provide a response to the system call or the first user utterance based on a third response obtained by providing the third prompt.
9. In paragraph 8, A non-transitory recording medium, characterized in that the first prompt has the same form for a second user utterance that is different from the first user utterance.
10. In paragraph 8 or 9, A non-transitory recording medium characterized in that the instructions further include instructions that, when executed, cause the server to provide parameters for the at least one function to the language model before providing the third prompt to the language model.
11. In any one of paragraphs 8 to 10, A non-transitory recording medium characterized in that the instructions further include instructions that, when executed, cause the server to obtain from the language model a fourth response indicating whether to call the at least one function or to request additional information from the user based on the provision of the parameters.
12. In any one of paragraphs 8 to 11, The above instructions, when executed, cause the server to provide the language model with a list of a plurality of functions associated with the at least one function; A non-transitory recording medium, characterized in that it further includes an instruction set to obtain information about a function name for one of the functions included in the list from the language model based on the provision of the list of the plurality of functions.
13. In any one of paragraphs 8 to 12, A non-transitory recording medium characterized in that the instructions further include instructions that, when executed, cause the server to provide parameters for the at least one function to the language model without generating the first prompt and the second prompt based on obtaining information about the function name.
14. In any one of paragraphs 8 to 13, A non-transitory recording medium characterized in that the above instructions further include an instruction configured to cause the server, when executed, to generate the first prompt if information about the function name is not provided.
15. In the user terminal, At least one microphone, Communication module, Touchscreen display, At least one processor, and A memory comprising: a processor configured to cause the user terminal to: Acquire a first user utterance using at least one microphone, Through the above communication module, information about the acquired first user utterance is transmitted to a server that is operable with the user terminal, Acquire a second user utterance different from the first user utterance using at least one microphone, Through the above communication module, information about the acquired second user utterance is transmitted to a server connected to enable operation with the user terminal, and It is set to store instructions for displaying the processing results for the first user utterance and the second user utterance on the touch screen display, A user terminal, characterized in that the first task corresponding to the first user utterance and the second task corresponding to the second user utterance are processed by prompts of the same format.
Citation Information
Patent Citations
Model-based interaction method and device, electronic equipment and storage medium
CN117235222A
Updating a search index used to facilitate application searches
KR1020150031234A
Chitosan Hydrogels for Tissue Sealant
KR1020210125339A
Collaborative search sessions through an automated assistant
US20230195815A1
Providing prompts in speech recognition results in real time
US20230215441A1