Intelligent agent memory indexing method and system based on intention recognition

By performing preliminary intent classification and in-depth analysis of real-time question-and-answer data, combined with multi-dimensional retrieval and feedback mechanisms, the challenges of intent recognition and policy reuse in existing technologies have been solved, enabling agents to execute efficiently and reliably in complex tasks.

CN121009166APending Publication Date: 2025-11-25TERMINUSBEIJING TECH CO LTD
View PDF 0 Cites 6 Cited by

Patent Information

Application Number
CN202511065205.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-30
Publication Date
2025-11-25

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively capture and reuse structured understandings and strategic responses to specific task types, resulting in inefficiencies and inconsistent performance of agents in handling complex tasks.

Method used

By acquiring real-time question-and-answer data, initial intent classification is performed using a domain knowledge rule base, in-depth intent parsing is conducted in stages, standardized intent description text is output, and suitable strategies are obtained from the strategy library through multi-dimensional retrieval. The strategy library is updated by combining micro and macro feedback to achieve self-purification and iteration of strategies.

Benefits of technology

It achieves a complete closed loop from intent recognition to policy reuse, ensuring that the retrieval results are semantically similar and adapted to the current scenario, thereby improving the agent's execution efficiency and reliability in complex tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121009166A_ABST
    Figure CN121009166A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an intelligent agent memory indexing method and system based on intention recognition. The method is applied to the technical field of artificial intelligence and comprises the steps of obtaining real-time question-answer data, and performing preliminary intention classification on the real-time question-answer data by utilizing a domain knowledge rule library; extracting a structured description from the real-time question and answer data after the preliminary intention classification, performing deep intention analysis in stages, and outputting a standardized intention description text; according to the standardized intention description text, acquiring an Agent operation context, performing multi-dimensional retrieval to obtain an adaptive strategy, executing the adaptive strategy, and returning a strategy evaluation result; according to a strategy evaluation result, carrying out microscopic feedback and macroscopic feedback to update a strategy library; the Agent operation context is obtained through the following steps that semantic features of a standardized intention description text are captured, and the Agent operation context corresponding to the deep semantic features is recorded based on a fine-grained metadata labeling system. According to the invention, a complete closed loop from intention identification to strategy multiplexing to strategy optimization is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to an intelligent agent memory indexing method and system based on intent recognition. Background Technology

[0002] In recent years, breakthroughs have been made in large language model technologies such as GPT and Claude, making it possible to build intelligent agents with complex reasoning capabilities. These agent systems are being widely used in key business scenarios such as enterprise process automation, professional consulting services, and intelligent decision support, bringing revolutionary changes to traditional work models.

[0003] However, with the increasing complexity of application scenarios, how to build an efficient and reliable memory system has become one of the main bottlenecks restricting the improvement of agent capabilities.

[0004] Memory systems not only need to store historical information, but also need to have a deep understanding of task intent and the ability to reuse strategies, which poses a serious challenge to existing technologies.

[0005] Currently, mainstream memory management solutions are mainly based on the RAG (Retrieval-Augmented Generation) technical framework, which enhances the model's generation capabilities through vector retrieval.

[0006] Dialogue memory is the most basic implementation method. It adopts a linear storage structure similar to chat logs, storing the user's and agent's interaction history in a vector database in the form of text or embeddings. Although this method is simple to implement, it is essentially based on similarity matching of surface-level text features and cannot identify and utilize the structured information behind the task. For example, when dealing with professional tasks such as "drafting business contracts," relying solely on dialogue history retrieval often results in generated content lacking the necessary legal rigor and structural integrity, requiring repeated manual corrections and supplementary prompts.

[0007] Document-based knowledge retrieval systems are more commonly found in specialized fields, enhancing an agent's professional knowledge base by importing external knowledge bases and professional documents. However, these systems are essentially passive knowledge retrieval mechanisms, unable to proactively identify and extract strategic knowledge during task execution. For example, in legal consultation scenarios, while the system can retrieve relevant legal provisions and cases, it cannot automatically generate a structured processing flow such as "how to analyze a case - how to apply the law - how to draft a legal opinion." This results in the need to rebuild the reasoning chain each time a similar case is handled, leading to inefficiency and difficulty in ensuring consistency.

[0008] To address these issues, several intent planning schemes have been proposed, such as Plan-and-Solve and SemanticKernel frameworks. These schemes attempt to introduce planning mechanisms into the task processing, decomposing complex tasks into subtasks and establishing semantic relationships. However, these methods still have significant limitations:

[0009] On the one hand, their planning process is usually limited to the execution cycle of a single task, lacking the ability to retain information across tasks; on the other hand, they fail to establish a systematic "planning" mechanism. Figure 1 The lack of a proper strategy knowledge representation and storage mechanism prevents valuable processing experience from being transformed into reusable strategy assets.

[0010] Looking deeper, the main challenges facing existing memory systems lie in: how to achieve a structured representation of task intent, how to establish a dynamic mapping relationship between intent and processing strategies, and how to enable the continuous evolution and optimization of this knowledge. These problems are particularly prominent in professional service fields. For example, in scenarios such as legal document drafting and financial analysis report generation, professionals' experience is often reflected in a structured understanding and strategic responses to specific task types, while existing technologies struggle to effectively capture and reuse this type of knowledge. This limitation not only affects the agent's execution efficiency but also restricts its reliability and professional performance in critical business scenarios.

[0011] To address the above issues, this disclosure provides an intelligent agent memory indexing method and system based on intent recognition. Summary of the Invention

[0012] This disclosure provides an intelligent agent memory indexing method and system based on intent recognition, which solves the problem that existing technologies are unable to effectively capture and reuse structured understanding and strategic responses to specific task types.

[0013] According to a first aspect of this disclosure, an agent memory indexing method based on intent recognition is provided. The method includes:

[0014] Acquire real-time question-and-answer data, and perform preliminary intent classification on the real-time question-and-answer data using a domain knowledge rule base;

[0015] Structured descriptions are extracted from real-time question-and-answer data after initial intent classification, and deep intent parsing is performed in stages to output standardized intent description text.

[0016] Based on the standardized intent description text, the Agent runtime context is obtained for multi-dimensional retrieval, the appropriate policy is obtained from the policy library and executed, and the policy evaluation result is returned.

[0017] Based on the strategy evaluation results, micro-level and macro-level feedback are provided to update the strategy library; wherein...

[0018] The Agent runtime context is obtained through the following steps: capturing the semantic features of the standardized intent description text, and recording the Agent runtime context corresponding to the deep semantic features based on a fine-grained metadata annotation system.

[0019] In addition to the aspects and any possible implementations described above, another implementation is provided, the structured description of which includes the following three dimensions:

[0020] Task type dimension to identify the category of basic operations;

[0021] Pragmatic objectives are used to analyze deeper intentions;

[0022] Content element dimension, to capture the relationships between entities.

[0023] In addition to the aspects and any possible implementations described above, a further implementation is provided that performs deep intent parsing in stages and outputs standardized intent description text, specifically including the following steps:

[0024] The first intent text is obtained by analyzing the predicate and object structure of real-time question-and-answer data through syntactic analysis tree.

[0025] The second intent text is obtained by analyzing the constraints of the modifiers in the real-time question-and-answer data through dependency relation analysis of the first intent text.

[0026] By combining explicit and implicit instructions from historical dialogues based on real-time question-and-answer data, ambiguity in the second intent text is eliminated, resulting in the third intent text.

[0027] The third intent text is output based on a preset standard to obtain a standardized intent description text.

[0028] In addition to the aspects and any possible implementations described above, a further implementation is provided, which, after obtaining the third intent text, includes:

[0029] Construct an intent quantification model, use the intent quantification model to calculate the fuzzy score of the third intent text, and determine whether the third intent text is a highly fuzzy intent based on the fuzzy score; if so, proceed to the next step.

[0030] The fuzzy classifier is used to identify the fuzzy type of the third intent text. Based on the different fuzzy types, structured follow-up question templates are generated, and the user is asked to provide clarification information based on the structured follow-up question templates.

[0031] Based on the clarification information, explicit features and / or implicit features are extracted, and an intent weight vector is constructed based on the explicit features and / or implicit features to obtain a multi-dimensional intent description;

[0032] The preset standard adds a fuzzy processing field, and the multi-dimensional intent description and clarification information are filled into the fuzzy processing field to obtain standardized intent description text.

[0033] In addition to the aspects and any possible implementations described above, a further implementation is provided that performs multi-dimensional retrieval, obtains and executes an adapted strategy from a strategy library, including the following steps:

[0034] The standardized intent description text is converted into a query vector, and a nearest neighbor search is performed in the vector space to recall candidate vectors with similar semantics.

[0035] The candidate vectors are processed using a dynamic filter based on preset metadata to obtain the optimal matching strategy;

[0036] The differences between the real-time question-answering data and the candidate vectors corresponding to the best matching strategy are analyzed, and the matching strategy is obtained by variable substitution and logical connection based on the differences.

[0037] The adaptation strategy is dynamically injected into the large language model as the reasoning process progresses.

[0038] In addition to the aspects and any possible implementations described above, a further implementation is provided in which the micro-feedback includes:

[0039] The results of each strategy evaluation are automatically saved;

[0040] Increase the priority weight of successful adaptation strategies;

[0041] Add correction comments to the failed adaptation strategy;

[0042] Record the number of times the adaptation strategy is referenced, the most recent usage time, and its applicability across different scenarios.

[0043] In addition to the aspects and any possible implementations described above, a further implementation is provided in which the macroscopic feedback includes:

[0044] Identify policy sets with high semantic overlap through policy distillation;

[0045] A strategy that automatically marks outdated knowledge based on the half-life of knowledge in various fields;

[0046] The strategy-based input-output ratio is used to implement the bottom-ranking elimination system, where the input-output ratio is the ratio of the strategy execution time to the strategy evaluation result.

[0047] In addition to the aspects and any possible implementations described above, another implementation is provided in which the updating steps of new and old strategies in a specific domain include: comparing the differences between the new and old strategies through shadow testing and assessing the risk levels of the new and old strategies respectively, and selecting the new strategy or the old strategy with the lower risk level for updating.

[0048] In addition to the aspects described above and any possible implementation, a further implementation is provided, which also includes the ability to query the adaptation strategy adopted and the evolution trajectory of the adaptation strategy for any user question data.

[0049] According to a second aspect of this disclosure, an intelligent agent memory indexing system based on intent recognition is provided, comprising the following modules:

[0050] The preliminary classification module is used to acquire real-time question-and-answer data and perform preliminary intent classification on the real-time question-and-answer data using a domain knowledge rule base.

[0051] The deep classification module, connected to the preliminary classification module, is used to extract structured descriptions from real-time question-and-answer data after preliminary intent classification, and to perform deep intent parsing in stages, outputting standardized intent description text.

[0052] The intent memory index retrieval module, connected to the deep classification module, is used to obtain the Agent runtime context based on the standardized intent description text, perform multi-dimensional retrieval, obtain and execute the adapted strategy from the strategy library, and return the strategy evaluation result. The Agent runtime context is obtained through the following steps: capturing the semantic features of the standardized intent description text and recording the Agent runtime context corresponding to the deep semantic features based on a fine-grained metadata annotation system.

[0053] The feedback update module, connected to the intent memory index retrieval module, is used to provide micro-feedback and macro-feedback based on the policy evaluation results, and update the policy library.

[0054] The beneficial effects of this disclosure are:

[0055] This disclosure uses a process of "preliminary classification - structured description - in-depth analysis - standardized output" to gradually mine deep semantics from surface text. It also designs a sub-process of "quantitative evaluation - structured questioning - multi-dimensional description supplementation" to solve the problem of ambiguous intent and provide accurate input for subsequent retrieval.

[0056] This disclosure records the Agent runtime context through a fine-grained metadata annotation system, transforming the experience of "how to solve problems" into reusable structured strategies;

[0057] This disclosure utilizes a multi-dimensional retrieval mechanism combining "vector retrieval + dynamic filtering" with strategy adaptation and dynamic injection to achieve precise matching and flexible adjustment of strategies. This ensures that the retrieval results are not only semantically similar but also adapted to the current scenario, avoiding the problem of traditional retrieval methods that only achieve similarity without proper matching.

[0058] This disclosure achieves self-purification and iteration of the strategy library through a two-layer optimization mechanism that combines micro and macro feedback;

[0059] The technical solution disclosed herein achieves a complete closed loop from "intent recognition" to "policy reuse" and then to "policy optimization".

[0060] It should be understood that the description in the Summary of the Invention is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0061] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. The drawings are provided for a better understanding of the invention and are not intended to limit the scope of this disclosure. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:

[0062] Figure 1 A flowchart of the agent memory indexing method based on intent recognition provided in this disclosure is shown;

[0063] Figure 2 A schematic diagram of the structure of the agent memory indexing system based on intent recognition provided in this disclosure is shown;

[0064] Figure 3 A schematic diagram of the structure of an electronic device provided in this disclosure is shown. Detailed Implementation

[0065] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0066] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0067] First, it should be noted that an agent system is an intelligent system based on multiple agents, where each agent is a computational entity capable of autonomously perceiving the environment, making decisions, and executing actions to achieve a specific goal. These agents coordinate and serve each other to jointly accomplish complex tasks. In this disclosure, "Agent" is used to refer to this intelligent system.

[0068] This disclosure provides an agent memory indexing method based on intent recognition, see [link to relevant documentation]. Figure 1 ,include:

[0069] S1. Obtain real-time question-and-answer data, and perform preliminary intent classification on the real-time question-and-answer data using a domain knowledge rule base.

[0070] The domain knowledge rule base contains grammatical pattern matching rules for vertical scenarios (such as legal documents, business copywriting, data analysis, etc.), and can identify domain keywords and contextual markers in the task, such as "draft," "revise," and "analyze." It should be noted that a large amount of real-time question-answering data should be acquired to ensure the accuracy of intent analysis.

[0071] S2. Extract structured descriptions from real-time question-and-answer data after initial intent classification, and perform in-depth intent parsing in stages to output standardized intent description text.

[0072] (i) Using a semantic template engine, the real-time question-and-answer data after initial intent classification is deconstructed to extract a three-layer structured description:

[0073] (1) Task type dimension to identify basic operation categories, such as text generation, clause modification, data visualization, etc.;

[0074] (2) Pragmatic goals dimension, to analyze deep intentions, such as persuading customers, avoiding risks, and presenting trends. We can also judge tone and style by analyzing modal verbs and rhetorical features. Modal verbs include "should", "suggest", "must", etc., and rhetorical features include "question", "exclamation", "conditional sentence", etc.

[0075] (3) Content element dimension to capture entity relationships, such as specific legal terms, industry terms, and data fields.

[0076] (ii) To handle complex intents, in-depth intent parsing is also required in stages, specifically including the following steps:

[0077] S211. Analyze the predicate and object structure of real-time question-and-answer data through syntactic analysis tree to obtain the first intent text, thereby determining the main task framework;

[0078] S212. Analyze the constraints of the modifiers in the real-time question-and-answer data through dependency relation analysis to obtain the second intent text; such as a time limit of three days and a table format requirement.

[0079] S213. For ambiguous statements, the contextual reasoning mechanism is used to eliminate ambiguity in the second intent text by combining explicit and implicit instructions from historical dialogues in real-time question-and-answer data, thus obtaining the third intent text. Explicit instructions include user supplementary notes such as "refer to previously processed merger and acquisition agreements"; implicit cues include recurring terms.

[0080] The intermediate representations generated during the parsing process need to undergo consistency checks to ensure that there are no logical conflicts in the descriptions of each dimension. For example, the combination of the "legal document" type and "humorous tone" will be marked as an anomaly.

[0081] S214. The third intent text is output based on a preset standard to obtain a standardized intent description text. In this disclosure, the final output structured intent description is organized using a standardized JSON Schema, containing required fields (task type, core verb) and optional fields (style constraints, reference template), providing computable semantic features for subsequent index queries.

[0082] In summary, it not only understands what the user "wants to do," but also focuses on analyzing the pragmatic features of "how to execute," so that the generated intent description can directly guide subsequent strategy reuse.

[0083] Furthermore, considering that the output standardized intent description text may fail to parse mixed intents or implicit intents, where implicit intents refer to those without explicit predicates / objects, and mixed intents refer to those with multi-task conflicts, such as needing both detail and brevity, the third intent text is processed as follows:

[0084] S221. Construct an intent quantification model, use the intent quantification model to calculate the fuzzy score of the third intent text, and determine whether the third intent text is a highly fuzzy intent based on the fuzzy score; if so, proceed to the next step.

[0085] The intent quantization model is built on a fine-tuned BERT model, and the fuzzy score S can be expressed by the following formula:

[0086] S = 1 - max(P1, P2, ..., P... N );

[0087] Where P1 represents the probability of type 1 intention, P2 represents the probability of type 2 intention, and P... N This represents the probability of the Nth type of intent, where N is the total number of preset intent categories.

[0088] If the fuzziness score is greater than a preset threshold, it is determined to be a highly fuzzy intent.

[0089] S222. Identify the fuzzy type of the third intent text based on the constructed fuzzy classifier, generate structured follow-up question templates based on different fuzzy types, and wait for the user to supplement the clarification information based on the structured follow-up question templates.

[0090] The ambiguity types include implicit intent and mixed intent. In one specific embodiment, the structured questioning template for implicit intent is: Does there be an error in the content, format, or logic? While the structured questioning template for mixed intent is: Does there be a priority?

[0091] S223. Extract explicit features and / or implicit features based on the clarification information, and construct an intent weight vector based on the explicit features and / or implicit features to obtain a multi-dimensional intent description;

[0092] Display features are obtained based on the clarification information provided by the user, such as specifying constraints based on the priority provided by the user.

[0093] The weight vector is represented as W = [W1, w2, w3], where w1 represents the task type weight, such as risk analysis accounting for 60% and report generation accounting for 40%; w2 represents the pragmatic goal weight, such as "compliance" accounting for 70% and "conciseness" accounting for 30%; w3 represents the content element weight, such as table accuracy accounting for 80% and format aesthetics accounting for 20%.

[0094] For w1, w2, and w3, an attention mechanism is used for computation.

[0095]

[0096] Among them, S i This represents the significance score of the i-th explicit or implicit feature. The significance score is calculated based on the frequency of user clarification (reflecting explicit features) and the frequency of term occurrence (reflecting implicit features).

[0097] S224. Add a fuzzy processing field to the preset standard, and fill the multi-dimensional intent description and clarification information into the fuzzy processing field to obtain standardized intent description text, ensuring that unstructured constraints are stored in a structured manner.

[0098] The above quantifies ambiguous intent.

[0099] S3. Obtain the Agent runtime context based on the standardized intent description text, perform multi-dimensional retrieval, obtain the appropriate policy from the policy library and execute it, and return the policy evaluation result;

[0100] The Agent runtime context is obtained through the following steps: capturing the semantic features of the standardized intent description text, and recording the Agent runtime context corresponding to the deep semantic features based on a fine-grained metadata annotation system.

[0101] Specifically, deep semantic features of the standardized intent-description text are captured through dense vector encoding; for example, the embedding vector generated using the BERT encoder or the Sentence-BERT model is a deep semantic feature.

[0102] Simultaneously, a fine-grained metadata annotation system is adopted to record the Agent runtime context associated with deep semantic features. The fine-grained metadata annotation system includes, but is not limited to, successful execution prompt chain templates (such as prompt sequences for the "contract revision" task), strategy summaries (such as rule-based descriptions of "prioritizing the citation of Article 584 of the Civil Code"), and historical execution performance indicators (such as manual scoring, automated ROUGE / LegalBLEU evaluation values, and time consumption statistics). The Agent runtime context can be understood as a structured record of the Agent's execution process, providing reusable strategic basis for subsequent retrieval.

[0103] In addition, the backend service will periodically perform compression and semantic redundancy merging strategies, such as merging 10 similar "labor contract modification" intentions into a generalized template, and automatically eliminating inefficient strategies that have not been used for a long time or whose effects are consistently below the threshold.

[0104] To ensure stability, it is possible to save the intent at a specific point in time as a rollback checkpoint, which is especially important in high-risk scenarios such as law and finance.

[0105] In summary, a proactive memory management capability oriented towards the agent's runtime context was designed. This capability not only records "what happened in the past" but also structurally accumulates strategic knowledge on "how to successfully solve problems." When the agent encounters complex tasks during runtime, it can automatically reuse previous experience in handling similar intentions through intention decomposition and strategy assembly. For example, when "drafting an English merger and acquisition agreement with default clauses," the intentions related to "merger and acquisition agreement templates, drafting default clauses, and legal English translation" can be reused, significantly improving the zero-sample adaptation capability for complex tasks.

[0106] One issue is the lack of dimensions in the construction process of the Agent runtime context, which may lead to insufficient adaptability of the retrieved strategies. Therefore, the following settings were implemented to obtain better adapted strategies:

[0107] Step 1: Set up an external interface. Use the external interface to call the user profile library to obtain long-term features and call the domain database to obtain real-time constraint features. The long-term features and real-time constraint features constitute an environmental feature vector.

[0108] By connecting to external interfaces, an environmental feature vector is constructed, solving the problem of requiring differentiated strategies for similar tasks due to different user identities. For example, long-term features include industry tags (such as listed companies, small businesses, etc.) and role tags (such as general counsel, etc.); real-time constraint features include industry risk levels and regulatory tags.

[0109] Step 2: Obtain the domain labels corresponding to the standardized intent description text, construct a retrieval graph based on the association strength between the domain labels, obtain the association strengths in the retrieval graph that are greater than a set value and the corresponding two domain labels, and obtain the domain table;

[0110] Domain tags such as law, e-commerce, and taxation are used. For example, law and taxation are strongly correlated, so the correlation strength between them is 1. A retrieval graph is constructed using domain tags as nodes and correlation strength as edge weights. Relationship strengths greater than a set value are obtained from the retrieval graph to filter weakly correlated domains. These domains can be sorted from largest to smallest correlation strength, and the top three are selected. Based on the retrieval graph, the related domains involved in real-time question-and-answer data are identified, ensuring that the retrieved strategies not only cover the current domain but also include supporting strategies for related domains.

[0111] Step 3: Capture the semantic features of the standardized intent description text, encode the semantic features into a semantic vector, encode the domain table into a domain vector, and encode the environment feature vector into an environment vector; fuse the semantic vector, domain vector, and environment vector to obtain a fused vector;

[0112] User industry, role, and other environmental information are transformed into computer-recognizable numerical vectors. For example, specific values ​​can be used to correspond to characteristics such as "listed company," "legal affairs," and "high urgency." Cross-domain related information is also transformed into numerical vectors, using numerical values ​​to represent the degree of correlation and characteristics between different domains.

[0113] In this disclosure, different weights are set for the semantic vector, domain vector, and environment vector, and the weights are multiplied and summed to obtain the fused vector. It is important to note that the sum of the weights should be 1.

[0114] Step 4: Calculate the similarity between the fused vector and the vectors in the policy library, and use the policy in the policy library with the highest similarity as the adaptation policy for policy optimization and sorting.

[0115] The above optimizations to the strategy selection process enhance the adaptability of strategy retrieval to real-time scenarios and cross-domain logic by supplementing environmental and cross-domain dimensions.

[0116] The multi-dimensional retrieval process is not a simple nearest neighbor matching, but rather employs a dynamic weighted algorithm that comprehensively considers semantic similarity, domain label matching degree, and the success rate weight of historical strategies. For example, when processing the task of "revising the confidentiality clause in the equity transfer agreement", the system may simultaneously recall multiple related strategies such as "equity agreement template generation", "equity agreement template generation", and "legal document revision", and then generate a comprehensive ranking result through a relevance fusion algorithm.

[0117] Specifically, multi-dimensional retrieval is performed to obtain and execute suitable strategies from the strategy library, including the following steps:

[0118] S31. Convert the standardized intent description text into a query vector, perform a nearest neighbor search in the vector space of the strategy library, and recall candidate vectors with similar semantics.

[0119] The vector space is formed by transforming the policies in the policy library into vector representations. The similarity between the query vector and each vector representation in the vector space is calculated, and vectors with high similarity are recalled as candidate vectors.

[0120] S32. Process the candidate vectors using a dynamic filter based on preset metadata to obtain the optimal matching strategy;

[0121] Metadata includes three aspects: domain tags, timeliness, and resource constraints. Domain tags include vertical classifications such as finance, law, and healthcare. Timeliness prioritizes recently successful strategies. Resource constraints represent special settings, such as excluding strategies that require calling specific APIs. In one example, the current query vector has a high similarity to three vectors in the strategy library, but if the domain tag of the current query vector overlaps significantly with a certain strategy, that strategy will receive a higher score. Similarly, strategies with high timeliness and that meet resource constraints will also receive bonus points. The strategy with the highest score is the best matching strategy.

[0122] The two-layer retrieval architecture of S31 and S32 retains the neural network's ability to perform fuzzy matching of intents, while ensuring the business compliance of the return strategy through the rule engine.

[0123] S33. Analyze the difference between the real-time question-and-answer data and the candidate vectors corresponding to the best matching strategy, and obtain the adaptation strategy by performing variable substitution and logical connection based on the difference.

[0124] The best matching strategy returned by the search is not applied directly; a strategy adaptation phase is still required.

[0125] By analyzing the differences between the current real-time question-and-answer data and the candidate vectors corresponding to the best matching strategy, the system automatically performs variable substitution and logical connection to adapt the strategy. For example, when the historical strategy targets "Chinese contract revision" while the current task requires "English output," the current task requirement and the matched historical strategy are input into the machine learning model. The machine learning model then makes specific modifications for the current task, referencing the historical strategy, that is, it inserts a language conversion module while retaining the core legal logic.

[0126] For complex tasks, the system supports strategy combination, which intelligently splices together strategy chains of multiple intentions. For example, the "data report generation" strategy can be executed first, and then the "visual chart optimization" strategy can be applied.

[0127] The entire adaptation process can be verified for logical coherence in a sandbox environment to avoid issues such as instruction conflicts or semantic breaks.

[0128] S34. The adaptation strategy is dynamically injected into the large language model gradually as the large language model performs reasoning.

[0129] The strategy execution phase employs a progressive generation mechanism, dynamically injecting retrieved strategy key points into each step of reasoning within the large language model. For example, when generated text is detected to deviate from legal terminology norms, the constraint of "using standard legal expressions" is automatically strengthened.

[0130] In addition, strategy evaluation results are returned after each retrieval task is completed. Strategy evaluation results include formal review (such as format completeness and terminology consistency), functional verification (such as whether it meets the requirements of real-time question-answering data), and domain expert evaluation (such as a preliminary judgment on legal validity).

[0131] The strategy evaluation results are not only used to adjust the confidence weight of the strategy in real time, but also to trigger the incremental learning mechanism of the strategy library. When the existing strategy is found to be insufficient, the Agent running context at the time of successful execution is recorded, and its applicable boundary conditions are marked, such as "only applicable to equity agreements with registered capital of less than 5 million".

[0132] S4. Based on the strategy evaluation results, provide micro-feedback and macro-feedback, and update the strategy library.

[0133] (I) Micro-feedback

[0134] (1) The results of each strategy evaluation are automatically saved;

[0135] The strategy evaluation results generated after each task execution will trigger record updates, such as user ratings and automation metrics:

[0136] Increase the priority weight of successful adaptation strategies so that they are more likely to be hit in subsequent searches;

[0137] The success of an adaptation strategy can be determined by the following methods: high user ratings indicate success, or machine learning models can be used to judge the original intent of users' real-time question-and-answer data and the search results; if they match the user's original intent, the strategy is considered successful.

[0138] Defective adaptation strategies will be marked with corrections, and will trigger warnings or automatically invoke remedial measures during the next search, such as recommending manual review.

[0139] The system maintains metadata about the "lifecycle" of adaptation strategies, recording metrics such as the number of times they are referenced, the most recent usage time, and cross-scenario applicability, providing data support for subsequent optimization.

[0140] (II) Macro Feedback

[0141] At the macro level, regular maintenance primarily ensures the health of the repository through three core operations:

[0142] 1. Identify policy sets with high semantic overlap through policy distillation;

[0143] For example, for 20 "labor contract drafting" records with similarity exceeding the threshold, clustering algorithms are used to extract common patterns, generate a super strategy with stronger generalization ability, and archive the original specific instances as derivative cases.

[0144] 2. A strategy to automatically mark outdated knowledge based on the half-life of knowledge in various fields; for example, the average update cycle of financial regulatory provisions, and accessing external knowledge sources for real-time compliance verification in rapidly changing fields such as healthcare;

[0145] 3. Implement an elimination mechanism based on the input-output ratio of the strategy, such as the ratio of strategy execution time to strategy evaluation results, and remove inefficient records that have been at the bottom for a long time.

[0146] This disclosure also includes the following steps for updating strategies in specific domains: comparing the differences between the new and old strategies through shadow testing and assessing the risk levels of the new and old strategies respectively, and selecting the new strategy or the old strategy with the lower risk level for updating. Specifically, change management is implemented for strategy modifications in specific domains (such as legal citations and medical advice); major updates require shadow testing, which involves executing the new and old strategies in parallel on a historical task set, comparing the output differences, and assessing the risk level through a machine learning model.

[0147] This disclosure also includes: traceability of strategy versions, allowing any output to be traced back to its adopted strategy chain and the historical evolution of the strategy, which is crucial for meeting the compliance audit requirements of industries such as finance and healthcare.

[0148] Unlike the global parameter updates of traditional machine learning models, this disclosed solution maintains a semantic granularity that is understandable to humans. Each strategy adjustment can be applied to the improvement needs of a specific task scenario. This design not only ensures the interpretability of the system but also facilitates the participation of domain experts in targeted optimization.

[0149] Based on the above technical solutions, this disclosure uses a process of "preliminary classification - structured description - in-depth analysis - standardized output" to gradually mine deep semantics from surface text. It also designs a sub-process of "quantitative evaluation - structured questioning - multi-dimensional description supplementation" for ambiguous intents, which solves the problem of intent ambiguity and provides accurate input for subsequent retrieval.

[0150] This disclosure records the Agent runtime context through a fine-grained metadata annotation system, transforming the experience of "how to solve problems" into reusable structured strategies;

[0151] This disclosure utilizes a multi-dimensional retrieval mechanism combining "vector retrieval + dynamic filtering" with strategy adaptation and dynamic injection to achieve precise matching and flexible adjustment of strategies. This ensures that the retrieval results are not only semantically similar but also adapted to the current scenario, avoiding the problem of traditional retrieval methods that only achieve similarity without proper matching.

[0152] This disclosure achieves self-purification and iteration of the strategy library through a two-layer optimization mechanism that combines micro and macro feedback;

[0153] The technical solution disclosed herein achieves a complete closed loop from "intent recognition" to "policy reuse" and then to "policy optimization".

[0154] This disclosure also provides an intelligent agent memory indexing system 200 based on intent recognition, see [link to relevant documentation]. Figure 2 It includes the following modules:

[0155] The preliminary classification module 201 is used to acquire real-time question-and-answer data and perform preliminary intent classification on the real-time question-and-answer data using a domain knowledge rule base.

[0156] The deep classification module 202, connected to the preliminary classification module 201, is used to extract structured descriptions from real-time question-and-answer data after preliminary intent classification, and to perform deep intent parsing in stages, outputting standardized intent description text.

[0157] The intent memory index retrieval module 203, connected to the deep classification module 202, is used to obtain the Agent running context based on the standardized intent description text, perform multi-dimensional retrieval, obtain the appropriate strategy from the strategy library and execute it, and return the strategy evaluation result; wherein, the Agent running context is obtained through the following steps: capturing the semantic features of the standardized intent description text, and recording the Agent running context corresponding to the deep semantic features based on the fine-grained metadata annotation system;

[0158] The feedback update module 204, connected to the intent memory index retrieval module 203, is used to provide micro-feedback and macro-feedback based on the strategy evaluation results and update the strategy library.

[0159] Other details can be found in the section on [specific topics], and will not be elaborated upon here.

[0160] This disclosure also provides an apparatus comprising: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to perform the steps of the method described above.

[0161] Figure 3 A schematic block diagram of an electronic device 300 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0162] Electronic device 300 includes a computing unit 301, which can perform various appropriate actions and processes according to a computer program stored in ROM 302 or a computer program loaded into RAM 303 from storage unit 308. RAM 303 can also store various programs and data required for the operation of electronic device 300. The computing unit 301, ROM 302, and RAM 303 are interconnected via bus 304. I / O interface 305 is also connected to bus 304.

[0163] Multiple components in electronic device 300 are connected to I / O interface 305, including: input unit 306, such as keyboard, mouse, etc.; output unit 307, such as various types of displays, speakers, etc.; storage unit 308, such as disk, optical disk, etc.; and communication unit 309, such as network card, modem, wireless transceiver, etc. Communication unit 309 allows electronic device 300 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0164] The computing unit 301 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 301 performs the various methods and processes described above. For example, the intent-based agent memory indexing method, in some embodiments, can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 308. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 300 via ROM 302 and / or communication unit 309. When the computer program is loaded into RAM 303 and executed by the computing unit 301, one or more steps of the intent-based agent memory indexing method described above can be performed. Alternatively, in other embodiments, computing unit 301 may be configured by any other suitable means (e.g., by means of firmware) to perform an agent memory indexing method based on intent recognition.

[0165] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0166] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0167] This disclosure also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements an agent memory indexing method based on intent recognition.

[0168] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0169] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including voice input, speech input, or tactile input).

[0170] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0171] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0172] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0173] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. An agent memory indexing method based on intent recognition, comprising: Acquire real-time question-and-answer data, and perform preliminary intent classification on the real-time question-and-answer data using a domain knowledge rule base; Structured descriptions are extracted from real-time question-and-answer data after initial intent classification, and deep intent parsing is performed in stages to output standardized intent description text. Based on the standardized intent description text, the Agent runtime context is obtained for multi-dimensional retrieval, the appropriate policy is obtained from the policy library and executed, and the policy evaluation result is returned. Based on the strategy evaluation results, micro-level and macro-level feedback are provided to update the strategy library; wherein... The Agent runtime context is obtained through the following steps: capturing the semantic features of the standardized intent description text, and recording the Agent runtime context corresponding to the deep semantic features based on a fine-grained metadata annotation system.

2. The agent memory indexing method based on intent recognition according to claim 1, wherein, Structured descriptions include the following three dimensions: Task type dimension to identify the category of basic operations; Pragmatic objectives are used to analyze deeper intentions; Content element dimension, to capture the relationships between entities.

3. The agent memory indexing method based on intent recognition according to claim 1, wherein, Deep intent parsing is performed in stages to output standardized intent description text, specifically including the following steps: The first intent text is obtained by analyzing the predicate and object structure of real-time question-and-answer data through syntactic analysis tree. The second intent text is obtained by analyzing the constraints of the modifiers in the real-time question-and-answer data through dependency relation analysis of the first intent text. By combining explicit and implicit instructions from historical dialogues based on real-time question-and-answer data, ambiguity in the second intent text is eliminated, resulting in the third intent text. The third intent text is output based on a preset standard to obtain a standardized intent description text.

4. The agent memory indexing method based on intent recognition according to claim 3, wherein, After obtaining the third intent text, it includes: Construct an intent quantification model, use the intent quantification model to calculate the fuzzy score of the third intent text, and determine whether the third intent text is a highly fuzzy intent based on the fuzzy score; if so, proceed to the next step. The fuzzy classifier is used to identify the fuzzy type of the third intent text. Based on the different fuzzy types, structured follow-up question templates are generated, and the user is asked to provide clarification information based on the structured follow-up question templates. Based on the clarification information, explicit features and / or implicit features are extracted, and an intent weight vector is constructed based on the explicit features and / or implicit features to obtain a multi-dimensional intent description; The preset standard adds a fuzzy processing field, and the multi-dimensional intent description and clarification information are filled into the fuzzy processing field to obtain standardized intent description text.

5. The agent memory indexing method based on intent recognition according to claim 1, wherein, Perform multi-dimensional retrieval, obtain and execute suitable strategies from the strategy library, including the following steps: The standardized intent description text is converted into a query vector, and a nearest neighbor search is performed in the vector space of the strategy library to recall candidate vectors with similar semantics. The candidate vectors are processed using a dynamic filter based on preset metadata to obtain the optimal matching strategy; The differences between the real-time question-answering data and the candidate vectors corresponding to the best matching strategy are analyzed, and the matching strategy is obtained by variable substitution and logical connection based on the differences. The adaptation strategy is dynamically injected into the large language model as the reasoning process progresses.

6. The agent memory indexing method based on intent recognition according to claim 1, wherein, The micro-feedback includes: The results of each strategy evaluation are automatically saved; Increase the priority weight of successful adaptation strategies; Additional correction notes for the failed adaptation strategy: Record the number of times the adaptation strategy is referenced, the most recent usage time, and its applicability across different scenarios.

7. The agent memory indexing method based on intent recognition according to claim 1, wherein, The macro-level feedback includes: Identify policy sets with high semantic overlap through policy distillation; A strategy that automatically marks outdated knowledge based on the half-life of knowledge in various fields; The strategy-based input-output ratio is used to implement the bottom-ranking elimination system, where the input-output ratio is the ratio of the strategy execution time to the strategy evaluation result.

8. The agent memory indexing method based on intent recognition according to claim 7, wherein, The steps for updating new and old strategies in specific fields include: comparing the differences between the new and old strategies through shadow testing and assessing the risk levels of the new and old strategies respectively, and selecting the new strategy or the old strategy with the lower risk level for updating.

9. The agent memory indexing method based on intent recognition according to claim 7, wherein, It also includes: for any user question data, the corresponding adaptation strategy and the evolution trajectory of the adaptation strategy can be queried.

10. An intelligent agent memory indexing system based on intent recognition, used to implement the method of claims 1 to 9, comprising the following modules: The preliminary classification module is used to acquire real-time question-and-answer data and perform preliminary intent classification on the real-time question-and-answer data using a domain knowledge rule base. The deep classification module, connected to the preliminary classification module, is used to extract structured descriptions from real-time question-and-answer data after preliminary intent classification, and to perform deep intent parsing in stages, outputting standardized intent description text. The intent memory index retrieval module, connected to the deep classification module, is used to obtain the Agent runtime context based on the standardized intent description text, perform multi-dimensional retrieval, obtain and execute the adapted strategy from the strategy library, and return the strategy evaluation result. The Agent runtime context is obtained through the following steps: capturing the semantic features of the standardized intent description text and recording the Agent runtime context corresponding to the deep semantic features based on a fine-grained metadata annotation system. The feedback update module, connected to the intent memory index retrieval module, is used to provide micro-feedback and macro-feedback based on the policy evaluation results, and update the policy library.

Citation Information

Cited By

  • NL2DSL-based power distribution network semantic analysis and intelligent number asking method and system

    CN121456106A

  • Question and answer method and device based on multiple agents, medium, equipment and program product

    CN121542390A

  • Question answering method and device based on multi-agent, medium, equipment and program product

    CN121542390B

  • Extraction analysis method and system based on semantic expression understanding

    CN121561104A

  • Text-to-SQL (Structured Query Language) agent collaboration system and method for perceiving potential intention of user in multiple rounds of contexts

    CN122152877A