Dialogue content generation method and device based on dialogue intelligent agent and context engineering, equipment and storage medium
By introducing context engineering and a target intent recognition model, high-information-density intent recognition prompts are generated, solving the problem of unstable intent recognition in existing agent systems and improving the reliability of agent output results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANDONG CVIC SOFTWARE ENG
- Filing Date
- 2026-03-03
- Publication Date
- 2026-06-02
AI Technical Summary
Existing intelligent agent systems rely primarily on natural language prompts input by the user during the intent recognition process, leading to unstable intent recognition results and affecting system reliability.
By introducing context engineering, high-information-density intent recognition prompts are generated by acquiring user context information, external knowledge, runtime environment information, and user behavior preference data. The intent is then recognized using a target intent recognition model, and auxiliary prompts are constructed to constrain the agent's reasoning process.
It significantly improves the stability and accuracy of intent recognition, reduces the risk of intent recognition deviation, and enhances the reliability of the agent's output results.
Smart Images

Figure CN122133801A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence, and in particular to a method, apparatus, device, and storage medium for generating dialogue content based on conversational agents and context engineering. Background Technology
[0002] In agent systems based on large language models, the reliability of the system's output is highly dependent on the accurate recognition of user intent. Only when the user's true goal, task requirements, and operational intent are fully understood can the agent generate the expected response content and execution results. However, existing agent systems mainly rely on the natural language prompts currently input by the user as the core information source during intent recognition. This approach has significant technical limitations, leading to unstable intent recognition results and thus affecting the overall reliability of the system. Summary of the Invention
[0003] In view of this, the purpose of this invention is to provide a method, apparatus, device, and storage medium for generating dialogue content based on conversational agents and context engineering, which can improve the stability of intent recognition results. The specific solution is as follows: Firstly, this application discloses a dialogue content generation method based on conversational agents and context engineering, applied to a server equipped with a target conversational agent, including: The system uses the target communication interface to obtain the original input content sent by the user, uses context engineering to obtain context information based on the original input content, and generates intent recognition prompts based on the context information. The target intent recognition model of the target conversational agent is used to obtain the intent recognition result corresponding to the original input content based on the intent recognition prompt words, and auxiliary prompt words are constructed based on the intent recognition result and the original input content; Based on the auxiliary prompts and the original input content, the target content generation model of the target conversational agent is invoked to obtain the content generation result corresponding to the original input content, and the content generation result is returned to the user terminal through the target communication interface.
[0004] Optionally, generating intent recognition prompts based on the context information includes: Using the target evaluation model of the target conversational agent, the relevance of each context information is evaluated based on the original input content to obtain the corresponding evaluation results; If the evaluation result corresponding to the context information indicates that the context information meets the preset relevance conditions, then the context information is determined as the target context information, and all the target context information is used to generate intent recognition prompt words.
[0005] Optionally, before generating the intent recognition prompt based on the context information, the method further includes: The target retrieval enhancement generation method is used to obtain external knowledge of the target based on the original input content, and to obtain the corresponding operating environment information, user behavior preference data and system-level instructions of the user terminal; Accordingly, generating intent recognition prompts based on the context information includes: Intent recognition prompts are generated based on the context information, the target external knowledge, the operating environment information, the user behavior preference data, and the system-level instructions.
[0006] Optionally, after obtaining the intent recognition result corresponding to the original input content based on the intent recognition prompt word using the target intent recognition model of the target conversational agent, the method further includes: If the intent recognition result indicates that the original input content does not meet the intent recognition conditions, then the target intent recognition model is used to generate corresponding content supplementation suggestions based on the intent recognition prompt and the original input content; The content supplementation suggestion is sent to the user terminal using the target communication interface to obtain new original input content, and then the process jumps to the step of obtaining context information based on the original input content using context engineering.
[0007] Optionally, when generating a large model from the target content of the target conversational agent based on the auxiliary prompt words and the original input content, the system priority corresponding to the auxiliary prompt words is higher than the system priority corresponding to the original input content.
[0008] Optionally, constructing auxiliary prompts based on the intent recognition result and the original input content includes: Obtain the intent recognition result described above; If the current intent recognition result is different from the previous intent recognition result, then a new auxiliary prompt word is constructed using the current intent recognition result.
[0009] Secondly, this application discloses a dialogue content generation device based on conversational agents and context engineering, applied to a server equipped with a target conversational agent, comprising: The first prompt word construction module is used to obtain the original input content sent by the user terminal using the target communication interface, obtain context information based on the original input content using context engineering, and generate intent recognition prompt words based on the context information. The second prompt word construction module is used to obtain the intent recognition result corresponding to the original input content based on the intent recognition prompt word using the target intent recognition model of the target conversational agent, and to construct auxiliary prompt words based on the intent recognition result and the original input content; The content generation module is used to call the target content generation model of the target conversational agent based on the auxiliary prompt words and the original input content, so as to obtain the content generation result corresponding to the original input content, and return the content generation result to the user terminal through the target communication interface.
[0010] Optionally, the first prompt word construction module includes: The relevance assessment unit is used to use the target assessment model of the target conversational agent to perform relevance assessment on each of the context information based on the original input content to obtain the corresponding assessment results. The first prompt word construction unit is used to determine the context information as target context information if the evaluation result corresponding to the context information indicates that the context information meets the preset relevance conditions, and to generate intent recognition prompt words using all the target context information.
[0011] Thirdly, this application discloses an electronic device, including: Memory, used to store computer programs; A processor is used to execute the computer program to implement the aforementioned dialogue content generation method based on conversational agents and context engineering.
[0012] Fourthly, this application discloses a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the aforementioned dialogue content generation method based on conversational agents and context engineering.
[0013] In this application, the server equipped with a target conversational agent, when generating dialogue content based on the conversational agent and context engineering, uses a target communication interface to obtain the original input content sent by the user, uses context engineering to obtain context information based on the original input content, and generates intent recognition prompts based on the context information; it uses the target intent recognition model of the target conversational agent to obtain the intent recognition result corresponding to the original input content based on the intent recognition prompts, and constructs auxiliary prompts based on the intent recognition result and the original input content; based on the auxiliary prompts and the original input content, it calls the target content generation model of the target conversational agent to obtain the content generation result corresponding to the original input content, and returns the content generation result to the user through the target communication interface. It can be seen that this application introduces a user intent recognition stage before using the target conversational agent to obtain the content generation result corresponding to the user's original input content. In the user intent recognition stage, this application utilizes context engineering to filter and integrate various contextual information to obtain intent recognition prompts. While ensuring semantic purity, this significantly improves the input information density in the intent recognition stage, enabling the target intent recognition model to understand the user's true needs within a more complete semantic context and obtain the intent recognition result corresponding to the user's original input content. Based on this, auxiliary prompts are constructed using the intent recognition result and the original input content. These auxiliary prompts constrain the reasoning process of the target conversational agent regarding the original input content, effectively reducing the risk of intent recognition deviation, improving the stability and accuracy of intent understanding in complex scenarios, and ultimately enhancing the reliability of the target conversational agent's output. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention 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 embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0015] Figure 1 This is a flowchart of a dialogue content generation method based on conversational agents and context engineering disclosed in this application; Figure 2 This is a schematic diagram of the structure of a dialogue content generation device based on conversational intelligent agents and context engineering disclosed in this application. Figure 3 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] In agent systems based on large language models, the reliability of the system output depends heavily on the accurate recognition of user intent. Only when the user's true goal, task requirements, and operational intent are fully understood can the agent generate the expected response content and execution results. However, existing agent systems primarily rely on the user's current input natural language prompts as the core information source during intent recognition. This approach has significant technical limitations, leading to unstable intent recognition results and affecting the overall system reliability. To address these technical problems, this application discloses a dialogue content generation method based on conversational agents and context engineering, which can improve the stability of intent recognition results.
[0018] See Figure 1 As shown, this embodiment of the invention discloses a dialogue content generation method based on conversational agents and context engineering, applied to a server equipped with a target conversational agent, including: Step S11: Obtain the original input content sent by the user terminal using the target communication interface, obtain context information based on the original input content using context engineering, and generate intent recognition prompt words based on the context information.
[0019] In this embodiment, after obtaining the original input content from the user through the target communication interface, the server equipped with the target conversational agent can enter the user intent recognition stage, using context engineering to obtain the context information corresponding to the original input content. Before generating intent recognition prompts based on the context information, the process also includes: using a target retrieval-enhanced generation method to obtain target external knowledge based on the original input content, and obtaining the user's corresponding operating environment information, user behavior preference data, and system-level instructions. Accordingly, generating intent recognition prompts based on context information includes: generating intent recognition prompts based on context information, target external knowledge, operating environment information, user behavior preference data, and system-level instructions. In other words, in this embodiment, when the server performs user intent analysis, it relies not only on the natural language text currently input by the user, but also on historical dialogue content, operating environment information, external knowledge content obtained through retrieval-enhanced generation, system-level prompts, and user behavior preference data. This information reflects the user's business environment, operational background, and potential needs from different dimensions.
[0020] Since not all of the aforementioned contextual information is directly related to the current user request, indiscriminately adding it all to the prompts during the user intent recognition stage could easily introduce a large amount of irrelevant information, thereby interfering with the model's ability to focus on the core semantics. In this embodiment, when the server generates intent recognition prompts based on contextual information, it may specifically include: using the target evaluation model of the target conversational agent to evaluate the relevance of each piece of contextual information based on the original input content to obtain the corresponding evaluation results; if the evaluation result corresponding to the contextual information indicates that the contextual information meets the preset relevance conditions, then the contextual information is determined as the target contextual information, and intent recognition prompts are generated using all target contextual information.
[0021] In one specific implementation, the server inputs the user's current input along with the context information of a single candidate into the target evaluation model. The target evaluation model then determines whether this information helps in understanding the user's current intent. It is understood that the evaluation model can be implemented using various models such as machine learning models, neural network models, and large language models; that is, the implementation of the evaluation model in this embodiment does not depend on any specific model architecture. Taking a large language model as an example, to fully utilize the semantic understanding capabilities of the large model, the user input and candidate context are concatenated into prompts. For example, inputting "Please determine whether the following context information helps in understanding the user's current request. Only answer 'yes' or 'no'. User request: [User input] Candidate context: [Context content]", the large language model is invoked to perform reasoning, and the output result determines whether to retain the context. This method does not require additional model training, utilizing the semantic understanding capabilities of the large model to achieve relevance judgment. Only when the evaluation result indicates that the information has a positive effect on intent recognition is it retained for subsequent prompt construction. Based on this relevance filtering mechanism, the server can filter out content highly relevant to the current request from multiple sources, while eliminating noise information that may cause semantic interference and preventing irrelevant information from contaminating the model input, effectively improving the signal-to-noise ratio of intent recognition. After completing the relevance filtering, the server structurally integrates the retained contextual information, combining it with the user's original input and system-level instructions to construct high-information-density intent recognition prompts. These prompts not only include the user's stated needs but also supplement with business background, historical semantic clues, and necessary knowledge information relevant to the current scenario, thus significantly improving the completeness and semantic clarity of the input content. The high-information-density intent recognition prompts effectively improve the intent recognition model's ability to understand complex intents.
[0022] Step S12: Using the target intent recognition model of the target conversational agent, obtain the intent recognition result corresponding to the original input content based on the intent recognition prompt words, and construct auxiliary prompt words based on the intent recognition result and the original input content.
[0023] In this embodiment, based on the aforementioned steps, the server invokes the target intent recognition model of the target conversational agent to perform user intent recognition tasks based on intent recognition prompts. This analyzes and outputs the user's current goal, need type, and operational intent, thereby obtaining the intent recognition result corresponding to the original input content. Specifically, if the intent recognition result indicates that the original input content does not meet the intent recognition conditions, the target intent recognition model generates corresponding content supplementation suggestions based on the intent recognition prompts and the original input content. The supplementation suggestions are then sent to the user terminal via the target communication interface to obtain new original input content, and the process jumps to the step of obtaining context information based on the original input content using context engineering. In other words, when the target intent recognition model determines that the user's intent is still unclear, it can generate targeted supplementary question suggestions to further clarify the user's needs. The target intent recognition model can be a model built based on a large language model with relatively few parameters, such as the DeepSeek model trained on intent recognition, or other models. The implementation of the target intent recognition model does not depend on a specific model architecture, and no particular limitation is made here. Taking a large language model as an example, to fully utilize the semantic understanding capabilities of the large model, the prompts input to the target intent recognition model can include: the user's original input (remaining unchanged to ensure semantic purity); highly relevant contextual information retained after context relevance evaluation (categorized and labeled by source, such as "historical dialogues," "page status," "user preferences," etc.); and fixed system instructions, such as: "Based on the above information, accurately identify the user's true goal, need type, and operational intent. The output format is JSON, containing the fields: intent_type (intent category), goal (goal description), confidence (confidence level, 0~1), and need_clarification (whether clarification is needed, Boolean value)." The output of the target intent recognition model is a structured representation of the user's intent, which can be directly used for subsequent task planning or response generation. If confidence is below a threshold (e.g., 0.7) or need_clarification is true, a clarification questioning process is triggered, returning guiding questions to the user to refine the intent.
[0024] In this embodiment, after obtaining the intent recognition result, to ensure that the intent recognition result can form a stable constraint on subsequent agent behavior, auxiliary prompt words are constructed based on the intent recognition result and the original input content. The recognized user intent is embedded into the system-level prompt instruction, and the historical intent content is updated in a replacement manner. Specifically, constructing auxiliary prompt words based on the intent recognition result and the original input content includes: obtaining the previous intent recognition result; if the current intent recognition result is different from the previous intent recognition result, then constructing a new auxiliary prompt word using the current intent recognition result. This replacement-based update method ensures that the subsequent reasoning process always revolves around the user's current intent, avoiding intent deviation due to multiple rounds of interaction.
[0025] Step S13: Based on the auxiliary prompt words and the original input content, call the target content generation model of the target conversational agent to obtain the content generation result corresponding to the original input content, and return the content generation result to the user terminal through the target communication interface.
[0026] In this embodiment, when invoking the target content generation model of the target conversational agent based on auxiliary prompts and the original input content, the system priority corresponding to the auxiliary prompts is higher than the system priority corresponding to the original input content. This ensures the purity of the user context (the user context being the most basic user requirement) when processing user input using the target conversational agent. Consequently, when obtaining the content generation result corresponding to the original input content, without changing the original agent's execution logic, the accuracy and stability of the agent's recognition of user intent are improved, enhancing the reliability of the overall output result of the agent system and preventing intent drift in multi-turn dialogues. Finally, the obtained content generation result corresponding to the original input content can be returned to the user end through the target communication interface.
[0027] In one specific implementation, this embodiment is applied to an enterprise OA assistant intelligent agent to achieve intent recognition. Compared with directly splicing the dialogue between the user and the intelligent agent without filtering to achieve intent recognition, this embodiment achieves intent recognition based on context filtering and system prompt word embedding. Through the relevance evaluation mechanism, noise is effectively filtered. While keeping the user's original semantics unchanged, the accuracy of intent recognition can be improved by nearly 20 percentage points, and the number of multiple rounds of clarification interaction caused by unclear intent can be significantly reduced.
[0028] As can be seen, this application introduces a user intent recognition stage before generating the content corresponding to the user's original input content using the target conversational agent. In this stage, context engineering is used to filter and integrate various contextual information to obtain intent recognition prompts. This significantly improves the input information density while maintaining semantic purity, enabling the target intent recognition model to understand the user's true needs within a more complete semantic context and obtain the intent recognition result corresponding to the user's original input content. Based on this, auxiliary prompts are constructed using the intent recognition result and the original input content. These auxiliary prompts constrain the reasoning process of the target conversational agent regarding the original input content, effectively reducing the risk of intent recognition deviation, improving the stability and accuracy of intent understanding in complex scenarios, and ultimately enhancing the reliability of the target conversational agent's output.
[0029] See Figure 2 As shown, this application discloses a device for improving the stability of intent recognition results. This device, applied to a server equipped with a target conversational agent, includes: The first prompt word construction module 11 is used to obtain the original input content sent by the user terminal using the target communication interface, obtain context information based on the original input content using context engineering, and generate intent recognition prompt words based on the context information. The second prompt word construction module 12 is used to obtain the intent recognition result corresponding to the original input content based on the intent recognition prompt word using the target intent recognition model of the target conversational agent, and to construct auxiliary prompt words based on the intent recognition result and the original input content; The content generation module 13 is used to call the target content generation model of the target conversational agent based on the auxiliary prompt words and the original input content, so as to obtain the content generation result corresponding to the original input content, and return the content generation result to the user terminal through the target communication interface.
[0030] As can be seen, this application introduces a user intent recognition stage before generating the content corresponding to the user's original input content using the target conversational agent. In this stage, context engineering is used to filter and integrate various contextual information to obtain intent recognition prompts. This significantly improves the input information density while maintaining semantic purity, enabling the target intent recognition model to understand the user's true needs within a more complete semantic context and obtain the intent recognition result corresponding to the user's original input content. Based on this, auxiliary prompts are constructed using the intent recognition result and the original input content. These auxiliary prompts constrain the reasoning process of the target conversational agent regarding the original input content, effectively reducing the risk of intent recognition deviation, improving the stability and accuracy of intent understanding in complex scenarios, and ultimately enhancing the reliability of the target conversational agent's output.
[0031] In one specific implementation, the first prompt word construction module 11 may specifically include: The relevance assessment unit is used to use the target assessment model of the target conversational agent to perform relevance assessment on each of the context information based on the original input content to obtain the corresponding assessment results. The first prompt word construction unit is used to determine the context information as target context information if the evaluation result corresponding to the context information indicates that the context information meets the preset relevance conditions, and to generate intent recognition prompt words using all the target context information.
[0032] In one specific embodiment, the device may further include: The data acquisition module is used to acquire external knowledge of the target based on the original input content using the target retrieval enhancement generation method, and to acquire the corresponding operating environment information, user behavior preference data and system-level instructions of the user terminal; Accordingly, the first prompt word construction module 11 includes: The second prompt word construction unit is used to generate intent recognition prompt words based on the context information, the target external knowledge, the operating environment information, the user behavior preference data, and the system-level instructions.
[0033] In one specific embodiment, the device may further include: The supplementary suggestion generation module is used to generate corresponding supplementary content suggestions based on the intent recognition prompt and the original input content using the target intent recognition model if the intent recognition result indicates that the original input content does not meet the intent recognition conditions. The input content re-acquisition module is used to send the content supplementation suggestion to the user terminal using the target communication interface to obtain the new original input content, and then jump to the step of obtaining context information based on the original input content using context engineering.
[0034] In one specific embodiment, the second prompt word construction module 12 may specifically include: The recognition result acquisition unit is used to acquire the intent recognition result described above; The auxiliary prompt word construction unit is used to construct a new auxiliary prompt word using the current intent recognition result if the current intent recognition result is different from the previous intent recognition result.
[0035] Furthermore, embodiments of this application also disclose an electronic device, Figure 3 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.
[0036] Figure 3 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the dialogue content generation method based on conversational intelligent agents and context engineering disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0037] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0038] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk, or optical disk, etc. The resources stored thereon can include an operating system 221, computer programs 222, etc., and the storage method can be temporary storage or permanent storage.
[0039] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the dialogue content generation method based on conversational agents and context engineering disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.
[0040] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed method for generating dialogue content based on conversational agents and context engineering. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0041] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0042] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0043] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0044] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only 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 said element.
[0045] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for generating dialogue content based on conversational agents and context engineering, characterized in that, Applied to servers equipped with target-oriented conversational agents, including: The system uses the target communication interface to obtain the original input content sent by the user, uses context engineering to obtain context information based on the original input content, and generates intent recognition prompts based on the context information. The target intent recognition model of the target conversational agent is used to obtain the intent recognition result corresponding to the original input content based on the intent recognition prompt words, and auxiliary prompt words are constructed based on the intent recognition result and the original input content; Based on the auxiliary prompts and the original input content, the target content generation model of the target conversational agent is invoked to obtain the content generation result corresponding to the original input content, and the content generation result is returned to the user terminal through the target communication interface.
2. The dialogue content generation method based on conversational agents and context engineering according to claim 1, characterized in that, The generation of intent recognition prompts based on the context information includes: Using the target evaluation model of the target conversational agent, the relevance of each context information is evaluated based on the original input content to obtain the corresponding evaluation results; If the evaluation result corresponding to the context information indicates that the context information meets the preset relevance conditions, then the context information is determined as the target context information, and all the target context information is used to generate intent recognition prompt words.
3. The dialogue content generation method based on conversational agents and context engineering according to claim 1, characterized in that, Before generating the intent recognition prompt based on the context information, the method further includes: The target retrieval enhancement generation method is used to obtain external knowledge of the target based on the original input content, and to obtain the corresponding operating environment information, user behavior preference data and system-level instructions of the user terminal; Accordingly, generating intent recognition prompts based on the context information includes: Intent recognition prompts are generated based on the context information, the target external knowledge, the operating environment information, the user behavior preference data, and the system-level instructions.
4. The dialogue content generation method based on conversational agents and context engineering according to claim 1, characterized in that, After obtaining the intent recognition result corresponding to the original input content based on the intent recognition prompt words using the target intent recognition model of the target conversational agent, the method further includes: If the intent recognition result indicates that the original input content does not meet the intent recognition conditions, then the target intent recognition model is used to generate corresponding content supplementation suggestions based on the intent recognition prompt and the original input content; The content supplementation suggestion is sent to the user terminal using the target communication interface to obtain new original input content, and then the process jumps to the step of obtaining context information based on the original input content using context engineering.
5. The dialogue content generation method based on conversational agents and context engineering according to claim 1, characterized in that, When generating a large model by calling the target content of the target conversational agent based on the auxiliary prompt words and the original input content, the system priority corresponding to the auxiliary prompt words is higher than the system priority corresponding to the original input content.
6. The dialogue content generation method based on conversational agents and context engineering according to claim 1, characterized in that, The construction of auxiliary prompt words based on the intent recognition result and the original input content includes: Obtain the intent recognition result described above; If the current intent recognition result is different from the previous intent recognition result, then a new auxiliary prompt word is constructed using the current intent recognition result.
7. A dialogue content generation device based on conversational intelligent agents and context engineering, characterized in that, Applied to servers equipped with target-oriented conversational agents, including: The first prompt word construction module is used to obtain the original input content sent by the user terminal using the target communication interface, obtain context information based on the original input content using context engineering, and generate intent recognition prompt words based on the context information. The second prompt word construction module is used to obtain the intent recognition result corresponding to the original input content based on the intent recognition prompt word using the target intent recognition model of the target conversational agent, and to construct auxiliary prompt words based on the intent recognition result and the original input content; The content generation module is used to call the target content generation model of the target conversational agent based on the auxiliary prompt words and the original input content, so as to obtain the content generation result corresponding to the original input content, and return the content generation result to the user terminal through the target communication interface.
8. The dialogue content generation device based on conversational intelligent agents and context engineering according to claim 7, characterized in that, The first prompt word construction module includes: The relevance assessment unit is used to use the target assessment model of the target conversational agent to perform relevance assessment on each of the context information based on the original input content to obtain the corresponding assessment results. The first prompt word construction unit is used to determine the context information as target context information if the evaluation result corresponding to the context information indicates that the context information meets the preset relevance conditions, and to generate intent recognition prompt words using all the target context information.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the dialogue content generation method based on conversational agents and context engineering as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, Used to store a computer program, wherein the computer program, when executed by a processor, implements the dialogue content generation method based on conversational agents and context engineering as described in any one of claims 1 to 6.