Sample optimization method, device and equipment based on large model and storage medium
By generating target query statements through a large model and performing attribution analysis on sample data, the problems of low efficiency and insufficient accuracy of templated query statements in attribution analysis are solved, and efficient sample optimization is achieved.
Patent Information
- Application Number
- CN202510865020.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-09-26
AI Technical Summary
The template-based query statements in the existing technology are difficult to meet the diverse attribution analysis needs, resulting in low query efficiency and insufficient accuracy and depth of attribution analysis.
By leveraging the natural language understanding capabilities of large models, we can generate target query statements for the problem to be optimized, and generate optimization strategies by performing attribution analysis on sample data to improve the accuracy and depth of attribution analysis.
It improves the accuracy and depth of attribution analysis, enhances the efficiency of sample optimization, and meets multi-dimensional optimization needs.
Smart Images

Figure CN120705583A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, in particular to large language models, AI intelligent assistants, and machine learning technology, and specifically to sample optimization methods, devices, equipment, and storage media based on large models. Background Art
[0002] In the field of machine learning technology, training samples are usually queried based on expert experience or in combination with templated query statements, and attribution analysis is performed on the queried sample data to optimize the model.
[0003] With the development of artificial intelligence technology, the processing logic of various models has become increasingly complex, and the sample data retrieved based on templated query statements is difficult to meet the diverse attribution analysis needs. Summary of the Invention
[0004] The present disclosure provides a large model-based sample optimization method, apparatus, device, and storage medium.
[0005] According to one aspect of the present disclosure, a sample optimization method based on a big model is provided, comprising: receiving at least one optimization requirement selected by an object on an interactive interface; wherein the at least one optimization requirement includes a problem to be optimized and an optimization target; wherein the problem to be optimized is obtained by performing a cause analysis on an abnormal result output by a target model using a big model; based on the problem to be optimized and the optimization target, generating a target query statement using the big model; wherein the target query statement is used to query target sample data related to the problem to be optimized from sample data; the target model is obtained by training based on the sample data; and analyzing the target sample data using the big model to generate a target strategy so as to optimize the target sample data based on the target strategy.
[0006] According to another aspect of the present disclosure, a large model-based sample optimization device is provided, including: a receiving module, a generating module, and an analyzing module.
[0007] A receiving module is used to receive at least one optimization requirement selected by an object on an interactive interface; wherein, at least one optimization requirement includes a problem to be optimized and an optimization target; wherein, the problem to be optimized is obtained by performing a cause analysis on an abnormal result output by a target model using a large model.
[0008] The generation module is used to generate a target query statement using a large model based on the problem to be optimized and the optimization goal; wherein the target query statement is used to query the target sample data related to the problem to be optimized from the sample data; the target model is obtained by training based on the sample data.
[0009] The analysis module is used to analyze the target sample data using the large model and generate a target strategy so as to optimize the target sample data based on the target strategy.
[0010] According to another aspect of the present disclosure, an intelligent agent for sample optimization is provided, comprising: an input module, a processing module, and an output module.
[0011] The input module is used to receive at least one optimization requirement selected by the object on the interactive interface.
[0012] The processing module is used to determine the target task based on at least one optimization requirement information received by the input module, determine the target big model based on the target task, and obtain the target strategy for optimizing the target sample data by calling the target big model to execute any of the big model-based sample optimization methods described above.
[0013] The output module is used to output the target strategy obtained by the processing module.
[0014] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described above.
[0015] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described above.
[0016] According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program, which implements the method described above when executed by a processor.
[0017] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.
[0019] Figure 1 Schematically illustrates an exemplary system architecture to which a large model-based sample optimization method and apparatus can be applied according to an embodiment of the present disclosure;
[0020] Figure 2 The flowchart of the sample optimization method based on the large model according to the embodiment of the present disclosure is schematically shown;
[0021] Figure 3 The schematic diagram of generating SQL based on the large model adversarial method according to an embodiment of the present disclosure is schematically shown;
[0022] Figure 4 The schematic diagram of optimizing SQL from three dimensions of sample coverage, attribution accuracy, and query efficiency based on a large model according to an embodiment of the present disclosure is shown schematically;
[0023] Figure 5 A schematic diagram schematically illustrates an interactive interface in the adversarial SQL generation stage according to an embodiment of the present disclosure;
[0024] Figure 6 The following schematically illustrates a schematic diagram of sample attribution based on a large model according to an embodiment of the present disclosure;
[0025] Figure 7 A schematic diagram schematically illustrates an interactive interface at the sample attribution stage according to an embodiment of the present disclosure;
[0026] Figure 8 A schematic diagram of a sample optimization method based on a large model according to an embodiment of the present disclosure is schematically shown;
[0027] Figure 9 Schematically shows a block diagram of a sample optimization device based on a large model according to an embodiment of the present disclosure;
[0028] Figure 10 A block diagram schematically illustrates an intelligent agent for sample optimization according to an embodiment of the present disclosure; and
[0029] Figure 11 A block diagram of an electronic device suitable for implementing a large model-based sample optimization method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0030] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0031] In the field of sample attribution and data analysis for machine learning models, sample data analysis is typically performed by writing SQL (Structured Query Language) or SQL templates based on expert experience or the current model output. This approach is not only inefficient when processing large-scale training datasets, but also yields limited data dimensions, resulting in low accuracy and depth in attribution analysis.
[0032] In light of this, the disclosed embodiments leverage the natural language understanding capabilities of a large model to generate a target query statement that is specific to the problem being optimized and meets the optimization goal, based on a thorough understanding and analysis of the optimization requirements. The large model is then used to perform attribution analysis on the data retrieved from the sample data based on the target query statement, further improving the accuracy and depth of the attribution analysis. This results in the generation of an optimization strategy that meets the optimization requirements, further improving the efficiency of sample optimization.
[0033] Figure 1 An exemplary system architecture to which the large model-based sample optimization method and apparatus can be applied according to an embodiment of the present disclosure is schematically shown.
[0034] It should be noted that Figure 1 The examples shown are merely examples of system architectures to which the embodiments of the present disclosure may be applied, to help those skilled in the art understand the technical content of the present disclosure, but do not imply that the embodiments of the present disclosure may not be applied to other devices, systems, environments, or scenarios. For example, in another embodiment, an exemplary system architecture to which the large-model-based sample optimization method and apparatus may be applied may include a terminal device, but the terminal device may implement the large-model-based sample optimization method and apparatus provided by the embodiments of the present disclosure without interacting with a server.
[0035] like Figure 1 As shown, the exemplary architecture 100 may include a terminal device 101 , an agent 102 , a database 103 and a server 104 .
[0036] Various communication client applications can be installed on the terminal device 101, such as knowledge reading applications, web browser applications, search applications, instant messaging tools, email clients and / or social platform software, AI smart assistants, etc. (only as examples).
[0037] The terminal device 101 may be any electronic device having a display screen and supporting web browsing, including but not limited to a smart phone, a tablet computer, a laptop computer, a desktop computer, and the like.
[0038] The intelligent agent 102 can identify user needs based on a large model, such as a large language model, and output information that meets the user needs.
[0039] The database 103 may be a relational database for storing training sample data.
[0040] Server 104 may be a server that provides various services, such as a background management server (for example only) that supports content viewed by users on terminal device 101. The background management server may analyze and process received data such as user requests, and provide feedback (e.g., web pages, information, or data obtained or generated based on user requests) to terminal device 101.
[0041] For example, a user can enter an optimization requirement into terminal device 101. Terminal device 101 then invokes agent 102 to generate SQL statements for querying sample data based on the optimization requirement. The SQL statements generated by agent 102 are then used to retrieve target sample data related to the problem to be optimized from database 103. Agent 102 is then invoked again to perform attribution analysis on the target sample data, generating an optimization strategy 110. This strategy is then presented to the user via an interactive interface on terminal device 101, allowing the user to optimize the target sample data based on optimization strategy 110 and then use the optimized sample data to optimize the model to solve the problem to be optimized.
[0042] It should be noted that the large model-based sample optimization method provided in the embodiment of the present disclosure can generally be executed by the terminal device 101. Accordingly, the large model-based sample optimization apparatus provided in the embodiment of the present disclosure can also be provided in the terminal device 101.
[0043] Alternatively, the large model-based sample optimization method provided by the embodiment of the present disclosure may also be generally executed by the server 104. Accordingly, the large model-based sample optimization device provided by the embodiment of the present disclosure may generally be set in the server 104. The large model-based sample optimization method provided by the embodiment of the present disclosure may also be executed by a server or server cluster that is different from the server 104 and can communicate with the terminal device 101 and / or the server 104. Accordingly, the large model-based sample optimization device provided by the embodiment of the present disclosure may also be set in a server or server cluster that is different from the server 104 and can communicate with the terminal device 101 and / or the server 104.
[0044] For example, terminal device 101 can send optimization requirements input by a user to server 104. After receiving the optimization requirements, server 104 can execute the large model-based sample optimization method of the disclosed embodiment, invoke agent 102 to generate SQL, and query target sample data from database 103 based on the SQL. Agent 102 can then be invoked to perform attribution analysis on the target sample data and generate a target strategy. Finally, the target strategy is fed back to terminal device 101.
[0045] In the technical solution disclosed herein, the collection, storage, use, processing, transmission, provision, disclosure and application of user personal information involved comply with the provisions of relevant laws and regulations, take necessary confidentiality measures, and do not violate public order and good morals.
[0046] In the technical solution disclosed herein, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.
[0047] Figure 2 The flowchart of the sample optimization method based on the large model according to the embodiment of the present disclosure is schematically shown.
[0048] like Figure 2 As shown, the method 200 includes operations S210 to S230.
[0049] In operation S210 , at least one optimization requirement selected by an object on an interactive interface is received.
[0050] In operation S220 , a target query statement is generated using the large model based on the problem to be optimized and the optimization goal.
[0051] In operation S230 , the target sample data is analyzed using the large model to generate a target strategy so as to optimize the target sample data based on the target strategy.
[0052] According to embodiments of the present disclosure, optimization requirements can represent optimization suggestions for resolving abnormal output issues with a target model. The target model can be any model trained using methods such as machine learning and deep learning. Examples include search engine ranking models, information recommendation models, financial risk analysis models, medical data analysis models, e-commerce platform data mining models, industrial production quality control models, and network security analysis models. Sample data can be any multimedia data, such as text and images.
[0053] In the embodiment of the present disclosure, the optimization requirement may include a problem to be optimized and an optimization target. The problem to be optimized may be obtained by analyzing the cause of an abnormal result output by a target model using a large model.
[0054] For example, in an information recommendation model, an abnormal result means the model output doesn't match the user's query intent. For example, a user might enter "Please recommend a hotel 100 kilometers from Airport A." The information recommendation model analyzes the user's input and outputs "Hotel B is 100 kilometers from Airport A." However, the user actually wanted to find a hotel near Airport A that costs 100 yuan.
[0055] Therefore, the abnormal result can be fed as a prompt into a large model, such as a large language model. Leveraging the model's deep understanding capabilities, it can be determined that the model outputted the abnormal result because it failed to accurately identify the user's query intent as an amount, not distance. This cause can be identified as an issue to be optimized.
[0056] In the embodiments of the present disclosure, the optimization objectives may include: the optimization objectives of the target model, such as improving the accuracy of the model output. The optimization objectives may also include: the optimization objectives of the sample data, such as using the optimized sample data to train the target model to achieve the model optimization objectives.
[0057] In some embodiments, the optimization goal may also include: an optimization goal for a query statement (SQL) used to query sample data related to the problem to be optimized. The optimization goal may include at least the following dimensions: sample coverage, attribution accuracy, and query efficiency, so as to use the optimized query statement to efficiently query sample data that can be used for attribution analysis from the database.
[0058] In some embodiments, sample coverage can be used to test the completeness of SQL query coverage of sample data related to the problem to be optimized. For example, does the query cover all sample sets related to the problem to be optimized? Does it include typical case samples of various types of failure samples? Does it cover key samples near the decision boundary?
[0059] In some embodiments, attribution accuracy can be used to measure the accuracy and depth of SQL attribution for optimization problems. For example, it can determine: Are the samples retrieved based on the SQL query relevant to the problem being optimized? Can different types of problem samples be effectively distinguished? Have interpretable key features been extracted?
[0060] In some embodiments, query efficiency is used to detect the efficiency of the target sample data obtained through SQL queries, for example, the time required to execute the query operation, the storage resources and computing resources consumed by the query process, etc.
[0061] In the disclosed embodiments, the target query statement generated by the large model based on the problem to be optimized and the optimization target can meet multi-dimensional requirements such as sample coverage, attribution accuracy, and query efficiency, thereby enabling the query of target sample data related to the problem to be optimized from the sample data. Because the target model is trained based on the sample data, attribution analysis can be performed based on the queried target sample data to optimize the sample data for the problem to be optimized, and then the target model can be trained using the optimized sample data, further improving the accuracy of the model output.
[0062] The large model can then be used to perform attribution analysis on the target sample data. During the analysis process, model type information can be added to the prompt used to input the large model. This allows the large model to dynamically adjust the focus of the attribution analysis based on the target model type. For example, for an information recommendation model, the attribution analysis focuses on how to accurately identify the user's query intent. This allows for flexible attribution analysis tailored to different model types and optimization problems, further improving optimization efficiency for different model types.
[0063] In some embodiments, application scenario information can be added to the prompt used to input the large model. This allows the large model to dynamically adjust the dimensions of attribution analysis based on this application scenario information. For example, in scenarios with limited computing resources, the analysis of query efficiency can be reduced. This allows for flexible attribution analysis tailored to different application scenarios and optimization issues, further improving optimization efficiency for different application scenarios.
[0064] This disclosed embodiment leverages the natural language understanding capabilities of a large model to generate a target query statement that is specific to the problem being optimized and meets the optimization goal, based on a thorough understanding and analysis of the optimization requirements. The large model is then used to perform attribution analysis on the data retrieved from the sample data based on the target query statement, further improving the accuracy and depth of the attribution analysis. This generates an optimization strategy that meets the optimization requirements, further improving the efficiency of sample optimization and thus the efficiency of model optimization, thereby meeting the optimization needs of different users.
[0065] According to an embodiment of the present disclosure, generating a target query statement using a big model based on the problem to be optimized and the optimization goal may include the following operations: generating an initial query statement based on the problem to be optimized using the big model; detecting the initial query statement based on the optimization goal using the big model to generate a detection result; in response to determining that the matching degree is less than a predetermined threshold, optimizing the initial query statement based on the detection result using the big model to generate a target query statement; and in response to determining that the matching degree is greater than or equal to the predetermined threshold, determining that the initial query statement is a target query statement.
[0066] In some embodiments, the test result includes the degree of match between the sample data retrieved by the initial query statement and the optimization target. The test result may include the degree of match with the optimization target in at least three dimensions: sample coverage, attribution accuracy, and query efficiency.
[0067] Figure 3 The diagram schematically shows a large model-based adversarial SQL generation according to an embodiment of the present disclosure.
[0068] like Figure 3 As shown, in the stage of generating the target query using the large model, a SQL generation large model 310 and a SQL detection large model 320 may be included. Both the SQL generation large model 310 and the SQL detection large model 320 may be large language models. The main difference is that they can respectively perform SQL generation and SQL detection operations based on different input prompts, implementing multiple rounds of iterative adversarial optimization, and ultimately generating SQL that meets the optimization requirements.
[0069] For example, the SQL generation model 310 can mainly perform the following operations: attribution demand analysis, data model understanding, SQL logic construction, feedback integration application and SQL statement output.
[0070] In the attribution demand analysis operation, key attribution dimensions can be extracted from the problem to be optimized based on the large language model, such as the dimension of intent recognition accuracy.
[0071] In data model understanding operations, the structure of sample data and the relationships between sample pairs can be analyzed based on the large language model. For example, whether each sample pair in the sample data has a clearly differentiated entity representation for the query.
[0072] In the SQL logic construction operation, the logical associations between the sample data may be analyzed based on the large language model, so as to construct the SQL logic according to the logical associations between the sample data.
[0073] In the SQL statement output operation, the initial query statement (SQL) can be output based on the large language model after extracting key attribution dimensions, analyzing the structure of sample data and the correlation between sample pairs, and building SQL logic.
[0074] Then, the initial query statement can be input into the SQL detection model 320. The SQL detection model 320 mainly performs the following operations: syntax and logic verification, sample coverage detection, attribution accuracy analysis, query efficiency estimation, and structured feedback generation.
[0075] In the syntax and logic verification operation, the large model can be used to check whether the syntax and query logic of the initial query statement are correct.
[0076] In the sample coverage detection operation, the large model can be used to analyze the coverage of related samples that can be found based on the initial query statement.
[0077] In the attribution accuracy analysis operation, a large model can be used to analyze whether the sample features that can be found based on the initial query statement can distinguish the problem to be optimized.
[0078] In the query efficiency estimation operation, a large model can be used to analyze the resources consumed when executing query operations on sample data based on the initial query statement.
[0079] During structured feedback generation, the large model can use the results of syntax and logic verification, sample coverage testing, attribution accuracy analysis, and query efficiency estimation to determine the degree of match between the initial query statement and the optimization target. If the match is less than a predetermined threshold, optimization suggestions are generated for each of the aforementioned test dimensions. The optimization suggestions are then fed back to the SQL generation large model 310.
[0080] The SQL generation model 310 can perform feedback integration and application operations based on the received optimization suggestions, that is, modify or optimize the initial query statement according to the optimization suggestions, and input the optimized query statement into the SQL detection model 320 again, so as to undergo multiple rounds of iterative adversarial optimization until a target query statement with a matching degree greater than or equal to a predetermined threshold is generated.
[0081] During the multi-round iterative adversarial optimization process, the maximum number of iterations can be set as a termination condition based on a predetermined threshold to reduce the number of calls to the large model and reduce resource consumption during the SQL optimization process.
[0082] Through multiple rounds of iterative adversarial target query statements, the query statements can be flexibly adjusted based on the complexity of the optimization requirements. Compared with templated query statements, it can meet the special attribution requirements of processing logically complex models, further improve the matching degree between query statements and optimization requirements, and improve the accuracy of sample attribution and the efficiency of sample optimization.
[0083] In some embodiments, in order to further reduce the number of calls to the large model and save resource consumption during sample optimization, an initial query statement can be generated based on historical attribution experience.
[0084] For example, based on the problem to be optimized, generating an initial query statement using a large model may include the following operations: constructing a first prompt text according to the problem to be optimized, the type of sample data, and a reference optimization example, and inputting the first prompt text into the large model to output the initial query statement.
[0085] According to embodiments of the present disclosure, a reference optimization example includes a historical query statement used to retrieve a target historical sample from historical sample data. The target historical sample represents sample data that meets the optimization requirements and is used in the sample attribution phase for training samples of the reference model. The reference model can be a model of the same or similar type and application scenario as the target model. The reference optimization example can also include historical optimization problems of the same type as the problem to be optimized.
[0086] According to an embodiment of the present disclosure, the type of sample data may include: the data format and structure of a relational database used to store the sample data, so that the large model can generate structured SQL statements that comply with database syntax requirements.
[0087] Historical query statements are input into the big model as reference optimization examples, so that the big model can generate initial query statements based on a full understanding and summary of historical attribution experience, thereby reducing the number of iterations in the adversarial generation of target query statements, further reducing the number of calls to the big model, and saving resource consumption during the sample optimization process.
[0088] Figure 4 The diagram schematically shows a schematic diagram of optimizing SQL from three dimensions of sample coverage, attribution accuracy, and query efficiency based on a large model according to an embodiment of the present disclosure.
[0089] like Figure 4 As shown, this embodiment may include a sample coverage optimization stage 421 , an attribution accuracy optimization stage 422 , and a query efficiency optimization stage 423 .
[0090] In some embodiments, based on the optimization goal, the initial query statement is detected using a large model to generate a detection result, which may include the following operations: based on the optimization goal, the sample coverage of the initial query statement is detected using a large model to generate a first detection result.
[0091] For example, in the sample coverage optimization phase 421, the sample coverage can be tested based on the initial SQL0 4210 using the large model by executing operation S4211 to obtain a first test result. Then, the large model can be used to generate coverage optimization recommendations based on the first test result by executing operation S4212. Subsequently, the initial SQL0 4210 can be optimized according to the coverage optimization recommendations to generate optimized SQL1 4220.
[0092] In some embodiments, based on the optimization goal, using the big model to detect the initial query statement and generate a detection result can include the following operations: based on the optimization goal, using the big model to detect the attribution accuracy of the initial query statement and generate a second detection result.
[0093] For example, in the attribution accuracy optimization stage 422, the attribution accuracy can be tested based on the optimized SQL1 4220 using the large model by executing operation S4221 to obtain a second test result. The large model can then be used to generate an accuracy optimization recommendation based on the second test result by executing operation S4222. The optimized SQL1 4220 can then be optimized according to the accuracy optimization recommendation to generate optimized SQL2 4230.
[0094] In some embodiments, based on the optimization goal, using the big model to detect the initial query statement and generate a detection result can include the following operations: based on the optimization goal, using the big model to detect the query efficiency of the initial query statement and generate a third detection result.
[0095] For example, in the query efficiency optimization phase 423, the query efficiency can be tested based on the optimized SQL 24230 using the big model by executing operation S4231, resulting in a third test result. Then, the big model can be used to generate efficiency optimization recommendations based on the third test result by executing operation S4232. The optimized SQL 24230 can then be optimized according to the efficiency optimization recommendations to generate target SQL 4240.
[0096] By comprehensively testing whether SQL meets optimization requirements through three dimensions: sample coverage, attribution accuracy, and query efficiency, it is possible to balance the optimization requirements of multi-dimensional indicators in the optimization target based on optimization requirements in sample attribution analysis, further improving the matching degree of sample optimization with different models and different application scenarios, and providing a universal method for sample attribution and sample optimization.
[0097] In actual application scenarios, different models have different deployment environments and therefore different requirements for sample optimization. Therefore, the model operating environment factor can be added to the initial SQL statement detection phase to further improve optimization efficiency.
[0098] In an embodiment of the present disclosure, based on the optimization goal, the initial query statement is detected using a large model to generate a detection result, which may include the following operations: constructing a second prompt text based on the optimization goal, the initial query statement and the operating environment information of the target model; inputting the second prompt text into the large model to generate a detection result.
[0099] For example, the detection results may include detection results in at least one of the above optimization stages, such as sample coverage detection results, attribution accuracy detection results, and query efficiency detection results.
[0100] In the embodiment of the present disclosure, the operating environment information may represent the hardware resource environment in which the target model is deployed.
[0101] By adding the model operating environment factor to the prompt text used for detecting the initial SQL statement, the adaptability of the optimization strategy to the operating environment is further improved, and the optimization efficiency is further improved.
[0102] In some embodiments, the detection results may include optimization suggestions for the initial query statement. In the process of SQL optimization, historical optimization experience may also be referenced.
[0103] In some embodiments, determining that the matching degree is less than a predetermined threshold, optimizing the initial query statement using a large model based on the detection results to generate a target query statement may include the following operations: generating a third prompt text based on the optimization suggestions, the initial query statement, the problem to be optimized, and the reference optimization example; and inputting the third prompt text into the large model to generate a target query statement.
[0104] For example, coverage optimization recommendations can focus on sample comprehensiveness, ensuring that key samples and features are not missed. By increasing sample completeness through relaxed matching conditions and complete logical connections, targeted screening of sample data can be achieved for the problem being optimized.
[0105] For example, accuracy optimization suggestions can introduce precise attribution conditions, optimize sample screening criteria, enhance feature extraction logic, and support deep attribution analysis, thereby achieving correlation-based feature screening and sorting.
[0106] For example, efficiency optimization suggestions can optimize query structures and query strategies, reference index-aware mechanisms, and generate more efficient query paths, thereby implementing serial and parallel query strategies for sample data.
[0107] In the disclosed embodiments, the reference optimization examples can contain the same content as the reference optimization examples used in the initial query statement generation phase. Furthermore, optimization suggestions based on historical SQL optimization processes involving the problem being optimized, which have been performed less frequently, can be added. This allows the large model to optimize SQL based on the experience gained from historical sample attribution and sample optimization, thereby reducing the number of calls to the large model during SQL optimization and reducing resource consumption.
[0108] Since different users have flexible and varied needs for sample attribution analysis and model optimization, it is possible to increase the interaction process with users in each stage of sample attribution analysis and model optimization to further improve the accuracy and efficiency of sample optimization.
[0109] For example: in the sample coverage optimization stage, the generated coverage optimization suggestions may include multiple ones. In some embodiments, according to the correlation between each coverage optimization suggestion and the problem to be optimized, the optimization operation can be performed in turn according to each suggestion using the large model, and finally the target query statement can be generated.
[0110] In some embodiments, multiple coverage optimization suggestions can also be displayed on the interactive interface according to the correlation between each coverage optimization suggestion and the problem to be optimized, so that the object can select some optimization suggestions on the interactive interface to perform optimization operations according to actual needs, or adjust the execution order of multiple optimization suggestions.
[0111] Therefore, in the embodiment of the present disclosure, it is determined that the matching degree is less than a predetermined threshold, and based on the detection result, the initial query statement is optimized using the big model to generate a target query statement. The following operations may also be included: receiving at least one optimization suggestion selected by the object on the interactive interface; and based on the at least one optimization suggestion, optimizing the initial query statement using the big model to generate a target query statement.
[0112] Figure 5 A schematic diagram of an interactive interface in the adversarial SQL generation stage according to an embodiment of the present disclosure is schematically shown.
[0113] like Figure 5 As shown, the interactive interface 500 may include interaction information between the user and the AI assistant. For example, the user's input information 510 may include analysis instructions, abnormal cases, and problems to be optimized. For example, the analysis instruction may be "Please generate SQL for querying the sample data set based on the following problem to be optimized in order to perform sample attribution analysis." Abnormal cases may include the query "Hotels 100 kilometers away from Airport A" and the output of the target model "Hotel XX is 100 kilometers away from Airport A." The problem to be optimized may be "The query intent is the amount, not the distance."
[0114] For example, the AI assistant's feedback information 520 may include SQL generated using a large model and a test result for that SQL, with the test result including optimization suggestions for that SQL. For example, a test result might be "The attribution accuracy of the SQL query sample dataset is less than 0.5," and optimization suggestions might include "Use Rlike for precise number + unit matching; use multiple condition combinations (number words + location); cover a variety of price expressions; cover a variety of distance units; cover common location references," etc.
[0115] Users can choose from the optimization suggestions provided by the AI assistant based on their actual needs, and they can choose one or more suggestions.
[0116] For example, the user's feedback information 530 regarding the optimization suggestion may include "Please optimize the SQL based on a combination of multiple conditions (number words + positions) and use Rlike to perform precise number + unit matching."
[0117] The large model can then be used to optimize the SQL according to the user's selected optimization suggestions, and the optimized SQL is retested. The retest results and optimization suggestions are then fed back to the user. After multiple rounds of interaction, the AI assistant's final feedback information 5n0 may include: the target query statement "zzz", informing the user that the SQL has met the optimization goal, and asking the user whether to perform training sample queries based on the SQL.
[0118] Add interaction with users during the sample attribution analysis phase to further improve the accuracy and efficiency of sample optimization.
[0119] In an embodiment of the present disclosure, target sample data related to the problem to be optimized can be queried from the sample data based on the target query statement, and then the target sample data is subjected to attribution analysis using a large model to generate an optimization strategy for optimizing the training samples.
[0120] Figure 6 A schematic diagram of sample attribution based on a large model according to an embodiment of the present disclosure is schematically shown.
[0121] like Figure 6 As shown, the sample attribution analysis model 610 can be used to perform label analysis, query intent analysis, entity analysis, and query domain analysis on the target sample data. Based on the analysis results, an optimization strategy 601 is generated. Optimization strategy 601 may include label optimization strategy, query statement optimization strategy, entity optimization strategy, and domain optimization strategy.
[0122] In some embodiments, using a large model to analyze target sample data and generate a target strategy may include the following operations: using a large model to perform label analysis on the target sample data to generate a first analysis result; and based on the first analysis result, generating a target strategy for the sample label.
[0123] In the embodiment of the present disclosure, the first analysis result may represent the correlation between the sample query intent and the sample label in the target sample data.
[0124] For example, the issue to be optimized is anomalies in relevance ranking, where documents with a high relevance to the query are ranked lower. This could be because during the sample annotation process, only the pros and cons of two documents were compared, for example, the document containing the most keywords in the query was considered high-quality. However, the product manager's perspective was not considered to determine whether the resulting document list ranking reflects the relevance ranking of the query's intent.
[0125] Therefore, the generated optimization suggestion can be "the goal of the labeling task is no longer just to compare the pros and cons of two documents, but also to think about the list sorting results that are more relevant to this query from the perspective of a product manager."
[0126] In some embodiments, using a large model to analyze target sample data and generate a target strategy may include the following operations: using a large model to analyze query intent on the target sample data to generate a second analysis result; and based on the second analysis result, generating a target strategy for the sample query statement.
[0127] In the embodiment of the present disclosure, the second analysis result represents the semantic similarity of the sample query intent in the target sample data.
[0128] For example, the problem to be optimized is anomalies in query intent recognition, which can lead to the inability to accurately identify multiple semantically similar query expressions. For example, in gaming scenarios, there are many expressions that differ from those in ordinary scenarios but have similar semantics. If the model cannot accurately identify the true query intent of these similar expressions, the model output will not match the user's query intent.
[0129] Therefore, the generated optimization suggestion can be "perform content enhancement on synonymous variants of the query in the sample data."
[0130] In some embodiments, using a large model to analyze target sample data and generate a target strategy may include the following operations: using the large model to perform entity analysis on the target sample data to generate a third analysis result; and generating a target strategy for the sample entity based on the third analysis result.
[0131] In the embodiment of the present disclosure, the third analysis result represents the differences between the multiple sample entities in the target sample data.
[0132] For example, the problem to be optimized is entity matching anomalies, where entities with similar semantics but different expressions, or entities with similar expressions but significant semantic differences, cannot be accurately identified. Examples include "child," "children," and "children." The generated optimization suggestions could include content enhancements for documents in the sample data.
[0133] In some embodiments, using a large model to analyze target sample data and generate a target strategy may include the following operations: using the large model to analyze the query field covered by the target sample data to generate a fourth analysis result; and generating a target strategy for the query field based on the fourth analysis result.
[0134] In the embodiment of the present disclosure, the fourth analysis result represents the similarity of the field to which the target sample data belongs.
[0135] For example, the problem to be optimized may be cross-domain anomaly recognition, which cannot accurately identify queries in domains similar to or significantly different from the training samples.
[0136] Therefore, the generated optimization suggestions can be used to expand the domain of the sample data. For example, if the original training samples are for medical consultation, they can be expanded to other fields such as education consultation and project consultation to improve the generalization of the model.
[0137] Attribution analysis is performed on target sample data from multiple dimensions such as labels, query intent, entities, and query fields, which further improves the attribution depth and thus the attribution accuracy.
[0138] In some embodiments, the target strategy may include multiple ones, and the above method may further include the following operations: sorting the multiple target strategies according to the correlation between the multiple target strategies and the problem to be optimized; and optimizing the target sample data using a large model according to the sorting results of the correlation to generate optimized first sample data.
[0139] For example, a large model can be used to prioritize sample optimization using strategies that are highly relevant to the problem being optimized. The large model can then be used to analyze the optimized sample data to determine whether the optimized model meets or partially meets the optimization requirements. This allows the user to determine whether to terminate the sample optimization operation based on the analysis results. This can further improve the efficiency of sample optimization in scenarios with large amounts of sample data.
[0140] For example, in scenarios where high attribution accuracy is required, sample optimization operations can be performed sequentially according to the sorting results to further improve the accuracy of sample optimization and thus improve the accuracy of the optimized model output.
[0141] Similar to the SQL optimization stage, user interaction can also be added during the sample optimization stage.
[0142] For example: displaying multiple target strategies on the interactive interface according to the sorting results of relevance; receiving the object's selection of at least one target strategy on the interactive interface; and optimizing the target sample data according to at least one target strategy using the large model to generate optimized second sample data.
[0143] Figure 7 A schematic diagram of an interactive interface at the sample attribution stage according to an embodiment of the present disclosure is schematically shown.
[0144] like Figure 7 As shown, the interactive interface 700 may include interaction information between the user and the AI assistant.
[0145] For example, the user's input information 710 may include analysis instructions, abnormal cases, problems to be optimized, and optimization goals. For example, the analysis instruction may be "Please conduct sample attribution analysis on the problem to be optimized based on the sample data queried, and provide reasonable suggestions." Abnormal cases may include the query "Hotels 100 kilometers away from Airport A" and the output of the target model "Hotel XX is 100 kilometers away from Airport A." The problem to be optimized may be "The query intent is the amount, not the distance." The optimization goal may be "to improve the accuracy of the model in identifying the query intent, and the sample coverage is greater than the attribution accuracy and greater than the query efficiency."
[0146] The feedback information 720 of the AI assistant may include optimization strategies in multiple dimensions, such as label optimization strategy, entity optimization strategy, etc.
[0147] For example, the tag optimization strategy could be: "The goal of the tagging task is no longer just to compare the pros and cons of two documents, but also to think about the sorting results of the list that is more relevant to this query from the perspective of a product manager."
[0148] Then, the user can select from the optimization strategies provided by the AI assistant based on actual needs and input feedback information 730 “Please optimize the sample data based on the label optimization strategy”.
[0149] In some embodiments, the optimization target may also be generated by analyzing at least one optimization requirement using a large model.
[0150] Therefore, the above method may further include the following operation: performing analysis using at least one optimization requirement, abnormal result, and type of sample data to generate an optimization target related to the problem to be optimized.
[0151] For example, the semantic understanding capabilities of large models can be used to analyze query dimensions of sample data based on optimization requirements and abnormal results. For example, sample coverage is greater than attribution accuracy, which is greater than query efficiency. This allows the balance point to be determined among multiple query dimensions, allowing for the flexible generation of optimization targets that match optimization requirements.
[0152] In some embodiments, the optimization goal may also be a goal for a specific domain.
[0153] Therefore, the above method may also include the following operations: receiving the area to be optimized selected by the object on the interactive interface; and using at least one optimization requirement, abnormal result and sample data type for analysis to generate an optimization target for the area to be optimized related to the problem to be optimized.
[0154] For example, if the target model's initial sample data is all about education consulting, and the user chooses to optimize for medical consulting, the semantic understanding capabilities of the large model can be leveraged to analyze the optimization requirements, the area to be optimized, and abnormal results to determine the optimization dimensions of the sample data. For example, queries can be expanded and enhanced for the medical consulting field, thereby achieving cross-domain sample optimization.
[0155] User interaction can be introduced in each stage of SQL optimization and sample optimization to further improve the match between optimization strategies and user needs, increase user participation, and further enhance user experience.
[0156] Figure 8 A schematic diagram of a large model-based sample optimization method according to an embodiment of the present disclosure is schematically shown.
[0157] like Figure 8 As shown, in this embodiment 800, the user first inputs a query into the search model 810, which outputs search results 811 and filters out abnormal results 812 from the multiple search results. Then, based on the abnormal results 812, the large model 820 is called to perform cause analysis 821, generating multiple candidate optimization problems and displaying them on the interactive interface P1 801. The user can then select a problem to be optimized 813 from the multiple candidate optimization problems.
[0158] Next, based on the problem to be optimized 813 selected by the user, multiple candidate optimization targets may be matched and displayed on the interactive interface P2 802 , and the user may select an optimization target 814 from the multiple candidate optimization targets.
[0159] Then, based on the optimization goal 814 and the problem to be optimized 813, the large model 820 can be called to generate SQL 822, and the target sample data 815 can be queried from the database 830 based on the generated SQL.
[0160] Next, by calling the large model 820 to perform attribution analysis 823 on the target sample data 815, multiple candidate optimization strategies are generated and displayed on the interactive interface P3 803. The user can select an optimization strategy 815 from the multiple candidate optimization strategies.
[0161] Finally, the target sample data is optimized based on the optimization strategy 815, and the search model 810 is optimized and trained using the optimized sample data, so that the optimized model meets the user's optimization requirements and reduces the probability of outputting abnormal results.
[0162] Figure 9 The block diagram of the sample optimization device based on a large model according to an embodiment of the present disclosure is schematically shown.
[0163] like Figure 9 As shown, the sample optimization device includes: a receiving module 910, a generating module 920 and an analyzing module 930.
[0164] The receiving module 910 is used to receive at least one optimization requirement selected by the object on the interactive interface; wherein, at least one optimization requirement includes a problem to be optimized and an optimization target; wherein, the problem to be optimized is obtained by performing a cause analysis on an abnormal result output by the target model using a large model.
[0165] Generation module 920 is used to generate a target query statement using a large model based on the problem to be optimized and the optimization target; wherein the target query statement is used to query target sample data related to the problem to be optimized from the sample data; the target model is obtained by training based on the sample data.
[0166] The analysis module 930 uses the large model to analyze the target sample data and generates a target strategy so as to optimize the target sample data based on the target strategy.
[0167] According to an embodiment of the present disclosure, the generation module 920 may include: a generation submodule, a detection submodule, and a determination submodule.
[0168] The generation submodule is used to generate the initial query statement based on the problem to be optimized using the large model;
[0169] The detection submodule is used to detect the initial query statement based on the optimization goal using the large model and generate a detection result; wherein the detection result includes: the matching degree between the sample data queried by the initial query statement and the optimization goal.
[0170] A determination submodule is used to, in response to determining that the matching degree is less than a predetermined threshold, optimize the initial query statement based on the detection result using the large model to generate a target query statement; and in response to determining that the matching degree is greater than or equal to the predetermined threshold, determine that the initial query statement is the target query statement.
[0171] According to an embodiment of the present disclosure, the generating submodule includes: a first constructing unit and a first input unit.
[0172] The first construction unit is used to construct a first prompt text according to the problem to be optimized, the type of sample data and the reference optimization example; wherein the reference optimization example includes a historical query statement for querying the target historical sample from the historical sample data.
[0173] The first input unit is used to input the first prompt text into the large model and output an initial query statement.
[0174] According to an embodiment of the present disclosure, the detection submodule includes: a first detection unit, which is used to detect the sample coverage of the initial query statement using a large model based on an optimization goal and generate a first detection result.
[0175] According to an embodiment of the present disclosure, the detection submodule further includes: a second detection unit, configured to detect the attribution accuracy of the initial query statement using a large model based on an optimization goal, and generate a second detection result.
[0176] According to an embodiment of the present disclosure, the detection submodule further includes: a third detection unit, which is used to detect the query efficiency of the initial query statement based on the optimization target using the large model to generate a third detection result.
[0177] According to an embodiment of the present disclosure, the detection submodule includes: a second construction unit and a second input unit.
[0178] The second construction unit is used to construct a second prompt text according to the optimization target, the initial query statement and the operating environment information of the target model.
[0179] The second input unit is used to input the second prompt text into the large model to generate a detection result; wherein the detection result includes at least one of the following: a sample coverage detection result, an attribution accuracy detection result, and a query efficiency detection result.
[0180] According to an embodiment of the present disclosure, the detection result includes optimization suggestions for the initial query statement. The determination submodule includes: a first generation unit and a second generation unit.
[0181] The first generating unit is configured to generate a third prompt text according to the optimization suggestion, the initial query statement, the problem to be optimized, and the reference optimization example.
[0182] The second generating unit is used to input the third prompt text into the large model to generate a target query statement.
[0183] According to an embodiment of the present disclosure, the determination submodule further includes: a first receiving unit and a first optimization unit.
[0184] The first receiving unit is configured to receive at least one optimization suggestion selected by the subject on the interactive interface.
[0185] The first optimization unit is configured to optimize the initial query statement using the large model based on at least one optimization suggestion to generate a target query statement.
[0186] According to an embodiment of the present disclosure, the analysis module includes: a first analysis submodule and a first strategy generation submodule.
[0187] The first molecular module is used to perform label analysis on the target sample data using the large model to generate a first analysis result; wherein the first analysis result represents the correlation between the sample query intent and the sample label in the target sample data.
[0188] The first strategy generation submodule is used to generate a target strategy for the sample label based on the first analysis result.
[0189] According to an embodiment of the present disclosure, the analysis module includes: a second analysis submodule and a second strategy generation submodule.
[0190] The second analysis submodule is used to use the large model to perform query intent analysis on the target sample data to generate a second analysis result; wherein the second analysis result represents the semantic similarity of the sample query intent in the target sample data.
[0191] The second strategy generating submodule is used to generate a target strategy for the sample query statement based on the second analysis result.
[0192] According to an embodiment of the present disclosure, the analysis module includes: a third analysis submodule and a third strategy generation submodule.
[0193] The third analysis submodule is used to perform entity analysis on the target sample data using the large model to generate a third analysis result; wherein the third analysis result represents the difference between multiple sample entities in the target sample data.
[0194] The third strategy generation submodule is used to generate a target strategy for the sample entity based on the third analysis result.
[0195] According to an embodiment of the present disclosure, the analysis module includes: a fourth analysis submodule and a fourth strategy generation submodule.
[0196] The fourth analysis submodule is used to analyze the query field covered by the target sample data using the large model to generate a fourth analysis result; wherein the fourth analysis result represents the similarity of the field to which the target sample data belongs.
[0197] The fourth strategy generation submodule is used to generate a target strategy for the query field based on the fourth analysis result.
[0198] According to an embodiment of the present disclosure, the target strategy includes multiple ones, and the above-mentioned device further includes: a sorting module and a first optimization module.
[0199] The sorting module is used to sort multiple target strategies according to the relevance between the multiple target strategies and the problem to be optimized.
[0200] The optimization module is used to optimize the target sample data according to the relevance sorting results and generate the optimized first sample data using the large model.
[0201] According to an embodiment of the present disclosure, the above-mentioned device further includes: a display module, a strategy receiving module and a second optimization module.
[0202] The display module is used to display multiple target strategies on the interactive interface according to the sorting results of relevance.
[0203] The strategy receiving module is used to receive the object's selection of at least one target strategy on the interactive interface.
[0204] The second optimization module is used to optimize the target sample data using the large model according to at least one target strategy to generate optimized second sample data.
[0205] According to an embodiment of the present disclosure, the above-mentioned device also includes a target generation module, which is used to analyze using at least one optimization requirement, abnormal result and type of sample data to generate an optimization target related to the problem to be optimized.
[0206] According to an embodiment of the present disclosure, the above-mentioned device further includes: a domain receiving module and a target generating module.
[0207] The domain receiving module is used to receive the domain to be optimized selected by the object on the interactive interface.
[0208] The target generation module is used to analyze at least one optimization requirement, abnormal result and sample data type to generate an optimization target for the field to be optimized that is related to the problem to be optimized.
[0209] According to an embodiment of the present disclosure, the present disclosure also provides an intelligent agent for sample optimization, an electronic device, a readable storage medium and a computer program product.
[0210] According to an embodiment of the present disclosure, an intelligent agent for sample optimization includes: an input module, a processing module and an output module.
[0211] The input module is used to receive at least one optimization requirement selected by the object on the interactive interface.
[0212] The processing module is used to determine the target task based on at least one optimization requirement information received by the input module, determine the target big model based on the target task, and obtain the target strategy for optimizing the target sample data by calling the target big model to execute any of the big model-based sample optimization methods described above.
[0213] An output module is configured to output the target strategy obtained by the processing module. According to an embodiment of the present disclosure, an electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described above.
[0214] According to an embodiment of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute the method described above.
[0215] According to an embodiment of the present disclosure, a computer program product includes a computer program, and when the computer program is executed by a processor, the computer program implements the method described above.
[0216] Figure 10 The structural block diagram of an intelligent agent for sample optimization according to an embodiment of the present disclosure is schematically shown.
[0217] In the embodiments of the present disclosure, inspired by the von Neumann structure in modern computer theory, such as Figure 10 As shown, the AI agent 1000 may include three core modules: an input module 1010, an output module 1020, and a processing module 1030. The processing module 1030 may include a control unit 1031, a storage unit 1032, and an operation unit 1033.
[0218] Input module 1010 is responsible for receiving or sensing information such as queries, requests, instructions, signals, or data from the outside world (e.g., users or the external environment) and converting it into a format that AI agent 1000 can understand and process. Input module 1010 is the primary link for AI agent 1000 to interact with the outside world. It enables AI agent 1000 to efficiently and accurately obtain necessary "sensory" information from the outside world and respond to this information.
[0219] In an example, the input information received by the input module 1010 may be at least one optimization requirement described above.
[0220] In this example, processing module 1030 is the core support for AI agent 1000's ability to handle complex tasks. Processing module 1030 can determine a target task based on the input information received by input module 1010, determine a large model based on the target task, and execute the large model-based sample optimization method described above by calling the large model to output a target strategy.
[0221] In the example, the control unit 1031 in the processing module 1030 will continuously interact with the storage unit 1032, the computing unit 1033, and / or the output module 1020 during operation. However, it should be noted that in the embodiment of the present disclosure, the control unit 1031 acts as a single initiator to initiate communication with the storage unit 1032, the computing unit 1033, and / or the output module 1020, and there is no communication coupling between the storage unit 1032, the computing unit 1033, and the output module 1020.
[0222] In this example, the performance of the control unit 1031 can be closely related to the large model on which the AI agent 1000 is based. To fully utilize the capabilities of the large language model, the internal structure of the control unit 1031 can be designed to be highly configurable and scalable to cope with various types of tasks and requirements in real scenarios.
[0223] The storage unit 1032 may be responsible for memorizing information such as historical conversations, event flows, etc. The configuration information, target text, and data resources generated in each round as described above may be included in the storage unit 1032 .
[0224] In the example, after the AI agent 1000 obtains the configuration generation request, the AI agent 1000 can use the intent recognition model to determine the configuration intent from the initial text. The configuration intent can be stored in the storage unit 1032. The AI agent 1000 can retrieve relevant data resources from the storage unit 1032 and feed it back to the control unit 1031. Then, the control unit 1031 can use the fed-back data resources to obtain the configuration data corresponding to the initial text. It can also retrieve relevant text data from the storage unit 1032 and feed it back to the control unit 1031. Then, the control unit 1031 can use the returned text data to obtain the target text. And pass the target text and configuration data to the output module 1020.
[0225] The computing unit 1033 can be viewed as a predefined tool library, and the renderer and presentation controls mentioned above can be included in the computing unit 1033 .
[0226] In the example, when the AI agent 1000 needs to render multiple output data, it can call the relevant renderer and display control from the operation unit 1033 and feed it back to the control unit 1032. Then, the control unit 1032 can use the feedback renderer and display control to render the first search result and pass the first search result to the output module 1020. It can be understood that although the large language model has excellent language understanding and generation capabilities, it is the same as a human. Without the help of any tools, the tasks that can be solved are very limited. When the AI agent 1000 is given the ability to call tools, it can achieve tasks such as completing mathematical operations with the help of a calculator, completing data analysis with the help of Python, and completing prediction tasks with the help of a search engine.
[0227] In an example, the output module 1020 may output the target policy described above.
[0228] The AI agent 1000 according to the embodiment of the present disclosure can simply and effectively improve the level of intelligence, and enhance flexibility and versatility.
[0229] Figure 11 A schematic block diagram of an example electronic device 1100 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 can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0230] like Figure 11 As shown, device 1100 includes a computing unit 1101, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1102 or a computer program loaded from a storage unit 1108 into a random access memory (RAM) 1103. RAM 1103 may also store various programs and data required for the operation of device 1100. Computing unit 1101, ROM 1102, and RAM 1103 are connected to each other via a bus 1104. An input / output (I / O) interface 1105 is also connected to bus 1104.
[0231] Various components in device 1100 are connected to I / O interface 1105, including an input unit 1106, such as a keyboard and mouse; an output unit 1107, such as various types of displays and speakers; a storage unit 1108, such as a magnetic disk and optical disk; and a communication unit 1109, such as a network card, a modem, a wireless communication transceiver, etc. Communication unit 1109 allows device 1100 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0232] Computing unit 1101 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of computing unit 1101 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized 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. Computing unit 1101 performs the various methods and processes described above, such as the large-model-based sample optimization method. For example, in some embodiments, the large-model-based sample optimization method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 1108. In some embodiments, part or all of the computer program can be loaded and / or installed onto device 1100 via ROM 1102 and / or communication unit 1109. When the computer program is loaded into RAM 1103 and executed by computing unit 1101, one or more steps of the large-model-based sample optimization method described above can be performed. Alternatively, in other embodiments, the computing unit 1101 may be configured to execute the large model-based sample optimization method in any other appropriate manner (for example, by means of firmware).
[0233] Various embodiments of the systems and techniques described above 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), system-on-a-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0234] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0235] In the context of the present disclosure, a machine-readable medium may 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 may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fibers, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0236] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the 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 acoustic input, voice input, or tactile input).
[0237] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0238] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.
[0239] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not a limitation herein.
[0240] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. A sample optimization method based on a large model, comprising: Receive at least one optimization requirement selected by a subject on an interactive interface; wherein the at least one optimization requirement includes a problem to be optimized and an optimization target; wherein the problem to be optimized is obtained by analyzing the cause of an abnormal result output by a target model using a large model; Based on the problem to be optimized and the optimization goal, a target query statement is generated using the large model; wherein the target query statement is used to query target sample data related to the problem to be optimized from the sample data; the target model is obtained by training based on the sample data; and The target sample data is analyzed using the large model to generate a target strategy so as to optimize the target sample data based on the target strategy.
2. The method according to claim 1, wherein The step of generating a target query statement using a large model based on the problem to be optimized and the optimization goal includes: Based on the problem to be optimized, generating an initial query statement using the large model; Based on the optimization goal, the initial query statement is tested using the large model to generate a test result; wherein the test result includes: the matching degree between the sample data retrieved by the initial query statement and the optimization goal; In response to determining that the degree of match is less than a predetermined threshold, based on the detection result, optimizing the initial query using the large model to generate a target query; and In response to determining that the matching degree is greater than or equal to the predetermined threshold, the initial query statement is determined to be the target query statement.
3. The method according to claim 2, wherein: The step of generating an initial query statement based on the problem to be optimized by using the large model includes: Constructing a first prompt text according to the problem to be optimized, the type of the sample data, and a reference optimization example; wherein the reference optimization example includes a historical query statement for querying a target historical sample from the historical sample data; and The first prompt text is input into the large model, and the initial query statement is output.
4. The method according to claim 2 or 3, wherein: The detecting the initial query statement using the large model based on the optimization goal to generate a detection result includes: Based on the optimization goal, the sample coverage of the initial query statement is detected using the large model to generate a first detection result.
5. The method according to claim 4, wherein The detecting the initial query statement using the large model based on the optimization goal to generate a detection result further includes: Based on the optimization goal, the attribution accuracy of the initial query statement is tested using the large model to generate a second test result.
6. The method according to claim 4 or 5, wherein: The detecting the initial query statement using the large model based on the optimization goal to generate a detection result further includes: Based on the optimization goal, the query efficiency of the initial query statement is tested using the large model to generate a third test result.
7. The method according to any one of claims 4 to 6, wherein The detecting the initial query statement using the large model based on the optimization goal to generate a detection result includes: Constructing a second prompt text according to the optimization goal, the initial query statement, and the operating environment information of the target model; The second prompt text is input into the large model to generate the detection result; wherein the detection result includes at least one of the following: sample coverage detection result, attribution accuracy detection result and query efficiency detection result.
8. The method according to any one of claims 3 to 7, wherein The detection results include optimization suggestions for the initial query statement; Determining that the matching degree is less than a predetermined threshold, and optimizing the initial query statement using the large model based on the detection result to generate a target query statement, includes: generating a third prompt text according to the optimization suggestion, the initial query statement, the problem to be optimized, and the reference optimization example; and The third prompt text is input into the large model to generate the target query statement.
9. The method according to claim 8, wherein Determining that the matching degree is less than a predetermined threshold, and optimizing the initial query statement using the large model based on the detection result to generate a target query statement, further includes: receiving at least one optimization suggestion selected by the subject on the interactive interface; Based on the at least one optimization suggestion, the initial query statement is optimized using the large model to generate the target query statement.
10. The method according to claim 1, wherein The step of analyzing the target sample data using the large model to generate a target strategy includes: Performing label analysis on the target sample data using the large model to generate a first analysis result; wherein the first analysis result represents the correlation between the sample query intent and the sample label in the target sample data; and Based on the first analysis result, a target strategy for the sample label is generated.
11. The method according to claim 1 or 10, wherein: The analyzing the target sample data using the large model to generate a target strategy also includes: Performing query intent analysis on the target sample data using the large model to generate a second analysis result; wherein the second analysis result represents the semantic similarity of the sample query intent in the target sample data; and Based on the second analysis result, a target strategy for the sample query statement is generated.
12. The method according to claim 10 or 11, wherein: The analyzing the target sample data using the large model to generate a target strategy also includes: Performing entity analysis on the target sample data using the large model to generate a third analysis result; wherein the third analysis result represents the difference between multiple sample entities in the target sample data; and Based on the third analysis result, a target policy for the sample entity is generated.
13. The method according to any one of claims 10 to 12, wherein: The analyzing the target sample data using the large model to generate a target strategy also includes: Analyzing the query domain covered by the target sample data using the large model to generate a fourth analysis result; wherein the fourth analysis result represents the similarity of the domain to which the target sample data belongs; and Based on the fourth analysis result, a target strategy for the query field is generated.
14. The method according to claim 1, wherein the target strategy comprises a plurality of target strategies; the method further comprising: Sorting the plurality of target strategies according to the relevance between the plurality of target strategies and the problem to be optimized; as well as According to the sorting result of the relevance, the target sample data is optimized using the large model to generate optimized first sample data.
15. The method according to claim 14, further comprising: Displaying a plurality of target strategies on the interactive interface according to the sorting results of the relevance; receiving a selection of at least one of the target strategies by an object on the interactive interface; The target sample data is optimized using the large model according to the at least one target strategy to generate optimized second sample data.
16. The method according to claim 1, wherein The method further comprises: An analysis is performed using the at least one optimization requirement, the abnormal result, and the type of the sample data to generate an optimization target related to the problem to be optimized.
17. The method according to claim 16, wherein The method further comprises: receiving the area to be optimized selected by the subject on the interactive interface; and The at least one optimization requirement, the abnormal result and the type of the sample data are used for analysis to generate an optimization target for the field to be optimized that is related to the problem to be optimized.
18. A sample optimization device based on a large model, comprising: A receiving module, configured to receive at least one optimization requirement selected by a subject on an interactive interface; wherein the at least one optimization requirement includes a problem to be optimized and an optimization target; wherein the problem to be optimized is obtained by analyzing the cause of an abnormal result output by a target model using a large model; A generation module, configured to generate a target query statement using the large model based on the problem to be optimized and the optimization goal; wherein the target query statement is used to query target sample data related to the problem to be optimized from the sample data; and the target model is obtained by training based on the sample data; and An analysis module is used to analyze the target sample data using the large model and generate a target strategy so as to optimize the target sample data based on the target strategy.
19. An intelligent agent comprising: An input module, configured to receive at least one optimization requirement selected by a subject on an interactive interface; a processing module, configured to determine a target task based on the at least one optimization requirement information received by the input module, determine a target macro model based on the target task, and obtain a target strategy for optimizing target sample data by executing the method according to any one of claims 1 to 17 by calling the target macro model; as well as An output module is used to output the target strategy obtained by the processing module.
20. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 17.
21. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-17.
22. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 17.