Method for generating ai agent by using large language model and computing device performing same

By generating and verifying pseudocode with a predefined schema and converting it to static executable code, the method addresses the inconsistency and unpredictability of large language models, ensuring reliable and secure AI agent performance.

WO2026111072A1PCT designated stage Publication Date: 2026-05-28VESSL AI KOREA INC
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
VESSL AI KOREA INC
Filing Date
2025-06-20
Publication Date
2026-05-28

Smart Images

  • Figure KR2025008540_28052026_PF_FP_ABST
    Figure KR2025008540_28052026_PF_FP_ABST
Patent Text Reader

Abstract

A method for generating an AI agent by using a large language model, performed by a processor, may comprise the steps of: receiving a request message from a user device; in response to the received request message, generating a pseudocode having a predefined schema and a predetermined data format by using the large language model; verifying the schema of the generated pseudocode; verifying the validity of the generated pseudocode; generating an executable code on the basis of the verified pseudocode; and executing the executable code. The step of verifying the schema of the generated pseudocode may comprise the steps of: identifying whether at least one step field or at least one dependency field is included in the pseudocode; identifying whether an essential field is included in a first step included in the at least one step field; and identifying whether the value of a type field included in the first step is one of predefined types.
Need to check novelty before this filing date? Find Prior Art

Description

Method for generating AI agents using large language models and computing device for performing the same

[0001] The following embodiments relate to a method for generating an AI agent using a large language model and a computing device for performing the same. More specifically, the following embodiments relate to a method for generating an AI agent that reduces uncertainty in a large language model and accurately generates a workflow in the form desired by a user, and a computing device for performing the same.

[0002] With the recent advancement of artificial intelligence technology, Large Language Models (LLMs) are being utilized in various fields. In particular, the field of Generative AI (Artificial Intelligence) is growing rapidly, driven by the powerful text generation capabilities of LLMs.

[0003] Large language models, such as the GPT (Generative Pre-trained Transformer) series—one of the core technologies of Generative AI—are trained on vast amounts of text data and possess superior natural language understanding and generation capabilities. These models are demonstrating remarkable performance as they are applied in various fields, including text generation, translation, summarization, and question answering.

[0004] Despite the advantages of the aforementioned large language models, there are several limitations when utilizing them as agents to perform specific tasks, and methods to overcome these limitations are required.

[0005] The background art is provided to facilitate understanding of the present disclosure. It should not be understood as an acknowledgment that the matters described in the background art exist as prior art.

[0006] The development of AI agents utilizing Large Language Models (LLMs) has recently been attracting attention in the field of artificial intelligence. Large Language Models generate text by probabilistically predicting the most likely next word for a given input. While this probability-based generation method allows for the direct creation of executable code for the agent, having LLMs directly generate such code presents several challenges.

[0007] First, large language models can generate different outputs for the same input each time, making it difficult to predict or control results and difficult to achieve a perfect result in a single attempt.

[0008] Secondly, it tends to output information that does not actually exist or code that cannot be executed as the execution result.

[0009] Thirdly, for the reasons mentioned above, it is difficult to trust and execute code generated by large language models, which can lead to unstable behavior or unexpected results for AI agents.

[0010] Fourth, while the output can be controlled by fixing the random seed so that a large language model can produce stable and uniform execution results, this may reduce the generation ability of the large language model and prevent it from generating various responses.

[0011] Accordingly, the inventors of the present disclosure have developed a method for generating an AI agent that accurately generates a safe, predictable, and user-desired workflow by reducing uncertainty while maintaining the generational degrees of freedom of a large language model, and a computing device for performing the same.

[0012] Accordingly, the embodiments aim to provide a method for generating an AI agent using a large language model and a computing device for performing the same.

[0013] The problems that the present disclosure aims to solve are not limited to those described above, and problems not mentioned will be clearly understood by those skilled in the art from the present specification and the accompanying drawings.

[0014] A method for generating an AI agent using a large language model, performed by a processor according to one embodiment, may include: receiving a request message from a user device; generating pseudocode having a predefined schema and a predetermined data form using the large language model in response to the received request message; verifying the schema of the generated pseudocode; verifying the validity of the generated pseudocode; generating executable code based on the verified pseudocode; and executing the executable code.

[0015] According to the features of the present disclosure, the predetermined data form may be in the form of YAML (YAML Not Markup Language).

[0016] According to another feature of the present disclosure, the step of validating the validity of the generated pseudocode may include checking whether the value of the tool field included in the first step is one of the predefined tools, and checking whether there exists a cycle between at least one dependency field and at least one step field.

[0017] According to another feature of the present disclosure, if the verification of the schema or the verification of the validity fails, the step of regenerating the pseudocode may be further included, and the step of regenerating the pseudocode may be repeated up to N (N is a positive integer) times if the verification of the schema or the verification of the validity fails.

[0018] According to another feature of the present disclosure, the step of generating executable code based on the verified pseudocode may include the step of mapping at least one step included in the pseudocode into the form of a predefined object, and the executable code may be static code.

[0019] A computing device for operating an AI agent according to one embodiment includes at least one processor comprising a memory, a transceiver configured to receive a request message from a user device, and a Large Language Model (LLM). The processor may be configured to respond to the received request message by generating pseudocode having a predefined schema and a predetermined data form using the Large Language Model, verifying the schema of the generated pseudocode, verifying the validity of the generated pseudocode, generating executable code based on the verified pseudocode, and executing the executable code.

[0020] A computer program according to one embodiment may be a computer program stored on a computer-readable recording medium to perform a method for generating an AI agent using the large language model described above, combined with a computer which is hardware.

[0021] A non-transient computer-readable recording medium according to one embodiment may have a computer program executed by a computer recorded thereon. The computer program may include: receiving a request message from a user device; generating pseudocode having a predefined schema and a predetermined data form using the large language model in response to the received request message; verifying the schema of the generated pseudocode; verifying the validity of the generated pseudocode; generating executable code based on the verified pseudocode; and executing the executable code. Here, verifying the schema of the generated pseudocode may include checking whether the pseudocode contains at least one step field or at least one dependency field; checking whether a required field is included in a first step included in at least one step field; and checking whether the value of a type field included in the first step is one of a predefined type.

[0022] The means for solving the problem of the present disclosure are not limited to the means for solving the problem described above, and means for solving the problem not mentioned will be clearly understood by those skilled in the art to which the present disclosure belongs from the present specification and the attached drawings.

[0023] According to the embodiments, the safety of executable code can be ensured by verifying the schema and validity of pseudocode generated by a large language model and generating static code. This prevents unexpected behavior or security issues that may occur during the execution of executable code.

[0024] According to the embodiments, since only statically defined components are used in the code generation process, consistent output can be guaranteed for the same input. This can increase the predictability of the AI ​​agent's behavior and improve the reliability of the AI ​​agent's behavior.

[0025] According to the embodiments, various workflows can be implemented by utilizing the powerful text generation capabilities of a large language model, and accordingly, an AI agent capable of flexibly responding to user requirements can be implemented.

[0026] According to the embodiments, errors in the code generation process can be minimized through the process of verifying pseudocode errors and regenerating pseudocode. In addition, execution speed can be improved and resource usage optimized through static code generation.

[0027] According to the embodiments, since the functionality of the system can be extended by adding new step types or tools to the schema, a general-purpose AI agent applicable to various application fields can be produced.

[0028] The effects according to the present disclosure are not limited to the effects described above, and unmentioned effects will be clearly understood by those skilled in the art from the present specification and the accompanying drawings.

[0029] The accompanying drawings, included as part of the detailed description to aid in understanding the present specification, provide embodiments of the present specification and explain the technical features of the present specification together with the detailed description.

[0030] FIG. 1 is a conceptual diagram illustrating an AI agent generation system using a large language model according to one embodiment of the present disclosure.

[0031] FIG. 2 is a block diagram showing the configuration of a computing device for the operation of an AI agent according to one embodiment of the present disclosure.

[0032] FIG. 3 is an illustrative diagram for explaining the creation and operation process of an AI agent according to one embodiment of the present disclosure.

[0033] FIG. 4 is a flowchart illustrating a method for generating an AI agent using a large language model performed by a processor according to one embodiment of the present disclosure.

[0034] Specific structural or functional descriptions of embodiments according to the concept of the present disclosure disclosed herein are provided merely for the purpose of explaining embodiments according to the concept of the present disclosure, and embodiments according to the concept of the present disclosure may be implemented in various forms and are not limited to the embodiments described herein.

[0035] Embodiments according to the concept of the present disclosure may be subject to various modifications and may take various forms; therefore, embodiments are illustrated in the drawings and described in detail in this specification. However, this is not intended to limit the embodiments according to the concept of the present disclosure to specific disclosed forms, and includes modifications, equivalents, or substitutions that fall within the spirit and scope of the present disclosure.

[0036] Terms such as "first" or "second" may be used to describe various components, but said components shall not be limited by said terms. For the sole purpose of distinguishing one component from another, for example, without departing from the scope of rights according to the concept of the present disclosure, the first component may be named the second component, and similarly, the second component may be named the first component.

[0037] When it is stated that one component is "connected" or "connected" to another component, it should be understood that while it may be directly connected or connected to that other component, there may also be other components in between. Conversely, when it is stated that one component is "directly connected" or "directly connected" to another component, it should be understood that there are no other components in between. Expressions describing the relationships between components, such as "between," "exactly between," or "directly adjacent to," should be interpreted in the same way.

[0038] The terms used herein are used merely to describe specific embodiments and are not intended to limit the disclosure. Singular expressions include plural expressions unless the context clearly indicates otherwise. In this specification, terms such as “comprising” or “having” are intended to specify the existence of the described features, numbers, steps, actions, components, parts, or combinations thereof, and should be understood as not precluding the existence or addition of one or more other features, numbers, steps, actions, components, parts, or combinations thereof.

[0039] Unless otherwise defined, all terms used herein, including technical or scientific terms, have the same meaning as generally understood by those skilled in the art to which this disclosure pertains. Terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant technology, and should not be interpreted in an ideal or overly formal sense unless explicitly defined in this specification.

[0040] For clarity in the interpretation of this specification, the terms used in this specification are defined below.

[0041] As used herein, the term 'Large Language Model (LLM)' refers to a language model capable of performing Natural Language Processing (NLP) tasks. Specifically, a large language model may be a model capable of learning question data containing predefined keywords and outputting new question data that is similar to the question data. For example, the large language model of the present disclosure may take a user's query message or request message as input and output pseudocode. Furthermore, the large language model may be fine-tuned according to the type of the user's request message.

[0042] As used herein, the term "AI agent" refers to a software system that automates business tasks by calling external application programming interfaces (APIs) or services. Specifically, an AI agent may include a model, a tool, and / or memory. A model as a component of an AI agent may be a large language model that actually generates text or commands. A tool as a component of an AI agent may be a set of APIs or services that connect to the model and can perform various functions, such as database queries, document creation, and / or responding to customer inquiries. A memory as a component of an AI agent stores the history or state of the model's use of the tool, and / or the history or state of the model's generation of responses.

[0043] As used herein, the term "pseudo-code" refers to a form of code written in a human-readable manner to explain algorithms or logic, while not adhering to the syntax of an actual programming language. As used herein, the term "executable code" refers to a program composed of instructions that a computer can interpret or compile and actually execute. For example, code written in languages ​​such as Python, JavaScript, C++, and Java may be executable code.

[0044] As used in this specification, the term "processor" may mean hardware capable of performing functions and operations according to each name described in this specification, computer program code capable of performing specific functions and operations, or an electronic recording medium loaded with computer program code capable of performing specific functions and operations.

[0045] In other words, the term "processor" may mean hardware for carrying out the technical concept of the present disclosure, software for driving said hardware, a functional combination of said hardware and said software, and / or a structural combination of said hardware and said software.

[0046] Hereinafter, embodiments will be described in detail with reference to the attached drawings. However, the scope of the patent application is not limited or restricted by these embodiments. Identical reference numerals in each drawing indicate identical components.

[0047] FIG. 1 is a conceptual diagram illustrating an AI agent generation system using a large language model according to one embodiment of the present disclosure.

[0048] Referring to FIG. 1, an AI agent generation system (1000) using a large language model according to one embodiment of the present disclosure may include a user device (100) and / or a computing device (200) for operating an AI agent. For example, the AI ​​agent generation system (1000) may be a system that, in response to a user's request, uses a large language model to go beyond simple text generation and creates or develops an AI agent that automates business tasks by calling an external API or service.

[0049] A user device (100) is a device of a user who wishes to transmit a query message or a request message for a specific task to a large language model or an AI agent. The user device (100) may include a smartphone, a tablet PC (Personal Computer), a laptop, and a PC, etc. The user device (100) may install or run one or more of the Web, a Mobile Application, and a program provided by the computing device (200) for the operation of the AI ​​agent. For example, the user device (100) may access a web page and may output a user interface screen that can create a request message containing various components. In this specification, the request message may be referred to as a 'query message', 'request', 'query', or 'message'. In this specification, the request message may be one of the business processes. For example, the request message may be a database query, document creation, or a response to a customer inquiry. For example, the request may be text corresponding to content such as "Create a chatbot that answers a user's question based on a web search."

[0050] A computing device (200) for the operation of an AI agent may be a server of a service provider that provides an AI agent service that performs specific tasks using a large language model. The computing device (200) may include a general-purpose computer, a laptop, and a data server, etc. The computing device (200) for the operation of an AI agent may provide one or more of a web, a mobile application, and a program to a user device (100) so as to provide an AI agent service that includes a specific business process. Specific details of the computing device (200) for the operation of an AI agent will be described later in FIGS. 2 and 3.

[0051] Up to now, an AI agent generation system (1000) using a large language model according to one embodiment of the present disclosure has been described.

[0052] According to embodiments of the present disclosure, the safety of executable code can be ensured by verifying the schema and validity of pseudocode generated by a large language model and generating static code. This prevents unexpected behavior or security issues that may occur during the execution of executable code.

[0053] According to embodiments of the present disclosure, since only statically defined components are used in the code generation process, consistent output can be guaranteed for the same input. This can increase the predictability of the AI ​​agent's behavior and improve the reliability of the AI ​​agent's behavior.

[0054] According to embodiments of the present disclosure, various workflows can be implemented by utilizing the powerful text generation capabilities of a large language model, and thereby an AI agent capable of flexibly responding to user requirements can be implemented.

[0055] According to embodiments of the present disclosure, errors in the code generation process can be minimized through the process of verifying pseudocode errors and regenerating pseudocode. In addition, execution speed can be improved and resource usage optimized through static code generation.

[0056] According to the embodiments of the present disclosure, since the functionality of the system can be extended by adding new step types or tools to the schema, a general-purpose AI agent applicable to various application fields can be produced.

[0057] FIG. 2 is a block diagram showing the configuration of a computing device for the operation of an AI agent according to one embodiment of the present disclosure.

[0058] Referring to FIG. 2, the computing device (200) for the operation of the AI ​​agent may be a server that provides AI agent services in response to a request from a user or user device (100), or a computing device in which one or more of a web page, application, and program capable of performing a specific business process are installed and executed.

[0059] A computing device (200) for the operation of an AI agent may include a communication interface (110210), a memory (120220), an I / O (Input / Output) interface (130230) and / or a processor (140240), and each component may communicate with one or more communication buses or signal lines.

[0060] The communication interface (110210) can be connected to the user device (100) via a wired / wireless communication network to exchange data. For example, if the computing device (200) for the operation of the AI ​​agent is a server, the communication interface (110210) can receive a request message from the user device (100).

[0061] Meanwhile, a communication interface (110210) that enables the transmission and reception of such data may include a wired communication port (111211) and a wireless circuit (112212). Here, the wired communication port (111211) may include one or more wired interfaces, for example, Ethernet, Universal Serial Bus (USB), and IEEE1394 (e.g., Apple’s FireWire, Sony’s i.Link, Texas Instruments’ Lynx). Additionally, the wireless circuit (112212) may transmit and receive data with an external device via an RF (Radio Frequency) signal or an optical signal. Furthermore, wireless communication may use at least one of a plurality of communication standards, protocols, and technologies, such as GSM (Global System for Mobile Communications), EDGE (Enhanced Data rates for GSM Evolution), CDMA (Code-Division Multiple Access), TDMA (Time Division Multiple Access), Bluetooth, Wi-Fi, VoIP, Wi-MAX, and any other suitable communication protocol.

[0062] The memory (120220) can store various data used in the computing device (200) for the operation of the AI ​​agent. For example, the memory (120220) can store a large language model. As another example, the memory (120220) can store information necessary for learning a large language model and inferring results according to one embodiment of the present disclosure. Additionally, the memory (120220) can store the history or status of the large language model using tools and / or the history or status of the model generating answers.

[0063] In various embodiments, the memory (120220) may include a volatile or non-volatile recording medium capable of storing various data, commands and / or information. For example, the memory (120220) may include at least one type of storage medium among a flash memory type, a hard disk type, a multimedia card micro type, a card type memory (e.g., SD or XD memory, etc.), Random Access Memory (RAM), Static RAM (SRAM), Read-Only Memory (ROM), Programmable ROM (PROM), Electrically Erasable ROM (EEPROM), network storage, cloud, and blockchain database.

[0064] In various embodiments, the memory (120) may store at least one configuration of an operating system (121221), a communication module (122222), a user interface module (123223), and one or more applications (124224).

[0065] An operating system (121221) (e.g., embedded operating systems such as LINUX, UNIX, MAC OS, WINDOWS, VxWorks, etc.) may include various software components and drivers for controlling and managing general system operations (e.g., memory management, storage device control, power management, etc.) and may support communication between various hardware, firmware, and software components.

[0066] The communication module (123223) can support communication with another device through the communication interface (110210). The communication module (123223) may include various software components for processing data received by the wired communication port (111211) or wireless circuit (112212) of the communication interface (110210).

[0067] The user interface module (123223) can receive requests or input from a user, such as a keyboard, touch screen, keyboard, mouse, and / or microphone, through the I / O interface (130230) and provide a user interface on the display.

[0068] The application (124224) may include a program or module configured to be executed by one or more processors (140240). Here, the application providing an AI agent generation service for handling all processes required for training a large language model, generating pseudocode, generating executable code, and / or executing executable code may be implemented on a server farm.

[0069] The I / O interface (130230) can connect at least one of an input / output device (not shown) of a computing device (200) for the operation of an AI agent, such as a display, keyboard, touch screen, and microphone, to a user interface module (123223). The I / O interface (130230) can receive user input (e.g., voice input, keyboard input, touch input, etc.) together with the user interface module (123223) and process commands based on the received input.

[0070] The processor (140) is connected to a communication interface (110210), a memory (120220), and an I / O interface (130230) to control the overall operation of the computing device (200) for the operation of the AI ​​agent, and can execute various commands for the creation and operation of the AI ​​agent through an application and / or program stored in the memory (120220).

[0071] The processor (140240) may correspond to a computing device such as a CPU (Central Processing Unit) or an AP (Application Processor). Additionally, the processor (140240) may be implemented in the form of an Integrated Chip (IC), such as a System on Chip (SoC) that integrates various computing devices. Alternatively, the processor (140240) may include a module for computing artificial neural network models, such as a Neural Processing Unit (NPU).

[0072] FIG. 3 is an illustrative diagram for explaining the creation and operation process of an AI agent according to one embodiment of the present disclosure.

[0073] FIG. 3 illustrates a process in which, when a user transmits a request message (Request) through a user device (100) to a computing device (200) for the operation of an AI agent, the computing device (200) for the operation of an AI agent generates an AI agent and returns a response to the user's request to the user device (100). The computing device (200) for the operation of an AI agent shown in FIG. 3 is an example of the computing device for the operation of an AI agent shown in FIG. 1 and FIG. 2.

[0074] A computing device (200) for the operation of an AI agent may include a large language model (LLM) (202), a pseudocode verifier (204), a static code generator (206), a code executor (208), and / or an AI agent (210209). According to an embodiment, the AI ​​agent (210209) may include only the large language model (202), or it may further include the pseudocode verifier (204), the static code generator (206), and / or the code executor (208). At least some of the blocks illustrated in FIG. 3 may be implemented as hardware logic in some embodiments, or as software modules executed by at least one processor in some embodiments.

[0075] According to an embodiment, a user can input a request message, "Create a chatbot that answers the user's questions based on web search," using the user interface of a user device (100). The request message can be transmitted to a computing device (200) for the operation of an AI agent.

[0076] When a computing device (200) for the operation of an AI agent receives a request message from a user device (100), a large language model (202) can generate pseudocode.

[0077] An example of pseudocode generated by a large language model (202) is as follows.

[0078] steps:

[0079] - name: step_user_input

[0080] type: user_input

[0081] message: “What do you want to know?”

[0082] - name: step_web_search

[0083] type: tool_call

[0084] tool: web_search

[0085] params:

[0086] query: "{{user_input}}"

[0087] - name: step_generate_response

[0088] type: generate_text

[0089] prompt: "Using the results from {{step_web_search}}, provide an answer to: {{step_user_input}}"

[0090] dependencies:

[0091] - from: step_user_input

[0092] to: step_web_search

[0093] - from: step_web_search

[0094] to: step_generate_response

[0095] According to one example of pseudocode generated by a large language model (202), the pseudocode includes three Step Fields and two Dependency Fields. In this specification, a Step Field is a field included in the pseudocode that corresponds to a field that is necessary to generate a response to a user's request. A Dependency Field is a field included in the pseudocode that indicates a dependency between Step Fields.

[0096] According to one embodiment, the pseudocode may include three step fields, namely, a step field corresponding to a step where a user inputs a message, a step field corresponding to a step where a web search is performed, and a step field corresponding to a step where a response is generated based on web search results. Each step field may include various fields necessary to define each step, such as a name field, a type field, a tool field, and a message field, and various fields necessary to perform the operation of each step.

[0097] According to one embodiment, the dependency field may include two from-to fields. Specifically, the dependency field may include a from-to field indicating that a step of performing a web search is performed after a step of a user entering a message, and a from-to field indicating that a step of generating a response based on web search results is performed after a step of performing a web search.

[0098] The large language model (202) can transmit the generated pseudocode to the pseudocode verifier (204). The pseudocode verifier (204) can verify the schema and / or validity of the pseudocode received from the large language model (202).

[0099] According to an embodiment, the pseudocode verifier (204) can verify the schema of the pseudocode received from the large language model (202). For example, the pseudocode verifier (204) can check for the existence of each step field and dependency field. The pseudocode verifier (204) can check whether the required fields (e.g., name field, type field) that must be included in each step field are included. The pseudocode verifier (204) can check whether the type of the step field is one of the predefined types (e.g., too_call, user_input, generate_text, calculator, calendar_booking).

[0100] According to an embodiment, the pseudocode verifier (204) can verify the validity of pseudocode received from the large language model (202). For example, the pseudocode verifier (204) can check whether the tool used in the step is included in the list of allowed tools. The pseudocode verifier (204) can check whether the type and value of the parameter included in the step field are appropriate.

[0101] Specifically, the pseudo-code validator (204) can verify the validity of the from-to field of the dependency field. For example, the pseudo-code validator (204) can check whether there are no cycles in the dependency graph of the dependency field. For example, if there is a from-to field indicating that a step of web searching is performed after a step of a user entering a message, and a from-to field indicating that a step of a user entering a message is performed after a step of web searching, this means that there are cycles in the dependency graph. In such cases, if cycles exist in the dependency graph, it becomes impossible to obtain an execution result by continuously repeating the cycle.

[0102] If the pseudocode verifier (204) detects an error during the verification process, it may request pseudocode regeneration by feeding back an error message regarding the error to the large language model (202). The pseudocode regeneration request may be performed multiple times. For example, the pseudocode regeneration request of the pseudocode verifier (204) may be performed up to three times. The maximum number of times the pseudocode regeneration request can be performed may be implemented to be changeable.

[0103] The verification process in the aforementioned pseudocode is easier and simpler than the verification process in the generated executable code.

[0104] The pseudocode verifier (204) can pass the verified pseudocode to the static code generator (206).

[0105] The static code generator (206) can generate executable code based on verified pseudocode received from the pseudocode verifier (204). The executable code may be static code. In this case, the step(s) included in each step field of the pseudocode may be mapped to the form of a predefined object. For example, the step(s) included in each step field of the pseudocode may be mapped to a predefined class or function.

[0106] The static code generator (206) can define a base step class in step 1. The static code generator (206) can implement a step type class in step 2. The static code generator (206) can set dependencies and execute a workflow in step 3.

[0107] The code(s) generated in steps 1 through 3 may be static code that is statically generated in a predefined form through the parameter(s) within the verified pseudocode received from the pseudocode verifier (204). In other words, since the executable code generated by the static code generator (206) is generated to have a pre-verified form, the possibility of unexpected behavior or security issues occurring during execution can be minimized. Additionally, the quality of the executable code can be guaranteed by limiting the code generation workflow by the computing device (200) for the operation of the AI ​​agent to pseudocode.

[0108] The static code generator (206) can pass the generated executable code to the code executor (208).

[0109] The code executor (208) can perform actions according to user requests by actually executing the executable code received from the static code generator (206).

[0110] The code executor (208) can enhance the security of the system by executing code in a sandbox or virtual environment. Additionally, the code executor (208) can ensure stable operation by handling exceptions or errors that may occur during execution. The result of the code execution by the code executor (208) can be delivered to the user or utilized for the next task.

[0111] The code executor (208) can transmit the result of executing the code to the AI ​​agent (210209).

[0112] The AI ​​agent (210209) can return the execution result received from the code executer (208) to the user device (100) as a response to a user request. Returning as a response to a user request can be performed by a chatbot that answers the user's question.

[0113] FIG. 4 is a flowchart illustrating a method for generating an AI agent using a large language model performed by a processor according to one embodiment of the present disclosure.

[0114] A method for generating an AI agent using a large language model according to one embodiment of the present disclosure can be performed by a processor.

[0115] According to the method for generating an AI agent using a large language model, the processor can receive a request message from a user device (100) (S400). At this time, the request message may be one of the business processes. For example, the request message may be a database query, document creation, chatbot creation, or a response to a customer inquiry.

[0116] According to the method for generating an AI agent using a large language model, the processor can generate pseudocode having a predefined schema and a predetermined data form using a large language model in response to a received request message (S402).

[0117] The predetermined data format may be in the form of YAML (YAML Ain't Markup Language). However, this is merely one embodiment, and the predetermined data format does not limit the scope of the rights of the present disclosure.

[0118] According to the method for generating AI agents using a large language model, the processor can verify the schema of the generated pseudocode (S404).

[0119] The step of verifying the schema of the generated pseudocode (S404) may include a step of checking whether the pseudocode contains at least one step field or at least one dependency field. Furthermore, the step of verifying the schema of the generated pseudocode (S404) may include a step of checking whether a required field is included in the first step included in the at least one step field. Here, the first step may be, for example, a step where a user inputs a message. A required field may refer to a field that must be included in at least one step field. The required field may include a name field and a type field, etc.

[0120] The step of verifying the schema of the generated pseudocode (S404) may include a step of checking whether the value of the type field included in the first step is one of the predefined types.

[0121] According to the method for generating AI agents using a large language model, the validity of the generated pseudocode can be verified (S406).

[0122] The step of validating the validity of the generated pseudocode (S406) may include a step of checking whether the value of the tool field included in the first step is one of the predefined tools.

[0123] The step of validating the validity of the generated pseudocode (S406) may include checking whether there is a cycle between at least one dependency field and at least one step field.

[0124] According to the method for generating an AI agent using a large language model, the processor can regenerate pseudocode if the verification of the schema or the validation of the validity fails. The step of regenerating pseudocode can be repeated up to N (where N is a positive integer) times if the verification of the schema or the validation of the validity fails.

[0125] According to the method for generating AI agents using a large language model, the processor can generate executable code based on verified pseudocode (S408).

[0126] The step of generating executable code based on verified pseudocode (S408) may include the step of mapping at least one step included in the pseudocode into the form of a predefined object. Here, the executable code may be static code.

[0127] According to the method for generating an AI agent using a large language model, the processor can execute executable code (S410).

[0128] According to the method for generating an AI agent using a large language model, the processor can transmit the result of executing executable code to the user device (100).

[0129] A computing device (200) for operating an AI agent according to one embodiment of the present disclosure may include at least one processor comprising a memory, a transceiver configured to receive a request message from a user device (100), and / or a large language model. The processor may be configured to respond to a request message received from a user device (100) to generate pseudocode having a predefined schema and a predetermined data form using the large language model, verify the schema of the generated pseudocode, verify the validity of the generated pseudocode, generate executable code based on the verified pseudocode, and execute the executable code.

[0130] A computing device (200) for operating an AI agent according to one embodiment of the present disclosure may include a computer program stored in a computer-readable recording medium to perform steps S400 to S410 of FIG. 4 described above, combined with a computer (or computing device) which is hardware.

[0131] A computing device (200) for operating an AI agent according to one embodiment of the present disclosure may be implemented as a computing device comprising at least one processor that executes instructions of programs loaded in memory. A program including instructions described to execute steps S400 to S410 of FIG. 4 described above may be loaded in the memory of the computing device (200).

[0132] The device described above may be implemented as a hardware component, a software component, and / or a combination of a hardware component and a software component. For example, the device and components described in the embodiments may be implemented using one or more general-purpose or special-purpose computers, such as, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA), a programmable logic unit (PLU), a microprocessor, or any other device capable of executing and responding to instructions. The processing unit may execute an operating system (OS) and one or more software applications executed on said operating system. Additionally, the processing unit may access, store, manipulate, process, and generate data in response to the execution of the software. For ease of understanding, the processing unit may be described as being used as a single unit, but those skilled in the art will understand that the processing unit may include multiple processing elements and / or multiple types of processing elements. For example, the processing unit may include multiple processors or one processor and one controller. Additionally, other processing configurations, such as parallel processors, are also possible.

[0133] Software may include computer programs, code, instructions, or a combination of one or more of these, and may configure a processing unit to operate as desired or command the processing unit independently or collectively. Software and / or data may be permanently or temporarily embodied in any type of machine, component, physical device, virtual equipment, computer storage medium or device, or transmitted signal wave so as to be interpreted by the processing unit or to provide instructions or data to the processing unit. Software may be distributed over networked computer systems and may be stored or executed in a distributed manner. Software and data may be stored on one or more computer-readable recording media.

[0134] The method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded on a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, etc., either alone or in combination. The program instructions recorded on the medium may be those specifically designed and configured for the embodiment, or may be those known and available to those skilled in the art of computer software. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes; optical recording media such as CD-ROMs and DVDs; magneto-optical media such as floptical disks; and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, and flash memory. Examples of program instructions include machine code, such as that generated by a compiler, as well as high-level language code that can be executed by a computer using an interpreter, etc. The hardware device may be configured to operate as one or more software modules to perform the operation of the embodiment, and vice versa.

[0135] Although the embodiments have been described above with reference to limited examples and drawings, those skilled in the art can make various modifications and variations from the description above. For example, suitable results can be achieved even if the described techniques are performed in a different order than described, and / or the components of the described system, structure, device, circuit, etc. are combined or assembled in a form different from described, or replaced or substituted by other components or equivalents.

[0136] Therefore, other implementations, other embodiments, and equivalents to the claims also fall within the scope of the claims set forth below.

[0137] The method for generating an AI agent using a large language model as described above and the computing device for performing the same can be applied to service fields using large language models.

Claims

1. A method for generating an AI agent using a large language model, performed by a processor, A step of receiving a request message from a user device; A step of generating pseudocode having a predefined schema and a predetermined data form using the large language model in response to the received request message; A step of verifying the schema of the generated pseudocode; A step of verifying the validity of the generated pseudocode; A step of generating executable code based on the verified pseudocode above; and The step of executing the above executable code; including, The step of verifying the schema of the generated pseudocode is, A step of checking whether the above pseudocode includes at least one step field or at least one dependency field; A step of checking whether a required field is included in a first step included in at least one of the above-mentioned step fields; and A step of checking whether the value of a type field included in the first step is one of the predefined types; comprising How to create an AI agent.

2. In Paragraph 1, The above-determined data format is in the form of YAML (YAML Not Markup Language), How to create an AI agent.

3. In Paragraph 1, The step of verifying the validity of the generated pseudocode is, A step of checking whether the value of the tool field included in the first step above is one of the predefined tools; and A step of determining whether there exists a cycle between at least one of the dependency fields and at least one of the step fields; comprising How to create an AI agent.

4. In Paragraph 1, The method further includes the step of regenerating the pseudocode if the verification of the schema or the validation of the validity fails; The step of regenerating the above pseudocode is repeated up to N (where N is a positive integer) times if the verification of the schema or the verification of the validity fails, How to create an AI agent.

5. In Paragraph 1, The step of generating executable code based on the verified pseudocode above is: The method includes the step of mapping at least one step included in the above pseudocode into the form of a predefined object; The above executable code is static code, How to create an AI agent.

6. In Paragraph 1, additionally comprising the step of transmitting the result of executing the above executable code to the user device; How to create an AI agent.

7. As a computing device for the operation of an AI agent, Memory; A transceiver configured to receive a request message from a user device; and at least one processor including a Large Language Model (LLM); and The above processor is, In response to the received request message, pseudocode having a predefined schema and a predetermined data form is generated using the large language model, and Verify the schema of the generated pseudocode, and verify the validity of the generated pseudocode. Generate executable code based on the verified pseudocode above, and Configured to execute the above executable code, and The above processor is, In verifying the schema of the pseudocode generated above, Check whether the above pseudocode includes at least one step field or at least one dependency field, and Checking whether a required field is included in the first step included in at least one of the above-mentioned step fields, and A type field value included in the first step is additionally configured to check whether it is one of the predefined types. Computing device.

8. Combined with a computer which is hardware, and stored on a computer-readable recording medium to perform the method of generating an AI agent using the large language model of claim 1, Computer program.

9. A non-transient computer-readable recording medium on which a computer program executed by a computing device is recorded, The above computer program is, Receiving a request message from a user device; In response to the received request message, generating pseudocode having a predefined schema and a predetermined data form using the large language model; Verifying the schema of the generated pseudocode; Verifying the validity of the generated pseudocode; Generating executable code based on the verified pseudocode above; and Executing the above executable code; including, Verifying the schema of the pseudocode generated above is, Checking whether the above pseudocode includes at least one step field or at least one dependency field; Checking whether a required field is included in a first step included in at least one of the above-mentioned step fields; and Checking whether the value of the type field included in the first step is one of the predefined types; comprising Computer-readable non-temporary recording medium.

Citation Information

Patent Citations

  • Business domain model establishing system and method

    CN110968294A

  • Programming method, device and equipment based on AIGC and storage medium

    CN117992033A

  • Silk screen printing apparatus

    KR1020260009417A

  • Method for Automatically Executing API by LLM-based Agent System

    KR102707512B1

  • Automated code generation based on pseudo-code

    US20230041718A1