# US 2025/0094820 A1 · Enabling device control planning capabilities of small language model

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2025/0094820 A1
- Document ID: US20250094820A1
- Status: Published application
- Kind: A1
- Application number: 18/824,166
- Filed: 2024-09-04
- Published: 2025-03-20
- Earliest claimed: 2023-09-15
- Assignees: Samsung Electronics Co., Ltd.
- Applicants: Samsung Electronics Co., Ltd.
- Inventors: Sudipta PAUL; Lingyu ZHANG; Yilin SHEN; Hongxia JIN
- Web page: https://patentgrep.com/patent/US20250094820A1

## CPC

- G05B 15/02: electric
- G06N 3/096: Transfer learning
- G05B 17/02: electric
- G05B 19/0426: {Programming the control sequence}
- G05B 2219/25232: DCS, distributed control system, decentralised control unit
- G05B 2219/2642: Domotique, domestic, home control, automation, smart house
- G05B: CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS (systems for controlling or regulating non-electric variables G05D; systems for regulating electric or magnetic variables G05F; control devices or systems insofar as characterised by mechanical features only G05G)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A method for enabling an improved device control capability of a small language model (SLM) transferrable to a hub device configured to be operable by a user in an environment, is disclosed. The method includes performing a fine-tuning the SLM based on a data set including base plans and contrastive plans; generating computer codes corresponding to the fine-tuned SLM; and transferring the generated computer codes to the hub device to be connected with a group of the electronic devices in the environment.

## Claims

### Claim 1

A method for enabling an improved device control capability of a small language model (SLM), the method comprising:
generating, by using a large language model (LLM), a pool of diverse instructions including direct instructions for controlling a first group of electronic devices and indirect instructions for controlling the first group of the electronic devices, wherein the first group of the electronic devices corresponds to all available devices in the environment;
generating, by using the LLM, base plans related to operations of controlling the first group of the electronic devices;
determining, by using the LLM and a retrieval model, retrieved devices based on the base plans and the indirect instructions, wherein the retrieved devices correspond to a second group of the electronic devices and wherein a first number of the electronic devices in the first group is higher than a second number of the electronic devices in the second group;
generating, by using the LLM, contrastive plans based on a third group of the electronic devices, wherein a third number of the electronic devices in the third group corresponds to a number of the first number minus the second number;
generating a data set by combining the base plans and the contrastive plans;
performing a fine-tuning the SLM based on the data set;
generating computer codes corresponding to the fine-tuned SLM; and
transferring the generated computer codes to the hub device to be connected with a fourth group of the electronic devices in the environment.

### Claim 2 (depends on 1)

The method of claim 1, wherein the generating, by using the LLM, the pool of diverse instructions comprises:
receiving seed instructions;
generating, by using the LLM, instructions based on the received seed instructions;
filtering, by using a filter, the generated instructions; and
storing the filtered instructions in the pool of diverse instructions.

### Claim 3 (depends on 2)

The method of claim 2, wherein the filter is a Rogue-L filter.

### Claim 4 (depends on 3)

The method of claim 3, wherein the filtering the generated instructions comprises:
measuring a Rogue-L similarity between one instruction of the generated instructions and an existing instruction in the pool of diverse instructions, and
storing the one instruction of the generated instructions in the pool of diverse instructions when the measured Rogue-L similarity is equal to or greater than a pre-determined threshold.

### Claim 5 (depends on 2)

The method of claim 2, wherein the generating, by using the LLM, the base plans comprises providing, to the LLM, in-context examples, the pool of diverse instructions, and a list of all controlled devices in the environment.

### Claim 6 (depends on 5)

The method of claim 5, wherein the in-context examples comprise a first group of instructions randomly sampled from the seed instructions and a second group of instructions randomly sampled from the pool of diverse instructions.

### Claim 7 (depends on 1)

The method of claim 1, wherein the determining, by using the LLM and the retrieval model, retrieved devices comprises determining, by using the LLM, whether an instruction provided to the LLM is one of the indirect instructions.

### Claim 8 (depends on 1)

The method of claim 1, the retrieval model is operatively connected with the LLM and is a pretrained sentence transformer.

### Claim 9 (depends on 1)

The method of claim 1, wherein the generating, by using the LLM, the contrastive plans based on the third group of the electronic devices, comprises providing, to the LLM, in-context examples and the indirect instructions to the LLM.

### Claim 10 (depends on 1)

The method of claim 1, wherein the data set comprises a plurality of instructions-devices-plans triplets.

### Claim 11 (depends on 1)

The method of claim 1, wherein the performing the fine-tuning the SLM comprises maximizing a likelihood =Σi=1N[log P(Si|ui, Di; Θ)] wherein ui is an user instruction, Di is a group of available devices, and Si is a device control plan/step, and P is a conditional probability P modeled using a neural network with parameters Θ.

### Claim 12

A method for enabling an improved device control capability of a first language model transferrable to a hub device configured to be operable by a user in an environment, the method comprising:
generating, by using a second language model, a pool of diverse instructions including direct instructions for controlling a first group of electronic devices and indirect instructions for controlling the first group of the electronic devices, wherein the first group of the electronic devices corresponds to all available devices in the environment;
generating, by using the second language model, first plans related to operations of controlling the first group of the electronic devices;
determining, by using the second language model and a retrieval model, retrieved devices based on the first plans and the indirect instructions, wherein the retrieved devices correspond to a second group of the electronic devices and wherein a first number of the electronic devices in the first group is higher than a second number of the electronic devices in the second group;
generating, by using the second language model, second plans based on a third group of the electronic devices, wherein a third number of the electronic devices in the third group corresponds to a number of the first number minus the second number;
generating a data set by combining the first plans and the second plans;
performing a fine-tuning the first language model based on the data set;
generating computer codes corresponding to the fine-tuned first language model; and
transferring the generated computer codes to the hub device to be connected with a fourth group of the electronic devices in the environment.

### Claim 13

An electronic device for enabling an improved device control capability of a small language model (SLM), the electronic device comprising:
at least one processor comprising processing circuitry; and
at least one memory including one or more instructions, which executed by the at least one processor individually or collectively, to cause the electronic device to at least:
generate, by using a large language model (LLM), a pool of diverse instructions including direct instructions for controlling a first group of electronic devices and indirect instructions for controlling the first group of the electronic devices, wherein the first group of the electronic devices corresponds to all available devices in the environment;
generate, by using the LLM, base plans related to operations of controlling the first group of the electronic devices;
determine, by using the LLM and a retrieval model, retrieved devices based on the base plans and the indirect instructions, wherein the retrieved devices correspond to a second group of the electronic devices and wherein a first number of the electronic devices in the first group is higher than a second number of the electronic devices in the second group;
generate, by using the LLM, contrastive plans based on a third group of the electronic devices, wherein a third number of the electronic devices in the third group corresponds to a number of the first number minus the second number;
generate a data set by combining the base plans and the contrastive plans;
perform a fine-tuning the SLM based on the data set;
generate computer codes corresponding to the fine-tuned SLM; and
transfer the generated computer codes to the hub device to be connected with a fourth group of the electronic devices in the environment.

### Claim 14 (depends on 13)

The electronic device of claim 13, wherein the at least one memory including one or more instructions, which executed by the at least one processor individually or collectively cause the electronic device further to generate, by using the LLM, the pool of diverse instructions by:
receiving seed instructions;
generating, by using the LLM, instructions based on the received seed instructions;
filtering, by using a filter, the generated instructions; and
storing the filtered instructions in the pool of diverse instructions.

### Claim 15 (depends on 14)

The electronic device of claim 14, wherein the filter is a Rogue-L filter.

### Claim 16 (depends on 15)

The electronic device of claim 15, wherein the at least one memory including one or more instructions, which executed by the at least one processor individually or collectively, cause the electronic device further to filter the generated instructions by:
measuring a Rogue-L similarity between one instruction of the generated instructions and an existing instruction in the pool of instructions, and
storing the one instruction of the generated instructions in the pool of diverse instructions when the measured Rogue-L similarity is equal to or greater than a pre-determined threshold.

### Claim 17 (depends on 14)

The electronic device of claim 14, wherein the at least one memory including one or more instructions, which executed by the at least one processor individually or collectively cause the electronic device further to generate, by using the LLM, the base plans by providing, to the LLM, in-context examples, the pool of diverse instructions, and a list of all controlled devices in the environment.

### Claim 18 (depends on 17)

The electronic device of claim 17, wherein the in-context examples comprise a first group of instructions randomly sampled from the seed instructions and a second group of instructions randomly sampled from the pool of diverse instructions.

### Claim 19 (depends on 13)

The electronic device of claim 13, wherein the at least one memory including one or more instructions, which executed by the at least one processor individually or collectively cause the electronic device further to determine, by using the LLM and the retrieval model, retrieved devices by determining, by using the LLM, whether an instruction provided to the LLM is one of the indirect instructions.

### Claim 20 (depends on 13)

The electronic device of claim 13, the retrieval model is operatively connected with the LLM and is a pretrained sentence transformer.
