Skill construction method and device, electronic equipment and storage medium
By automatically extracting and structuring thought chain patterns from interaction trajectories, the problem of skill building relying on manual design is solved, resulting in cost reduction and expanded coverage, and improving the task processing capabilities of intelligent agents.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- OBJECT INTEGRITY (SHANGHAI) TECHNOLOGY CO LTD
- Filing Date
- 2025-12-31
- Publication Date
- 2026-05-12
AI Technical Summary
The existing skill development relies on expert manual design, which is costly and has limited coverage, thus limiting the task processing capabilities of intelligent agents.
By acquiring information about the interaction trajectory between users and intelligent agents, the system automatically extracts and structures thought chain patterns into skills, reducing reliance on manual intervention and improving the degree of automation and coverage.
Significantly reduce the cost of skill development, expand the scope of skills, and enhance the task processing capabilities of intelligent agents.
Smart Images

Figure CN122021697A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and more particularly to a method, apparatus, electronic device, and storage medium for constructing skills. Background Technology
[0002] With the rapid development of Large Language Models (LLMs), more and more individuals and enterprises are using conversational agents to complete a variety of complex tasks such as copywriting, data analysis, advertising diagnostics, and content marketing planning. To reduce the coupling of agent systems and improve reusability and maintainability, the industry is gradually exploring a development paradigm centered on "skills." A skill is a standardized, modular unit of agent capability encapsulation. It teaches the agent to execute specific workflows by packaging the instructions, scripts, and resource organization required to complete a specific task into a standardized folder. This skill-centric development paradigm divides agent capabilities into multiple composable and maintainable capability units through skills.
[0003] Currently, skills are highly dependent on expert manual design and maintenance, resulting in high costs for skill development. Furthermore, since skill development is usually based on expert cognition and experience, the coverage of skills is limited, which in turn limits the task processing capabilities of intelligent agents. Summary of the Invention
[0004] In view of this, embodiments of this application provide a method, apparatus, electronic device, and storage medium for constructing skills, providing a new way of sourcing skills, effectively improving the automation level of the construction process and thus reducing construction costs, while significantly expanding the coverage of skills and thus effectively enhancing the task processing capabilities of intelligent agents.
[0005] In a first aspect, embodiments of this application provide a method for constructing a skill, the method comprising: acquiring interaction trajectory information between a user and an intelligent agent; acquiring skill construction data based on the interaction trajectory information, the skill construction data describing the problem to be solved by the target skill to be constructed and the solution to the problem; and constructing the target skill based on the skill construction data to generate a target skill file package.
[0006] According to one embodiment of this application, obtaining skill construction data based on the interaction trajectory information includes: constructing triplet data containing a question segment, an answer segment, and a logical reasoning chain segment based on the interaction trajectory information, as the skill construction data.
[0007] According to one embodiment of this application, after acquiring the interaction trajectory information between the user and the intelligent agent, the method further includes: filtering out high-quality interaction trajectory information that meets preset quality requirements from the acquired interaction trajectory information; the step of constructing triplet data containing question segments, answer segments, and logical reasoning chain segments based on the interaction trajectory information as the skill construction data includes: constructing triplet data containing question segments, answer segments, and logical reasoning chain segments based on the selected high-quality interaction trajectory information as the skill construction data.
[0008] According to one embodiment of this application, the step of selecting interaction trajectory information that meets preset quality requirements from the acquired interaction trajectory information includes: for each interaction trajectory information, extracting the task completeness feature, user evaluation feature, and business indicator feature corresponding to the interaction trajectory information, and generating a multi-dimensional feature vector based on the task completeness feature, user evaluation feature, and business indicator feature; and determining the high-quality interaction trajectory information based on the multi-dimensional feature vector using a pre-trained classification model.
[0009] According to one embodiment of this application, the interaction trajectory information includes at least one interaction sub-trajectory information of a complete task execution process; the step of constructing triplet data containing question segments, answer segments, and logical reasoning chain segments based on the selected high-quality interaction trajectory information, as the skill construction data, includes: for each interaction sub-trajectory information in each of the high-quality interaction trajectory information, extracting and summarizing the user's target task in the starting segment of the trajectory information, and determining it as the question segment; for each interaction sub-trajectory information, recording the final answer adopted by the user in the ending segment of the trajectory information, and determining it as the answer segment; parsing the interaction information in the middle segment of each interaction sub-trajectory, and converting the interaction information into a natural language description of the reasoning process to form a logical reasoning chain segment.
[0010] According to one embodiment of this application, before constructing the target skill to generate a target skill file package based on the skill construction data, the method further includes: performing semantic clustering processing on multiple sets of triple data to aggregate triple data with the same or similar problem segments into the same category; forming target triple data based on the logical reasoning chain segments of the aggregated triple data, wherein the logical reasoning chain segments of the target triple data embody the common characteristics of the logical reasoning chain segments of the aggregated triple data; the construction of the target skill to generate a target skill file package based on the skill construction data includes: constructing the target skill to generate a target skill file package based on the target triple data.
[0011] According to one embodiment of this application, constructing the target skill to generate a target skill file package based on the skill construction data includes: generating a target skill file package based on the problem solved by the target skill, the solution to the problem, and a pre-set skill template; wherein, the target skill file package includes: an entry file, which includes a functional description, a thought chain description, and routing rules; and reference files; wherein, the functional description indicates the problem solved by the target skill, the thought chain description describes the reasoning process of the solution to the problem, the reference files include files that need to be called in the solution to the problem described in the thought chain description, and the routing rules indicate the calling conditions of the referenced documents.
[0012] According to one embodiment of this application, the thought chain description includes: a checklist, which describes the content to be checked at the checkpoints in the solution or the input information to be obtained in the solution; a step sequence, which describes the execution steps in the solution; branch conditions, which describe the logical judgment conditions for different execution paths in the solution; and feedback loop information, which describes the processing principles for the execution results of the execution steps or external feedback.
[0013] According to one embodiment of this application, after constructing the target skill, the method further includes: publishing the target skill to enable an agent to use the target skill to solve a user problem; obtaining new interaction trajectory information after the target skill is published; and evaluating the target skill based on the new interaction trajectory information to determine whether the target skill needs to be repaired.
[0014] According to one embodiment of this application, evaluating the target skill based on the newly added interaction trajectory information to determine whether the target skill needs to be repaired includes: filtering out abnormal interaction trajectories from the newly added interaction trajectories that output results that do not meet the user's expectations; extracting the actual solution executed by the agent using the target skill from the abnormal interaction trajectories; comparing the actual solution with the solution described by the target skill, and determining whether the target skill needs to be repaired based on the comparison result.
[0015] According to one embodiment of this application, after determining whether the target skill needs to be repaired based on the comparison results, the method further includes: determining the cause of the abnormal interaction trajectory based on the comparison results; and repairing the target skill based on the cause of the abnormal interaction trajectory to obtain an updated version of the target skill, wherein the version number of the updated version of the target skill is different from the version number of the target skill.
[0016] Secondly, embodiments of this application also provide a skill construction apparatus, the apparatus comprising: a first acquisition unit, configured to acquire interaction trajectory information between a user and an intelligent agent; a second acquisition unit, configured to acquire skill construction data based on the interaction trajectory information, the skill construction data describing the problem solved by the target skill to be constructed and the solution to the problem; and a construction unit, configured to construct the target skill based on the skill construction data to generate a target skill file package.
[0017] According to one embodiment of this application, the second acquisition unit is specifically used to construct triplet data containing a question segment, an answer segment, and a logical reasoning chain segment based on the interaction trajectory information, as the skill construction data.
[0018] According to one embodiment of this application, the device further includes: a filtering unit, configured to filter out high-quality interaction trajectory information that meets preset quality requirements from the acquired interaction trajectory information; the second acquisition unit is specifically configured to: construct triplet data containing question segments, answer segments, and logical reasoning chain segments based on the high-quality interaction trajectory information filtered out by the filtering unit, as the skill construction data.
[0019] According to one embodiment of this application, the filtering unit includes: an extraction module, configured to extract task completeness features, user evaluation features, and business indicator features corresponding to each interaction trajectory information, and generate a multi-dimensional feature vector based on the task completeness features, user evaluation features, and business indicator features; and a judgment module, configured to determine the high-quality interaction trajectory information based on the multi-dimensional feature vector using a pre-trained classification model.
[0020] According to one embodiment of this application, the interaction trajectory information includes at least one interaction sub-trajectory information of a complete task execution process; the second acquisition unit includes: a question extraction module, used to extract and summarize the user's target task in the starting segment of the trajectory information for each interaction sub-trajectory information in each high-quality interaction trajectory information, and determine it as a question segment; an answer extraction module, used to record the final answer adopted by the user in the ending segment of the trajectory information for each interaction sub-trajectory information, and determine it as an answer segment; and a reasoning process summarization module, used to parse the interaction information in the middle segment of the trajectory of each interaction sub-trajectory, and convert the interaction information into a natural language description of the reasoning process to form a logical reasoning chain segment.
[0021] According to one embodiment of this application, the second acquisition unit further includes: a classification module, used to perform semantic clustering processing on multiple triple data sets to aggregate triple data sets with the same or similar problem segments into the same category; a summarization module, used to form target triple data sets based on the logical reasoning chain segments of the triple data sets aggregated into the same category, wherein the logical reasoning chain segments of the target triple data sets embody the common characteristics of the logical reasoning chain segments of the triple data sets aggregated into the same category; and the construction unit is specifically used to construct target skills based on the target triple data sets.
[0022] According to one embodiment of this application, the construction unit is specifically used to: generate a target skill file package based on the problem solved by the target skill, the solution to the problem, and a pre-set skill template; wherein, the target skill file package includes: an entry file, which includes a functional description, a thought chain description, and routing rules; and a reference file; wherein, the functional description indicates the problem solved by the target skill, the thought chain description describes the solution to the problem, the reference file includes files that need to be called in the solution described in the thought chain description, and the routing rules indicate the calling conditions of the referenced documents.
[0023] According to one embodiment of this application, the thought chain description includes: a checklist, which describes the content to be checked at the checkpoints in the solution or the input information to be obtained in the solution; a step sequence, which describes the execution steps in the solution; branch conditions, which describe the logical judgment conditions for different execution paths in the solution; and feedback loop information, which describes the processing principles for the execution results of the execution steps or external feedback.
[0024] According to one embodiment of this application, the apparatus further includes: a publishing unit for publishing the target skill so that an agent can use the target skill to solve a user problem; a third acquisition unit for acquiring new interaction trajectory information after the target skill is published; and a repair unit for evaluating the target skill based on the new interaction trajectory information to determine whether the target skill needs to be repaired.
[0025] According to one embodiment of this application, the repair unit is specifically used for: filtering out abnormal interaction trajectories from the newly added interaction trajectories that output results that do not meet the user's expectations; extracting the actual solution executed by the agent using the target skill from the abnormal interaction trajectories; comparing the actual solution with the solution described by the target skill, and determining whether the target skill needs to be repaired based on the comparison result.
[0026] According to one embodiment of this application, the repair unit is further configured to: determine the cause of the abnormal interaction trajectory based on the comparison result; and repair the target skill based on the cause of the abnormal interaction trajectory to obtain an updated version of the target skill, wherein the version number of the updated version of the target skill is different from the version number of the target skill.
[0027] Thirdly, embodiments of this application also provide an electronic device, the electronic device comprising: a housing, a processor, a memory, a circuit board, and a power supply circuit, wherein the circuit board is disposed within the space enclosed by the housing, and the processor and the memory are disposed on the circuit board; the power supply circuit is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory is used to store executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, for executing the construction method of the skills described in the above-mentioned embodiments.
[0028] Fourthly, embodiments of this application also provide a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the construction method of the skills described in the above embodiments.
[0029] The skill construction method, apparatus, electronic device, and storage medium provided in this application utilize interaction trajectory data from the actual use of the intelligent agent system to automatically extract the problems and solutions solved in the real interaction trajectory, i.e., the thought chain patterns for problem-solving, and then structure them into skills. This provides a new and continuous source of new skills, significantly reduces the reliance on manual design and construction of skills, improves the automation level of skill construction, and effectively reduces the cost of skill construction. Moreover, the real interaction trajectory covers a wide variety of business scenarios and problems. Therefore, constructing the valuable experience in the interaction trajectory into reusable skills significantly improves the coverage of skills, thereby effectively enhancing the task processing capabilities of the intelligent agent. Attached Figure Description
[0030] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0031] Figure 1 A schematic flowchart illustrating a skill construction method provided in an embodiment of this application; Figure 2 A schematic diagram of the architecture of a skill construction device provided in an embodiment of this application; Figure 3 This is a schematic block diagram illustrating the architecture of one embodiment of the electronic device of this application. Detailed Implementation
[0032] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0033] It should be understood that the described embodiments are merely some, not all, of the embodiments in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0034] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following examples do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0035] It should be noted that in this application, "at least one of several items" refers to three parallel cases: "any one of the several items", "a combination of any number of the several items", and "all of the several items". For example, "including at least one of A and B" includes the following three parallel cases: (1) including A; (2) including B; (3) including A and B. Another example is "performing at least one of step one and step two", which means the following three parallel cases: (1) performing step one; (2) performing step two; (3) performing both step one and step two.
[0036] A skill is a standardized, modular unit of capability encapsulation for an intelligent agent. For an intelligent agent, a skill can be considered a tutorial on specialized knowledge and operational procedures for a specific problem or task, teaching the agent how to solve it. The more skills an agent possesses, the stronger its capabilities, and the wider the range of problems it can solve.
[0037] Currently, the source of skills mainly relies on human design. Experts, i.e., skill builders, usually build skills to teach intelligence to solve problems based on their own cognition and experience, which is equivalent to "offline teaching." On the one hand, the automation level of the skill building process is low, and most of it depends on human intervention, resulting in high costs for skill building. On the other hand, experts' cognition and experience are limited, while intelligent agents actually face a wide variety of application scenarios and have to solve complex and diverse problems. Therefore, skills built based on experts' cognition and experience can only cover some of the application scenarios and problems that intelligent agents may face. As a result, the coverage of skills is limited, which in turn limits the capabilities of intelligent agents.
[0038] In view of this, embodiments of this application provide a method for constructing skills, which provides a new way of sourcing skills. This method can effectively improve the automation of the skill construction process and reduce construction costs, while significantly expanding the coverage of skills and thus effectively enhancing the task processing capabilities of intelligent agents.
[0039] like Figure 1 As shown in the embodiments of this application, the skill construction method includes: Step 101: Obtain the interaction trajectory information between the user and the intelligent agent.
[0040] During real-world online use, intelligent agent systems generate a large amount of interaction trajectory information. This interaction trajectory information refers to a collection of multi-round interaction records and related metadata between the user and one or more agents of the intelligent agent system, arranged chronologically. It typically includes user input, agent output, tool or skill call records, system state changes, and user feedback signals. These interaction trajectories are usually recorded in the intelligent agent system's operation log during operation, i.e., online use. The interaction trajectory can completely describe the entire dynamic process from the start to the end of a task, including the complete path of "initial task attempt failure—multiple rounds of clarification—gradual correction—final completion," as well as the process of expert intervention to correct agent output. Essentially, it contains high-value thinking and reasoning processes, i.e., thought chain patterns. Therefore, the construction method of this application embodiment will automatically extract and summarize problem-solving thought chain patterns from these semantically rich interaction trajectory information, and then structure them into skills, thereby reusing these valuable experiences scattered in the intelligent agent system's operation log.
[0041] In this step, interaction trajectory information between the user and the agent can be obtained under predetermined triggering conditions, such as reaching a predetermined time point or receiving a skill creation instruction from the user. For example, a "Create Skill" button can be set on the agent system interface, allowing the user to issue a skill creation instruction by clicking the button. This interaction trajectory information can be obtained from the agent system's operation logs. Interaction trajectory information can also be obtained within a certain time range, such as the interaction trajectory information for the previous 10 days.
[0042] Step 102: Based on the interaction trajectory information, acquire skill construction data. The skill construction data describes the problem to be solved by the target skill to be constructed and the solution to the problem.
[0043] In summary, after obtaining the interaction trajectory information, this step will summarize and extract the thinking and reasoning process for solving the problem, that is, summarize the problem and the solution to solve the problem, i.e., the thought chain. Based on the summary, skill building information is obtained for building skills, and then the skill building information is used to build skills.
[0044] In one embodiment of this application, the summarized skill building information can be a triplet data (Question-Answer-Reasoning, QAR) containing a question segment, an answer segment, and a logical reasoning chain segment (i.e., a reasoning process segment). The question segment reflects the problem to be solved and the task to be handled by the skill to be built; the answer segment reflects the result of solving the problem; and the logical reasoning chain segment reflects the reasoning process for solving the problem, such as what steps were performed, what tools were used, etc.
[0045] Specifically, in one embodiment of this application, acquiring skill building data based on interaction trajectory information may include the following stages: The screening process begins by selecting high-quality interaction trajectories from a massive dataset that meet predefined quality requirements. These trajectories typically exhibit high task completion rates, positive user feedback, and significant improvements in business metrics. Quality features can be predefined, such as task completion characteristics, user feedback characteristics, and business metric improvement characteristics. Based on these quality features, each interaction trajectory is evaluated to select high-quality trajectories. In one embodiment of this application, for each interaction trajectory, task completion features, user feedback features, and business metric features are extracted, and a multi-dimensional feature vector is generated based on these features. Then, a pre-trained classification model uses this multi-dimensional feature vector to determine the high-quality interaction trajectory information. The selected high-quality interaction trajectory information will then be used to construct skills.
[0046] In fact, each interaction trajectory is usually a long interaction trajectory, which includes the interaction sub-trajectory information of one or more complete task execution processes. Therefore, the long interaction trajectory is divided into independent session segments according to the task boundary, that is, an interaction sub-trajectory information, and each session segment corresponds to a task.
[0047] The process involves constructing QAR triples, which automatically include a question segment, an answer segment, and a logical reasoning chain segment from each conversation segment. Specifically, for each conversation segment, the user's target task in the initial segment of the trajectory information is extracted and summarized, and identified as the question segment. The final answer adopted by the user in the final segment of the trajectory information is extracted and identified as the answer segment. The interaction information in the middle segment of the trajectory is parsed and transformed into a natural language description of the reasoning process to form a logical reasoning chain segment. This yields QAR data samples for each conversation segment.
[0048] Clustering: Due to the large number of conversation fragments and QAR data samples, semantic clustering of QAR samples is required to identify similar or identical tasks. Specifically, QAR samples with the same or similar question segments can be aggregated into the same category.
[0049] The process involves aligning multiple reasoning chains within each QAR cluster and extracting common thought chain skeletons. Finally, a skill file structure conforming to predetermined specifications is generated based on these extracted thought chain skeletons. Specifically, common features can be extracted from the reasoning chains of triplet data aggregated into the same category. Target triplet data is then formed based on these common features. The reasoning chains of the target triplet data reflect the common features of the reasoning chains of the triplet data aggregated into the same category (the extracted thought chain skeletons). Finally, target skills are constructed based on the target triplet data.
[0050] It should be noted that, in one embodiment of this application, after the trajectory filtering and segmentation are completed, the trajectories can be clustered first, and trajectories with similar semantics and consistent task objectives can be aggregated into the same type of trajectory cluster. For each type of trajectory cluster, QAR data can be constructed by summarizing and generalizing.
[0051] Step 103: Based on the skill construction data, construct the target skills to generate the target skill file package.
[0052] The skill building data describes the problem solved by the target skill and the solution to that problem. In this step, a target skill file package will be generated based on the problem solved by the target skill, the solution to that problem, and a pre-defined skill template. The pre-defined skill template specifies the structure of the skill files, including what files the target skill file package contains, the content requirements and format of each file, etc.
[0053] For example, the target skills file package constructed in this step may include: The entry file includes a functional description, a thought process description, and routing rules. Referenced files; The functional description indicates the problem that the target skill solves, the thought chain description describes the solution to the problem, the referenced files include the files that need to be called in the solution described in the thought chain description, and the routing rules indicate the conditions for calling the referenced documents, that is, under what conditions which referenced files are called.
[0054] Specifically, the entry file can be the SKILL.md document.
[0055] For example, in the entry file, the thought chain description may include a checklist, a sequence of steps, branching conditions, and feedback loop information. This information describes the solution to the problem. The checklist describes what needs to be checked at each checkpoint in the solution, such as the input files required before the solution or a specific step within it can run. The sequence of steps describes the execution steps in the solution. The branching conditions describe the logical judgment conditions for different execution paths within the solution, guiding the solution's flow towards different execution paths. The feedback loop information describes the handling principles for predetermined events, such as the execution result of a certain step or the handling principles for external feedback, such as how to handle user feedback received during solution execution.
[0056] The skill construction method provided in this application utilizes interaction trajectory data from the actual use of the intelligent agent system to automatically extract the problems and solutions solved in the real interaction trajectory, i.e., the problem-solving thought chain patterns, and then structures them into skills. This provides a new and continuous source of new skills, significantly reduces the reliance on manual design and construction of skills, improves the automation level of skill construction, and effectively reduces the cost of skill construction. Moreover, the real interaction trajectory covers a wide variety of business scenarios and problems. Therefore, constructing the valuable experience in the interaction trajectory into reusable skills significantly improves the coverage of skills, thereby effectively enhancing the task processing capabilities of the intelligent agent.
[0057] Furthermore, in one embodiment of this application, after constructing the target skill following step 103, the target skill can be tested to verify its effectiveness in running the intelligent agent. Based on the test results, the target skill can be adjusted or released. Releasing the target skill means providing it to the on-duty intelligent agent system, enabling the system to use it to solve user problems. This embodiment does not limit how the target skill is tested; the focus is on testing whether the intelligent agent's answer is correct when using the target skill to solve a problem, whether it follows the expected thought chain described by the skill, and whether it calls the correct document, etc. This ensures that the newly constructed skill is logically reliable and specific. Semantic analysis can be performed on the target skill file package to determine if the semantics of the files in the package are ambiguous; if so, adjustments will be made. The target skill can also be evaluated based on the testing process of the intelligent agent using the target skill to solve a problem. During evaluation, the target skill can be assessed by comparing whether the test agent's answer to a problem is consistent with the solution taught in the target skill curriculum, and by judging whether the test agent's thought process in solving a problem is consistent with the thought process of the solution taught in the target skill curriculum.
[0058] Further, optionally, in one embodiment of this application, after the target skill is published, the target skill can be evaluated based on the newly added interaction trajectory information after the skill is published to determine whether the target skill needs to be repaired or evolved. Specifically, abnormal interaction trajectories that do not produce results that do not meet the user's expectations can be filtered from the newly added interaction trajectories. The actual solution executed by the agent using the target skill can be extracted from the abnormal interaction trajectories. The actual solution is compared with the solution described by the target skill. Based on the comparison result, it is determined whether the target skill needs to be repaired. When skill repair is required, the cause of the abnormal interaction trajectory is determined based on the comparison result. Based on the cause of the abnormal interaction trajectory, the target skill is repaired to obtain an updated version of the target skill, the version number of which is different from the version number of the original target skill.
[0059] In one specific implementation, a pre-configured large language model can be used to provide the abnormal interaction trajectory and the original target skill to the large language model. After evaluation by the large language model, the corrected target skill is output.
[0060] In addition to repairing the target skills constructed in this embodiment, the existing skills of the intelligent agent system can also be evaluated, repaired, or evolved in the same way described above, based on the interaction trajectory information after the skill is released.
[0061] It should be emphasized that the target skill constructed in the embodiments of this application describes a problem and its solution, i.e., a thought chain pattern. Therefore, it can be called a thought chain type skill, or simply a thought chain skill. The solution described by this skill typically includes multi-step judgment, task decomposition, and rule lookup. Skills can also have other types; for example, skills with a single function, deterministic logic, and code execution as their core driving force can be called atomic type skills, or simply atomic skills. Thought chain skills can depend on atomic skills; that is, the solution described by the thought chain skill needs to call the capabilities of atomic skills to implement basic functions such as data format conversion and table statistics. If the skill has a type, the target skill file package can also include type description information and skill dependencies.
[0062] The skill construction method provided in this application embodiment will be described in detail below through a specific example. The skill construction method of this embodiment includes three stages: construction, testing, and evolution, as described in detail below: (a) Construction Phase: 1. Interaction trajectory filtering and aggregation: Filter conversation trajectories from pre-collected interaction trajectory datasets that exhibit characteristics such as high task completion rate, positive user feedback, and significant improvement in business metrics; Synthetic and goal-oriented conversation trajectories are aggregated into candidate task clusters.
[0063] 2. Automatic QAR Sample Construction: Within each task cluster, a "standardized problem description" is automatically extracted or summarized from the beginning of the trajectory as a query; Extract the user's final accepted answer or the expert's revised conclusion from the end of the trajectory as the Answer; Summarize the multiple interactions in the trajectory, extract key intermediate conclusions, tool calls, and branch judgments, and form a multi-step reasoning description.
[0064] 3. Skill modalities and boundary judgment: Analyze the constructed QAR: If the reasoning process mainly involves multi-step judgment, task decomposition and rule lookup, then it is determined that a new ThinkFlow Skill needs to be constructed. At the same time, identify recurring sub-steps that can be extracted into code, providing clues for subsequent atomic skill extraction.
[0065] 4. Mining and generating thought chain patterns and templates: Align steps across multiple QARs within the same task cluster to identify "mandatory steps," "optional steps," and "typical branch structures." Generate a mind chain template skeleton that includes a checklist, a sequence of steps, branching conditions, and a feedback loop.
[0066] 5. Skill file structure instantiation: Create a skills directory that conforms to the specifications, such as skills / {skill_name} / ; Automatically generate SKILL.md, and write skill metadata, applicable scenarios, mind chain description (fill in steps, checkpoints and feedback loops according to the template skeleton), routing rules and a list of dependent atomic skills, etc. Automatically generate reference files under the references folder (e.g., xxx-thinkflow.md). Generate a basic test case file (such as evaluations.json), and use some high-quality QARs as a cold start test suite.
[0067] Through the above process, without the need for manual writing of each thought chain description, a loadable initial version of the ThinkFlow Skill can be directly constructed from the interaction trajectory, achieving automated generation of the skill from 0 to 1.
[0068] (II) Automated Testing Phase 1. Test environment instantiation: Instantiate a "tested agent" in an isolated environment, and load only the thought chain skills to be tested and the atomic skills they depend on. Bind access interfaces to tools that are the same as or similar to those in the production environment to ensure that test results are representative.
[0069] 2. QAR-driven single-round test: The QAR test set (derived from the data constructed in Phase 1, Section 2) will be input line by line into the agent under test. By comparing its output with the standard Answer in QAR to determine whether it is semantically equivalent, a preliminary judgment can be made as to whether the skill has basic correctness.
[0070] 3. Routing assertion: By using Hook technology to monitor the file reading and skill invocation behavior of the tested agent during execution, it can be verified whether the agent correctly loads the expected referenced documents and atomic skills according to different intentions (routing assertion). If an agent is found to skip a critical document or misuse a skill, it is recorded as a routing error.
[0071] 4. Analysis of the coverage and deviation of the thought chain: Compare the actual reasoning path of the tested agent with the key steps defined in the thought chain skill, and statistically analyze the coverage. When the coverage is insufficient or new reasoning branches appear frequently, it is marked as "thinking path deviation". The initial version of the skill is then adjusted and returned to testing until the test is passed and the skill is released.
[0072] The automated testing not only verifies the correctness of the final result, but also focuses on checking whether "the right path was taken" and "whether the thought chain reasoning process was read and executed as expected," thereby ensuring that the newly constructed skills are logically reliable.
[0073] (III) Closed-loop evolution stage Once the skill is actually used in the production environment, it will continuously evolve based on new interaction patterns and business metrics, including but not limited to the following stages: 1. Static and semantic auditing: Regularly read the SKILL.md file, referenced documents, and script code in the skill pack to check the integrity of the file structure; use a large language model to understand the route description, step design, and prompts to determine if there is any ambiguity, inconsistency, or outdated information.
[0074] 2. Dynamic simulation and trajectory comparison: Select recent real-world interaction trajectories, reproduce the same inputs in a sandbox environment, and compare the differences between the current skill version and historical successful trajectories at key points; Check whether changes in the business environment have rendered the original skills and strategies ineffective (e.g., a data source goes offline or an evaluation metric changes).
[0075] 3. Audit of reasoning paths and problem attribution: For test samples that fail or exhibit degraded performance, analyze the agent's thought chain output and tool call sequence. Determine whether the problem stems from ambiguous routing rules, improper step sequence, missing necessary checks, or unreasonable atomic skill parameter settings.
[0076] 4. Self-repair and version evolution: For issues that can be automatically fixed (such as unclear document routing or lack of explicit intermediate conclusion output constraints), modification suggestions or patches are directly generated and written into the candidate new version skill pack; For modifications that pose business risks, we will recommend submitting them to experts for review and confirmation. After passing regression testing, the new version can replace the old version or coexist with the old version for subsequent online A / B testing.
[0077] 5. Indicator-driven survival of the fittest: Based on metrics such as task success rate, user satisfaction, execution latency, and business KPIs, different versions of skills are comprehensively scored. Automatically reduce the call priority of versions that have consistently performed poorly, and retain and enhance versions that have stable and excellent performance.
[0078] Through the above stages, a closed-loop evolution from "generating skills - deploying skills - collecting new trajectories - auditing and fixing - releasing new versions" is achieved, enabling mind chain skills to continuously optimize themselves as business changes occur.
[0079] See Figure 2 This application also provides a skill construction apparatus, the apparatus comprising: The first acquisition unit 201 is used to acquire the interaction trajectory information between the user and the intelligent agent; The second acquisition unit 202 is used to acquire skill construction data based on the interaction trajectory information, wherein the skill construction data describes the problem to be solved by the target skill to be constructed and the solution to the problem; The construction unit 203 is used to construct the target skill based on the skill construction data to generate a target skill file package.
[0080] In some embodiments, the second acquisition unit 220 is specifically used to construct triplet data containing question segments, answer segments, and logical reasoning chain segments based on the interaction trajectory information, as the skill construction data.
[0081] In some embodiments, the apparatus further includes: The filtering unit is used to filter out high-quality interaction trajectory information that meets preset quality requirements from the acquired interaction trajectory information. The second acquisition unit is specifically used for: Based on the high-quality interaction trajectory information filtered by the filtering unit, triplet data containing question segments, answer segments, and logical reasoning chain segments are constructed as the skill construction data.
[0082] In some embodiments, the filtering unit includes: The extraction module is used to extract the task completeness features, user evaluation features, and business indicator features corresponding to each interaction trajectory information, and generate a multi-dimensional feature vector based on the task completeness features, user evaluation features, and business indicator features. The determination module is used to determine the high-quality interaction trajectory information based on the multi-dimensional feature vector using a pre-trained classification model.
[0083] In some embodiments, the interaction trajectory information includes interaction sub-trajectory information of at least one complete task execution process; The second acquisition unit includes: The problem extraction module is used to extract and summarize the user's target task in the starting segment of each interaction sub-trajectory information in each high-quality interaction trajectory information, and determine it as the problem segment. The answer extraction module is used to record the final answer adopted by the user at the end of each interaction sub-trajectory information segment and determine it as the answer segment. The reasoning process induction module is used to parse the interaction information of the middle segment of each interaction sub-trajectory, and convert the interaction information into a natural language description of the reasoning process to form a logical reasoning chain segment.
[0084] In some embodiments, the second acquisition unit further includes: The classification module is used to perform semantic clustering processing on multiple triple data sets to aggregate triple data sets with the same or similar problem segments into the same category; The summary module is used to form target triple data based on the logical reasoning chain segments of the triple data aggregated into the same category. The logical reasoning chain segments of the target triple data reflect the common characteristics of the logical reasoning chain segments of the triple data aggregated into the same category. The construction unit is specifically used to construct the target skill based on the target triplet data to generate a target skill file package.
[0085] In some embodiments, the building unit is specifically used for: Based on the problem solved by the target skill, the solution to the problem, and a pre-defined skill template, a target skill file package is generated; wherein, the target skill file package includes: The entry file includes a functional description, a thought chain description, and routing rules; Referenced files; The functional description indicates the problem solved by the target skill, the thought chain description describes the solution to the problem, the referenced files include the files that need to be called in the solution described in the thought chain description, and the routing rules indicate the calling conditions of the referenced documents.
[0086] In some embodiments, the thought chain description includes: A checklist, which describes the items that need to be checked at the checkpoints in the solution or the input information that needs to be obtained in the solution; A sequence of steps, which describes the execution steps in the solution; Branch conditions, which describe the logical judgment conditions for different execution paths in the solution; Feedback loop information describes the processing principles for the execution results or external feedback of the execution steps.
[0087] In some embodiments, the apparatus further includes: A publishing unit is used to publish the target skill so that the intelligent agent can use the target skill to solve the user problem; The third acquisition unit is used to acquire new interaction trajectory information after the target skill is released; The repair unit is used to evaluate the target skill based on the newly added interaction trajectory information to determine whether the target skill needs to be repaired.
[0088] In some embodiments, the repair unit is specifically used for: Filter out abnormal interaction trajectories from the newly added interaction trajectories that do not produce results that do not meet the user's expectations; Extract the actual solution executed by the agent using the target skill from the abnormal interaction trajectory; By comparing the actual solution with the solution described in the target skill, and based on the comparison results, it is determined whether the target skill needs to be repaired.
[0089] In some embodiments, the repair unit is further configured to: Based on the comparison results, the cause of the abnormal interaction trajectory is determined; Based on the cause of the abnormal interaction trajectory, the target skill is repaired to obtain an updated version of the target skill, the version number of which is different from the version number of the original target skill.
[0090] See Figure 3 This application also provides an electronic device. Based on the same technical concept as the aforementioned embodiment one, the electronic device provided in this application can implement the steps and flow of the method in any embodiment one of this application.
[0091] The aforementioned electronic device may include: a housing 31, a processor 32, a memory 33, a circuit board 34, and a power supply circuit 35, wherein the circuit board 34 is disposed inside the space enclosed by the housing 31, and the processor 32 and the memory 33 are disposed on the circuit board 34; the power supply circuit 35 is used to supply power to the various circuits or devices of the aforementioned electronic device; the memory 33 is used to store executable program code; the processor 42 runs a program corresponding to the executable program code by reading the executable program code stored in the memory 33, for executing the construction method of any of the skills in the aforementioned embodiment one.
[0092] For details on the specific execution process of the above steps by the processor 32 and the steps further executed by the processor 32 by running executable program code, please refer to the description of Embodiment 1 of this application, which will not be repeated here.
[0093] Electronic devices exist in many forms, including but not limited to: (1) Mobile communication devices: These devices are characterized by their mobile communication capabilities and are primarily designed to provide voice and data communication. These terminals include smartphones (such as iPhones), multimedia phones, feature phones, and low-end phones.
[0094] (2) Ultra-mobile personal computer devices: These devices fall under the category of personal computers, possessing computing and processing capabilities, and generally also have mobile internet access features. These terminals include PDAs, MIDs, and UMPCs, such as the iPad.
[0095] (3) Portable entertainment devices: These devices can display and play multimedia content. This category includes: audio and video players (such as iPods), handheld game consoles, e-books, as well as smart toys and portable car navigation devices.
[0096] (4) Server: A device that provides computing services. The components of a server include a processor, hard disk, memory, system bus, etc. Servers are similar to general computer architectures, but because they need to provide highly reliable services, they have higher requirements in terms of processing power, stability, reliability, security, scalability, and manageability.
[0097] (5) Other electronic devices with data interaction functions.
[0098] This application also provides a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the construction method of any of the skills in the foregoing embodiment one.
[0099] In summary, the embodiments of this application provide a method, apparatus, electronic device, and storage medium for constructing skills. By utilizing interaction trajectory data from the actual use of an intelligent agent system, the problems and solutions solved in the actual interaction trajectories, i.e., the thought chain patterns for problem-solving, are automatically extracted and structured into skills. This provides a new and continuous source of new skills, significantly reduces the reliance on manual design and construction of skills, improves the automation level of skill construction, and effectively reduces the cost of skill construction. Moreover, the actual interaction trajectories cover a wide variety of business scenarios and problems. Therefore, constructing valuable experiences from the interaction trajectories into reusable skills significantly improves the coverage of skills and can effectively enhance the task processing capabilities of the intelligent agent.
[0100] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0101] The various embodiments in this specification are described in a related manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
[0102] For ease of description, if systems, servers, etc. are involved, they may be described separately as various units / modules based on their functions. Of course, in implementing this application, the functions of each unit / module can be implemented in one or more software and / or hardware.
[0103] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0104] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for constructing a skill, characterized in that, The method includes: Acquire information about the interaction trajectory between the user and the intelligent agent; Based on the interaction trajectory information, skill construction data is obtained, which describes the problem to be solved by the target skill to be constructed and the solution to the problem; Based on the skill construction data, the target skill is constructed to generate a target skill file package.
2. The method for constructing skills according to claim 1, characterized in that, The acquisition of skill construction data based on the interaction trajectory information includes: Based on the interaction trajectory information, a triplet data consisting of a question segment, an answer segment, and a logical reasoning chain segment is constructed as the skill construction data.
3. The method for constructing skills according to claim 2, characterized in that, After acquiring the interaction trajectory information between the user and the intelligent agent, the method further includes: From the acquired interaction trajectory information, high-quality interaction trajectory information that meets the preset quality requirements is selected; The construction of triplet data, comprising a question segment, an answer segment, and a logical reasoning chain segment, based on the interaction trajectory information, as the skill construction data includes: Based on the selected high-quality interaction trajectory information, triplet data containing question segments, answer segments, and logical reasoning chain segments are constructed as the skill construction data.
4. The method for constructing skills according to claim 3, characterized in that, The interaction trajectory information includes at least one interaction sub-trajectory information of a complete task execution process; Based on the selected high-quality interaction trajectory information, a triplet data set containing a question segment, an answer segment, and a logical reasoning chain segment is constructed, which serves as the skill construction data. For each of the interaction sub-trajectory information in each of the high-quality interaction trajectory information, extract and summarize the user's target task in the starting segment of the trajectory information, and determine it as the problem segment; For each of the aforementioned interactive sub-trajectory information, the final answer adopted by the user at the end of the trajectory information segment is recorded and determined as the answer segment; The interaction information of the middle segment of each interaction sub-trajectory is analyzed and transformed into a natural language description of the reasoning process to form a logical reasoning chain.
5. The method for constructing skills according to claim 1, characterized in that, The process of constructing the target skill based on the skill construction data to generate a target skill file package includes: Based on the problem solved by the target skill, the solution to the problem, and a pre-defined skill template, a target skill file package is generated; wherein, the target skill file package includes: The entry file includes a functional description, a thought chain description, and routing rules. Referenced files; The functional description indicates the problem solved by the target skill, the thought chain description describes the reasoning process of the solution to the problem, the referenced files include the files that need to be called in the solution to the problem described in the thought chain description, and the routing rules indicate the calling conditions of the referenced documents.
6. The method for constructing skills according to claim 5, characterized in that, The description of the thought chain includes: A checklist, which describes the items that need to be checked at the checkpoints in the solution or the input information that needs to be obtained in the solution; A sequence of steps, which describes the execution steps in the solution; Branch conditions, which describe the logical judgment conditions for different execution paths in the solution; Feedback loop information describes the processing principles for the execution results or external feedback of the execution steps.
7. The method for constructing skills according to claim 1, characterized in that, After constructing the target skill, the method further includes: The target skill is released so that the agent can use the target skill to solve the user problem; Obtain new interaction trajectory information after the target skill is published; Based on the newly added interaction trajectory information, the target skill is evaluated to determine whether the target skill needs to be repaired.
8. A skill construction device, characterized in that, The device includes: The first acquisition unit is used to acquire the interaction trajectory information between the user and the intelligent agent; The second acquisition unit is used to acquire skill construction data based on the interaction trajectory information, wherein the skill construction data describes the problem to be solved by the target skill to be constructed and the solution to the problem; A construction unit is used to construct the target skill based on the skill construction data to generate a target skill file package.
9. An electronic device, characterized in that, The electronic device includes: a housing, a processor, a memory, a circuit board, and a power supply circuit, wherein the circuit board is disposed inside the space enclosed by the housing, and the processor and the memory are disposed on the circuit board; the power supply circuit is used to supply power to various circuits or devices of the electronic device; the memory is used to store executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, for executing the construction method of the skill according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores one or more programs, which can be executed by one or more processors to implement the method of constructing the skill according to any one of claims 1 to 7.