Method for arranging large model application based on structured configuration file
Through the event-driven mode based on structured configuration files, the design restriction of the DAG architecture during the loop iteration process is solved, the large-scale application orchestration process is simplified, and the development efficiency and system stability are improved.
Patent Information
- Application Number
- CN202411220922.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2024-12-13
AI Technical Summary
Traditional DAG architectures are difficult to support loop iteration processes, resulting in limited design of large-scale application orchestration and Agent orchestration process, unclear execution logic of components and modules, increasing difficulty in troubleshooting and maintenance, poor development experience, and enhanced system complexity and dependency. .
Using a structured configuration file-based method, the event-driven mode is introduced, and by parsing configuration files, building abstract syntax trees and designing flexible execution engines, the orchestration process of large-scale model applications or agents is optimized, the interactive logic between components is simplified, and the system complexity is reduced. and dependencies.
It significantly improves the development efficiency, scalability and operation stability of large-scale language model applications, simplifies the definition and execution of complex logic, reduces the difficulty of troubleshooting, and improves system transparency and maintainability.
Smart Images

Figure CN119127275A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of artificial intelligence development platforms, and in particular to a method for arranging large model applications based on structured configuration files. Background Art
[0002] The current problem is that loop logic processing is missing: the traditional DAG architecture cannot directly support loop iteration processes, such as the core requirements of the ReAct process, which limits the design of large model application orchestration or Agent orchestration processes and cannot fully express complex business logic;
[0003] Difficulty in debugging and understanding: Under the existing methods, the execution logic of components and modules is not clear enough, and the Pipeline executor needs to handle many edge situations, which makes the Pipeline structure complex and difficult to read, greatly increasing the difficulty of debugging and maintenance;
[0004] Poor development experience: In a pipeline containing a loop, core logic (such as conditional judgment and loop) is excessively dispersed to the edges of the graph, which increases the difficulty of definition. At the same time, the logic for handling optional values and default values also becomes extremely complex. In addition, developers of large model application orchestration or agent orchestration are forced to use unintuitive methods to define communication between nodes, reducing development efficiency;
[0005] Increased system complexity and dependencies: As the complexity of the Pipeline increases, the difficulty of implementing the Pipeline executor increases dramatically, and more edge cases need to be dealt with. The overall complexity of the system and the dependencies between components also increase accordingly. Summary of the invention
[0006] The purpose of the present invention is to address the deficiencies of the above-mentioned prior art and provide a method for orchestrating large model applications based on structured configuration files, introduce an event-driven model, and completely change the scheduling method of graph processes, shifting the focus from the edges of the graph to how components subscribe to and process events. This not only simplifies the interaction logic between components, but also greatly reduces the complexity and dependencies of the system.
[0007] To achieve the above object, the present invention adopts the following technical solutions:
[0008] A method for orchestrating a large model application based on a structured configuration file comprises the following steps:
[0009] S1. Parse the structured configuration file and verify its legitimacy;
[0010] S2, convert the parsed legal content into an abstract syntax tree;
[0011] S3, the execution engine executes the process according to the abstract syntax tree and observes the process;
[0012] S4. Get the operation result and return it to the user;
[0013] S5. Based on the feedback, orchestrate and optimize large model applications or agents.
[0014] Further, the S1 is specifically:
[0015] S101. Design an efficient and robust configuration file parsing module;
[0016] S102, the parsing process begins with reading the configuration file content, and then using a special library to perform syntax parsing;
[0017] S103. Implement custom rule verification to ensure the legitimacy and integrity of the data structure.
[0018] Furthermore, S2 is specifically as follows: dynamically constructing an abstract syntax tree AST according to the content of the configuration file, each node represents an operation or conditional judgment, and the connection relationship between the nodes reflects the execution order and dependency relationship of the operation or condition.
[0019] Further, the S3 is specifically:
[0020] S301, design a flexible execution engine to be responsible for executing corresponding operations according to the process defined by the abstract syntax tree AST and the specific parameters of each run;
[0021] S302, parse the abstract syntax tree AST to determine the execution order of operations and the logic of conditional judgment;
[0022] S303. Dynamically determine which operations need to be executed and which conditions are judged to be true or false based on the currently running parameter values.
[0023] Further, the S4 is specifically:
[0024] S401, when the execution engine completes all defined operations, it will collect and organize the operation results;
[0025] S402: The execution engine will encapsulate the result into a format that is easy to understand and use, and return it to the user through an appropriate communication protocol. Before returning the result, the execution engine will also perform necessary verification and cleanup to ensure that the returned data is complete, accurate and secure.
[0026] Further, the S5 is specifically:
[0027] S501, involving a closed-loop feedback and modulation mechanism;
[0028] S502. After receiving the operation results, evaluate the results according to actual needs and give corresponding feedback;
[0029] S503. After receiving the feedback, conduct detailed evaluation and analysis to determine the root cause and solution of the problem, and adjust and optimize the arrangement of the configuration file based on the evaluation results.
[0030] The beneficial effects of the present invention are: on the premise of ensuring support for large model application orchestration and Agent orchestration, aiming at the limitations of the standard directed acyclic graph (DAG) in the current Agent process design in processing complex logic, especially cyclic logic, the purpose is to reshape the process execution mode, optimize the definition, execution and management of the Agent process, thereby significantly improving the development efficiency, scalability and operation stability of LLM (large language model)-based applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 A flowchart of a method for orchestrating large model applications based on a structured configuration file. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0033] like Figure 1 As shown, a method for orchestrating a large model application based on a structured configuration file includes the following steps:
[0034] S1. Parse the structured configuration file and verify its legitimacy;
[0035] S2, convert the parsed legal content into an abstract syntax tree;
[0036] S3, the execution engine executes the process according to the abstract syntax tree and observes the process;
[0037] S4. Get the operation result and return it to the user;
[0038] S5. Based on the feedback, orchestrate and optimize large model applications or agents.
[0039] The S1 is specifically:
[0040] S101. Design an efficient and robust configuration file parsing module;
[0041] S102, the parsing process begins with reading the configuration file content, and then using a special library to perform syntax parsing;
[0042] S103. Implement custom rule verification to ensure the legitimacy and integrity of the data structure.
[0043] In a specific implementation, the configuration file parsing module can support multiple common structured configuration file formats, such as JSON and YAML, to accommodate different user preferences and project requirements;
[0044] During the parsing process, the module performs strict syntax checking and structure validation to ensure that each element in the configuration file meets the expected format and type requirements;
[0045] This custom rule verification, for example, checks whether the key field exists, whether the field type is correct, and whether the field value is within a reasonable range;
[0046] If any illegality or inconsistency is found, the system will immediately return detailed error information, allowing users to quickly locate and correct the problem.
[0047] Specifically, S2 is as follows: dynamically constructing an abstract syntax tree AST according to the content of the configuration file, each node represents an operation or conditional judgment, and the connection relationship between the nodes reflects the execution order and dependency relationship of the operations or conditions.
[0048] The abstract syntax tree AST represents the grammatical structure of the source code, but does not contain the specific grammatical details (such as brackets, semicolons, etc.) in the source code.
[0049] By constructing an abstract syntax tree (AST), the running process of large model applications can be controlled in a clear and predictable way, providing a solid foundation for subsequent automated execution and exception handling.
[0050] The S3 is specifically:
[0051] S301, design a flexible execution engine to be responsible for executing corresponding operations according to the process defined by the abstract syntax tree AST and the specific parameters of each run;
[0052] S302, parse the abstract syntax tree AST to determine the execution order of operations and the logic of conditional judgment;
[0053] S303. Dynamically determine which operations need to be executed and which conditions are judged to be true or false based on the currently running parameter values.
[0054] During the execution process, the execution engine will closely monitor each step of the process, and observe and determine whether any abnormal situation occurs in real time through the built-in anomaly detection mechanism; once an anomaly is detected, the execution engine will immediately record the exception information and perform corresponding processing according to the preset strategy (such as retry, skip, termination, etc.) to ensure the stability and reliability of the entire process.
[0055] The S4 is specifically:
[0056] S401. When the execution engine completes all defined operations, it will collect and organize the operation results; the results may include output data, execution status code, log information, etc.
[0057] S402. The execution engine will encapsulate the results into a format that is easy to understand and use, such as JSON or XML, and return them to the user through an appropriate communication protocol (such as HTTP, WebSocket, etc.). Before returning the results, the execution engine will also perform necessary verification and cleanup to ensure that the returned data is complete, accurate and secure.
[0058] In this way, users can obtain the required information and make further decisions or operations based on this information. In addition, in order to enhance the transparency and traceability of the system, the return results can also include log information of the execution process or a detailed execution report for auditing and analysis by the caller or system administrator.
[0059] The S5 is specifically:
[0060] S501, involving a closed-loop feedback and modulation mechanism;
[0061] S502. After receiving the operation results, evaluate the results according to actual needs and give corresponding feedback;
[0062] This feedback may include performance issues, functional defects, suggestions for improving user experience, etc.
[0063] S503. After receiving the feedback, a detailed evaluation and analysis is performed to determine the root cause and solution of the problem, and the arrangement of the configuration file is adjusted and optimized according to the evaluation results.
[0064] The adjustment may include modifying operating parameters, optimizing process structure, and introducing new functional components. Through continuous iteration and optimization, the effect and stability of large model applications or agents can be gradually improved to meet the expectations and needs of users.
[0065] Logical cohesion: Encapsulate the processing logic originally scattered on the edges of the graph into the components, making the component behavior more autonomous and reducing the complexity of edge cases.
[0066] Flexibility and scalability: Supports the implementation of complex logic such as retry, failure handling, timeout control, loop execution, and human-in-loop without modifying the underlying graph structure.
[0067] Simplified executor design: The Pipeline executor is only responsible for message distribution, context maintenance, and waking up corresponding components based on subscription conditions, which greatly simplifies the execution logic.
[0068] Efficient data preparation: Integrate data collection and preprocessing tools, automate data cleaning and annotation processes, and reduce the coding burden.
[0069] Intuitive Prompt Engineering: Provides a real-time optimized prompt editing and debugging environment to improve the efficiency and effectiveness of prompt design.
[0070] Intelligent embedding and context management: Automatically handle long context embedding to enhance application scalability and responsiveness.
[0071] Comprehensive monitoring and maintenance: Real-time monitoring of application performance, rapid response to issues, ensuring stable operation, and providing detailed logging.
[0072] Continuous optimization mechanism: supports fine-tuning of data preparation and online feedback collection to promote continuous improvement of model effects.
[0073] In addition, the LLMops platform also has the function of AI plug-in development and integration, providing developers with powerful tools to easily create and deploy LLM-based plug-ins, further accelerating application development and value realization.
[0074] The above-mentioned embodiments only express the implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention should be based on the attached claims.
Claims
1. A method for arranging large model applications based on a structured configuration file, characterized in that: The following steps are involved: S1. Parse the structured configuration file and verify its legitimacy; S2, convert the parsed legal content into an abstract syntax tree; S3, the execution engine executes the process according to the abstract syntax tree and observes the process; S4. Get the operation result and return it to the user; S5. Based on the feedback, orchestrate and optimize large model applications or agents.
2. A method for arranging large model applications based on structured configuration files according to claim 1, characterized in that: The S1 is specifically: S101. Design an efficient and robust configuration file parsing module; S102, the parsing process begins with reading the configuration file content, and then using a special library to perform syntax parsing; S103. Implement custom rule verification to ensure the legitimacy and integrity of the data structure.
3. The method for arranging large model applications based on structured configuration files according to claim 2, characterized in that: Specifically, S2 is as follows: dynamically constructing an abstract syntax tree AST according to the content of the configuration file, each node represents an operation or conditional judgment, and the connection relationship between the nodes reflects the execution order and dependency relationship of the operations or conditions.
4. The method for arranging large model applications based on structured configuration files according to claim 3, characterized in that: The S3 is specifically: S301, design a flexible execution engine to be responsible for executing corresponding operations according to the process defined by the abstract syntax tree AST and the specific parameters of each run; S302, parse the abstract syntax tree AST to determine the execution order of operations and the logic of conditional judgment; S303. Dynamically determine which operations need to be executed and which conditions are judged to be true or false based on the currently running parameter values.
5. The method for arranging large model applications based on structured configuration files according to claim 4, characterized in that: The S4 is specifically: S401, when the execution engine completes all defined operations, it will collect and organize the operation results; S402: The execution engine will encapsulate the result into a format that is easy to understand and use, and return it to the user through an appropriate communication protocol. Before returning the result, the execution engine will also perform necessary verification and cleanup to ensure that the returned data is complete, accurate and secure.
6. The method for arranging large model applications based on structured configuration files according to claim 5, characterized in that: The S5 is specifically: S501, involving a closed-loop feedback and modulation mechanism; S502. After receiving the operation results, evaluate the results according to actual needs and give corresponding feedback; S503. After receiving the feedback, a detailed evaluation and analysis is performed to determine the root cause and solution of the problem, and the arrangement of the configuration file is adjusted and optimized according to the evaluation results.
Citation Information
Cited By
Communication system of embedded intelligent lock based on Internet of Things
CN119629617A
