Large model agent plan multiplexing system, method and equipment based on core task intention analysis
By using a large-model intelligent agent plan reuse system based on core task intent parsing, the problems of high resource consumption and low matching accuracy in intelligent agent technology are solved, achieving efficient and accurate task execution and dynamic adaptation, and reducing the frequency and latency of LLM calls.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TIANJIN UNIV
- Filing Date
- 2026-01-27
- Publication Date
- 2026-05-08
AI Technical Summary
Existing agent technologies suffer from high cloud-side inference costs and resource consumption when facing complex tasks. In particular, frequent LLM calls during the planning phase lead to high economic costs and increased latency. Existing caching optimization schemes are difficult to adapt to agent requirements, resulting in low matching accuracy and poor real-time adaptability.
A large-scale intelligent agent plan reuse system based on core task intent parsing is adopted. The system extracts core task intent keywords through SLM and combines small language planning model and large language planning model to achieve accurate matching of cache hits or misses and plan generation. Combined with real-time data verification and dynamic adaptation, a full-process architecture of "intent extraction-cache retrieval-plan reuse/generation-template refinement" is constructed.
Significantly improves cache matching accuracy, reduces LLM call frequency, optimizes resource consumption, enhances dynamic scenario adaptability, ensures the accuracy and stability of task execution, and reduces latency and cost.
Smart Images

Figure CN121998092A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to intelligent agent technology, and in particular to a large-scale intelligent agent plan reuse system, method and device based on core task intent parsing. Background Technology
[0002] Currently, with the rapid development of artificial intelligence technology, generative large language models (LLMs) have attracted much attention due to their outstanding capabilities in complex natural language processing tasks. LLM-based intelligent agent technology has demonstrated remarkable application potential in many fields such as personal assistance, intelligent interaction, and data processing. However, although LLMs possess excellent natural language understanding and logical reasoning capabilities based on massive pre-trained knowledge reserves, their knowledge remains fixed after the pre-training phase, making it difficult to capture real-time dynamic data in rapidly iterating scenarios, thus limiting the full potential of their reasoning performance. Therefore, current mainstream intelligent agent architectures generally equip LLMs with tool-calling capabilities to expand the model's perception and interaction boundaries and compensate for the shortcomings of static knowledge systems.
[0003] The current intelligent agent's workflow can be broken down into four core iterative steps, each step forming a closed loop: The first step is the initialization phase, where the agent receives the task objective prompt input by the user and passes it into the LLM as the initial context, triggering the first inference process; the second step is the planning phase, where the LLM performs logical inference based on the current context (including the task objective, historical interaction records, etc.), clarifies the sub-objectives of the current task, the types of actions to be performed, and generates structured action instructions; the third step is the execution phase, where the agent implements the action instructions output by the LLM, and if tool interaction is involved (such as calling the plan template database, etc.), completes data interaction with the corresponding tool entity; the fourth step is the observation and context update phase, where the agent collects feedback results after action execution (such as data returned by tools, changes in environmental state, etc.), first integrates the observation information with the current inference and action content and updates it to the context, then judges the task progress based on the observation results. If the task objective has been completed, the loop terminates and the result is fed back to the user; otherwise, the next round of the "plan-execution-observation" phase loop is triggered.
[0004] While this workflow demonstrates excellent problem-solving capabilities in complex task scenarios, its execution complexity and frequent interactions with external tools and local environments result in substantial cloud-side inference costs. Specifically, the cost pressure is primarily concentrated in the planning phase: to ensure inference accuracy, test-time compute techniques, such as chain-of-thought reasoning, are commonly used during planning. These techniques require multiple complete LLM calls to complete the inference. These high-frequency, expensive LLM calls not only directly generate huge economic costs but also indirectly exacerbate service latency due to continuous data transmission between the edge and cloud (interaction data, inference instructions) and the consumption of cloud computing power.
[0005] To reduce computational power consumption and costs, cache optimization is a key technical approach to reduce the overhead of high-frequency LLM calls. Based on the differences between cached objects and optimization logic, existing cache optimization efforts are divided into two implementation methods: intermediate state reuse and final response reuse.
[0006] Schemes based on intermediate state reuse, such as SGLang, RAGCache, and PromptCache, rely on caching key-value pairs (KV pairs) generated during the LLM inference prefill phase. They utilize prefix matching to enable cross-request reuse, thus avoiding redundant KV pair computations and reducing computational overhead and memory usage during inference. However, this caching mechanism struggles to fully meet the actual needs of agents: First, prefix matching requires strict consistency between the prefix text of queries before and after. In agent applications, prompts often embed real-time data returned by external tools, leading to text discrepancies and directly limiting KV pair reuse. Second, this approach exhibits strong model dependency; the same text prompt can generate KV cache data adapted to specific model structures in different LLMs, hindering cross-model compatibility.
[0007] Schemes based on final response reuse, such as GPTCache and GenCache, rely on building a semantic cache pool of query-response pairs. This is achieved by converting prompts into vector embeddings and calculating the semantic similarity (commonly measured by cosine distance) between new prompts and historical cache keys. When the similarity exceeds a preset threshold, a match is considered, and the corresponding historical response is returned. However, these schemes still face three major drawbacks: First, when prompts have key semantic differences but similar overall expressions, semantic similarity calculations are prone to misjudging matches, leading to incorrect responses. Second, the output of the LLM agent highly depends on real-time dynamic data returned by external tools; the inference result is not solely determined by the user's query semantics. Even if a new query and a historical query are semantically identical, reusing historical cache responses can still invalidate the result if real-time data is updated. Third, when prompts have different expressions but consistent core semantics, the semantic cache struggles to accurately identify the correlation between the two, leading to matching failures and repeated LLM calls. Summary of the Invention
[0008] This invention provides a large-scale intelligent agent plan reuse system, method, and device based on core task intent parsing to solve the technical problems existing in the prior art.
[0009] The technical solution adopted by this invention to solve the technical problems existing in the prior art is as follows: A large-scale intelligent agent plan reuse system based on core task intent parsing, the system includes a core task intent parsing module, a matching and triggering module, an execution plan formulation module, an action executor, an asynchronous plan collection module, a plan template construction module, and a plan template database; The core task intent parsing module is used to convert user prompts into standardized and unique core task intent keywords. It uses SLM as the execution carrier and extracts core task intent keywords by combining SLM with preset system prompts. These core task intent keywords are used to retrieve stored plan cache containing information on keyword and plan template pairing, triggering two scenarios: cache hit or cache miss. The matching and triggering module is used to retrieve the stored keyword and plan template matching information using the core task intent keywords, and trigger the workflow of the corresponding cache hit or miss scenarios. The execution plan formulation module is used to generate a complete context based on cache hit or cache miss scenarios by integrating relevant system prompts, tool call information, and user input prompts. In the cache hit scenario, the context is input into the small language planning model, which renders the plan template and supplements the parameters to form a personalized plan that can be executed directly. In the cache miss scenario, the context is input into the large language planning model, which infers and generates a new execution plan based on the context. The action executor is used to parse the plan and execute it step by step to generate the end user's response; during the execution process, the results returned by the tools at each step update the context in real time, and the updated context is fed back to the large language model for further iterative optimization of the plan; The asynchronous collection module is used to filter and structure effective iteration plan data without interfering with the normal inference process of LLM through a low-intrusive data capture method. It continuously captures the iteration plan output of each round of the large language model, associates all plans corresponding to the same user prompt word and stores them in the plan template database, and synchronously records the associated prompt words and core task intent keywords to provide basic data support for the generation of subsequent plan templates. The plan template construction module is used to extract common core logic from the plans cached in the plan template database to generate standardized plan templates, and finally store them in the plan template database in the form of key-value pairs between the core task intent and the plan template.
[0010] Furthermore, the plan template construction module includes a template verification module and a template dynamic update mechanism module. The template verification module includes a template format verification module and a dual verification module for rendering validity and result consistency. The template format verification module is used to verify the structural integrity, grammatical correctness, and clarity of placeholder definitions of the plan template, ensuring that the template conforms to the preset format standards; The dual verification module for rendering validity and result consistency is used to render the plan template sequentially by SLM according to all user input prompts corresponding to the core task intent keywords. It verifies whether the rendered template can be parsed normally and output an executable structured execution plan. The module compares the user answers generated by the plan template after executing SLM rendering with the user answers generated by the plan inference output in the execution cache. Only when the similarity between the two reaches a preset threshold and the rendered plan template can be executed will the template be officially stored in the plan template database. The template dynamic update mechanism module is used to automatically start the template iteration process when the number of newly added valid plans corresponding to the same core task intent triggers the preset threshold again, and upgrades and iterates the existing template by integrating the optimization logic of the newly added plans.
[0011] Furthermore, the matching and triggering module includes a classification and aggregation module. The classification and aggregation module will classify and aggregate multiple rounds of valid plans according to their core task intent, providing a standardized data set for the subsequent plan template construction module. When the cumulative number of valid plans associated with the same core task intent keyword reaches a preset threshold, the matching and triggering module will trigger the template generation process.
[0012] Furthermore, the plan template construction module extracts general reasoning logic and tool call framework from the valid iterative plan data collected by the plan asynchronous collection module, replaces dynamically changing content with standardized placeholders, and ensures that the template adapts to different expression scenarios of the same type of task through parameter filling.
[0013] Furthermore, the asynchronous collection module for planning incorporates an LLM-based semantic classifier and a right-or-wrong filtering module. This semantic classifier takes the reflective reasoning process generated by the LLM based on the tool's returned results as input. Through semantic feature extraction and intent judgment, it divides the planning steps into two categories: effective execution and ineffective execution. The right-or-wrong filtering module, based on the semantic classifier's classification results, judges the correctness of the core planning data for that round and filters it according to the following method: If the classification result is "effective execution," it indicates that the LLM confirms the current step's logic is correct and the execution result meets expectations, thus retaining the core planning data for that round; if the classification result is "ineffective execution," meaning the LLM reflects and identifies errors in tool call parameters or contradictions in execution logic, then the planning data for that round is directly removed.
[0014] This invention also provides a method for reusing large model agent plans based on core task intent parsing, utilizing the aforementioned large model agent plan reuse system based on core task intent parsing. This method includes the following steps: Step 1: Using the core task intent parsing module, the core task intent keywords are obtained from the natural language prompts input by the user, combined with preset system prompts. Step 2: The matching and triggering module uses the core task intent keyword to search the plan template database for plan cache and determines whether there are keywords and plan templates that match the core task intent keywords. If they exist, it determines that the cache hit has been triggered and proceeds to step 3A. If they do not exist, it determines that the cache hit has not been triggered and proceeds to step 3B. Step 3A: The execution plan formulation module integrates the rendering system prompts, the retrieved plan template, the tool call method corresponding to the template, and the user prompts to generate a complete context and input it into the small language model; the small language model instantiates and renders the plan template, supplements specific task parameters to form a personalized plan that can be executed directly, and then hands the plan over to the action executor to execute step by step until all tasks are completed and user responses are generated; Step 3B: The execution plan formulation module integrates the rendering system prompts, all available tool call information, and user input prompts to generate a complete contextual input large language model. After the large language model generates a new execution plan, it is passed to the action executor for parsing and step-by-step execution. During the execution process, the action executor updates the context in real time with the results returned by the tools at each step and feeds the updated context back to the large language model for further iterative optimization of the plan. The above steps are repeated until the plan is completed and the final user answer is generated. During the iterative optimization process, the asynchronous collection module filters and structures the storage of valid iterative plan data. The plan template construction module generates standardized plan templates based on the plans cached in the plan template database and stores them in the plan template database for subsequent reuse.
[0015] Furthermore, the template construction module is equipped with a template verification module and a template dynamic update mechanism module. The template verification module is equipped with a template format verification module and a dual verification module for rendering validity and result consistency. The template format verification module is used to verify the structural integrity, grammatical correctness, and clarity of placeholder definitions of the plan template, ensuring that the template conforms to the preset format standards; The dual verification module for rendering validity and result consistency is used to render the plan template sequentially by SLM according to all user input prompts corresponding to the core task intent keywords. It verifies whether the rendered template can be parsed normally and output an executable structured execution plan. The module compares the user answers generated by the plan template after executing SLM rendering with the user answers generated by the plan inference output in the execution cache. Only when the similarity between the two reaches a preset threshold and the rendered plan template can be executed will the template be officially stored in the plan template database. The template dynamic update mechanism module is used to automatically start the template iteration process when the number of newly added valid plans corresponding to the same core task intent triggers the preset threshold again, and upgrades and iterates the existing template by integrating the optimization logic of the newly added plans. The template format verification module and the dual verification module for rendering validity and result consistency are used sequentially to perform the following multi-level correctness verification: Phase 1: The template format verification module verifies the structural integrity, syntactic standardization, and clarity of placeholder definitions of each template to ensure that the template conforms to the preset JSON format standard, laying the foundation for subsequent SLM instantiation, rendering, and action execution from the bottom up. The second stage involves a dual verification module for rendering validity and result consistency. This module calls the SLM (Simplified Modeling Library) which is from the same source as the cached hit scenario. It sequentially renders templates for all user input prompts in the plan template database that correspond to the core task intent keywords, verifying whether the templates can be parsed correctly and output an executable structured execution plan. Subsequently, the plan results generated by the SLM rendering are compared with the results of the cached LLM native inference output. Only when the similarity between the two reaches a preset similarity threshold is the template stored in the plan template database. If the similarity does not reach the similarity threshold, the system will dynamically calibrate the template generation quantity threshold based on the number of unqualified samples, thereby increasing the sample accumulation to improve the generalization ability and adaptation accuracy of subsequent templates. The plan template construction module adopts a quantitative threshold control strategy. When the number of new valid plans corresponding to the same core task intent triggers the preset template generation threshold, the template iteration process is automatically started. The optimization logic of the new plans is integrated to upgrade and iterate the existing templates, so that the templates can dynamically adapt to changes in task scenarios and updates in tool calling rules.
[0016] Furthermore, an algorithm for dynamically adjusting the threshold setting of the number of templates generated based on the difficulty of the task scenario is used to quantify and classify the difficulty of the task scenario. The threshold for the number of templates generated is dynamically increased or decreased automatically as the difficulty level of the task scenario increases or decreases.
[0017] Furthermore, step 3B includes the following sub-steps: Step 3B-1, define the input: user query, core task intent keywords, system prompts, toolset; define the output: end user response; Step 3B-2, Initialization: Large model inference context, plan cache, end user response; Iteration steps k=0; Step 3B-3: The user inputs a prompt word, let k = k + 1; Steps 3B-4: The execution plan formulation module integrates rendering system prompts, all available tool call information, and user input prompts to generate a complete context; Step 3B-5: Input the context into the large language model, and the large language model calls LLM inference to generate a new execution plan; Step 3B-6: The action executor parses the plan and executes it step by step; Step 3B-7: LLM determines whether the final user response has been generated; if no final user response has been generated, it returns to step 3B-8; if a final user response has been generated, it proceeds to step 3B-9. Step 3B-8; The action executor feeds back the results returned by the tools at each step to the LLM, and the context is updated in real time by the results returned by the tools at each step; Return to step 3B-3; Step 3B-9; The asynchronous data collection module retrieves the large model's thought process, tool name, and tool input; the tool is executed and its results are returned; the current step plan is cached; Step 3B-10: The plan template construction module generates a standardized plan template based on the plans cached in the plan template database.
[0018] The present invention also provides an apparatus for a large model agent plan reuse method based on core task intent parsing, comprising a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the computer program and, when executing the computer program, implement the steps of the large model agent plan reuse method based on core task intent parsing as described above.
[0019] The advantages and positive effects of this invention are: This invention constructs an intelligent planning caching framework based on core task intent parsing. Through an innovatively designed end-to-end architecture of "intent extraction - cache retrieval - plan reuse / generation - template refinement," it effectively solves the three core technical problems of traditional intelligent agent caching: low matching accuracy, poor real-time adaptability, and excessive resource consumption. Compared with existing technologies, it has significant innovation and practicality, with the following specific benefits: (1) Significantly improves cache matching accuracy, effectively avoids over-matching and under-matching problems, and ensures cache reuse efficiency and task execution accuracy. This invention innovatively uses SLM to extract core task intent keywords, breaking through the constraints of traditional surface text semantic matching, accurately capturing the essential core of the task, and can effectively identify the same type of task under different expression forms, solving the problem of repeated calls caused by under-matching from the root; at the same time, relying on the precise matching logic of "core task category + key attributes", it replaces fuzzy similarity calculation, triggering cache reuse only when the task category and key attributes are completely consistent, strictly distinguishing tasks with similar surface semantics but different core needs, greatly reducing the risk of erroneous execution caused by over-matching, and significantly improving the accuracy and reliability of cache reuse.
[0020] (2) Enhance the adaptability to dynamic scenarios and ensure the effectiveness of caching in real-time data environments. This invention abandons the traditional mode of directly reusing inference results and uses a structured inference plan as the core of reuse to achieve decoupling between fixed inference logic and dynamic data. At the same time, in the plan execution stage, the real-time data verification and dynamic adaptation mechanism effectively solves the problem of result failure caused by real-time data dependence in traditional caching, thereby improving the adaptability and stability of the framework in dynamic data scenarios.
[0021] (3) Optimize the resource consumption structure and significantly reduce the cost of LLM calls and task execution delay. This invention replaces the traditional result reuse mode with plan reuse and combines the collaborative division of labor strategy of SLM and LLM to achieve efficient resource utilization: when the cache is hit, it is only necessary to instantiate and render the retrieved plan template through SLM and supplement the specific parameters to generate the execution plan. There is no need to call LLM to re-infer, which greatly reduces the frequency of LLM calls with high computing power consumption. Attached Figure Description
[0022] Figure 1 This is a flowchart of a large-model intelligent agent plan reuse method based on core task intent parsing according to the present invention; Figure 2 This is a flowchart of a plan template generation method according to the present invention; Figure 3 This is a diagram illustrating the suggested words from the keyword extraction LLM system.
[0023] Figure 4 This is a flowchart of the asynchronous collection algorithm. Detailed Implementation
[0024] The present invention will now be described in detail with reference to the accompanying drawings and embodiments. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0025] In the description of this invention, the terms "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," and "bottom," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and do not require the invention to be constructed and operated in a specific orientation; therefore, they should not be construed as limitations on the invention. The terms "connected" and "linked" used in this invention should be interpreted broadly. For example, they can refer to a fixed connection or a detachable connection; a direct connection or an indirect connection through intermediate components; or an electrical connection or signal transmission. Those skilled in the art can understand the specific meaning of the above terms according to the specific circumstances.
[0026] The following are the Chinese definitions of English words, phrases, and abbreviations: LLM: Large Language Model.
[0027] LLMs: Various large-scale language models.
[0028] SLM: Small Language Model.
[0029] Llama 3-8B: A small language model developed by Meta, distilled from a large model.
[0030] GPTCache: A technical solution that optimizes inference costs by reusing the final response.
[0031] GenCache: A technical solution that optimizes inference costs by reusing the final response.
[0032] SGLang: Reasoning Frame.
[0033] RAGCache: A technical solution for inference cost based on cache request awareness in search enhancement generation scenarios.
[0034] PromptCache: A technical solution that optimizes inference cost by reusing intermediate states.
[0035] prefill: The prefilling stage during model inference.
[0036] KV: Key vector and value vector generated during model inference.
[0037] prompt: The query statement that the user inputs for the model's inference.
[0038] Task: mission or mission.
[0039] SystemPrompt: System prompts provided to optimize model inference.
[0040] Ctx: The context input to the model during model inference.
[0041] plan_buffer: The buffer used when retrieving the inference plan.
[0042] final_answer: The final answer that the model outputs to the user.
[0043] thought: The thought process of the model in each round of reasoning.
[0044] action_name: The name of the tool that the model wants to call in each round of inference.
[0045] action_input: The input given to the tool by the model during each round of inference when the model calls the tool.
[0046] AsyncBuildPlan: An asynchronous build plan template.
[0047] Query: Same as prompt, it is the query statement that the user inputs for the model's inference.
[0048] key: The key value retrieved from the plan template database, used to obtain the corresponding plan template.
[0049] no: The selected branch was not hit.
[0050] yes: Select the branch hit.
[0051] JSON: A lightweight data interchange format that uses a text format that is completely independent of programming languages.
[0052] Please see Figures 1 to 4 A large-scale intelligent agent plan reuse system based on core task intent parsing is proposed. The system includes a core task intent parsing module, a matching and triggering module, an execution plan formulation module, an action executor, an asynchronous plan collection module, a plan template construction module, and a plan template database.
[0053] The core task intent parsing module is used to convert user prompts into standardized and unique core task intent keywords. It uses SLM as the execution carrier and extracts core task intent keywords by combining SLM with preset system prompts. These core task intent keywords are used to retrieve stored plan cache containing keyword and plan template pairing information, triggering two scenarios: cache hit or cache miss.
[0054] The matching and triggering module is used to retrieve the stored keyword and plan template matching information using the core task intent keywords, and trigger the workflow for the corresponding cache hit or miss scenarios.
[0055] The execution plan formulation module is used to generate a complete context based on two scenarios: cache hit or cache miss. It integrates relevant system prompts, tool call information, and user input prompts. In the cache hit scenario, the context is input into the small language planning model, which renders the plan template and supplements the parameters to form a personalized plan that can be executed directly. In the cache miss scenario, the context is input into the large language planning model, which infers and generates a new execution plan based on the context.
[0056] The action executor is used to parse the plan and execute it step by step to generate the end user's response. During the execution, the results returned by each step tool update the context in real time, and the updated context is fed back to the large language model for further iterative optimization of the plan.
[0057] The asynchronous collection module is used to filter and structure effective iteration plan data without interfering with the normal inference process of LLM through a low-intrusive data capture method. It continuously captures the iteration plan output of each round of the large language model, associates all plans corresponding to the same user prompt word and stores them in the plan template database, and synchronously records the associated prompt words and core task intent keywords to provide basic data support for the generation of subsequent plan templates.
[0058] The plan template construction module is used to extract common core logic from the plans cached in the plan template database to generate standardized plan templates, and finally store them in the plan template database in the form of key-value pairs between the core task intent and the plan template. The plan template database is used to cache valid iterative plan data output by the asynchronous plan collection module and plan templates generated by the plan template construction module.
[0059] Large Language Models (LLMs) are trained on massive amounts of text data to understand, generate, and process natural language text. This enables them to understand context, generate coherent and relevant text, and perform various language-based tasks such as translation, summarization, and question answering. They have a huge number of parameters, typically billions or even hundreds of billions. They are trained on massive, diverse, general-purpose datasets (such as internet text). Their characteristics include versatility and complex reasoning: they possess broad knowledge and strong contextual understanding capabilities, excelling at handling complex, open-ended tasks.
[0060] SLMs (Small Language Models) serve the same purpose as Large Language Models (LLMs), but they are trained on smaller amounts of data. Therefore, they require significantly fewer computational resources compared to LLMs. Despite their smaller size, SLMs are designed to maintain high performance across a wide range of natural language processing tasks, including text generation, classification, and translation. Choosing an SLM can make applications more accessible on a wider range of devices and even enable offline functionality. With a smaller number of parameters, typically ranging from millions to billions, they are characterized by specialization and high efficiency: excellent performance in specific tasks or domains, fast response times, and low resource consumption.
[0061] Preferably, the plan template construction module may include a template verification module and a template dynamic update mechanism module. The template verification module may include a template format verification module and a dual verification module for rendering validity and result consistency.
[0062] The template format verification module is used to verify the structural integrity, grammatical correctness, and clarity of placeholder definitions of the plan template, ensuring that the template conforms to the preset format standards.
[0063] The dual verification module for rendering validity and result consistency is used to render the plan template sequentially by SLM according to all user input prompts corresponding to the core task intent keywords. It verifies whether the rendered template can be parsed normally and output an executable structured execution plan. The module compares the user answers generated by the plan template after executing SLM rendering with the user answers generated by the plan inference output in the execution cache. Only when the similarity between the two reaches a preset threshold and the rendered plan template can be executed will the template be officially stored in the plan template database.
[0064] The template dynamic update mechanism module is used to automatically start the template iteration process when the number of newly added valid plans corresponding to the same core task intent triggers the preset threshold again, and upgrades and iterates the existing template by integrating the optimization logic of the newly added plans.
[0065] Preferably, the matching and triggering module may include a classification and aggregation module. The classification and aggregation module will classify and aggregate multiple rounds of valid plans according to the core task intent, providing a standardized data set for the subsequent plan template construction module. When the cumulative number of valid plans associated with the same core task intent keyword reaches a preset threshold, the matching and triggering module will trigger the template generation process.
[0066] Preferably, the plan template construction module can extract general reasoning logic and tool calling framework from the effective iterative plan data collected by the plan asynchronous collection module, replace dynamically changing content with standardized placeholders, and ensure that the template is filled with parameters to adapt to different expression scenarios of the same type of task.
[0067] Preferably, the asynchronous collection module for planning can have a built-in semantic classifier based on LLM and a right-or-wrong filtering module. The semantic classifier takes the reflective reasoning process generated by LLM in response to the tool's returned results as input, and divides the planning steps into two categories: effective execution and ineffective execution through semantic feature extraction and intent judgment. The right-or-wrong filtering module judges the correctness of the core planning data for this round based on the classification results of the semantic classifier and filters them according to the following method: if the classification result is effective execution, it means that LLM confirms that the current step logic is correct and the execution result meets expectations, so the core planning data for this round is retained; if the classification result is ineffective execution, that is, LLM reflects and identifies that the tool call parameters are incorrect or the execution logic is contradictory, so the planning data for this round is directly removed.
[0068] This invention also provides a method for reusing large model agent plans based on core task intent parsing, utilizing the aforementioned large model agent plan reuse system based on core task intent parsing. This method includes the following steps: Step 1: Using the core task intent parsing module, the core task intent keywords are obtained from the natural language prompts input by the user, combined with preset system prompts.
[0069] Step 2: The matching and triggering module uses the core task intent keyword to search the plan template database for plan cache and determines whether there are keywords and plan templates that match the core task intent keywords. If they exist, it determines that the cache hit has been triggered and proceeds to step 3A. If they do not exist, it determines that the cache hit has not been triggered and proceeds to step 3B.
[0070] Step 3A: The execution plan formulation module integrates the rendering system prompts, the retrieved plan template, the corresponding tool call method, and the user prompts to generate a complete context and input it into the small language model. The small language model instantiates and renders the plan template, supplements specific task parameters to form a personalized plan that can be executed directly, and then hands the plan over to the action executor to execute it step by step until all tasks are completed and user responses are generated.
[0071] Step 3B: The execution plan formulation module integrates the rendering system prompts, all available tool call information, and user input prompts to generate a complete contextual input large language model. After the large language model generates a new execution plan, it is handed over to the action executor for parsing and step-by-step execution. During the execution process, the action executor updates the context in real time with the results returned by the tools at each step and feeds the updated context back to the large language model for further iterative optimization of the plan. The above steps are repeated until the plan is completed and the final user answer is generated.
[0072] During the iterative optimization process, the asynchronous collection module filters and structures the storage of valid iterative plan data.
[0073] The plan template construction module generates standardized plan templates based on the plans cached in the plan template database and stores them in the plan template database for subsequent reuse.
[0074] Preferably, the planning template construction module can be configured with a template verification module and a template dynamic update mechanism module. The template verification module can be configured with a template format verification module and a dual verification module for rendering validity and result consistency.
[0075] The template format verification module is used to verify the structural integrity, grammatical correctness, and clarity of placeholder definitions of the plan template, ensuring that the template conforms to the preset format standards.
[0076] The dual verification module for rendering validity and result consistency is used to render the plan template sequentially by SLM according to all user input prompts corresponding to the core task intent keywords. It verifies whether the rendered template can be parsed normally and output an executable structured execution plan. The module compares the user answers generated by the plan template after executing SLM rendering with the user answers generated by the plan inference output in the execution cache. Only when the similarity between the two reaches a preset threshold and the rendered plan template can be executed will the template be officially stored in the plan template database.
[0077] The template dynamic update mechanism module is used to automatically start the template iteration process when the number of newly added valid plans corresponding to the same core task intent triggers the preset threshold again, and upgrades and iterates the existing template by integrating the optimization logic of the newly added plans.
[0078] The template format verification module and the dual verification module for rendering validity and result consistency can be used sequentially to perform the following multi-level correctness verification: Phase 1: The template format verification module verifies the structural integrity, syntactic standardization, and clarity of placeholder definitions of each template to ensure that the template conforms to the preset JSON format standard, laying the foundation for subsequent SLM instantiation, rendering, and action execution from the bottom up.
[0079] The second stage involves a dual verification module for rendering validity and result consistency. This module calls the SLM (Simplified Modeling Library) which is from the same source as the cached hit scenario. It sequentially renders templates for all user input prompts in the plan template database that correspond to the core task intent keywords, verifying whether the templates can be parsed correctly and output an executable structured execution plan. Subsequently, the plan results generated by the SLM rendering are compared with the results of the cached LLM native inference output. Only when the similarity between the two reaches a preset similarity threshold is the template stored in the plan template database. If the similarity does not reach the similarity threshold, the system will dynamically calibrate the template generation quantity threshold based on the number of unqualified samples, thereby increasing the sample accumulation to improve the generalization ability and adaptation accuracy of subsequent templates.
[0080] The plan template construction module adopts a quantitative threshold control strategy. When the number of new valid plans corresponding to the same core task intent triggers the preset template generation threshold, the template iteration process is automatically started. The optimization logic of the new plans is integrated to upgrade and iterate the existing templates, so that the templates can dynamically adapt to changes in task scenarios and updates in tool calling rules.
[0081] Preferably, an algorithm for dynamically adjusting the threshold setting of the number of templates generated based on the difficulty of the task scenario is used to quantify and classify the difficulty of the task scenario, and the threshold for the number of templates generated is automatically increased or decreased dynamically as the difficulty level of the task scenario increases or decreases.
[0082] Preferably, step 3B may include the following sub-steps: Step 3B-1: Define inputs: user query, core task intent keywords, system prompts, toolset; Define output: end user response.
[0083] Step 3B-2, Initialization: Large model inference context, plan cache, end user response; Iteration steps k=0; Step 3B-3: The user inputs a prompt word, let k = k + 1.
[0084] Steps 3B-4: The execution plan formulation module integrates the rendering system prompts, all available tool call information, and user input prompts to generate a complete context.
[0085] Step 3B-5: Input the context into the large language model, and the large language model calls LLM inference to generate a new execution plan.
[0086] Steps 3B-6: The action executor parses the plan and executes it step by step.
[0087] Step 3B-7: LLM determines whether the final user response has been generated. If no final user response has been generated, it returns to step 3B-8. If a final user response has been generated, it proceeds to step 3B-9.
[0088] Step 3B-8; The action executor feeds back the results returned by the tools in each step to the LLM, and the context is updated in real time by the results returned by the tools in each step; return to step 3B-3.
[0089] Step 3B-9: The asynchronous collection module is planned to obtain the large model thinking, tool name, and tool input; execute the tool and return the tool result; cache the current step plan.
[0090] Step 3B-10: The plan template construction module generates a standardized plan template based on the plans cached in the plan template database.
[0091] The present invention also provides an apparatus for a large model agent plan reuse method based on core task intent parsing, comprising a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the computer program and, when executing the computer program, implement the steps of the large model agent plan reuse method based on core task intent parsing as described above.
[0092] The workflow and working principle of the present invention will be further described below with reference to preferred embodiments: To address the technical problems of insufficient cache matching, real-time data dependency failure, over-matching, and excessive resource consumption in traditional intelligent agents, this invention proposes a large-model intelligent agent plan reuse system and method based on core task intent parsing. Figure 1 The end-to-end architecture flowchart shown demonstrates how module collaboration optimizes matching accuracy, real-time adaptability, and resource utilization. This solution uses the core task intent as a basis to construct a complete technical chain: "intent extraction - cache retrieval - plan generation / reuse - template refinement - execution feedback." The specific technical solution is as follows: The entire process begins with a user-input task query. First, the Small Language Model (SLM) extracts core task intent keywords to accurately capture the essence of the task (e.g., the core task intent of "solving the equation 3+2x=7" is "solving a linear equation in one variable"). The core reason for choosing SLM for this step is that core task intent keyword extraction only requires focusing on the core semantics of the task's surface layer, without the need for complex logical reasoning; SLM is sufficient to ensure extraction accuracy. Subsequently, these core task intent keywords are used to retrieve the stored keyword and plan template pairing information from the plan cache, triggering either a cache hit or a cache miss scenario.
[0093] In scenarios where the target is not hit: If a cache miss occurs, the system will execute the task strictly according to the traditional intelligent agent's invocation path. First, the execution plan formulation module integrates the rendering system prompts, all available tool invocation information, and user input prompts to generate a complete context for use by the large language planning model. Based on this context, the large language planning model infers and generates a new execution plan, which is then parsed and executed step-by-step by the action executor. During execution, the action executor updates the context with the results returned by the tools at each step in real time, feeding this information back to the LLM for further iterative optimization of the plan. This cycle continues until the plan is completed and the final user response is generated, at which point the process terminates.
[0094] During this process, the asynchronous collection module will run asynchronously, continuously capturing the iterative plans output by LLM in each round, associating all plans corresponding to the same user prompt word and storing them in the plan template database, synchronously recording the associated prompt words and core task intent keywords, providing basic data support for the generation of subsequent plan templates.
[0095] The plan template construction module extracts common core logic from the plans cached in the plan template database to generate standardized plan templates. Finally, the plan templates are stored in the plan template database in the form of key-value pairs between the core task intent and the plan template for subsequent reuse.
[0096] The plan template construction module uses a large-scale language planning model (LLM) as its core execution vehicle. The selection criteria are that template generation needs to possess the ability to extract complex logic, generalize across samples, and encapsulate structured data. Compared to smaller models, LLM can more accurately capture the common framework of multi-round plans, and can guide standardized output results through prompt word engineering. The module guides the model to generate templates using customized prompt words. The generated plan templates are verified through a template format validation module to ensure structural integrity, syntactic standardization, and clarity of placeholder definitions, guaranteeing compliance with preset format standards. A dual validation module for rendering validity and result consistency is used to render the generated plan templates sequentially using SLM based on all user input prompts corresponding to the core task intent keywords, verifying whether the rendered plan results can be correctly parsed and output as a feasible structured execution plan. Finally, the user responses generated by the SLM-rendered plan template are compared with the user responses generated by the LLM inference output in the execution cache. Only when the similarity between the two reaches a preset threshold and the template is executable is it officially stored in the plan template database.
[0097] Verify whether the rendered plan results can be parsed correctly and output a structured execution plan that can be implemented. The plan template can be instantiated and rendered using LM, and specific task parameters can be added to form a personalized plan that can be executed directly. Then, the plan is handed over to the action executor to execute step by step until all tasks are completed and user responses are generated.
[0098] In the scenario where the hit occurs: When a cache hit occurs, the execution plan formulation module first integrates the rendering system prompts, the retrieved plan template, the corresponding tool call method, and the user prompts to generate a complete context, which is then input into the small language planning model. The SLM instantiates and renders the plan template, supplementing specific task parameters to form a directly executable personalized plan. This plan is then handed over to the action executor for step-by-step execution until all tasks are completed and the user's response is generated.
[0099] (1) Core Task Intent Parsing Module: Corresponding to Figure 1 The core responsibility of the "Core Task Intent Keyword Extraction" step is to transform the unstructured natural language prompt input by the user into standardized and unique core task intent keywords. The design of this module directly determines the accuracy of subsequent cache matching and is a key tool for achieving the goal of "penetrating the surface expression and anchoring the essence of the task".
[0100] The core task intent parsing module uses SLM (such as Llama 3-8B) as the core reasoning vehicle, combined with... Figure 3 The pre-set system prompts work together to extract intent. Guided by these prompts, SLM can focus on the condensation of surface semantics and intent anchoring without the need for complex multi-round reasoning or deep context mining. This avoids the problem of limited semantic understanding boundaries of SLM itself, and ensures that the extraction results meet the standardized requirements of subsequent cache retrieval, accurately meeting the task requirements.
[0101] The core task intent keywords generated by the core task intent parsing module will serve as the core identifier and index throughout the entire plan reuse process, connecting subsequent plan cache management, template generation, and reuse. On one hand, these keywords will directly serve as the accurate matching basis for the plan template database, supporting the rapid location of the corresponding template in the cache retrieval stage and achieving efficient traffic separation between cache hit and miss scenarios. On the other hand, as the hub for storing iterative plans of similar tasks in the plan cache plan template database, it can aggregate multiple rounds of valid plans according to core task intent, providing a standardized data set for the subsequent plan template construction module. When the number of valid plans associated with the same keyword reaches a preset threshold, the template generation process will be triggered, ensuring that template extraction always revolves around the common logic of similar tasks, forming a closed-loop linkage of "intent extraction - data aggregation - template generation - cache reuse," ensuring consistency and efficiency throughout the entire process.
[0102] (2) The asynchronous collection module is the link Figure 1 This is a key supporting module for generating LLM iteration plans and refining subsequent plan templates in scenarios where the cache misses. Its core function is to accurately filter and structure and store effective iteration plan data without interfering with the normal inference process of LLM through a low-intrusion data capture mechanism.
[0103] Please see Figure 4 , Figure 4 This is a flowchart illustrating the asynchronous garbage collection algorithm of the asynchronous garbage collection module. The corresponding Chinese comments are as follows: Define inputs and outputs: User query Q, core task intent Task, system prompt SystemPrompt, toolset T. Figure 4 (Line 1 of the program).
[0104] Initialization: Large model inference context ctx, plan buffer plan_buffer, final user answer final_answer ( Figure 4 Lines 2-5 of the program.
[0105] Intelligent agent chain thinking loop ( Figure 4 Lines 6-28 of the program.
[0106] Calling LLM inference to generate answers ( Figure 4 Line 8 of the program.
[0107] LLM determines the task is complete, generates the final user response, and exits the loop. Figure 4 Lines 9-12 of the program.
[0108] Obtain the large model's thought, tool name (action_name), and tool input (action_input); Execute the tool and return the tool results. Figure 4 Lines 18-19 of the program.
[0109] Cache the current plan ( Figure 4 (Line 20 of the program).
[0110] Update the context and begin the next inference iteration. Figure 4 Lines 25-26 of the program.
[0111] To ensure the validity and reliability of stored data, this module incorporates an LLM-based error filtering mechanism within the AsyncBuildPlan function, and integrates a semantic classifier for precise verification. This semantic classifier takes the LLM's reflective reasoning process for the tool's returned results as input. Through semantic feature extraction and intent judgment, it categorizes planning steps into two types: effective (positive) and ineffective (negative). If the classification result is positive, it indicates that the LLM confirms the current step's logic is correct and the execution result meets expectations, thus retaining the core planning data for that round. If the classification result is negative, meaning the LLM's reflection identifies issues such as incorrect tool call parameters or contradictory execution logic, the planning data for that round is directly removed. This prevents erroneous logic from contaminating subsequent planning template generation processes, ensuring that the planning data stored in the planning template database possesses high quality and usability.
[0112] (3) Plan template construction module: corresponding to Figure 1 The core function of the "plan template construction" step is to create multiple effective plans based on the same core task intent. It relies on a large language model to extract general reasoning logic and generate standardized plan templates, providing a core carrier for subsequent caching and reuse, while ensuring the generalization and adaptability of the templates.
[0113] The triggering mechanism of the plan template construction module adopts a quantitative threshold control strategy. The template generation process is only initiated when the cumulative number of valid plans associated with the same core task intent keyword exceeds a preset threshold. This avoids the problem of weak template generalization ability and limited adaptability due to insufficient plan sample size. The threshold setting adopts a dynamic adjustment algorithm based on the difficulty of the task scenario. For simple task scenarios, the default threshold is set to start generating a template when there are 3 valid plans. For tasks with varied logic, the threshold will be dynamically increased to ensure that the template can cover a sufficient number of scenario variations and extract common core logic.
[0114] The template generation phase employs a large-scale language planning model (LLM) as the core execution vehicle. The selection criteria are based on the need for template generation to possess complex logic extraction, cross-sample generalization, and structured encapsulation capabilities. Compared to smaller models, LLM can more accurately capture the common framework of multi-round plans, and can guide standardized output results through prompt word engineering. The module guides the model to execute template generation through customized prompt words: explicitly requiring the model to extract specific parameters from the plan, such as numerical values, entity names, and path information, extracting general reasoning logic and tool call frameworks, and replacing dynamically changing content with standardized placeholders, such as real-time data parameters and tool call conditions, ensuring that the template can be adapted to different expression scenarios of similar tasks through parameter filling.
[0115] The template construction module sets up a template verification module and a template dynamic update mechanism module. The template verification module sets up a template format verification module and a dual verification module for rendering validity and result consistency.
[0116] Once the template is generated, the system will initiate a multi-level correctness verification process to fully ensure the reliability and accuracy of template reuse.
[0117] The first phase, the template format verification module, performs format compliance verification. The template format verification module verifies the structural integrity, grammatical standardization, and clarity of placeholder definitions of each template one by one, strictly ensuring that the template conforms to the preset JSON format standard, laying the foundation for subsequent SLM instantiation, rendering, and action execution from the bottom layer.
[0118] The second phase, a dual-verification module for rendering validity and result consistency, performs dual verification of rendering validity and result consistency. First, this module calls the SLM (Simplified Modeling Library) from the same source as the cached scenario to sequentially render templates for all user input prompts corresponding to the core task intent keywords in the plan template database. This verifies whether the template can be correctly parsed and output an executable structured execution plan. Then, the plan result generated by the SLM rendering is compared with the result output by the native inference of the LLM in the cache. Only when the similarity reaches a preset threshold (e.g., ≥90%) can the template be officially stored in the plan template database. If the similarity does not reach the threshold, the system will dynamically calibrate the template generation threshold based on the number of unqualified samples, improving the generalization ability and adaptation accuracy of subsequent templates by increasing the sample accumulation. Simultaneously, a dynamic template update mechanism is implemented: when the number of newly added valid plans corresponding to the same core task intent triggers the preset threshold again, the dynamic template update mechanism module automatically starts the template iteration process, integrating the optimization logic of the newly added plans to upgrade and iterate the existing templates. This ensures that the templates can dynamically adapt to changes in task scenarios and updates in tool calling rules, continuously guaranteeing the effectiveness, generalization, and stability of cache reuse.
[0119] The aforementioned core task intent parsing module, matching and triggering module, execution plan formulation module, action executor, asynchronous plan collection module, plan template construction module, plan template database, template verification module, template dynamic update mechanism module, classification and aggregation module, template format verification module, dual verification module for rendering validity and result consistency, LLM, SLM, low-intrusion data capture method and other functional modules, language models and algorithms can all adopt existing functional modules, language models and algorithms, and be constructed using conventional technical means.
[0120] The embodiments described above are only used to illustrate the technical ideas and features of the present invention. Their purpose is to enable those skilled in the art to understand the content of the present invention and implement it accordingly. The patent scope of the present invention should not be limited by these embodiments. That is, any equivalent changes or modifications made in accordance with the spirit disclosed in the present invention still fall within the patent scope of the present invention.
Claims
1. A large-scale intelligent agent plan reuse system based on core task intent parsing, characterized in that, The system includes a core task intent parsing module, a matching and triggering module, an execution plan formulation module, an action executor, an asynchronous plan collection module, a plan template construction module, and a plan template database; The core task intent parsing module is used to convert user prompts into standardized and unique core task intent keywords; It uses SLM as the execution carrier, and uses SLM in conjunction with preset system prompt words to extract core task intent keywords. These core task intent keywords are used to retrieve stored plan cache containing keyword and plan template matching information, triggering two scenarios: cache hit or cache miss. The matching and triggering module is used to retrieve the stored keyword and plan template matching information using the core task intent keywords, and trigger the workflow of the corresponding cache hit or miss scenarios. The execution plan formulation module is used to generate a complete context based on two scenarios: cache hit or cache miss, by integrating relevant system prompts, tool call information and user input prompts. In cache hit scenarios, the context is input into the small language planning model, which then renders the plan template and supplements the parameters to form a personalized plan that can be executed directly. In the case of a cache miss, the context is input into the large language planning model, which then infers and generates a new execution plan based on the context. The action executor is used to parse the plan and execute it step by step to generate an end-user response; During execution, the results returned by the tools at each step are updated in real time to update the context, and the updated context is fed back to the large language model for further iterative optimization of the plan; The asynchronous collection module is used to filter and structure the storage of valid iteration plan data through a low-intrusive data capture method without interfering with the normal inference process of LLM. It continuously captures the iteration plan of each round of output from the large language model, associates all plans corresponding to the same user prompt word and stores them in the plan template database, and synchronously records the associated prompt words and core task intent keywords, providing basic data support for the generation of subsequent plan templates; The plan template construction module is used to extract common core logic from the plans cached in the plan template database to generate standardized plan templates, and finally store them in the plan template database in the form of key-value pairs between the core task intent and the plan template.
2. The large-scale intelligent agent plan reuse system based on core task intent parsing according to claim 1, characterized in that, The planning template construction module includes a template verification module and a template dynamic update mechanism module. The template verification module includes a template format verification module and a dual verification module for rendering validity and result consistency. The template format verification module is used to verify the structural integrity, grammatical correctness, and clarity of placeholder definitions of the plan template, ensuring that the template conforms to the preset format standards; The dual verification module for rendering validity and result consistency is used to render the plan template sequentially by SLM according to all user input prompts corresponding to the core task intent keywords in it, and to verify whether the template can be parsed normally and output an executable structured execution plan after rendering. The user responses generated by the SLM-rendered plan template are compared with the user responses generated by the LLM inference output in the execution cache. Only when the similarity between the two reaches a preset threshold and the rendered plan template can be executed will the template be officially stored in the plan template database. The template dynamic update mechanism module is used to automatically start the template iteration process when the number of newly added valid plans corresponding to the same core task intent triggers the preset threshold again, and upgrades and iterates the existing template by integrating the optimization logic of the newly added plans.
3. The large-scale intelligent agent plan reuse system based on core task intent parsing according to claim 1, characterized in that, The matching and triggering module includes a classification and aggregation module. The classification and aggregation module will classify and aggregate multiple rounds of valid plans according to their core task intent, providing a standardized data set for the subsequent plan template construction module. When the cumulative number of valid plans associated with the same core task intent keyword reaches a preset threshold, the matching and triggering module will trigger the template generation process.
4. The large-scale intelligent agent plan reuse system based on core task intent parsing according to claim 1, characterized in that, The plan template construction module extracts general reasoning logic and tool call framework from the valid iterative plan data collected by the plan asynchronous collection module, and replaces dynamically changing content with standardized placeholders to ensure that the template is filled with parameters to adapt to different expression scenarios of the same task.
5. The large-scale intelligent agent plan reuse system based on core task intent parsing according to claim 1, characterized in that, The asynchronous collection module for planning incorporates an LLM-based semantic classifier and a right-or-wrong filtering module. The semantic classifier takes the reflective reasoning process generated by the LLM based on the tool's returned results as input. Through semantic feature extraction and intent judgment, it categorizes planning steps into two types: effective and ineffective. The right-or-wrong filtering module, based on the semantic classifier's classification results, judges the correctness of the core planning data for that round and filters it accordingly: if the classification result is "effective," it indicates that the LLM confirms the current step's logic is correct and the execution result meets expectations, thus retaining the core planning data for that round; if the classification result is "ineffective," meaning the LLM reflects and identifies errors in tool call parameters or contradictions in execution logic, then the planning data for that round is directly removed.
6. A method for reusing large model agent plans based on core task intent parsing using the large model agent plan reuse system based on core task intent parsing as described in claim 1, characterized in that, This method includes the following steps: Step 1: Using the core task intent parsing module, the core task intent keywords are obtained from the natural language prompts input by the user, combined with preset system prompts. Step 2: The matching and triggering module uses the core task intent keyword to search the plan template database for plan cache and determines whether there are keywords and plan templates that match the core task intent keywords. If they exist, it determines that the cache hit has been triggered and proceeds to step 3A. If they do not exist, it determines that the cache hit has not been triggered and proceeds to step 3B. Step 3A: The execution plan formulation module integrates the rendering system prompts, the retrieved plan template, the tool call method corresponding to the template, and the user prompts to generate a complete context and input it into the small language model; the small language model instantiates and renders the plan template, supplements specific task parameters to form a personalized plan that can be executed directly, and then hands the plan over to the action executor to execute step by step until all tasks are completed and user responses are generated; Step 3B: The execution plan formulation module integrates the rendering system prompts, all available tool call information and user input prompts to generate a complete contextual input large language model. After the large language model generates a new execution plan, it is handed over to the action executor for parsing and execution step by step. During execution, the action executor updates the context in real time with the results returned by the tools at each step, and feeds the updated context back to the large language model for further iterative optimization of the plan; the above steps are repeated until the plan is completed and the final user answer is generated; During the iterative optimization process, the asynchronous collection module filters and structures the storage of valid iterative plan data. The plan template construction module generates standardized plan templates based on the plans cached in the plan template database and stores them in the plan template database for subsequent reuse.
7. The method for reusing large-scale intelligent agent plans based on core task intent parsing according to claim 6, characterized in that, The template construction module sets up a template verification module and a template dynamic update mechanism module. The template verification module sets up a template format verification module and a dual verification module for rendering validity and result consistency. The template format verification module is used to verify the structural integrity, grammatical correctness, and clarity of placeholder definitions of the plan template, ensuring that the template conforms to the preset format standards; The dual verification module for rendering validity and result consistency is used to render the plan template sequentially by SLM according to all user input prompts corresponding to the core task intent keywords in it, and to verify whether the template can be parsed normally and output an executable structured execution plan after rendering. The user responses generated by the SLM-rendered plan template are compared with the user responses generated by the LLM inference output in the execution cache. Only when the similarity between the two reaches a preset threshold and the rendered plan template can be executed will the template be officially stored in the plan template database. The template dynamic update mechanism module is used to automatically start the template iteration process when the number of newly added valid plans corresponding to the same core task intent triggers the preset threshold again, and upgrades and iterates the existing template by integrating the optimization logic of the newly added plans. The template format verification module and the dual verification module for rendering validity and result consistency are used sequentially to perform the following multi-level correctness verification: Phase 1: The template format verification module verifies the structural integrity, syntactic standardization, and clarity of placeholder definitions of each template to ensure that the template conforms to the preset JSON format standard, laying the foundation for subsequent SLM instantiation, rendering, and action execution from the bottom up. The second stage involves a dual verification module for rendering validity and result consistency. This module calls the SLM (Simplified Modeling Library) which is from the same source as the cached hit scenario. It sequentially renders templates for all user input prompts in the plan template database that correspond to the core task intent keywords, verifying whether the templates can be parsed correctly and output an executable structured execution plan. Subsequently, the plan results generated by the SLM rendering are compared with the results of the cached LLM native inference output. Only when the similarity between the two reaches a preset similarity threshold is the template stored in the plan template database. If the similarity does not reach the similarity threshold, the system will dynamically calibrate the template generation quantity threshold based on the number of unqualified samples, thereby increasing the sample accumulation to improve the generalization ability and adaptation accuracy of subsequent templates. The plan template construction module adopts a quantitative threshold control strategy. When the number of new valid plans corresponding to the same core task intent triggers the preset template generation threshold, the template iteration process is automatically started. The optimization logic of the new plans is integrated to upgrade and iterate the existing templates, so that the templates can dynamically adapt to changes in task scenarios and updates in tool calling rules.
8. The method for reusing large-scale intelligent agent plans based on core task intent parsing according to claim 7, characterized in that, An algorithm that dynamically adjusts the threshold for the number of templates generated based on the difficulty of the task scenario quantifies and classifies the difficulty of the task scenario, and the threshold for the number of templates generated automatically increases or decreases dynamically as the difficulty level of the task scenario increases or decreases.
9. The method for reusing large-scale intelligent agent plans based on core task intent parsing according to claim 7, characterized in that, Step 3B includes the following sub-steps: Step 3B-1, define the input: user query, core task intent keywords, system prompts, toolset; define the output: end user response; Step 3B-2, Initialization: Large model inference context, plan cache, end user response; Iteration steps k=0; Step 3B-3: The user inputs a prompt word, let k = k + 1; Steps 3B-4: The execution plan formulation module integrates rendering system prompts, all available tool call information, and user input prompts to generate a complete context; Step 3B-5: Input the context into the large language model, and the large language model calls LLM inference to generate a new execution plan; Step 3B-6: The action executor parses the plan and executes it step by step; Step 3B-7: LLM determines whether the final user response has been generated; if no final user response has been generated, it returns to step 3B-8; if a final user response has been generated, it proceeds to step 3B-9. Step 3B-8; The action executor feeds back the results returned by the tools at each step to the LLM, and the context is updated in real time by the results returned by the tools at each step. Return to step 3B-3; Step 3B-9; The asynchronous data collection module is planned to retrieve the overall model thinking, tool name, and tool input; execute the tool and return the tool result; and cache the current step plan. Step 3B-10; The plan template construction module generates standardized plan templates based on plans cached in the plan template database.
10. A device for reusing large-scale intelligent agent plans based on core task intent parsing, comprising a memory and a processor, characterized in that, The memory is used to store a computer program; the processor is used to execute the computer program and, when executing the computer program, implement the steps of the large model intelligent agent plan reuse method based on core task intent parsing as described in any one of claims 1 to 9.