# US 2025/0147738 A1 · Scenario management apparatus and recording medium

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

- Number: US 2025/0147738 A1
- Document ID: US20250147738A1
- Status: Published application
- Kind: A1
- Application number: 18/894,046
- Filed: 2024-09-24
- Published: 2025-05-08
- Earliest claimed: 2023-11-02
- Assignees: Keyence Corporation
- Applicants: Keyence Corporation
- Inventors: Kazuki NATORI
- Web page: https://patentgrep.com/patent/US20250147738A1

## CPC

- G06F 8/34: Graphical or visual programming
- G06F 8/30: Creation or generation of source code
- G06F 8/33: Intelligent editors
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An appropriate prompt for a purpose of scenario generation can be input to a machine learning model in a mode easy for a user. A user instruction in a natural language format by the user is input to an LLM 12 (machine learning model) that has learned natural language processing. Accordingly, the LLM 12 can grasp the meaning of the user instruction. Further, rule information for describing a scenario in a general-purpose programming language is input to the LLM 12. Accordingly, the source code corresponding to the meaning of the user instruction can be appropriately generated based on the rule information. That is, it is possible to input the appropriate prompt for the purpose of the scenario generation to the LLM 12 in the mode easy for the user.

## Claims

### Claim 1

A scenario management apparatus that manages a scenario for automating an operation on another application program, the scenario management apparatus comprising:
an acceptance unit that accepts a user instruction in a natural language format by a user;
a rule information acquisition unit that acquires rule information for describing the scenario in a general-purpose programming language from a storage unit;
an input unit that inputs the user instruction accepted by the acceptance unit and the rule information acquired by the rule information acquisition unit to a machine learning model that has learned natural language processing;
an output information acquisition unit that acquires output information including a source code that describes the scenario, the source code being generated by the machine learning model in the general-purpose programming language according to the user instruction and the rule information; and
a display generation unit that converts the source code included in the output information into display information to be displayed on a GUI.

### Claim 2

A scenario management apparatus that manages a scenario for automating an operation on another application program, the scenario management apparatus comprising:
an acceptance unit that accepts a user instruction in a natural language format by a user;
a rule information acquisition unit that acquires rule information for describing the scenario in a general-purpose programming language from a storage unit;
an input unit that inputs the user instruction accepted by the acceptance unit and the rule information acquired by the rule information acquisition unit to a machine learning model that has learned natural language processing;
an output information acquisition unit that acquires output information including a source code that describes the scenario, the source code being generated by the machine learning model in the general-purpose programming language according to the user instruction and the rule information; and
an editing operation unit that retains the source code included in the output information in a mode editable by the user in the storage unit.

### Claim 3 (depends on 1)

The scenario management apparatus according to claim 1, wherein the rule information includes language designation information designating the general-purpose programming language describing the scenario included in the output information.

### Claim 4 (depends on 3)

The scenario management apparatus according to claim 3, wherein the rule information includes available function information for designating a function available to the description of the scenario among functions in a programming interface in the general-purpose programming language designated by the language designation information.

### Claim 5 (depends on 4)

The scenario management apparatus according to claim 4, wherein the rule information includes a sample code indicating a method for reading the available function indicated by the available function information.

### Claim 6 (depends on 1)

The scenario management apparatus according to claim 1, wherein the rule information includes information designating a method for describing the scenario in the general-purpose programming language.

### Claim 7 (depends on 1)

The scenario management apparatus according to claim 1, wherein the output information acquisition unit acquires the output information including an explanatory sentence explaining the scenario in a natural language, and
the display generation unit distinguishes the source code and the explanatory sentence of the scenario from the output information and generates the display information including explanatory sentence display based on the explanatory sentence.

### Claim 8 (depends on 1)

The scenario management apparatus according to claim 1, wherein the display generation unit generates the display information including input sentence display based on the user instruction accepted by the acceptance unit, the input sentence display and the scenario being associated with each other in the display information.

### Claim 9 (depends on 8)

The scenario management apparatus according to claim 8, wherein the scenario includes a plurality of activities that execute predetermined processing defined in the general-purpose programming language,
the acceptance unit retains a first user instruction as the user instruction in the storage unit,
the output information acquisition unit retains first output information as the output information in the storage unit, and
when the acceptance unit accepts a second user instruction as the user instruction after the output information acquisition unit acquires the first output information,
the display generation unit generates the display information in which history display based on the first user instruction and the first output information retained in the storage unit, the input sentence display, and an activity block indicating the activity are associated with each other.

### Claim 10 (depends on 9)

The scenario management apparatus according to claim 9, wherein the display generation unit generates the display information not including at least a part of the history display in accordance with an operation of the user accepted by the acceptance unit.

### Claim 11 (depends on 9)

The scenario management apparatus according to claim 9, further comprising
an editing operation unit that retains the source code included in the output information in an editable mode,
wherein the history display includes a first source code that is the source code included in the first output information and a second source code that is the source code included in the output information acquired by the output information acquisition unit after the first output information, and
when the acceptance unit accepts an operation of selecting one of the first source code and the second source code, the editing operation unit retains the scenario of the selected one source code in an editable manner.

### Claim 12 (depends on 9)

The scenario management apparatus according to claim 9, wherein the storage unit retains a correction instruction template that instructs to correct the source code,
when the acceptance unit accepts an operation input for selecting the correction instruction template in association with the activity block,
the rule information acquisition unit acquires the correction instruction template from the storage unit, and
the input unit inputs the source code included in the output information, the correction instruction template, and the rule information to the machine learning model.

### Claim 13 (depends on 1)

The scenario management apparatus according to claim 1, wherein the display generation unit displays, on the GUI, a first window that accepts an input of the user instruction by the user, and a second window different from the first window, the second window displaying the display information converted from the source code by the display generation unit.

### Claim 14 (depends on 2)

The scenario management apparatus according to claim 2, wherein the editing operation unit retains only a part of the scenario described by the source code in an editable mode.

### Claim 15 (depends on 1)

The scenario management apparatus according to claim 1, further comprising
a violation check unit that checks whether or not the source code included in the output information acquired by the output information acquisition unit violates the rule information,
wherein, when the violation check unit determines that the source code violates the rule information, the display generation unit generates information for displaying, on the GUI, that the source code violates the rule information.

### Claim 16

A computer-readable recording medium storing a scenario management program causing a computer to function as a scenario management apparatus that manages a scenario for automating an operation on another application program, the scenario management program causing the computer to execute steps of:
accepting a user instruction in a natural language format by a user;
acquiring rule information for describing the scenario in a general-purpose programming language from a storage unit;
inputting the user instruction and the rule information to a machine learning model that has learned natural language processing;
acquiring output information including a source code describes the scenario, the source code being generated by the machine learning model in the general-purpose programming language according to the user instruction and the rule information; and
retaining the source code included in the output information in a mode editable by the user in the storage unit.

### Claim 17 (depends on 16)

The recording medium according to claim 16, further comprising
converting the source code included in the output information into display information to be displayed on a GUI.
