CN-122019369-A - Intelligent skill construction method and device, electronic equipment and storage medium
Abstract
The embodiment of the invention discloses a method and a device for constructing intelligent skills, electronic equipment and a storage medium, which relate to the technical field of artificial intelligence and can effectively improve the efficiency and accuracy of skill evaluation evolution. The method comprises the steps of obtaining intelligent skill construction information, constructing target skills based on the intelligent skill construction information to generate a target skill file package, wherein the target skill file package comprises test cases written based on the inquiry and answer data, and testing the constructed target skills based on the test cases. The invention is suitable for large models and intelligent bodies.
Inventors
- LIU ZEMING
- Zou Guanyun
Assignees
- 物自体(上海)科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20251231
Claims (10)
- 1. A method of constructing an agent skill, comprising: acquiring intelligent skill construction information, wherein the intelligent skill construction information comprises question-answer data; Constructing target skills based on the agent skill construction information to generate a target skill file package, wherein the target skill file package comprises test cases written based on the question-answer data; and testing the constructed target skills based on the test cases.
- 2. The construction method according to claim 1, wherein, The test case comprises a test question obtained based on the question-answer data and a reference solution of the test question; The testing the constructed target skills based on the test cases comprises the following steps: deploying the constructed target skills in a test agent; Acquiring the test case from the target skill file package, and inputting the test questions to the test agent so that the test agent can provide an intelligent solution to the test questions by using the target skills; And evaluating whether the target skills need to be improved according to whether the intelligent solution is consistent with a reference solution specified in the test case.
- 3. The construction method according to claim 2, wherein, The intelligent solution scheme comprises an intelligent solution process and an intelligent solution result; the reference solution scheme comprises a reference solution process and a reference solution result; Said evaluating whether the target skill requires improvement based on whether the intelligent solution is consistent with the reference solution specified in the test case comprises: determining that the target skill needs improvement in the case that the intelligent solution process is inconsistent with the reference solution process; Or alternatively And determining that the target skills need to be improved in the case that the intelligent solving result is different from the reference solving result.
- 4. The construction method according to claim 2, wherein, The constructing a target skill based on the agent skill construction information to generate a target skill file package includes: Acquiring a question aimed by the target skill and a solution of the question based on the question and answer data; Generating a target skill file package based on a problem aimed at by the target skill and a solution of the problem, wherein the target skill file package comprises an entry file and a reference file, the entry file comprises a solution document and a routing rule, the solution document is used for recording the solution, the routing rule is used for recording the reference file which needs to be read by the solution, and an agent reads the solution document recording the solution of the problem to be solved based on the problem to be solved when applying the target skill; After the inputting of the test question to the test agent, the method further comprises: monitoring a file reading interface of the test intelligent agent to obtain the reference file read by the test intelligent agent for answering the test question, so as to obtain read document information; Comparing the read document information with the read document information, wherein the read document is the reference file searched according to the routing rule; In the event that the read document information is different from the read document information, determining the target skill requires improvement.
- 5. The construction method according to claim 2 to 4, wherein, The question and answer data comprise question and answer questions and answer schemes; the constructing a target skill based on the agent skill construction information to generate a target skill file package includes: determining the skill type of the target skill according to the question-answer solution, wherein the skill type comprises an atom type or a thinking chain type, the atom type skill is a code execution skill, the thinking chain type skill is an reasoning execution skill, and the reasoning execution process of the thinking chain type skill depends on the atom type skill; Constructing the target skills based on the skill types of the target skills and the question and answer data to generate a target skill file package, wherein the target skill file package comprises an inlet file, a reference file and a test case of the target skills, the inlet file comprises a solution document and a routing rule, the solution document is used for recording a teaching answer scheme of the question and answer scheme, the routing rule is used for recording the reference file which needs to be read by the teaching answer scheme, and the test case comprises a test problem acquired based on the question and a reference answer scheme of the test problem acquired based on the question and answer scheme.
- 6. The construction method according to claim 5, wherein, The intelligent skill construction information also comprises requirement description information; the constructing a target skill based on the skill type of the target skill and the question-answer data to generate the target skill file package includes: based on the skill type of the target skill, under the condition that the skill type of the target skill is a thinking chain type, constructing a target skill of the thinking chain type according to the requirement description information, the question-answer data and a preset thinking chain type skill design specification to generate a target skill file packet of the thinking chain type, wherein the target skill file packet of the thinking chain type comprises: an entry file including a function description acquired based on the demand description information, the function description indicating a target skill of the thought chain type, the solution document, and the routing rule; a reference file, which is a knowledge file that needs to be read by a solution provided by the solution document; a type description file for indicating a type of the target skill; A dependency relationship file, configured to indicate an atomic type skill on which the target skill of the mental chain type depends, where the atomic type skill on which the target skill of the mental chain type depends is an atomic type skill applied in the teaching solution for the question and answer problem, where the atomic type skill is obtained by an agent applying the target skill of the mental chain type; The test case; Or alternatively Based on the skill type of the target skill, constructing an atomic type target skill according to the requirement description information, the question-answer data and a preset atomic type skill design specification under the condition that the skill type of the target skill is an atomic type, so as to generate an atomic type target skill file packet, wherein the atomic type target skill file packet comprises: an entry file including a function description acquired based on the requirement description information, the function description indicating a target skill of the atom type, the solution document, and the routing rule; a reference file, which is a script file that needs to be read by a solution provided by the solution document; a type description file for indicating a type of the target skill; The test case.
- 7. The construction method according to claim 5, wherein, The target skills are skills of a thinking chain type; After the inputting of the test question to the test agent, the method further comprises: monitoring a file reading interface of the test intelligent agent to obtain the reference file read by the test intelligent agent for answering the test question, so as to obtain read document information; Comparing the read document information with the read document information, wherein the read document is the reference file searched according to the routing rule; Determining that the target skill needs improvement when the read document information is different from the read document information; Or alternatively The target skills are skills of a thinking chain type; Said evaluating whether the target skill requires improvement based on whether the intelligent solution is consistent with a reference solution specified in the test case comprises: Determining whether the intelligent solution is consistent with a reference solution specified in the test case according to a first judgment standard; according to the determined result of whether the intelligent solution is consistent with the reference solution specified in the test case, whether the target skills of the thinking chain type need to be improved is evaluated; Or alternatively The target skills are of atomic type; Said evaluating whether the target skill requires improvement based on whether the intelligent solution is consistent with a reference solution specified in the test case comprises: determining whether the intelligent solution is consistent with a reference solution specified in the test case according to a second judgment standard; And according to the determined result of whether the intelligent solution is consistent with the reference solution specified in the test case, evaluating whether the target skills of the atom type need to be improved.
- 8. An agent skill building apparatus, comprising: The intelligent skill construction system comprises an acquisition unit, a judgment unit and a judgment unit, wherein the acquisition unit is used for acquiring intelligent skill construction information, and the intelligent skill construction information comprises question-answer data; The construction unit is used for constructing target skills based on the intelligent agent skill construction information to generate a target skill file packet, wherein the target skill file packet comprises test cases written based on the question-answer data; and the testing unit is used for testing the constructed target skills based on the test cases.
- 9. An electronic device, characterized in that the electronic device comprises a processor and a memory, the processor is electrically connected with the memory, the memory is used for storing executable program codes, and the processor runs a program corresponding to the executable program codes by reading the executable program codes stored in the memory so as to realize the method for constructing the intelligent agent skills according to any one of the claims 1 to 7.
- 10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores one or more programs, the one or more programs being executable by one or more processors to implement the method of constructing an agent skill of any one of the preceding claims 1 to 7.
Description
Intelligent skill construction method and device, electronic equipment and storage medium Technical Field The present invention relates to the field of artificial intelligence technologies, and in particular, to a method and apparatus for constructing an intelligent agent skill, an electronic device, and a storage medium. Background With the rapid development of artificial intelligence (ARTIFICIAL INTELLIGENCE) and large language models, etc., agents (agents) are increasingly used. The intelligent agent can sense the change in the environment (such as through a sensor or data input), judge and decide according to the knowledge and algorithm learned by the intelligent agent, and further execute actions to influence the environment or achieve a preset target. While skills (Skill) is a modular, reusable functional encapsulation unit used to extend Agent capabilities. It teaches an agent to perform a specific workflow by packaging instructions, scripts, resource organizations, etc. required to accomplish a specific task into a standardized folder. Currently, skill evaluation and evolution (i.e., further repair and upgrade) of a skill is required to be performed manually when constructing a smart skill, and thus, skill evaluation and evolution cannot be achieved efficiently and accurately. In view of the above, the embodiment of the invention provides a method for constructing skills of an intelligent agent, which can automatically evaluate and evolve the constructed skills, and effectively improve the efficiency and accuracy of skill evaluation evolution. Disclosure of Invention In view of the above, the embodiments of the present invention provide a method, an apparatus, an electronic device, and a storage medium for constructing skills of an agent, which can effectively improve efficiency and accuracy of skill evaluation and evolution. In a first aspect, an embodiment of the present invention provides a method for constructing an agent skill, including obtaining agent skill construction information, where the agent skill construction information includes question-answer data, constructing a target skill based on the agent skill construction information to generate a target skill file package, where the target skill file package includes a test case written based on the question-answer data, and testing the constructed target skill based on the test case. In one embodiment, the test case comprises a test question obtained based on the question-answer data and a reference solution of the test question, the testing of the constructed target skills based on the test case comprises deploying the constructed target skills in a test agent, obtaining the test case from the target skill file package, inputting the test question to the test agent so that the test agent can provide an intelligent solution for the test question by using the target skills, and evaluating whether the target skills need improvement according to whether the intelligent solution is consistent with the reference solution specified in the test case. In one embodiment, the intelligent solution comprises an intelligent solution process and an intelligent solution result, the reference solution comprises a reference solution process and a reference solution result, and the evaluating whether the target skill needs to be improved according to whether the intelligent solution is consistent with the reference solution specified in the test case comprises determining that the target skill needs to be improved when the intelligent solution process is inconsistent with the reference solution process or determining that the target skill needs to be improved when the intelligent solution result is different from the reference solution result. In one embodiment, the inconsistency of the intelligent solution process with the reference solution process comprises at least one of the absence of a preset solution step of the reference solution process in the intelligent solution process, the addition of a solution step which does not exist in the reference solution process in the intelligent solution process, the execution sequence of the solution step of the intelligent solution process is different from that of the solution step of the reference solution process, the occurrence of error information in the intelligent solution process, and the call of an inexistent function in the intelligent solution process. In one embodiment, before the target skills are tested based on the test case, the method further comprises checking whether the target skill file package meets a preset design specification, wherein the design specification specifies a file structure of the target skill file package, and the testing the target skills based on the test case comprises testing the target skills based on the test case when the target skill file package meets the preset design specification. In one embodiment, the method further comprises performing improvement processing on