Database natural language query autoregression intention classification method and system

By using an autoregressive intent classification method, combined with a large language model and structured prompts, and dynamically adjusting the database query strategy, the problem of low intent recognition accuracy in existing technologies is solved, and efficient management and cross-database querying of infrared image data are achieved.

CN120995178AActive Publication Date: 2025-11-21山东浪潮数据库技术有限公司 +2

Patent Information

Application Number
CN202511157088.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-19
Publication Date
2025-11-21
Estimated Expiration
2045-08-19

AI Technical Summary

Technical Problem

Existing database natural language query intent classification methods suffer from insufficient generalization ability when dealing with complex semantics, multi-turn dialogues, and cross-database queries. They are unable to adapt to changes in database structure, resulting in low intent recognition accuracy. This is especially true in the field of infrared image processing, where data is difficult to manage and utilize effectively.

Method used

An autoregressive intent classification method is adopted, which combines a large language model with structured prompts and multi-turn dialogue state management to dynamically adjust the prompting strategy. The dataset and user feedback are stored in a database schema for autoregressive correction of intent classification to ensure the accuracy and adaptability of intent recognition.

Benefits of technology

It improves the accuracy of identifying user intent and cross-database queries, reduces manual maintenance costs, adapts to changes in database structure, and achieves efficient management and utilization of infrared image data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120995178A_ABST
    Figure CN120995178A_ABST
Patent Text Reader

Abstract

The invention discloses a database natural language query autoregression intention classification method and system, belongs to the technical field of natural language processing and large models, and aims at solving the technical problem of how to overcome the processing defects of a traditional infrared data set storage retrieval scheme on complex semantics and multiple rounds of dialogues. According to the technical scheme, the method comprises the steps of data storage and semantic annotation; autoregressive prompt correction: based on a large model dialogue application framework and according to user feedback, optimizing a structured prompt word for indicating database natural language query of a user large language model operation mode through an intention classification autoregressive correction large model, and realizing autoregressive prompt correction of natural language query correctness; performing multi-round dialogue state management; and context auto-regression correction: updating the context in combination with user replies, regenerating structured cue words, performing intention classification, and matching the cue words corresponding to the operation according to the weight of the structured cue words.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of natural language processing and large model technology, specifically to a method and system for classifying the autoregressive intent of natural language queries in a database. Background Technology

[0002] Existing databases rely heavily on rule engines or static machine learning models for classifying natural language query intents. This makes it difficult to handle complex semantics (such as nested intents and variations of domain terminology). Furthermore, the databases lack generalization capabilities in cross-database queries and dynamic schema scenarios. This results in highly complex data management for different scenarios and annotation types in the field of infrared image processing. In practical use, it is difficult to mine related data based on the task scenario, thus failing to realize the value of existing data.

[0003] Existing LLM-based solutions have the following drawbacks: ①Note: The project is static. It is unable to adaptively adjust the prompting strategy based on historical query context and database structure changes.

[0004] ② Limited intent recognition: Weak ability to handle intent shifts in multi-turn dialogues (such as shifting from "querying user data" to "analyzing data trends").

[0005] ③ Insufficient cross-modal adaptation: It is difficult to combine non-textual features such as database table structure, index information, and infrared image data to optimize intent classification.

[0006] ④ Poor long-tail intent recognition: low accuracy for low-frequency query intents (such as specific stored procedure calls).

[0007] Therefore, how to overcome the shortcomings of traditional infrared dataset storage and retrieval schemes in handling complex semantics and multi-turn dialogues, and improve the accuracy of user intent and cross-database query recognition, is a technical problem that urgently needs to be solved. Summary of the Invention

[0008] The technical objective of this invention is to provide a database natural language query autoregressive intent classification method and system to overcome the shortcomings of traditional infrared dataset storage and retrieval schemes in handling complex semantics and multi-turn dialogues, and to improve the accuracy of user intent and cross-database query recognition.

[0009] The technical objective of this invention is achieved as follows: a database natural language query autoregressive intent classification method, the specific method of which is as follows: Data storage and semantic annotation: The infrared image dataset and multi-category attribute information of each dataset are stored using a standard database schema for retrieval of large language models; Autoregressive suggestion correction: Based on a large model dialogue application framework (such as LangGraph), according to user feedback, the structured suggestion words of the database natural language query used to indicate the user's large language model operation are corrected through intention classification autoregressive correction of the correctness of natural language query. Multi-turn dialogue state management: The dialogue context history is stored in a time-series database (the dialogue context saved in the time-series database is used), and the user is guided by structured prompt words. The large language model workflow ensures that the user is confirmed after the operation plan is generated. The large model of intention classification autoregressive correction intercepts user messages and automatically triggers autoregressive correction based on user feedback, so as to achieve accurate and fast retrieval of related infrared datasets. Contextual autoregressive correction: The context is updated by combining user responses, structured cue words are regenerated and intents are classified, and cue words corresponding to the operation are matched according to the weight of the structured cue words. The weight of the corresponding operation cue words is increased according to the operation confirmed by the user, and the classification results containing the main idea graph, sub-intents and related database objects are obtained.

[0010] As a preferred method, the structured prompt word generation is as follows: Extract table names, field names, and field types from the database schema to construct the database context; Generate a prompt framework with examples based on a pre-defined intent classification system (such as query, modify, and analyze); The weight of the prompt examples is dynamically adjusted based on user feedback.

[0011] More preferably, structured prompts include meta-prompts, operation prompts, and intent classification prompts; Meta-prompts are loaded through fixed Markdown documents; meta-prompts (prompt engineers) are used to guide the intention classification autoregressive correction model to maintain the intention classification prompts when users report errors in intent recognition, correct the intent classification method in the intention classification prompts, and add new operation classifications; meta-prompts are static prompts and will not be modified. The text content of operation prompts and intent classification prompts is stored in a vector database in Markdown structured text format. It is retrieved and recalled through the corresponding vector database retrieval function, and the content is modified through the corresponding tool. The metadata of operation prompt words is stored in the internal relational database in the form of a relational table. It is queried through the corresponding relational database query function and the weight is modified through the corresponding relational database update function. The metadata of operation prompt words includes operation category, operation prompt word name weight. The weight change information of operation prompt words is stored in a time series database and is queried through the time series data query function.

[0012] More preferably, intent classification prompts are used to guide the user's large language model to decompose and classify the user's question, breaking it down into operational steps consisting of specific questions and requirements. The intent classification prompts are only modified by the intent classification autoregressive correction model based on the meta-prompts when the user reports that the intent recognition is incorrect. The prompts guide the user's large language model to classify the user's intent. In addition to the operation prompts corresponding to each preset operation category, the system generates a specific business scenario proposed by the user in real time through an intent classification autoregressive correction model based on user feedback. The system is also dynamically maintained by the intent classification autoregressive correction model based on the workflow of the meta prompts and user feedback. The operation prompts for each preset operation category include: answering database syntax questions (answer_question_prompt.md), generating sample SQL statements (generate_sql_prompt.md), generating sample code for database use (generate_code_prompt.md), creating database objects (create_database_object_prompt.md), adding object records (insert_prompt.md), updating object records (update_prompt.md), deleting object records (delete_prompt.md), and querying the database (query_prompt.md).

[0013] More specifically, the rules for refining intent classification prompts using the autoregressive modified large model are as follows: Maintain the original format: The newly generated or revised meta prompt content is still a structured document in Markdown format, retaining the previous headings, and only modifying the content of Role Description, Workflow, and Rules; among them, Workflow must be a mermaid flowchart; User needs are at the core: all optimization actions must revolve around the goals or potential needs clearly stated by the user, and not deviate from the output direction expected by the user; Ensure the clarity and accuracy of prompts: Optimized prompts avoid ambiguity, use precise vocabulary and clear instructions to ensure that the AI ​​model can understand the user's intent without bias; Avoid redundant information: Delete content in the original prompts that is not related to the core requirements, keep the prompts concise, and do not omit key constraints; Adapt to AI model characteristics: Adjust the level of detail and expression of prompts based on the training data, response style and capability boundaries of the target AI model (for example, strengthen the reasoning steps for logic-sensitive models, and retain a certain degree of openness for creative models). The optimization logic is explainable: Explain the specific optimization approach to the user, enabling them to understand the value of the optimization; this specific approach includes the modifications made, the reasons for the modifications, and the expected problems to be solved. Retain core needs: During the optimization process, the core needs of the user's original prompts must not be deleted or distorted, and the optimized prompts must be consistent with the user's original intention. Iterative optimization principle: If users are still dissatisfied with the initial optimization results, analyze the problem again based on new feedback, repeat the optimization process, and continue until users are satisfied with the output effect.

[0014] More specifically, the workflow for refining intent classification prompts using an autoregressive model is as follows: (1) Obtain the user's original request, i.e., the user message context, based on the current session ID using the get_message_history tool; (2) Use the get_prompt tool to retrieve the currently saved intent classification prompts from the vector database; (3) Obtain the user's large language model type from the large model dialogue application framework using the get_llm_type tool; (4) Use the get_operation_class_list tool to query the prompt word category information and obtain all existing operation categories; (5) Obtain the latest user feedback from the user message context; (6) Determine if the user feedback indicates an error in the operation plan: ① If not, proceed to step (12); ②If so, proceed to step (7); (7) Analyze user feedback and identify the problems; (8) Determine if the operation category is missing: ① If so, update the operation category list in the intent category prompt words through the save_prompt tool, generate the corresponding operation prompt words, and jump to step (12). ②If not, proceed to step (8); (8) Defects in location prompts: missing information, vague instructions, insufficient constraints, i.e., weak guidance; (9) Develop optimization strategies: supplement details, clarify constraints, adjust structure and strengthen guidance; (10) Implement optimization and adjustment to generate optimized prompt words; (11) Save the revised intent category prompts and the newly added or revised operation prompts, as well as the weights of the corresponding categories of the operation prompts, using the save_prompt tool; (12) End the process.

[0015] More specifically, the natural language query process is as follows: (1) Receive user natural language query messages; (2) Use the query_weight tool to query the weight of each operation prompt word in the prompt word category information table; (3) Load the intent classification prompts and operation prompts that have been intercepted and corrected by the intent classification autoregressive correction large model using the load_prompt tool; (4) Determine the complexity of the user message: ①If the user message contains only one intent, proceed to step (9); ②If the user message contains multiple sub-intents, then proceed to step (5); (5) Based on semantic logic, decompose into multiple indivisible sub-intents; (6) Generate corresponding processing operations for each decomposed sub-intent; (7) Based on the weight of the operation category, query the vector database using the match_prompt tool to obtain a list of operation prompt words that match the operation information, and recall them based on the weight of the operation prompt words; (8) Generate operation plans according to the operation prompts corresponding to the categories; (9) Ask the user whether the operation plan matches the user's intention: ① If it does not meet the user's expectations, ask the user to explain why it does not meet their expectations; ②If it matches the user's intent, then proceed to step (10); (10) Please have the user confirm that the operation plan is correct: ①If the user confirms that the operation plan is correct, then start to execute the operation step by step according to the operation plan and execute step (11). ②If the user rejects the operation plan, proceed to step (4); (12) Increase the corresponding class weights using the raise_intention_class_weight tool; (13) Output the processing results.

[0016] More specifically, the natural language query rules are as follows: Accurately identify the operation type corresponding to the sub-intent: strictly based on the number of atomic intents contained in the user message, accurately distinguish between simple and complex messages, and provide the correct direction for subsequent processing; Semantic decomposition fits the context: When decomposing complex natural language queries, the context is fully considered to ensure that each decomposed query point is faithful to the user's original expression, without ambiguity or omission; Operation-generated adaptive query: The processing operations generated for each sub-intent are highly matched with the query content, are executable, and can effectively respond to the query requirements of the sub-intent; The categorization must strictly adhere to the following criteria: [Answering database syntax questions, generating sample SQL statements, generating sample code for database use, creating database objects, adding object records, updating object records, deleting object records, and querying the database]. Unauthorized adjustments to the categorization content are strictly prohibited. Focus on user query intent: The entire parsing process is always centered on the user's natural language query intent, avoiding deviation from the user's actual needs due to subjective interpretation; Ensure clear and intuitive results: The output classification results should be clearly structured and concisely expressed, so that users can quickly grasp the classification of their query intent and the corresponding processing method; Efficiently respond to query requests: While ensuring parsing accuracy, quickly process and analyze users' natural language query messages, and promptly provide classification results.

[0017] More preferably, the contextual autoregressive correction is as follows: (1) Obtain the user message context; (2) The intention classification autoregressive correction big model (internal big model) intercepts user messages, determines whether it is a negative operation plan feedback, and corrects the intention classification prompt words and operation prompt words according to the feedback message and meta prompt words; (3) The user big language model (external big model) decomposes the user requirements based on the latest intent classification prompt words and classifies the operation steps according to intent, generates an operation plan and pushes it to the user for confirmation; (4) Determine if the user confirms that the operation plan is correct: ①If so, the operation plan will be gradually executed starting from the user's large language model; ②If not, proceed to step (2).

[0018] A database natural language query autoregressive intent classification system is provided. This system is used to implement the database natural language query autoregressive intent classification method described above. The system includes a front-end interaction layer, a back-end service layer, a data layer, and a user service layer. The front-end interaction layer is used to build chat interaction interfaces and configuration management interfaces using mainstream AI Agent front-end frameworks (taking CopilotKit as an example); the chat interaction interface is used to provide users with a user interaction interface for using natural language queries to operate the user database; the configuration management interface is used to provide users with configuration information for configuring their own user large language model and database information for executing natural language queries. The backend service layer is implemented in Python based on a mainstream AI Agent framework (taking LangGraph as an example); the backend service layer includes a chat engine, an intent classification autoregressive correction model, a configuration management module, and a large model toolset; The chat engine provides a chat API for the chat interaction interface to receive user messages and call the save_message_history tool to save the chat message history. Then, the messages are passed to the intent classification autoregressive correction model in sequence. The intent classification autoregressive correction model performs intent classification and operation prompt word correction, and then passes it to the user big language model. The user big language model executes the various natural language query requirements requested by the user. The intent classification autoregressive correction model is used to call the get_message_history tool to retrieve chat message history from the time-series database, call the get_prompt tool to retrieve intent classification prompt words and operation prompt words, and make corrections based on user feedback, call the get_llm_type tool to retrieve the user's configured user language model type from the relational database for reference when correcting prompt words, call the get_operation_class_list tool to retrieve the operation prompt word type, and call the save_prompt tool to write the newly added or revised prompt word content to the vector database and append the newly added operation prompt words to the prompt word classification information table in the relational database. The configuration management module provides configuration management services for the configuration management interface. The configuration management services include adding, querying, updating, and deleting configuration information, including user large language model configuration information and database information for executing natural language queries. The large model toolset includes the `save_message_history`, `get_message_history`, `get_prompt`, `get_llm_type`, `get_operation_class_list`, `save_prompt`, `query_weight`, `load_prompt`, `match_prompt`, `raise_intention_class_weight`, and `database_mcp` tools. Specifically, `save_message_history` stores the chat engine's message history in a time-series database; `get_message_history` retrieves the chat message history through an intention classification autoregressive model; `get_prompt` allows the intention classification autoregressive model to retrieve intent classification prompts and operation prompts from a vector database for updating and correction; `get_llm_type` allows the intention classification autoregressive model to retrieve the user's user-defined language model type from a relational database, enabling targeted prompt generation and correction based on the characteristics of the user's language model type; `get_operation_class_list`... The `ass_list` tool allows the large-scale autoregressive model for intent classification to retrieve prompt word classification information from a relational database to compare and revise the operation types in the intent classification prompt words; the `save_prompt` tool allows the large-scale autoregressive model for intent classification to write the newly added or revised intent classification prompt words and operation prompt words to a vector database, and to write the newly added or revised operation prompt word classifications to the prompt word classification information in the relational database; the `query_weight` tool allows the large-scale language model for users to query the weight of each operation prompt word from the prompt word classification information, and is also used for prioritizing the retrieval of multiple operation prompt words during intent classification operation matching; `load_prompt`... The `pt` tool is used to load the latest intent classification prompts and operation prompts from the vector database for the user's large language model, after being corrected by the intent classification autoregressive model. The `match_prompt` tool is used to match the semantically closest operation prompts from the vector database based on the operation description after intent decomposition. When multiple operation prompts are matched, priority is given to the operation prompts whose weights are retrieved by the `query_weight` tool. The `raise_intention_class_weight` tool is used to increase the weights of the operation prompts involved in the user's operation plan after the user confirms the operation plan.The database_mcp tool is used by the user big language model to connect to the database to which natural language queries are to be executed based on the user database connection configuration information obtained from the relational database, and execute the SQL statements corresponding to the natural language queries generated by the user big language model based on intent classification prompt words and operation prompt words; The data layer includes an internal relational database, a vector database, and a time-series database. The relational database stores user language model configuration information, prompt word classification information, and database connection information for performing natural language queries. The vector database stores the content of intent classification prompt words and operation prompt words. The time-series database stores user context information. The user service layer includes user-defined large language model services for user use and databases that users need to operate to perform natural language queries.

[0019] The database natural language query autoregressive intent classification method and system of the present invention have the following advantages: (i) This invention achieves iterative optimization of intent classification through autoregressive prompting optimization, which solves the shortcomings of traditional solutions in handling complex semantics and chaotic dialogues, and improves the accuracy of long-tail intent and multi-turn dialogue intent recognition. (ii) This invention automatically senses changes in the database structure (such as the addition of new table fields), updates prompts in real time, reduces manual maintenance costs, and achieves dynamic adaptability; (iii) This invention combines database metadata features to avoid the disconnect between semantic understanding and the actual database structure, thereby reducing the query error rate; at the same time, it provides natural language retrieval of all relevant scenarios and labeled data to meet new task requirements. (iv) This invention does not require modification of the underlying parameters of large models, but achieves optimization through prompts for engineering and process orchestration, and is compatible with existing third-party large model services such as OpenAI; (v) The user big language model of the present invention decomposes and matches the prompt words from the user message according to the intent classification prompt words. When the user big language model performs user message operations, it calls the save_prompt tool to increase the prompt word classification weight according to the intent classification prompt words. (vi) This invention obtains the user's natural language query text and target database schema information through a user big model, and generates structured prompt words containing database context through the user big model, which are then input into the user big model for initial intent classification; at the same time, the user big model generates an operation plan for user feedback. If the user feedback on the operation plan is incorrect, the intent classification big model triggers an autoregressive correction process based on the user feedback: updating the context in combination with the user's reply, regenerating and classifying prompts, matching prompt words corresponding to the operation according to the weight of the operation prompt words, increasing the weight of the corresponding operation prompt words according to the operation confirmed by the user, and outputting classification results containing the main idea graph, sub-intents and related database objects, thereby improving the accuracy of intent and cross-database query recognition; (vii) In response to new task requirements, this invention provides a way to retrieve all relevant scene and annotation data using natural language. By combining scene information and annotation categories of infrared data, it enables efficient management and utilization of infrared image data. Attached Figure Description

[0020] The invention will be further described below with reference to the accompanying drawings.

[0021] Appendix Figure 1 This is a flowchart illustrating the context-based autoregressive correction process. Appendix Figure 2 This is a schematic diagram of the structure of a database natural language query autoregressive intent classification system. Detailed Implementation

[0022] The following detailed description of the database natural language query autoregressive intent classification method and system of the present invention is provided with reference to the accompanying drawings and specific embodiments.

[0023] Example 1: This example provides a database natural language query autoregressive intent classification method, which is as follows: S1. Data storage and semantic annotation: The infrared image dataset and multi-category attribute information of each dataset are stored using a standard database schema for retrieval of large language models; S2. Autoregressive suggestion correction: Based on a large model dialogue application framework (such as LangGraph), according to user feedback, the structured suggestion words of the database natural language query used to indicate the user's large language model operation mode are corrected by autoregressive correction of intent classification, thereby realizing the autoregressive suggestion correction of the correctness of natural language query. S3, Multi-turn Dialogue State Management: The dialogue context history is stored in a time-series database (using the dialogue context saved in the time-series database), and the user is guided by structured prompt words. The large language model workflow ensures that the user is confirmed after the operation plan is generated. The large model of intent classification autoregression correction intercepts user messages and automatically triggers autoregression correction based on user feedback, so as to achieve accurate and fast retrieval of associated infrared datasets. S4. Contextual Autoregressive Correction: Combine user responses to update the context, regenerate structured prompts and classify intents, and match prompts corresponding to actions based on the weights of the structured prompts. Increase the weight of prompts corresponding to actions based on user confirmations to obtain classification results that include main ideas, sub-intents and related database objects.

[0024] The structured prompt word generation in step S2 of this embodiment is as follows: S201. Extract table names, field names, and field types from the database schema to construct the database context; S202. Generate a prompt framework with examples by combining the preset intent classification system (such as query, modification, analysis); S203. Dynamically adjust the weight of the prompt examples based on user feedback.

[0025] The structured prompts in step S2 of this embodiment include meta-prompts, operation prompts, and intent classification prompts.

[0026] The autoregressive prompt correction process in step S2 of this embodiment is specifically as follows: A dedicated chat system-specific autoregressive correction model service is used to correct intent classification prompts and operation prompts. The user large model service is a user-configured, self-deployed, or purchased large model service used to provide natural language query services. The intent classification autoregressive correction large model is a large model service called internally by the autoregressive correction module, used for prompt evaluation and correction of natural language query prompts. A relational database is used to store prompt classification information (operation category name, operation prompt name, weight). A vector database is used to store the content of intent classification prompts used for user intent classification and operation prompts used to execute the corresponding operations of user sub-intents. A time-series database is used to store the user message context. Through prompt engineering, the user large language model is guided to proactively decompose and classify intents before responding to user messages. The intent classification autoregressive correction large model is guided to independently analyze the prompt quality of intent classification prompts and operation prompts based on user feedback, identify paragraphs that need improvement, provide the content to be improved, and call the prompt update tool to update the specific content of intent classification prompts and operation prompts.

[0027] Meta-suggestions are loaded through fixed Markdown documents; the text content of operation suggestions and intent classification suggestions is stored in a vector database in Markdown structured text format, retrieved and recalled using corresponding vector database retrieval functions, and its content is modified using corresponding tools; the metadata of operation suggestions is stored in an internal relational database in the form of relational tables, queried using corresponding relational database query functions, and its weight is modified using corresponding relational database update functions; among them, the metadata of operation suggestions includes operation category, operation suggestion name weight; the weight change information of operation suggestions is stored in a time-series database and queried using time-series data query functions.

[0028] In this embodiment, the meta-prompt words (prompt word engineer) are used to guide the intention classification autoregressive correction model to maintain the intention classification prompt words when the user reports an error in intent recognition. This process corrects the intent classification method within the prompt words and adds new operation classifications. The meta-prompt words are static and will not be modified.<meta_prompt.md> Example: # Role Prompt Engineer ## Role Description You are a professional prompting engineer, skilled in deeply analyzing user needs and feedback to accurately pinpoint issues with original prompts in terms of logical structure, information completeness, instruction clarity, and constraints. You are proficient in prompt design principles, familiar with the characteristics and response mechanisms of different AI models, and able to develop targeted optimization strategies. By supplementing key information, clarifying output requirements, optimizing language expression, and adjusting structural hierarchy, you improve the effectiveness, accuracy, and controllability of prompts, ultimately enabling optimized prompts to guide AI to generate higher-quality content that better meets user expectations.

[0029] ## Workflow ```mermaid Flowchart The workflow of the intent classification autoregressive correction model for correcting intent classification prompts in this embodiment is as follows: (1) Obtain the user's original request, i.e., the user message context, based on the current session ID using the get_message_history tool; (2) Use the get_prompt tool to retrieve the currently saved intent classification prompts from the vector database; (3) Obtain the user's large language model type from the large model dialogue application framework using the get_llm_type tool; (4) Use the get_operation_class_list tool to query the prompt word category information and obtain all existing operation categories; (5) Obtain the latest user feedback from the user message context; (6) Determine if the user feedback indicates an error in the operation plan: ① If not, proceed to step (12); ②If so, proceed to step (7); (7) Analyze user feedback and identify the problems; (8) Determine if the operation category is missing: ① If so, update the operation category list in the intent category prompt words through the save_prompt tool, generate the corresponding operation prompt words, and jump to step (12). ②If not, proceed to step (8); (8) Defects in location prompts: missing information, vague instructions, insufficient constraints, i.e., weak guidance; (9) Develop optimization strategies: supplement details, clarify constraints, adjust structure and strengthen guidance; (10) Implement optimization and adjustment to generate optimized prompt words; (11) Save the revised intent category prompts and the newly added or revised operation prompts, as well as the weights of the corresponding categories of the operation prompts, using the save_prompt tool; (12) End the process.

[0030] The specific rules for correcting intent classification prompts using the autoregressive large model in step S2 of this embodiment are as follows: ① Maintain the original format: The newly generated or revised meta prompt content is still a structured document in Markdown format, retaining the previous headings, and only modifying the content of Role Description, Workflow, and Rules; among them, Workflow must be a mermaid flowchart; ② Focus on user needs: All optimization actions must revolve around the goals or potential needs clearly stated by the user, and not deviate from the output direction expected by the user; ③ Ensure the clarity and accuracy of prompts: Optimized prompts avoid ambiguity, use precise vocabulary and clear instructions to ensure that the AI ​​model can understand the user's intent without bias; ④ Avoid redundant information: Delete content in the original prompts that is not related to the core requirements, keep the prompts concise, and do not omit key constraints; ⑤ Adapt to AI model characteristics: Adjust the level of detail and expression of prompts based on the training data, response style and capability boundaries of the target AI model (for example, strengthen the reasoning steps for logic-sensitive models, and retain a certain degree of openness for creative models). ⑥ Explainable optimization logic: Explain the specific optimization approach to the user, enabling them to understand the value of the optimization; the specific optimization approach includes the modifications, the reasons for the modifications, and the expected problems to be solved. ⑦ Retain core needs: During the optimization process, the core needs of the user's original prompts must not be deleted or distorted, ensuring that the optimized prompts are consistent with the user's original intention; ⑧ Iterative optimization principle: If users are still dissatisfied with the initial optimization results, analyze the problem again based on the new feedback, repeat the optimization process, and continue until the user approves of the output effect.

[0031] The `get_message_history`, `get_prompt`, `get_operation_class_list`, `get_llm_type`, and `save_prompt` tools are available for use by large-scale model dialogue application frameworks (such as LangGraph). These tools (corresponding to functions that implement the `StructedTools` interface in the programming API of large-scale model dialogue application frameworks like LangGraph, capable of executing specific functions and being recognized and called by the large model) are used to retrieve the user's original request based on the current session ID. The `get_prompt` tool retrieves the currently saved intent classification prompts from the vector database. The `get_operation_class_list` tool retrieves the currently existing operation classifications. The `get_llm_type` tool retrieves the user's large language model type from the large-scale model dialogue application framework. The `save_prompt` tool saves the revised intent classification prompts and the newly added / revised operation prompts, along with the weights of the corresponding categories for each operation prompt.

[0032] In step S2 of this embodiment, the intent classification prompt is used to guide the user's large language model to decompose and classify the user's question, breaking it down into operational steps consisting of specific questions and requirements. The intent classification prompt is only modified by the intent classification autoregressive correction model based on the meta-prompt, which calls the `save_prompt` tool, when the user reports an error in intent recognition. It generally includes prompts that guide the user's large language model to classify the user's intent. The intent classification prompt <<intention_classify_prompt.md> Example: # Role: Natural Language Query Requirements Analyst ## Role Description You are a professional Natural Language Query Requirements Analysis Engineer, specializing in deep analysis of user queries presented in natural language. You are capable of accurately identifying the core intent in user queries, whether simple single intent or complex multi-intent, and can handle them accordingly: For simple natural language queries with only one intent, you directly perform classification; for complex messages containing multiple intents, you first decompose them into multiple independent, atomically inseparable sub-intents based on semantic logic, then generate a plan to execute the corresponding operation for each sub-intent, and confirm the plan with the user; when the user requests to modify the plan, a meta-hint correction process is triggered, where the intent classification autoregressive correction model re-evaluates and corrects the accuracy of intent classification and operation hints based on meta-hints. When the user confirms, the corrected intent classification hints and operation hints are used to overwrite the previous hints, and the weights of the operation hints are updated. Finally, the corresponding operation is executed according to the classification criteria in the Rules, ensuring that natural language query requirements are clearly and accurately parsed and executed.

[0033] ## Workflow ```mermaid Flowchart In this embodiment, the natural language query process is as follows: (1) Receive user natural language query messages; (2) Use the query_weight tool to query the weight of each operation prompt word in the prompt word category information table; (3) Load the intent classification prompts and operation prompts that have been intercepted and corrected by the intent classification autoregressive correction large model using the load_prompt tool; (4) Determine the complexity of the user message: ①If the user message contains only one intent, proceed to step (9); ②If the user message contains multiple sub-intents, then proceed to step (5); (5) Based on semantic logic, decompose into multiple indivisible sub-intents; (6) Generate corresponding processing operations for each decomposed sub-intent; (7) Based on the weight of the operation category, query the vector database using the match_prompt tool to obtain a list of operation prompt words that match the operation information, and recall them based on the weight of the operation prompt words; (8) Generate operation plans according to the operation prompts corresponding to the categories; (9) Ask the user whether the operation plan matches the user's intention: ① If it does not meet the user's expectations, ask the user to explain why it does not meet their expectations; ②If it matches the user's intent, then proceed to step (10); (10) Please have the user confirm that the operation plan is correct: ①If the user confirms that the operation plan is correct, then start to execute the operation step by step according to the operation plan and execute step (11). ②If the user rejects the operation plan, proceed to step (4); (12) Increase the corresponding class weights using the raise_intention_class_weight tool; (13) Output the processing results.

[0034] In this embodiment, the natural language query rules are as follows: ① Accurately identify the operation type corresponding to the sub-intent: Strictly based on the number of atomic intents contained in the user message, accurately distinguish between simple messages and complex messages, and provide the correct direction for subsequent processing; ② Semantic decomposition fits the context: When decomposing complex natural language queries, the context is fully considered to ensure that each decomposed query point is faithful to the user's original expression, without ambiguity or omission; ③ Operation generation adapts to query: The processing operation generated for each sub-intent is highly matched with the query content, has executable capability, and can effectively respond to the query requirements of the sub-intent; ④ Strict adherence to classification standards: During the classification process, the following classifications must be strictly followed: [Answering database syntax questions, generating sample SQL statements, generating sample code for database use, creating database objects, adding object records, updating object records, deleting object records, and querying the database]. Unauthorized adjustments to the classification content are strictly prohibited. ⑤ Focus on user query intent: The entire parsing process is always centered on the user's natural language query intent, avoiding deviation from the user's actual needs due to subjective interpretation; ⑥ Ensure clear and intuitive results: The output classification results should be clearly structured and concisely expressed so that users can quickly grasp the classification of their query intent and the corresponding processing method; ⑦ Efficiently respond to query requests: While ensuring the accuracy of parsing, quickly complete the processing and analysis of users' natural language query messages, and promptly provide feedback on classification results.

[0035] The operation prompts for each preset operation category include: answering database syntax questions (answer_question_prompt.md), generating sample SQL statements (generate_sql_prompt.md), generating sample code for database use (generate_code_prompt.md), creating database objects (create_database_object_prompt.md), adding object records (insert_prompt.md), updating object records (update_prompt.md), deleting object records (delete_prompt.md), and querying the database (query_prompt.md).

[0036] Each category and its corresponding operation prompt word name are stored in the internal relational database of the classification system. The `load_prompt` tool is used to load the intent classification prompt words and operation prompt words that have been intercepted and corrected by the intent classification autoregressive correction model. The `query_weight` tool is used to query the weight of each operation prompt word in the prompt word classification information table. The `match_prompt` tool is used to query the vector database to obtain a list of operation prompt words that match the operation information and recall them according to the weight of the operation prompt words. The `raise_intention_class_weight` tool is used to increase the weight of a specific operation prompt word.

[0037] In addition to the operation prompts corresponding to each preset operation category, the system generates a specific business scenario proposed by the user in real time through an intent classification autoregressive correction model based on user feedback. The system is also dynamically maintained by the intent classification autoregressive correction model based on the workflow of the meta prompts and user feedback. The format of operation prompts is similar to that of meta prompts and intent classification prompts. The content includes a role description, the workflow and rules required to perform the corresponding operation, and is not described in detail here as it is not related to intent classification.

[0038] As attached Figure 1 As shown, in this embodiment, the context autoregressive correction is specifically as follows: (1) Obtain the user message context; (2) The intention classification autoregressive correction big model (internal big model) intercepts user messages, determines whether it is a negative operation plan feedback, and corrects the intention classification prompt words and operation prompt words according to the feedback message and meta prompt words; (3) The user big language model (external big model) decomposes the user requirements based on the latest intent classification prompt words and classifies the operation steps according to intent, generates an operation plan and pushes it to the user for confirmation; (4) Determine if the user confirms that the operation plan is correct: ①If so, the operation plan will be gradually executed starting from the user's large language model; ②If not, proceed to step (2).

[0039] Example 2: This example provides a database natural language query autoregressive intent classification system, which is used to implement the database natural language query autoregressive intent classification method as in Example 1; the system includes a front-end interaction layer, a back-end service layer, a data layer, and a user service layer; The front-end interaction layer is used to build chat interaction interfaces and configuration management interfaces using mainstream AI Agent front-end frameworks (taking CopilotKit as an example); the chat interaction interface is used to provide users with a user interaction interface for using natural language queries to operate the user database; the configuration management interface is used to provide users with configuration information for configuring their own user large language model and database information for executing natural language queries. The backend service layer is implemented in Python based on a mainstream AI Agent framework (taking LangGraph as an example); the backend service layer includes a chat engine, an intent classification autoregressive correction model, a configuration management module, and a large model toolset; The chat engine provides a chat API for the chat interaction interface to receive user messages and call the save_message_history tool to save the chat message history. Then, the messages are passed to the intent classification autoregressive correction model in sequence. The intent classification autoregressive correction model performs intent classification and operation prompt word correction, and then passes it to the user big language model. The user big language model executes the various natural language query requirements requested by the user. The intent classification autoregressive correction model is used to call the get_message_history tool to retrieve chat message history from the time-series database, call the get_prompt tool to retrieve intent classification prompt words and operation prompt words, and make corrections based on user feedback, call the get_llm_type tool to retrieve the user's configured user language model type from the relational database for reference when correcting prompt words, call the get_operation_class_list tool to retrieve the operation prompt word type, and call the save_prompt tool to write the newly added or revised prompt word content to the vector database and append the newly added operation prompt words to the prompt word classification information table in the relational database. The configuration management module provides configuration management services for the configuration management interface. The configuration management services include adding, querying, updating, and deleting configuration information, including user large language model configuration information and database information for executing natural language queries. The large model toolset includes the `save_message_history`, `get_message_history`, `get_prompt`, `get_llm_type`, `get_operation_class_list`, `save_prompt`, `query_weight`, `load_prompt`, `match_prompt`, `raise_intention_class_weight`, and `database_mcp` tools. Specifically, `save_message_history` stores the chat engine's message history in a time-series database; `get_message_history` retrieves the chat message history through an intention classification autoregressive model; `get_prompt` allows the intention classification autoregressive model to retrieve intent classification prompts and operation prompts from a vector database for updating and correction; `get_llm_type` allows the intention classification autoregressive model to retrieve the user's user-defined language model type from a relational database, enabling targeted prompt generation and correction based on the characteristics of the user's language model type; `get_operation_class_list`... The `ass_list` tool allows the large-scale autoregressive model for intent classification to retrieve prompt word classification information from a relational database to compare and revise the operation types in the intent classification prompt words; the `save_prompt` tool allows the large-scale autoregressive model for intent classification to write the newly added or revised intent classification prompt words and operation prompt words to a vector database, and to write the newly added or revised operation prompt word classifications to the prompt word classification information in the relational database; the `query_weight` tool allows the large-scale language model for users to query the weight of each operation prompt word from the prompt word classification information, and is also used for prioritizing the retrieval of multiple operation prompt words during intent classification operation matching; `load_prompt`... The `pt` tool is used to load the latest intent classification prompts and operation prompts from the vector database for the user's large language model, after being corrected by the intent classification autoregressive model. The `match_prompt` tool is used to match the semantically closest operation prompts from the vector database based on the operation description after intent decomposition. When multiple operation prompts are matched, priority is given to the operation prompts whose weights are retrieved by the `query_weight` tool. The `raise_intention_class_weight` tool is used to increase the weights of the operation prompts involved in the user's operation plan after the user confirms the operation plan.The database_mcp tool is used by the user big language model to connect to the database to which natural language queries are to be executed based on the user database connection configuration information obtained from the relational database, and execute the SQL statements corresponding to the natural language queries generated by the user big language model based on intent classification prompt words and operation prompt words; The data layer includes an internal relational database, a vector database, and a time-series database. The relational database stores user language model configuration information, prompt word classification information, and database connection information for performing natural language queries. The vector database stores the content of intent classification prompt words and operation prompt words. The time-series database stores user context information. The user service layer includes user-defined large language model services for user use and databases that users need to operate to perform natural language queries.

[0040] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A database natural language query autoregressive intent classification method, characterized in that, The method is as follows: Data storage and semantic annotation: The infrared image dataset and multi-category attribute information of each dataset are stored using a standard database schema for retrieval of large language models; Autoregressive suggestion correction: Based on the large model dialogue application framework, according to user feedback, the structured prompt words of the database natural language query used to indicate the user's large language model operation mode are corrected by autoregressive correction of intent classification, thereby realizing the autoregressive suggestion correction of the correctness of natural language query. Multi-turn dialogue state management: The dialogue context history is stored through a time-series database, structured prompts guide the user's workflow using a large language model to ensure confirmation to the user after the operation plan is generated, and the user message is intercepted using an intent classification autoregressive correction model, which automatically triggers autoregressive correction based on user feedback; Contextual autoregressive correction: The context is updated by combining user responses, structured cue words are regenerated and intents are classified, and cue words corresponding to the operation are matched according to the weight of the structured cue words. The weight of the corresponding operation cue words is increased according to the operation confirmed by the user, and the classification results containing the main idea graph, sub-intents and related database objects are obtained.

2. The database natural language query autoregressive intent classification method according to claim 1, characterized in that, The structured prompt word generation process is as follows: Extract table names, field names, and field types from the database schema to construct the database context; Generate a prompt framework with examples by combining a preset intent classification system; The weight of the prompt examples is dynamically adjusted based on user feedback.

3. The database natural language query autoregressive intent classification method according to claim 1 or 2, characterized in that, Structured prompts include meta-prompts, operation prompts, and intent classification prompts; Meta-prompts are loaded through a fixed Markdown document. When users report errors in intent recognition, meta-prompts guide the intent classification autoregressive correction model to maintain the intent classification prompts, correct the intent classification method in the prompts, and add new operation classifications. Meta-prompts are static and will not be modified. The text content of operation prompts and intent classification prompts is stored in a vector database in Markdown structured text format. It is retrieved and recalled through the corresponding vector database retrieval function, and the content is modified through the corresponding tool. The metadata of operation prompt words is stored in the internal relational database in the form of a relational table. It is queried through the corresponding relational database query function and the weight is modified through the corresponding relational database update function. The metadata of operation prompt words includes operation category, operation prompt word name weight. The weight change information of operation prompt words is stored in a time series database and is queried through the time series data query function.

4. The database natural language query autoregressive intent classification method according to claim 3, characterized in that, Intent classification prompts are used to guide the user's large language model to decompose and classify the user's problem, breaking it down into operational steps consisting of specific questions and requirements; The intent classification prompts are only modified by the intent classification autoregressive correction model when the user reports that the intent recognition is incorrect. The prompts are then modified by calling the save_prompt tool based on the meta-prompts, and the prompts guide the user's large language model to classify the user's intent. In addition to the operation prompts corresponding to each preset operation category, the system generates a specific business scenario proposed by the user in real time through an intent classification autoregressive correction model based on user feedback. The system is also dynamically maintained by the intent classification autoregressive correction model based on the workflow of the meta prompts and user feedback. The operation prompts for each preset operation category include: answering database syntax questions (answer_question_prompt.md), generating sample SQL statements (generate_sql_prompt.md), generating sample code for database use (generate_code_prompt.md), creating database objects (create_database_object_prompt.md), adding object records (insert_prompt.md), updating object records (update_prompt.md), deleting object records (delete_prompt.md), and querying the database (query_prompt.md).

5. The database natural language query autoregressive intent classification method according to claim 4, characterized in that, The specific rules for revising intent classification prompts using the autoregressive modified large model are as follows: Maintain the original format: The newly generated or revised meta prompt content is still a structured document in Markdown format, retaining the previous headings, and only modifying the content of Role Description, Workflow, and Rules; among them, Workflow must be a mermaid flowchart; User needs are at the core: all optimization actions must revolve around the goals or potential needs clearly stated by the user, and not deviate from the output direction expected by the user; Ensure the clarity and accuracy of prompts: Optimized prompts avoid ambiguity, use precise vocabulary and clear instructions to ensure that the AI ​​model can understand the user's intent without bias; Avoid redundant information: Delete content in the original prompts that is not related to the core requirements, keep the prompts concise, and do not omit key constraints; Adapt to AI model characteristics: Adjust the level of detail and expression of prompts based on the training data, response style, and capability boundaries of the target AI model; The optimization logic is explainable: Explain the specific optimization approach to the user, enabling them to understand the value of the optimization; this specific approach includes the modifications made, the reasons for the modifications, and the expected problems to be solved. Retain core needs: During the optimization process, the core needs of the user's original prompts must not be deleted or distorted, and the optimized prompts must be consistent with the user's original intention. Iterative optimization principle: If users are still dissatisfied with the initial optimization results, analyze the problem again based on new feedback, repeat the optimization process, and continue until users are satisfied with the output effect.

6. The database natural language query autoregressive intent classification method according to claim 5, characterized in that, The workflow for refining intent classification prompts using a large-scale autoregressive model is as follows: (1) Obtain the user's original request, i.e., the user message context, based on the current session ID using the get_message_history tool; (2) Use the get_prompt tool to retrieve the currently saved intent classification prompts from the vector database; (3) Obtain the user's large language model type from the large model dialogue application framework using the get_llm_type tool; (4) Use the get_operation_class_list tool to query the prompt word category information and obtain all existing operation categories; (5) Obtain the latest user feedback from the user message context; (6) Determine if the user feedback indicates an error in the operation plan: ① If not, proceed to step (12); ②If so, proceed to step (7); (7) Analyze user feedback and identify the problems; (8) Determine if the operation category is missing: ① If so, update the operation category list in the intent category prompt words through the save_prompt tool, generate the corresponding operation prompt words, and jump to step (12). ②If not, proceed to step (8); (8) Defects in location prompts: missing information, vague instructions, insufficient constraints, i.e., weak guidance; (9) Develop optimization strategies: supplement details, clarify constraints, adjust structure and strengthen guidance; (10) Implement optimization and adjustment to generate optimized prompt words; (11) Save the revised intent category prompts and the newly added or revised operation prompts, as well as the weights of the corresponding categories of the operation prompts, using the save_prompt tool; (12) End the process.

7. The database natural language query autoregressive intent classification method according to claim 6, characterized in that, The process of natural language query is as follows: (1) Receive user natural language query messages; (2) Use the query_weight tool to query the weight of each operation prompt word in the prompt word category information table; (3) Load the intent classification prompts and operation prompts that have been intercepted and corrected by the intent classification autoregressive correction large model using the load_prompt tool; (4) Determine the complexity of the user message: ①If the user message contains only one intent, proceed to step (9); ②If the user message contains multiple sub-intents, then proceed to step (5); (5) Based on semantic logic, decompose into multiple indivisible sub-intents; (6) Generate corresponding processing operations for each decomposed sub-intent; (7) Based on the weight of the operation category, query the vector database using the match_prompt tool to obtain a list of operation prompt words that match the operation information, and recall them based on the weight of the operation prompt words; (8) Generate operation plans according to the operation prompts corresponding to the categories; (9) Ask the user whether the operation plan matches the user's intention: ① If it does not meet the user's expectations, ask the user to explain why it does not meet their expectations; ②If it matches the user's intent, then proceed to step (10); (10) Please have the user confirm that the operation plan is correct: ①If the user confirms that the operation plan is correct, then start to execute the operation step by step according to the operation plan and execute step (11). ②If the user rejects the operation plan, proceed to step (4); (12) Increase the corresponding class weights using the raise_intention_class_weight tool; (13) Output the processing results.

8. The database natural language query autoregressive intent classification method according to claim 7, characterized in that, The specific rules for natural language queries are as follows: Accurately identify the operation type corresponding to the sub-intent: strictly based on the number of atomic intents contained in the user message, accurately distinguish between simple and complex messages, and provide the correct direction for subsequent processing; Semantic decomposition fits the context: When decomposing complex natural language queries, the context is fully considered to ensure that each decomposed query point is faithful to the user's original expression, without ambiguity or omission; Operation-generated adaptive query: The processing operations generated for each sub-intent are highly matched with the query content, are executable, and can effectively respond to the query requirements of the sub-intent; The categorization must strictly adhere to the following criteria: [Answering database syntax questions, generating sample SQL statements, generating sample code for database use, creating database objects, adding object records, updating object records, deleting object records, and querying the database]. Unauthorized adjustments to the categorization content are strictly prohibited. Focus on user query intent: The entire parsing process is always centered on the user's natural language query intent, avoiding deviation from the user's actual needs due to subjective interpretation; Ensure clear and intuitive results: The output classification results should be clearly structured and concisely expressed, so that users can quickly grasp the classification of their query intent and the corresponding processing method; Efficiently respond to query requests: While ensuring parsing accuracy, quickly process and analyze users' natural language query messages, and promptly provide classification results.

9. The database natural language query autoregressive intent classification method according to claim 8, characterized in that, The specific details of context-based autoregressive correction are as follows: (1) Obtain the user message context; (2) The intention classification autoregressive correction big model intercepts user messages, determines whether they are feedback of negative operation plans, and corrects the intention classification prompt words and operation prompt words based on the feedback message and meta prompt words; (3) The user big language model decomposes the user requirements based on the latest intent classification prompt words and classifies the operation steps according to intent, generates an operation plan and pushes it to the user for confirmation; (4) Determine if the user confirms that the operation plan is correct: ①If so, the operation plan will be gradually executed starting from the user's large language model; ②If not, proceed to step (2).

10. A database natural language query autoregressive intent classification system, characterized in that, This system is used to implement the database natural language query autoregressive intent classification method as described in any one of claims 1 to 9; the system includes a front-end interaction layer, a back-end service layer, a data layer, and a user service layer; The front-end interaction layer is used to build chat interaction interfaces and configuration management interfaces using mainstream AI Agent front-end frameworks; the chat interaction interface is used to provide users with a user interaction interface for querying and operating the user database using natural language; the configuration management interface is used to provide users with configuration information for configuring their own user large language model and database information for executing natural language queries. The backend service layer is implemented in Python based on a mainstream AI Agent framework; the backend service layer includes a chat engine, an intent classification autoregressive correction model, a configuration management module, and a large model toolset; The chat engine provides a chat API for the chat interaction interface to receive user messages and call the save_message_history tool to save the chat message history. Then, the messages are passed to the intent classification autoregressive correction model in sequence. The intent classification autoregressive correction model performs intent classification and operation prompt word correction, and then passes it to the user big language model. The user big language model executes the various natural language query requirements requested by the user. The intent classification autoregressive correction model is used to call the get_message_history tool to retrieve chat message history from the time-series database, call the get_prompt tool to retrieve intent classification prompt words and operation prompt words, and make corrections based on user feedback, call the get_llm_type tool to retrieve the user's configured user language model type from the relational database for reference when correcting prompt words, call the get_operation_class_list tool to retrieve the operation prompt word type, and call the save_prompt tool to write the newly added or revised prompt word content to the vector database and append the newly added operation prompt words to the prompt word classification information table in the relational database. The configuration management module provides configuration management services for the configuration management interface. The configuration management services include adding, querying, updating, and deleting configuration information, including user large language model configuration information and database information for executing natural language queries. The large model toolset includes the `save_message_history`, `get_message_history`, `get_prompt`, `get_llm_type`, `get_operation_class_list`, `save_prompt`, `query_weight`, `load_prompt`, `match_prompt`, `raise_intention_class_weight`, and `database_mcp` tools. Specifically, `save_message_history` stores the chat engine's message history in a time-series database; `get_message_history` retrieves the chat message history through an intention classification autoregressive model; `get_prompt` allows the intention classification autoregressive model to retrieve intent classification prompts and operation prompts from a vector database for updating and correction; `get_llm_type` allows the intention classification autoregressive model to retrieve the user's user-defined language model type from a relational database, enabling targeted prompt generation and correction based on the characteristics of the user's language model type; `get_operation_class_list`... The `ass_list` tool allows the large-scale autoregressive model for intent classification to retrieve prompt word classification information from a relational database to compare and revise the operation types in the intent classification prompt words; the `save_prompt` tool allows the large-scale autoregressive model for intent classification to write the newly added or revised intent classification prompt words and operation prompt words to a vector database, and to write the newly added or revised operation prompt word classifications to the prompt word classification information in the relational database; the `query_weight` tool allows the large-scale language model for users to query the weight of each operation prompt word from the prompt word classification information, and is also used for prioritizing the retrieval of multiple operation prompt words during intent classification operation matching; `load_prompt`... The `pt` tool is used to load the latest intent classification prompts and operation prompts from the vector database for the user's large language model, after being corrected by the intent classification autoregressive model. The `match_prompt` tool is used to match the semantically closest operation prompts from the vector database based on the operation description after intent decomposition. When multiple operation prompts are matched, priority is given to the operation prompts whose weights are retrieved by the `query_weight` tool. The `raise_intention_class_weight` tool is used to increase the weights of the operation prompts involved in the user's operation plan after the user confirms the operation plan.The database_mcp tool is used by the user big language model to connect to the database to which natural language queries are to be executed based on the user database connection configuration information obtained from the relational database, and execute the SQL statements corresponding to the natural language queries generated by the user big language model based on intent classification prompt words and operation prompt words; The data layer includes an internal relational database, a vector database, and a time-series database. The relational database stores user language model configuration information, prompt word classification information, and database connection information for performing natural language queries. The vector database stores the content of intent classification prompt words and operation prompt words. The time-series database stores user context information. The user service layer includes user-defined large language model services for user use and databases that users need to operate to perform natural language queries.

Citation Information

Patent Citations

  • Prompt framework based on large language model and system and application thereof

    CN118468891A

  • Database query method and device based on natural language and electronic equipment

    CN118535679A

  • User intention recognition and application method and system in intelligent question answering system

    CN118861219A

  • Method, system and equipment for generating SQL (Structured Query Language) statement based on large model

    CN119127913A

  • Adaptive graph database multi-modal power knowledge question-answering method and system

    CN119474322A

Cited By

  • Cloud management task execution method and device, storage medium, equipment and program

    CN121418481A