Energy chatbot method and system
The method and system improve LLM response accuracy by selecting and completing templates with sensor data and context information, addressing the sensitivity of LLMs to prompt structure, enhancing energy management and device control.
Patent Information
- Application Number
- GB2023017797
- Authority / Receiving Office
- GB · GB
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-11-21
- Publication Date
- 2025-06-11
AI Technical Summary
Large language models (LLMs) generate inaccurate responses due to sensitivity to the structure and content of user prompts, particularly in the context of energy data from devices associated with a premises, leading to suboptimal energy management and control.
A method and system that selects a template with the highest probability of generating accurate responses by using a trained classification model, completes the template with sensor data and context information, and provides it to the LLM for generating answers, enabling improved energy insights and control of devices.
Enhances the accuracy of LLM responses for energy management, providing actionable insights and optimizing energy usage by selecting appropriate templates and completing them with relevant data, thereby improving user understanding and device control.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical field The invention relates to a method and system for generating responses to user prompts provided to a large language model. In particular, the invention may relate to generating responses relating to energy consumed and I or energy generated by one or more devices associated with a user’s premises. The responses may be generated using data that has been obtained by, or is derived from, sensor data associated the one or more devices. Background Large language models (LLMs) are a type of artificial intelligence (Al) that can understand and generate human language. Typically, LLMs are trained on massive amounts of text data, which allows them to learn patterns and rules of language. This training enables LLMs to perform a variety of tasks, such as generating text, translating languages, summarizing text, answering question and producing creative content. In recent years, large language model (LLM) chatbots, such as ChatGPT and Google Bard have seen widespread adoption, despite being at a somewhat experimental stage of development. LLM chatbots such as these are trained to provide responses to prompts provided by users, where the prompts usually correspond to questions or instructions. Whilst the accuracy of LLM chatbots is likely to continue improving in the future, there remains a general problem in that, the accuracy of the responses generated is often highly dependent on the structure or format of the initial user prompt, as well as the specific data contained therein. For example, in some cases, changing the ordering of words in a prompt can result in the LLM chatbot generating an inaccurate answer, despite the semantic meaning of the prompt being unchanged, at least from the user’s perspective. The present invention seeks to address or mitigate the above-identified problems, particularly in the context of energy data relating to one or more devices associated with a premises. Summary The method and system disclosed are directed to solving one or more problems in the prior art, including those disclosed herein. More particularly, the method and system disclosed enable a user to obtain responses from a language model with improved accuracy, such that the user can obtain insights relating to their energy usage, as well as suggestions on how to optimise it, and in some cases, automatically control one or more appliances in accordance with a determined energy optimisation strategy. According to the invention in a first aspect, there is provided a method for generating responses to prompts provided by a user to a large language model. The user is associated with a premises comprising one or more devices and at least one sensor for detecting energy consumed by and I or energy generated by at least of the one or more devices. The method comprises receiving a prompt from a user, the prompt corresponding to a question relating to energy consumption and I or energy generation of the one or more devices; selecting based on the received prompt, a template comprising one or more data fields requiring completion; wherein selecting the template comprises selecting, from a plurality of templates, a template that is determined by a trained classification model as having the highest probability of generating an accurate response from the language model; obtaining a completed version of the selected template, wherein at least one of the data fields of the completed template comprises sensor data generated by the at least one sensor; and providing the completed template to the large language model, and generating based on the completed template, an answer to the received prompt. In an example, the method further comprises obtaining, based on at least part the selected template, the sensor data and completing at least one of the data fields of the selected template with the obtained sensor data. In an example, the sensor data comprises energy consumption and / or energy generation data associated with the one or more devices. In an example, the premises may be associated with a plurality of sensors, and the method may comprise obtaining aggregated sensor data representing data obtained from the plurality of sensors. In an example, the sensor data corresponds to data obtained from one or more smart devices. The sensor data may comprise data generated by at least of: a smart meter, a smart thermostat, a smart lighting system, a temperature sensor, a sensor associated with an electric vehicle, a smart plug. In an example, the method may further comprise obtaining, based on the selected template, context information associated with the premises, and completing at least one of the data fields of the selected template with the obtained context information. The context information may comprise one or more of: (i) time and date information, (ii) location information, (iii) a size of the premises, (iv) a number of devices associated with the premises, (v) a type of the one or more devices associated with the premises, (vi) a battery capacity of one or more devices associated with the premises, and (vii) energy tariff information associated with the premises. In an example, the method may further comprise obtaining, based on the selected template, electric vehicle charging information associated with an electric vehicle, and completing at least one of the data fields with the obtained electric vehicle charging information. The electric vehicle charging information may comprise at least one of: a current charge level of the electric vehicle; a battery capacity of the electric vehicle; and a rate at which power is consumed by the electric vehicle per unit distance. In an example, the method may further comprise aggregating sensor data from the plurality of sensors and obtaining, based on the selected template, aggregated sensor for completing at least one of the data fields of the selected template. The aggregated sensor data may be stored at one or more servers and obtaining the aggregated sensor data may comprise querying the one or more servers based on the one or more data fields of the selected template. In an example, the method further comprises controlling at least one of the devices based on the answer generated by the language model. Controlling at least one of the devices may comprise determining a schedule for which at least one of the devices is to be supplied with power and causing the at least one device to be supplied with power in accordance with the determined schedule. The method may also comprise determining at least one energy source from which power will be supplied to the at least one device and causing the at least one device to be supplied with power by the determined energy source. In an example, determining a schedule for at least one of the devices may comprise determining a first time period for which at least some of the power is to be supplied by a first energy source, and determining a second time period for which at least some of the power is to be supplied by a second energy source, and causing the at least one device to be supplied with power from the respective energy sources in accordance with the determined schedule. In an example, controlling at least one of the devices may further comprise obtaining energy tariff information associated with premises; and determining, based on the sensor data, a net energy generated by the energy source per unit time. The method may comprise determining an optimal time for supplying power based on at least one of: (i) the energy tariff information and (ii) the determined net energy generated by the energy source per unit time. The sensor data may comprise an amount of energy consumed by the one or more or devices per unit time and an amount of energy generated by the energy source per unit time. In an example, the at least one energy source associated with the premises comprises a renewable energy source, such as a solar panel. In an example, at least one of the devices to be controlled comprises a smart device. In an example, the at least one device that is to be supplied with power for the determined schedule is an electric vehicle charger, and the determined schedule corresponds to a time at which the electric vehicle charger is to provide charging to an electric vehicle. In an example, the classification model comprises a trained random forest classifier, the random classifier being trained to select a template based on an input user prompt. The random forest classifier may be trained with bag of word features extracted from templates and user prompts and a fitness function comprising a target value. In an example, the plurality of templates from which the template is selected correspond to a set of templates generated using a genetic algorithm. The genetic algorithm is trained for the large language model (M), with input data comprising: first user prompts (p) representing questions (Q) having answers (A), and second user prompts generated from the first user prompts (r). Training the algorithm comprises determining a set of tern plates (t) such that when the templates are completed using the second user prompts (r), the answer output by the large language model maximises a fitness score representing the accuracy of the answer output by the model. At least one of the plurality of templates may be generated based on at least one of (i) a combination of at least two templates in the determined set; and (ii) a random mutation of one of the templates in the set. In an example, at least one of the templates may be generated based on a random mutation applied to a combination of at least two templates in the determined set. In an example, the method may further comprise transmitting, via a communications network, the answer output by the large language model to a user device that is connected to the large language model via the communications network. According to the invention in a second aspect, there is provided a method for obtaining answers from a large language model in response to prompts provided to it by a user. The user being associated with a premises, the premises comprising one or more devices and at least one sensor for detecting energy consumed by and / or energy generated by at least of the one or more devices. In this aspect, the method comprises receiving, at a user device, a prompt for providing to the large language model, the prompt relating to the energy consumption and I or energy generation of one or more devices associated with the user’s premises; providing the prompt to a trained classifier, the classifier being trained to select, from a plurality of templates, a template that is determined as having the highest probability of generating an accurate answer from the large language model, the template comprising one or more data fields requiring completion; and receiving, at the user device, an answer generated by the large language model, the answer having been generated by the language model based on a completed version of the template, wherein at least one of the data fields of the completed template comprises sensor data generated by the at least one sensor. In an example, the user device may be connected to the trained classification model via a communications network and providing the prompt to the trained classification model may comprise transmitting the prompt to the trained classification model via the communications network. In an example, the user device may be connected to the large language model via a communications network and receiving the answer generated by the large language model may comprise receiving, via the communications network, the answer generated by the large language model. According to the invention in a fourth aspect, there are provided computer program products including computer program code configured, when executed on a computer processor, to control a data processor to undertake the steps of any method described herein. According to the invention in a fifth aspect, there is provided method for completing templates that are to be provided as an input to a large language model, the large language model being trained to generate answers to prompts provided by a user. The user being associated with a premises comprising one or more devices and at least one sensor for detecting energy consumed by and I or energy generated by at least of the one or more devices. The method comprising: receiving a template comprising one or more data fields requiring completion, the template having been selected by a classifier trained to select, from a plurality of templates, a template that is determined as having the highest probability of generating an accurate response from the large language model; obtaining, based on the received template, sensor data for completing at least one of the data fields of the received template; completing the received template based on the obtained sensor data; and providing the completed template to a large language model, the large language model being trained to output answers based on input completed templates. According to the invention in a sixth aspect, there is provided a system for generating responses to prompts provided by a user to a large language model. In this aspect, the system comprises: a template selection unit configured to: receive a user prompt corresponding to a question relating to energy consumption and / or energy generation of one or more devices associated with the user’s premises; select based on the received prompt, a template comprising one or more data fields requiring completion. The template selection unit comprises a classification model trained to select a template from a set of templates, wherein the model is trained to determine which of the templates in the set has the highest probability of generating an accurate answer from the large language model. The system also comprises a template completion unit configured to obtain a completed version of the selected template, wherein at least one of the data fields of the completed template comprises data generated by the at least one sensor associated with the one or more devices. The system also comprises a large language model configured to receive the completed template and generate an answer to the user’s prompt based on the received completed template. In an example, the system further comprises a control unit operable to control the one or more devices based on the answer output by the language model. The control unit may be configured to control at least one of (i) a time at and for which the one or more devices are to be supplied with power, (ii) an energy source that is to provide the one or more devices with power, and (iii) an amount of power that is to be supplied to the one or more devices. In an example, the template completion unit is further configured to obtain, based on the selected template, context information associated with the premises. In an example, the template completion unit is further configured to obtain at least one of: (i) electric vehicle (EV) charging information and (ii) energy tariff information based on the template selected by the template selection unit. Brief description of the drawings Embodiments of the disclosed methods and apparatus will be described in detail below, with reference to the accompanying drawings, in which: Figure 1 shows an example of a system in accordance with the present disclosure; Figure 2 shows an exemplary flowchart of a method in accordance with the present disclosure; Figure 3 shows a first example of a template arising from the mixing of two templates in a set, in accordance with the present disclosure; Figure 4 shows a second example of a template arising from the mixing of two templates in a set, in accordance with the present disclosure; Figure 5 shows an example of a template arising from a mutation of a template in a set, in accordance with the present disclosure; Figure 6 shows an example of a selected template in accordance with the present disclosure; Figure 7 shows an example of a completed version of the template shown in Figure 6; Figure 8 shows an example of a system for controlling one or more devices based on the output of a large language model, in accordance with the present disclosure; and Figure 9 shows an example of a completed template used to schedule charging of an electric vehicle by an electric vehicle charger, in accordance with the present disclosure. Detailed Description Generally, disclosed herein are methods and a system for generating an output from a large language model based on a selected template that has been completed with relevant data. The language model may be used to assist a user with better understanding their energy consumption habits and optionally, to control one or more of the user’s devices, such as household appliances, in accordance with answers generated by the language model. Reference will now be made to Figure 1, which shows an example of a system 100 in accordance with the present disclosure. In Figure 1, the system 100 comprises one or more devices 101 associated with a property 102, a user device 103 associated with a user 104, a communications network 105, a virtual dialogue unit 106, and a remote device 107. The communications network 105 facilitates communication between one or more of the devices 101 associated with the property, the user device 103, the virtual dialogue unit 106 and the remote device 107. The communications network 105 may correspond to the Internet, for example. The one or more devices 101 may be associated with the property 102 in the sense that they may be located within the property 102 or in a general vicinity of the property 102. In Figure 1, the property 102 may correspond to a residential premises, and may be associated with and I or contain one or more appliances, such as entertainment appliances (e.g., a TV, computer, games console), lighting appliances (e.g., smart bulbs), heating appliances (e.g., a boiler or heat pump), charging appliances (e.g., plugs or chargers), cooking appliances, washing appliances, drying appliances, etc. That is, the one or more devices 101 associated with the property may correspond to one or more appliances. In some examples, at least some of the appliances are ‘smart’ appliances in that they are configured to communicate with one or more other devices via a communications network, such as Wi-Fi or Bluetooth. The one or more appliances may consume energy supplied by one or more energy sources associated with the property 102. For example, the property 102 may be connected to a grid, with electrical power being supplied to the one or more appliances via the grid (i.e., as a mains supply). Additionally, or alternatively, the one or more appliances may be powered by one or more alternative or additional energy sources associated with the property 102, such as a distributed energy resource (DER). For example, in Figure 1, the property 102 is shown as having a solar panel 108 installed on its roof. Other examples of distributed energy resources (DERs) include wind turbines, hydroelectric generators, heat pumps, biomass burners, combined heat and power systems, etc. In some examples, at least one of the alternative sources of energy is a source of renewable energy. The property 102 is also associated with one or more sensors 109. The one or more sensors 109 may be configured to generate sensor data that enables the energy consumption and I or energy generation associated with the property 102 to be tracked (e.g., based on usage of the one or more appliances). In some examples, the sensor data may correspond to data generated by one or more smart devices, such as a smart meter, smart thermostat, a smart lighting system, a smart plug, etc. The sensor data may provide an indication of when at least one of the appliances has been switched on or off, the duration for which it was switched on or off, an amount of energy consumed by the appliance (e.g. in kWh), a source that was used to power the appliance, and optionally, an energy tariff or rate applicable to the time at which the appliance was in use. In some examples, at least one of the devices may aggregate the sensor data obtained from at least some of the other devices; e.g., in Figure 1, a smart meter 110 is shown as receiving inputs from at least some of the appliances. The smart meter 110 may use the aggregated sensor data to track energy usage of the one or more appliances associated with the premises 102. It will be appreciated that some of the appliances may contribute to a baseload, i.e., consume a minimum amount of electricity even when not in use (so may be considered to always be ‘switched on’). It will also be appreciated that some appliances, such as charging appliances, may supply the energy they consume to other devices, such as an electric vehicle that is to be charged. In some examples, at least one of the sensors 109 may comprise a temperature sensor. The temperature sensor may be configured to measure the temperature inside and I or outside of the property 102. For example, a user may wish to know when the optimal time for heating their home is, which may depend on the difference between the temperature inside and outside of the house (e.g., when natural warming is at its lowest). The temperature sensor data may therefore be used to calculate an optimal heating time. The temperature outside of the property 102 may be measured by a corresponding sensor, or obtained from an external data source, such as a remote device that stores context information associated with the property, such as location and weather information (described further below). In some examples, at least one of the sensors 109 may comprise motion sensor data. For example, a user may wish to schedule operation of an appliance based on their presence or absence from the property 102. In some examples, at least one of the sensors 109 may be associated with an electric vehicle. The sensor data may provide an indication of a current charge level of the electric vehicle. The sensor may be associated with the electric vehicle itself or a separate device that receives charge level information from the electric vehicle (such as the user device 103, which may have an application installed thereat, that allows the user to track the charge level of their vehicle). The one or more sensors 109 may also detect an amount of energy generated by one or more of energy sources associated with the property 102. For example, the solar panel 108 may be associated with a sensor that determines an amount of energy generated by the solar panel 108 per unit time (e.g., in kWh). The user may wish to know when a maximum amount of energy is being generated by the solar panel 108, so that the energy consumption of one or more appliances can be scheduled to coincide with this time period. By doing this, the user can reduce their impact on the environment, whilst also optimising the costs associated with their energy usage (by reducing their reliance on the mains supply). In some examples, the energy generated by the one or more energy sources may be detected by a smart meter. Alternatively, or in addition, in examples where the property 102 comprises a plurality of energy sources, each or at least some the energy sources may comprise or be associated with a respective sensor 109. In some examples, at least one of the sensors 109 may be configured to obtain demand response information from the grid. The demand response information may comprise information such as, whether there is a demand for energy to be supplied to the grid, a duration associated with the demand and a rebate associated with supplying energy to the grid. This type of information may allow a user to determine whether surplus energy generated by one or more of their energy sources can be supplied back to the grid, at what price and for how long. As mentioned previously, in Figure 1, the user 104 is associated with a user device 103. The user device 103 provides the user 104 with a means for providing inputs to the virtual dialogue unit 106. The virtual dialogue unit 106 is configured to generate answers to prompts provided by the user. In Figure 1, the virtual dialogue unit 106 is shown as comprising a template selection unit 111 for selecting a template from a set of templates, a template completion unit 112 for completing templates selected by the template selection unit 111, and a large language model (LLM) 113 for generating answers based on completed templates input to the language model 113. The method used for selecting templates, completing them, and generating answers to user prompts will be described further in relation to Figure 2. The virtual dialogue unit may be implemented at one or more servers (such as e.g., a cloud network), with the sensor data (or ‘energy data’ derived from the sensor data), context information and any other relevant data being obtained from one or more of the remote device, the user device, or the one or more devices associated with the property. In such a case, the virtual dialogue unit may be configured to transmit the answer output by the language model to the user device, such that it can be displayed at an associated display interface. The virtual dialogue unit 106 may implement at least some of the functionality of a virtual assistant that is trained to provide the user with information relating to their energy consumption habits and how best to optimise their energy usage. As will be appreciated, it may be difficult for the user to interpret or decipher the potentially large volume of sensor data associated with their premises, at least not without possessing expert knowledge. The virtual assistant may therefore improve the intelligibility of the complex sensor data behind the user’s energy consumption habits and provide the user with actionable insights for optimising their energy usage. In some examples, the outputs of the virtual dialogue unit may be used to control operation of one or more of the user’s appliances (as described later in relation to Figure 9). The virtual assistant may correspond to a virtual chatbot (i.e., an energy chatbot) that provides answers to prompts, such as natural language prompts in the form of text, provided to the chatbot by the user. The user may input the text via a user application installed at, or accessible via, the user device 103 (e.g., an ‘energy insights’ application). The user application may be configured to provide these to prompts to the virtual dialogue unit, via the communications network 105, and to receive, via the communications network 105, answers generated by the language model of the virtual dialogue unit. The user application may then display the received answer at a display device associated with the user device. For example, the user application may display a messaging window at the user’s device, and display the responses provided from the language model as replies to the user’s original messages. In alternative or additional examples, the text provided to the virtual assistant may correspond to text that has been converted from the user’s speech. For example, the energy insights application may provide the user with the option of providing speech inputs, which are automatically converted to text and provided to the virtual assistant, via the communications network 105. Similarly, the application may allow text outputs generated by the virtual assistant to be converted to speech and output by an audio output associated with the user device 103. Techniques for translating text to speech are well known in the art. Generally, the user device may be configured to convert non-text-inputs (such as detected audio or movement) into text that is subsequently provided to the virtual dialogue unit. Examples of prompts that may be provided by the user include: “At what time does my energy consumption peak?”, “At what time does my solar generation peak?”, “How much is the heat pump consuming?”, “Can you tell me what’s the baseload and which appliances are causing it?”, “How much my baseload costs?”, “How much can I reduce my daily spending by not using the dryer machine?”, “When is the best time to charge my EV?”, “When is the best time to heat my home?”, “When am I in an energy surplus?”, etc. The answers provided by the virtual assistant may correspond to answers to these questions, with the answers being determined based on one or more of: energy consumption data, energy generation data, and context information associated with the property 102 (as will be described further below). In Figure 1, the remote device 107 is shown as being connected to the communications network 105. The remote device 107 may be configured to obtain sensor data from the one or more sensors 109. For example, the remote device 107 may correspond to a server hosted by the user’s energy supplier, with the remote device 107 being configured to aggregate the received sensor data and determine energy consumption and / or energy generation data associated with the property 102 (or more generally, ‘energy data’), based on the aggregated sensor data. The remote device 107 may also store or have access to context information associated with the property 102. The context information may include, for example, a location of the property 102, a size of the property 102, time information (time, date, day, week, month, year, etc.), the number of appliances associated with the property 102, etc. Alternatively, or additionally, the context information may include dynamic data such as weather data (temperature, cloud coverage, humidity, UV level, etc.), local traffic data, sun position data, energy tariff information, electric vehicle information, etc. The context information may be used to determine and / or supplement answers provided to the user via the virtual assistant. In some examples, at least some of the context information may be obtained from a device that is separate from the remote device 107, such as the user device 103. For example, location information may be obtained from the GPS associated with the user device 103. The virtual chatbot application installed at the user’s device may provide an interface through which some of the context information can be provided directly (e.g., the user may input the size of their property, the model of their electric vehicle, etc. into the application themselves). In some examples, the functionality of one or more of: the template selection unit 111, template completion unit 112 and language model 113 may be distributed or split between the remote device 107 and the virtual dialogue unit 106. For example, the virtual dialogue unit 106 may be responsible for selecting templates and providing these to the remote device 107, which completes the templates using the relevant data and provides these to the language model 113 of the virtual dialogue unit 106. In some examples, one or more of the template selection unit 111, template completion unit 112 and language model 113 may be implemented at the remote device 107 rather than a separate virtual dialogue unit 106. It will also be appreciated that, in some examples, the user device 103 may also act as a sensor 109 from which sensor data is obtained. Figure 2 shows a flowchart of an exemplary method 200 for generating responses to prompts provided by the user to the virtual assistant. In preferred examples, the prompts relate to questions regarding energy usage and I or generation of the one or more devices associated with the user. Here the term ‘devices’ may refer to the one or more appliances and I or energy sources described previously. At a first step S201, an initial prompt is received from the user. The initial prompt corresponds to a question that is to be answered by the virtual assistant. The prompt may be relatively basic in that it includes limited information from which an answer can be directly derived. In an example, the prompt is “At what time did the solar generation had a peak?”. To answer this question, external data must be obtained such as the amount of energy generated by the solar panel over a given time period (e.g., kWh generated each hour over a period of 24 hours). At a second step S202, a template is selected based on the received prompt. The template comprises one or more data fields requiring completion, such that the user’s question can be answered by populating the one or more data fields of the selected template with the relevant data and providing the completed template to the language model. Modern language models are particularly sensitive to the type of data is presented to them (e.g., how it is aggregated) and how it is formatted, with small variations having a potentially large impact on the accuracy of the answer provided by the model. Hence, it is important that an appropriate template is selected, and that the relevant data is presented in a manner that is more likely to result in accurate answer being generated by the language model. For example, if the language model is presented with an excessive number of data fields and I or irrelevant data fields, the language model is more likely to generate an inaccurate response. Step S202 comprises selecting from a plurality of templates, a template that is determined as having a higher probability of generating an accurate response from the language model. The plurality of templates may correspond to a set of templates that have been optimised for a specific domain, such as the domain relating to energy consumption and I or energy generation of one or more household devices. Selecting a template from the plurality of templates may comprise selecting a template that is determined as having a highest or maximum probability of generating an accurate answer from the language model. The set of optimised templates may be generated using a genetic algorithm, which is a type of optimisation algorithm used in machine learning. The genetic algorithm is trained for the large language model, M, with input data comprising initial user prompts, p , representing questions, Q, having answers, A, and second user prompts, r, generated from the first user prompts, p. The optimisation problem may correspond to: given an initial prompt, p, from the user representing a question, Q, find a template, t, which will generate a further prompt, r = t(p), that contains the sensor data and optionally, other information (such as context information), and enables the language model, M, to produce the answer A = M(r). Finding the optimal template then corresponds to, given a set of questions and answers expressed by an initial user prompt in natural language D = {(p, Q, X)} and a language model, M , find a set of templates T = {t} such that A = maximises a fitness function, f^tip), Q,A), where t is any of the templates in T. The fitness function may be a score of zero or one, or a value therebetween. The fitness score may be assigned by a trainer of the model to reflect the accuracy of the answer generated by the model. Alternatively, the fitness score may be determined based on correct answers provided by a trainer of the model and a ROGUE-L metric which determines a similarity between the correct answers provided by the trainer and the answers output by the model. It will be appreciated that in some examples, the answer, A = M(f) may use aggregated sensor data corresponding to relevant energy data, rather than raw sensor data. In some examples, at least one of the templates in the optimised set may be generated based on a combination (i.e., mixing) of at least two templates determined as maximising the fitness function. For example, a cross over function may be applied to at least two of the templates obtained from the genetic algorithm. The cross over function may, for example, add at least some of the structure or format from one template to another, or replace part of the structure of one template with that of another. An example of this is shown in Figure 3, which shows a template resulting from the combination of a first and second template. In Figure 3, the template resulting from the combination comprises the first part of the template (e.g., a header section) and the remainder of the second template (e.g., the section for completing with data values and the original prompt). Figure 4 shows a further example of a template resulting from a cross over function having been applied to two templates. In Figure 4, the part corresponding to the second column of the first template has been combined with the header and first column of the second template, resulting in a template with only two columns: one for hours, and another for temperature inside minus temperature outside. As mentioned previously, the accuracy of the answers generated by the large language model can be improved by providing the large language model with focussed information (i.e., by reducing the opportunities for the language model to use the wrong data when determining an answer). The mixing of the templates may result in a more accurate answer, where for example, the user’s question requires data that is associated with two different templates in the optimised set. Generation of templates in this way allows new templates to be generated from a smaller sub-set of human-generated templates, whilst improving the accuracy of the answers provided by the language model that consumes them. In additional or alternative examples, at least one of the templates may be input to a mutation function that changes the template randomly. The mutation may include one or more of: reformulating a first part of the template (e.g., the introductory section that sets up the template) and I or replacing or modifying part of the template, e.g., by changing the position of one of the data fields within the template. An example of a mutation function having been applied to a selected template is shown in Figure 5. In Figure 5, an initial template, comprising respective column headers for hours, temperature inside minus temperature outside and boiler on / off has been modified such that the first part has been re-formulated (e.g., only refers to heating usage, not temperature) and the column for temperature data has been removed. As mentioned above, the accuracy of the answer generated by the large language model may be improved by controlling the format in which data is presented, as well as limiting the specific data that is provided to the large language model. In some examples, generating the optimised set of templates may comprise mixing at least two templates together (using a cross over function) and applying a mutation function to the template arising from the mixing. An example of an algorithm for generating a set of optimised templates is provided below. Algorithm - Genetic prompt engineering Input D = {(p,Q,A)}, f(r, D) fitness function, T_0 = {^, t2,... tw] initial set of templates, k sample population size, m percentage of population to mutate g = o while average fitness changes from the previous iteration g = g + i Compute f(th Q, D) for each template in Tg Tg = Select k% templates with highest fitness score Tg = Crossover(T5) Tg = Mutation(T5, m) end while return Tg At step S202, determining which of the plurality of templates has a higher probability of generating an accurate response may comprise providing the initial user prompt to a trained model, such as a trained classification model. The classification model may be trained to select a template from the set of optimised templates that maximises the probability of an accurate answer being generated by the large language model. The trained classification model may be a trained random forest classifier, for example, such as that described in Breiman, “Random Forests”, Machine Learning 45(1), 5-32, 2001. The Random Forest classifier may be trained using bag of word features extracted from the templates and the prompts and using the fitness function as a target. Bag of word features are a representation of text data where the order of words is disregarded and only the frequency of the words is considered. An example of a template selected for the prompt “At what time the solar generation had a peak?” is shown in Figure 6. In Figure 6, data fields requiring completion are represented using angular brackets. The <USER LOCATION> and <DAY> fields may correspond to context information that is to be consumed by the template. The <VALUE> data may correspond to the sensor data obtained from one or more sensors (or aggregated energy data based thereon) that is to be consumed by the template. The <ORIGINAL PROMPT> may correspond to the initial prompt provided by the user, i.e. “At what time did the solar generation had a peak?”. The original prompt may be returned to the user so that they can confirm whether the answer provided by the language model corresponds to their question. As can be seen above, the selected template is effectively a second user prompt, derived from the first user prompt, that can be completed with the relevant data. Returning to Figure 2, at a third step S203, a completed version of the template selected at step S202 is obtained. The completed version of the template corresponds to the selected template with at least one of the data fields comprising sensor data. The sensor data may correspond to sensor data generated by the one or more sensors described previously or data derived therefrom (e.g., aggregated sensor data, or ‘energy data’ pertaining to energy consumption and / or generation by the one or more devices). In some examples, the completed template may be obtained from the remote device 107. Alternatively, completion of the template may be carried out by the virtual dialogue unit 106. In some examples, step S203 comprises obtaining relevant data based on the selected template (or part thereof). In some examples, the relevant data may comprise time-series data that indicates for a given time period, such as e.g., a day, an amount of energy consumed and I or generated (e.g., in kWh) by the one or more devices, per unit time (e.g., hourly). Obtaining the relevant data may comprise querying one or more servers at which the relevant data is stored, using at least some of the information in the selected template (e.g. a data field, a data field header, etc.). The selected template may then be completed using the obtained data. Figure 7 shows an example of a completed version of the template shown in Figure 6. In this example, the sensor data used to complete the template corresponds to an amount of energy generated by the solar panel each hour over a previous day. The context information corresponds to a location of a property (premises) and a current date. At a fourth step S204, the completed template is provided to the language model. At a fifth step S205, the language model generates an answer based on the completed template. An example of an answer output by the language model for the prompt “At what time did the solar generation had a peak?” may include: "The peak of solar generation in your data is 2.10 kWh, which occurred at 1pm. This is the time of solar noon, when the sun is at its highest point in the sky and the solar panels are receiving the most sunlight.” In some examples, the method 200 may further comprise an additional step (not shown), of transmitting the answer generated by the model to another device. For example, the answer generated at step S205 may be transmitted, via the communications network, to the user device for display thereat. As mentioned previously, the user may have an energy chatbot application installed at their device that enables outputs of the language model to be displayed as part of a messaging interface. Additionally, or alternatively, the method 200 may further comprise generating, based on the answer generated by the language model, control instructions for controlling operation of one or more of the devices associated with the user’s premises. The control instructions may be transmitted to a control unit that is configured to control operation of the one or more devices. Alternatively, the control instructions may be transmitted directly to one or more of the devices. The control unit and I or the one or more devices may comprise one or more processors, which responsive to receiving control instructions, modify operation of the one or more devices. An example of controlling one or more devices based on the output of the language model will be described further in relation to Figure 8. It will be appreciated that, in some examples, the method 200 may comprise, prior to completing the one or more data fields of the selected template, transforming the obtained sensor data (or energy data) so that is in a suitable format for the selected template. Transforming the obtained sensor data may comprise performing one or more mathematical operations on it and / or combining it with other information, such as context information. Transformation of the data may be performed at, for example, the remote device, prior to supplying the relevant data to the template completion unit. For example, a prompt such as “when is the best time to charge my electric vehicle (EV)?” may require determining, for a given time period (e.g., a day), a net energy per unit time associated with the user’s property, where the net energy corresponds to the energy generated by an energy source, such as a solar panel, minus the electricity consumption associated with user’s property. The net energy may be used to determine a suitable time (e.g., hour of the day) where all or most of the charging can be supplied by the energy source (e.g., solar panel 108). In another example, a prompt relating to heating usage, such as when a boiler or heat pump was switched on or off, may require determining, fora given time period (e.g., day), an average difference between the internal and external temperature of the property per unit time. For example, if the on I off state of the boiler is not measured directly by a dedicated sensor, it may be possible to infer usage based on e.g., the average difference in internal and external temperature per unit time (e.g., hourly) and the total electricity consumption per unit time (e.g., kWh) associated with the premises. The boiler may be inferred as having been switched on at time when there was a peak in electricity consumption and a maximum average difference between the internal and external temperature. In other examples, transforming the sensor data (or energy data) may include determining a minimum and I or maximum energy consumption and I or energy generation for a given period (e.g., a day). In some examples, transforming the sensor data may involve determining an amount of energy that is likely to be consumed if a certain appliance is not used. For example, a prompt in the form of “How much can I reduce my daily spending by not using the dryer machine?” may require obtaining time-series data corresponding to electricity consumed each hour over a day (e.g., kWh consumed each hour), and determining from this, a difference in the energy that would be consumed over the day if the dryer was not used. Answering this specific question may also require obtaining additional information such as when the dryer was used, the amount of energy it consumed or likely consumes (e.g., based on a known model), and an energy tariff (e.g., pennies or cents charged per kWh) associated with the user’s property. At least some of this information may correspond to context information. In some examples, transforming the sensor data may involve resampling and I or re-aligning the sensor data. For example, a smart meter may measure electricity consumption every half hour but answering the user’s question may require completing the selected template with hourly electricity consumption data. Figure 8 shows an example of a further system 800 in accordance with the present disclosure. The system 800 shown in Figure 8 is identical to that shown in Figure 1 but shows at least one of the devices associated with the property 102 as comprising an electric vehicle (EV) charger 801 and an electric vehicle 802 for receiving charging from the electric vehicle charger 801. In Figure 8, the output generated by the language model 113 is used to schedule charging of the electric vehicle 802 by the EV charger 801. For example, the user 104 may wish to plan a trip with their electric vehicle 802 a day in advance and may provide the following prompt to the virtual dialogue unit 106: ““I have to travel 100km tomorrow leaving at 5pm, can you optimize the charging of my EV?”. To answer this question, a template is selected (as described previously) and completed with relevant data. In this example, the relevant data includes the total electricity consumption determined for the property 102 over a given time period (e.g., kWh consumed each hour, over a day). The energy data also comprises an amount of electricity generated per unit time by the solar panel (e.g., kWh generated each hour, over the same day). From this, a net energy generated by the solar panel for the time period (e.g. the day) is determined and used to complete the selected template. In addition, energy tariff information associated with the user’s property is also obtained and used to complete the template. In some examples, the energy tariff information may correspond to sensor data obtained from the one or more sensors. For example, a smart meter may track the price a user will be charged for their energy usage depending on the time of day. In additional or alternative examples, the energy tariff information may correspond to context information that is obtained from the user’s energy supplier, rather than from one or more sensors located at or in the vicinity of the user’s property. In the example of Figure 8, EV charging information associated with the electric vehicle 802 is also obtained and used to complete the selected template. The EV charging information may include at least one of: a current charge level of the electric vehicle, a battery capacity of the electric vehicle, and a rate at which energy is consumed by the EV per unit distance (e.g., kW per km). As mentioned previously, obtaining the relevant data for completing the one or more data fields of the selected template may be performed by a template completion unit 112, which may be located at the virtual dialogue unit 106 (as shown in Figure 8) or the remote device 107 (not shown in Figure 8). In some examples, the EV charging information is stored at a database associated with the remote device 107, such that the template completion unit 112 can obtain the relevant EV data by querying the database. The database may comprise EV charging information for one or more EVs associated with one or more users. For example, the instance of the energy chatbot application installed at the user’s device may be associated with a unique ID (such as a username), with the relevant EV information being obtained by performing a look-up operation in the database using the user’s unique ID. In additional or alternative examples, at least some of the EV charging information may be obtained from a separate device, such as the user’s user device 103, or a smart meter. For example, the user may have an EV application installed on their device 103, from which relevant EV charging information can be retrieved by the template completion unit 112. Having obtained the energy data, energy tariff information and EV charging information, the completed template is provided to the large language model 113. An example of a completed template for the present example is shown in Figure 9. In Figure 9, the completed template comprises an introductory section that provides context for the energy data introduced by the columns corresponding to hour, electricity consumption (kWh), solar energy generated (kWh) and net energy (kWh). For the completed template shown in Figure 9, the answer generated by the language model comprises: “Based on your solar generation data from yesterday, you should be able to generate enough solar energy to charge your EV to 80% during the day, tomorrow. However, it is always best to err on the side of caution and start charging your EV as early as possible in the morning. Here is a suggested charging schedule for tomorrow: - Start charging your EV at 12am, when the electricity price is 25p per kWh. - Charge your EV to 80% by 6am. - Stop charging your EV at 6am and rely on solar energy to power your EV for the rest of the day” The charging schedule provided by the language model 113 may then be translated into a structured format, corresponding to a set of control instructions. The control instructions may include, for example: a time at which charging is to commence, a time at which charging is to cease, a target charge level, and a source of energy that is to be used to provide the charging. The control instructions may include options for charging such that the EV 802 is only charged at night and I or when there’s a surplus of energy generated by the solar panel 108. An example of a set of control instructions generated from the answer output by the language model 113 is: { "start_time": "2023-09-29T00:00:00Z", "end_time": "2023-09-29T06:00:00Z", "target_charge_level": 80, "only_solar": False } { "start_time": "2023-09-29T06:00:00Z", "end_time": "2023-09-29T17:00:00Z", "target_charge_level": 80, "only_solar": True } These control instructions may be provided to a control unit 803 that is operable to control at least the EV charger 801 and the solar panel 108 based on the received control instructions. It will be appreciated that Figure 8 provides an illustrative example of controlling an EV charger 801 and a solar panel 108 based on the output of the language model 113. More generally, the output of the language model 113 may be used to control any of the one or more devices associated with the property 102. For example, the output of the language model 113 may be used to schedule operation of a boiler or heat pump, to schedule operation of a lighting system, to schedule operation of a washing appliance, etc. The output of the language model 113 may also be used to control a source from which power is supplied to one or more of these devices for at least some of the time that they are scheduled to be supplied with power. Generally, the control instructions may be generated by extracting relevant information from the output of the language model 113 and translating it into a format that can be used to control the one or more devices. The control instructions may be generated by the language model 113 or a separate device that receives outputs from the language model 113. For example, the remote device 107 may be configured to receive outputs from the language model 113, via the communications network 105, and to convert these into a suitable format for a control unit 803 that controls operation of the one or more devices. As mentioned previously, the devices may be controllable by virtue of being smart devices (or loT devices), such as smart thermostats, smart plugs, smart lights, smart locks, smart blinds, smart doors, smart sprinkler systems, smart pet feeders, smart security cameras, smart air conditioners, smart ovens, smart vacuums, smart faucets, etc. These devices may be controllable by virtue of being connected to a communications network, such as WiFi network, which enables the one or more devices to receive control instructions I commands. In some examples, at least some of the devices may comprise or be associated with one or more actuators and control of the one or more devices may correspond to controlling operation of the one or more associated actuators. For example, control of at least one of the devices may correspond to adjusting the position of a valve, such as a smart radiator valve. Other examples of smart devices comprising valves include smart sprinkler systems, smart drip irrigation systems, smart HVAC systems, etc. Generally, controlling the one or more devices may comprise one or more of: i. scheduling a time for which at least one of the devices is to be supplied with power, which may include one or more of: a start time, an end time, and a duration; ii. determining an amount of power that is to be supplied to the one or more devices; iii. determining a source of energy that is to supply the one or more devices with power; In some examples, control of the one or more devices may be performed centrally via a control unit, or directly (no control unit), distributed between plural control units, and I or a combination of direct communication and communication via one or more control units. In some examples, one or more of the devices 101, user device 103, virtual dialogue unit 106 and remote device 107 may comprise the control unit. For example, the user may have an application installed at their device 103 that allows them to control or more of their smart devices. Alternatively, or in addition, the user’s premises may be associated with a control unit (a local control unit), such as a hub device that issues commands to the one or more devices that are to be controlled. The hub device may use one or more of: WiFi, Zigbee, Z-Wave, Lutron Caseta to communicate with the one or more devices. The hub may receive the control instructions from e.g., the remote device. It will further be appreciated that, whilst the examples described above relate to a user’s energy consumption / generation habits, the template selection method may also be used in other domains. That is, natural language prompts and templates in any domain may be used in conjunction with the method of Figure 2. The large language model may be generic, with only the template selection method requiring domain-specific training data. The data used to complete the one or more data fields of the selected template may correspond to any monitored data that corresponds with the domain in which the template selection method has been trained. A computer program may be configured to provide any of the above-described methods. The computer program may be provided on a computer readable medium. The computer program may be a computer program product. The product may comprise a non-transitory computer usable storage medium. The computer program product may have computer-readable program code embodied in the medium configured to perform the method. The computer program product may be configured to cause at least one processor to perform some or all of the method. Various methods and apparatus are described herein with reference to block diagrams or flowchart illustrations of computer-implemented methods, apparatus (systems and / or devices) and / or computer program products. It is understood that a block of the block diagrams and / or flowchart illustrations, and combinations of blocks in the block diagrams and / or flowchart illustrations, can be implemented by computer program instructions that are performed by one or more computer circuits. These computer program instructions may be provided to a processor circuit of a general purpose computer circuit, special purpose computer circuit, and / or other programmable data processing circuit to produce a machine, such that the instructions, which execute via the processor of the computer and / or other programmable data processing apparatus, transform and control transistors, values stored in memory locations, and other hardware components within such circuitry to implement the functions / acts specified in the block diagrams and / or flowchart block or blocks, and thereby create means (functionality) and / or structure for implementing the functions / acts specified in the block diagrams and / or flowchart block(s). Computer program instructions may also be stored in a computer-readable medium that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable medium produce an article of manufacture including instructions which implement the functions / acts specified in the block diagrams and / or flowchart block or blocks. A tangible, non-transitory computer-readable medium may include an electronic, magnetic, optical, electromagnetic, or semiconductor data storage system, apparatus, or device. More specific examples of the computer-readable medium would include the following: a portable computer diskette, a random-access memory (RAM) circuit, a read-only memory (ROM) circuit, an erasable programmable read-only memory (EPROM or Flash memory) circuit, a portable compact disc read-only memory (CD-ROM), and a portable digital video disc readonly memory (DVD / Blu-ray). The computer program instructions may also be loaded onto a computer and / or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer and / or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions / acts specified in the block diagrams and / or flowchart block or blocks. Accordingly, the invention may be embodied in hardware and / or in software (including firmware, resident software, micro-code, etc.) that runs on a processor, which may collectively be referred to as “circuitry,” “a module” or variants thereof. It should also be noted that in some alternate implementations, the functions / acts noted in the blocks may occur out of the order noted in the flowcharts. For example, two blocks shown in succession may in fact be executed substantially concurrently or the blocks may sometimes be executed in the reverse order, depending upon the functionality / acts involved. Moreover, 5 the functionality of a given block of the flowcharts and / or block diagrams may be separated into multiple blocks and / or the functionality of two or more blocks of the flowcharts and / or block diagrams may be at least partially integrated. Finally, other blocks may be added / inserted between the blocks that are illustrated. 10 It will be apparent to those skilled in the art that various modifications and variations can be made to the disclosed systems and methods. Other embodiments will be apparent to those skilled in the art from consideration of the specification and practice of the disclosed systems and methods. It is intended that the specification and examples be considered as exemplary only, with a true scope being indicated by the following claims and their equivalents.
Claims
1. A method for generating responses to prompts provided by a user to a large language model, the user being associated with a premises, the premises comprising one or more devices and at least one sensor for detecting energy consumed by and I or energy generated by at least of the one or more devices, the method comprising:receiving a prompt from a user, the prompt corresponding to a question relating to energy consumption and / or energy generation of the one or more devices;selecting based on the received prompt, a template comprising one or more data fields requiring completion;wherein selecting the template comprises selecting, from a plurality of templates, a template that is determined by a trained classification model as having the highest probability of generating an accurate response from the language model;obtaining a completed version of the selected template, wherein at least one of the data fields of the completed template comprises sensor data generated by the at least one sensor; andproviding the completed template to the large language model, and generating based on the completed template, an answer to the received prompt.
2. A method according to claim 1, comprising, obtaining the sensor data, based on at least part of the selected template, and completing at least one of the data fields of the selected template with the obtained sensor data.
3. A method according to any preceding claim, further comprising controlling at least one of the devices based on the answer generated by the large language model.
4. A method according to claim 3, comprising determining a schedule for which at least one of the devices is to be supplied with power and causing the at least one device to be supplied with power in accordance with the determined schedule.
5. A method according to claim 4, comprising determining at least one energy source from which power will be supplied to the at least one device; andcausing the at least one device to be supplied with power by the determined energy source.
6. A method according to claim 5, further comprising: obtaining energy tariff information;determining, based on the sensor data, a net energy generated by the energy source per unit time; andwherein determining the schedule for which at least one of the devices is to be supplied with power comprises determining an optimal time for supplying power based on at least one of: (i) the energy tariff information and (ii) the determined net energy generated by the energy source per unit time.
7. A method according to any of claims 4 to 6, wherein the at least one device that is to be supplied with power for the determined schedule is an electric vehicle charger, andwherein the determined schedule corresponds to a time at which the electric vehicle charger is to provide charging to an electric vehicle.
8. A method according to claim 7, wherein at least one of the data fields of the completed template comprises charging information associated with an electric vehicle, the electric vehicle charging information comprising at least one of:a current charge level of the electric vehicle;a battery capacity of the electric vehicle; anda rate at which power is consumed by the electric vehicle per unit distance.
9. A method according to any preceding claim, wherein the sensor data comprises energy consumption and I or energy generation data associated with the one or more devices.
10. A method according to any preceding claim, wherein the sensor data corresponds to sensor data obtained by at least one of: (i) a smart meter, (ii) a smart thermostat, (iii) a smart lighting system, (iv) a temperature sensor, (v) a sensor associated with an electric vehicle and (vi) a smart plug.
11. A method according to any preceding claim, wherein the premises comprises a plurality of sensors and wherein the sensor data comprises aggregated sensor data representing sensor data obtained from the plurality of sensors.
12. A method according to any preceding claim, wherein at least one of the data fields of the completed template further comprises context information associated with the premises.
13. A method according to claim 12, wherein the context information comprises one or more of: (i) time and date information, (ii) location information, (iii) a size of the premises, (iv) a number of devices associated with the premises, (v) a type of the one or more devicesassociated with the premises, (vi) a battery capacity of one or more devices associated with the premises, and (vii) energy tariff information associated with the premises.
14. A method according to any preceding claim, wherein the classification model comprises a trained random forest classifier, the random classifier being trained to select a template based on an input user prompt.
15. A method according to claim 14, wherein the random forest classifier has been trained with bag of word features extracted from templates and user prompts and a fitness function comprising a target value.
16. A method according to any preceding claim, wherein the plurality of templates from which the template is selected correspond to templates generated using a genetic algorithm, the genetic algorithm having been trained for the large language model (M), with input data comprising: first user prompts (p) representing questions (Q) having answers (A), and second user prompts generated from the first user prompts (r); andwherein training the algorithm comprises determining a set of templates (t) such that when the templates are completed using the second user prompts (r), the answer output by the large language model maximises a fitness score representing the accuracy of the answer output by the model.
17. A method according to claim 16, wherein at least one of the plurality of templates has been generated based on at least one of: (i) a combination of at least two templates in the determined set; and (ii) a mutation of at least one of the templates in the determined set. [check summary up to date - can also have mutated combination]18. A method according to any preceding claim, wherein the large language model is connected to a user device associated with the user via a communications network; and comprising transmitting the answer output by the language model to the user device, via the communications network.
19. A computer program product including computer program code configured, when executed on a computer processor, to control a data processor to undertake the steps of the method of claims 1 to 18.
20. A method for obtaining answers from a large language model in response to prompts provided to it by a user, the user being associated with a premises, the premises comprisingone or more devices and at least one sensor for detecting energy consumed by and I or energy generated by at least of the one or more devices, the method comprising:receiving, at a user device, a prompt for providing to the large language model, the prompt relating to the energy consumption and I or energy generation of one or more devices associated with the user’s premises;providing the prompt to a trained classifier, the classifier being trained to select, from a plurality of templates, a template that is determined as having the highest probability of generating an accurate answer from the large language model, the template comprising one or more data fields requiring completion; andreceiving, at the user device, an answer generated by the large language model, the answer having been generated by the language model based on a completed version of the template, wherein at least one of the data fields of the completed template comprises sensor data generated by the at least one sensor.
22. A method for completing templates that are to be provided as an input to a large language model, the large language model being trained to generate answers to prompts provided by a user;wherein the user is associated with a premises comprising one or more devices and at least one sensor for detecting energy consumed by and I or energy generated by at least of the one or more devices, the method comprising:receiving a template comprising one or more data fields requiring completion, the template having been selected by a classifier trained to select, from a plurality of templates, a template that is determined as having the highest probability of generating an accurate response from the large language model;obtaining, based on the received template, sensor data generated by the at least one sensor for completing at least one of the data fields of the received template;completing the received template based on the data generated by the at least one sensor; andproviding the completed template to a large language model, the large language model being trained to output answers based on input completed templates.
23. A system for generating responses to prompts provided by a user to a large language model, the system comprising:a template selection unit configured to:receive a user prompt corresponding to a question relating to energy consumption and / or energy generation of one or more devices associated with the user’s premises;select based on the received prompt, a template comprising one or more data fields requiring completion,wherein the template selection unit comprises a classification model trained to select a template from a set of templates, the classification model being trained to determine which of the templates in the set has a higher probability of generating an accurate answer from the large language model;a template completion unit configured to obtain a completed version of the selected template, wherein at least one of the data fields of the completed template comprises data generated by the at least one sensor; anda large language model configured to receive the completed template and generate an answer to the user’s prompt based on the received completed template.
24. A system according to claim 23, further comprising a control unit operable to control the one or more devices based on the answer output by the language model.
25. A system according to claim 24, wherein the control unit is configured to control at least one of: (i) a time at and for which the one or more devices are to be supplied with power, (ii) an energy source that is to provide the one or more devices with power, and (iii) an amount of power that is to be supplied to the one or more devices.31
Citation Information
Patent Citations
Aspect prompting framework for language modeling
US20230237277A1