Knowledge question and answer and knowledge content processing method and device, storage medium and program product
By combining structured prompt words and knowledge reconstruction models, the initial knowledge content is reconstructed in a hierarchical manner, which solves the problems of low efficiency and different rewriting levels of online customer service processing knowledge content, and achieves efficient and unified knowledge content generation.
Patent Information
- Application Number
- CN202411481049.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-02-28
AI Technical Summary
When existing online customer service processes knowledge content, the efficiency is low and the rewriting levels of different customer services are different, resulting in inconsistent customer experience.
The method of combining structured prompt words and knowledge reconstruction model is adopted to reconstruct the initial knowledge content through the hierarchical knowledge reconstruction task prompt word guidance model to generate target knowledge content that meets the requirements.
It improves the speed and quality of generating target knowledge content, liberates online customer service from tedious tasks, and improves work efficiency and service quality.
Smart Images

Figure CN119537523A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a knowledge question and answer and knowledge content processing method, device, storage medium and program product. Background Art
[0002] The product knowledge base includes rich knowledge content, such as basic attributes of the product, usage experience, category information, and brand-related introductions. Taking the online consultation scenario as an example, when customers ask product-related consultation questions, online customer service staff can quickly and accurately search the product knowledge base and provide customers with feedback on product-related information to assist them in making purchase decisions.
[0003] However, the structure and format of the knowledge content in the product knowledge base may not be uniform. For example, some are structured data and some are unstructured data. The knowledge content is also uneven. For example, some knowledge content may include remarks information and some knowledge content may not describe enough information. These knowledge contents are not suitable for being directly fed back to customers as reply information.
[0004] In order to improve the quality of customer service, after retrieving the knowledge content of relevant products from the product knowledge base, the online customer service will independently extract key information, supplement the content, and rewrite the words based on manual experience, and then feedback the processed knowledge content to the customer as reply information.
[0005] Among them, the above-mentioned processing operations on knowledge content will reduce the work efficiency of online customer service; in addition, the rewriting levels of different online customer service are also different, which is likely to cause different customer experiences. Summary of the invention
[0006] Multiple aspects of the present application provide a knowledge question and answer and knowledge content processing method, device, storage medium and program product to improve the work efficiency and service quality of online customer service.
[0007] An embodiment of the present application provides a knowledge content processing method, including: receiving initial knowledge content; generating a first structured prompt word according to a first structured prompt word template, wherein the first structured prompt word includes a hierarchical knowledge reconstruction task prompt word; based on the first structured prompt word, calling a knowledge reconstruction model, and reconstructing the initial knowledge content according to the hierarchical knowledge reconstruction task prompt word to obtain target knowledge content.
[0008] The embodiment of the present application also provides a knowledge question and answer method, including: receiving question information input by a user on a question and answer page; querying a question and answer knowledge base based on the question information to obtain initial knowledge content; generating a first structured prompt word based on a first structured prompt word template, the first structured prompt word including a hierarchical knowledge reconstruction task prompt word; calling a knowledge reconstruction model based on the first structured prompt word, and reconstructing the initial knowledge content according to the hierarchical knowledge reconstruction task prompt word to obtain target knowledge content; outputting the target knowledge content as answer information to the question information on the question and answer page.
[0009] An embodiment of the present application also provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor is coupled to the memory and is used to execute the computer program to implement the steps in each method provided in the embodiment of the present application.
[0010] An embodiment of the present application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor is enabled to implement the steps in the above method.
[0011] An embodiment of the present application also provides a computer program product, which includes a computer program / instructions. When the computer program / instructions are executed by a processor, the processor is enabled to implement the steps in the above method embodiment.
[0012] In an embodiment of the present application, structured prompt words are combined with a knowledge reconstruction model. The structured prompt words include hierarchical knowledge reconstruction task prompt words. The structured prompt words are used as input to the knowledge reconstruction model. Combined with the capabilities of the knowledge reconstruction model, the model is guided to gradually reconstruct the initial knowledge content according to the hierarchical knowledge reconstruction task prompt words, and the target knowledge content that meets the requirements is quickly generated. This can improve the speed and quality of generating the target knowledge content, and at the same time, improve the work efficiency and service quality of online customer service. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0014] Figure 1 A flowchart of a knowledge content processing method provided for an exemplary embodiment of the present application;
[0015] Figure 2 A process diagram of a knowledge content processing method is provided for an exemplary embodiment of the present application;
[0016] Figure 3 A schematic diagram of a process for constructing a structured prompt word template is provided for an exemplary embodiment of the present application;
[0017] Figure 4 A flowchart of a knowledge question answering method provided for another exemplary embodiment of the present application;
[0018] Figure 5a A structural schematic diagram of a question-and-answer interface provided for another exemplary embodiment of the present application;
[0019] Figure 5b A structural schematic diagram of a question-and-answer interface provided for another exemplary embodiment of the present application;
[0020] Figure 5c A structural schematic diagram of a question-and-answer interface provided for another exemplary embodiment of the present application;
[0021] Figure 6 A schematic structural diagram of an electronic device is provided as yet another exemplary embodiment of the present application. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0023] It should be noted that, in the case where the embodiments of the present application involve user information, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse. In addition, the various models involved in this application (including but not limited to language models or large models) are in compliance with relevant laws and standards.
[0024] In addition, it should be noted that, in the case where the embodiments of the present application involve user interaction operations or trigger operations, the user interaction operations or trigger operations involved in the embodiments of the present application include but are not limited to: touch operation, gesture operation, voice operation, head movement operation, eye movement operation and other interactive operations in various ways; among which, touch operation includes but is not limited to: click operation, double-click operation, long press operation, sliding operation, pinch operation or mouse hover operation, etc. Sliding operation includes but is not limited to: straight line sliding, curve sliding, etc.
[0025] Furthermore, it should be noted that, in the case where the embodiments of the present application involve jumping between the first interface and the second interface, the jumping methods involved in the embodiments of the present application include but are not limited to: jumping directly from the first interface to the second interface, jumping from the first interface to the task interface first and jumping to the second interface after completing the corresponding task operation on the task interface; completing the corresponding task operation on the task interface includes but is not limited to: when the task interface is implemented as a game interface, completing the game operation on the game interface; when the task interface is implemented as an identity authentication interface, completing the identity authentication on the identity authentication interface; when the task interface is implemented as a recharge interface, completing the recharge operation on the recharge interface; and so on.
[0026] With the development of Internet technology, there are more and more online services, such as online e-commerce, online housekeeping, online live broadcasting, online medical care, online education, etc. In order to ensure the quality of service, various online services are usually equipped with online customer service and a knowledge base. The knowledge base includes knowledge content, and the knowledge content in the knowledge base corresponding to different online services is different. Online customer service can receive relevant consulting questions raised by customers, query the knowledge base to obtain knowledge content that is suitable for consulting questions, and reorganize the knowledge content to obtain a reply script suitable for replying to customers, and then return it to the customer. Taking online customer service in the field of online e-commerce as an example, the process of online customer service reorganizing the reply script based on the knowledge content retrieved from the knowledge base is exemplified. The knowledge base in the e-commerce field can be called a commodity knowledge base, and the knowledge content in the corresponding knowledge base can be called commodity knowledge content.
[0027] The process of online customer service reorganizing the reply based on the retrieved product knowledge content involves the following steps:
[0028] First, knowledge content extraction: Since the product knowledge base maintains various title contents for a certain product, such as usage experience, ingredient content, etc. However, the questions asked by customers (also known as consumers) may involve more detailed content in a certain title content, so it is not appropriate to send all the content of a certain title to the customer, because there may be some content that is irrelevant to the customer's question. Therefore, the online customer service will first summarize the retrieved product knowledge content, and extract the key points related to the customer's question, and obtain the initial reply content for the next step of processing;
[0029] Second, knowledge content supplement: The quality of product knowledge content maintenance in the product knowledge base varies. Most of them are just short answers to questions that customers may ask. When the questions asked by customers lack professional explanations in the product knowledge base, the online customer service will search outside the site and then add relevant content to the initial reply content. Of course, some online customer service with higher service levels will also add some industry common sense knowledge content to the initial reply content.
[0030] Third, the conversion of speech style. On the basis of supplementing the initial reply content, the online customer service will also rewrite some of the text in the initial reply content in a more friendly and professional tone, so that the tone of the reply content is not so stiff and easier for customers to understand and accept. In addition, some product knowledge bases may be divided into internal perspectives and external perspectives. The internal perspective is the product knowledge content that the online customer service can view when providing online consulting services. The product knowledge content under the internal perspective may contain content that is not suitable for direct disclosure to customers, such as service explanation content for online customer service; the external perspective refers to the content that can be disclosed to customers. Whether it is the internal perspective or the external perspective, it is maintained manually and may have problems such as inconsistent speech style and lack of basic service etiquette. Therefore, the online customer service will also add some emotional comfort words and enthusiastic service words before and after the initial reply content to obtain the final reply content, and unify the service etiquette in the final reply content, thereby improving the customer's consulting experience and trust in the platform.
[0031] The above steps will greatly reduce the work efficiency of customer service, and different customer service staff have different rewriting levels, resulting in different consumer experiences.
[0032] In order to solve the problems of low work efficiency caused by online customer service when processing knowledge content and different rewriting levels of different online customer service, in an embodiment of the present application, structured prompt words are combined with a knowledge reconstruction model. The structured prompt words include hierarchical knowledge reconstruction task prompt words. The structured prompt words are used as input to the knowledge reconstruction model. Combined with the capabilities of the knowledge reconstruction model, the model is guided to gradually reconstruct the initial knowledge content according to the hierarchical knowledge reconstruction task prompt words, and the target knowledge content that meets the requirements is quickly generated. The speed and quality of generating the target knowledge content can be improved. At the same time, online customer service can be freed from tedious tasks such as knowledge content extraction and rewriting, thereby improving the work efficiency and service quality of online customer service.
[0033] In addition, in the embodiments of the present application, the knowledge reconstruction model is endowed with the ability to generate intermediate reasoning information, so that the knowledge reconstruction model can output a logically coherent and hierarchical intermediate reasoning process, thereby improving the applicability of the model to meet the needs of different consulting scenarios.
[0034] Furthermore, the knowledge reconstruction model can output corresponding intermediate reasoning information when executing intermediate reasoning steps, providing online customer service with a clearer and traceable result explanation. Online customer service can then judge whether the execution logic of each intermediate reasoning step meets expectations based on the intermediate reasoning information, and decide whether to adopt the final target knowledge content based on this, thereby improving the practical value and user satisfaction of the overall solution.
[0035] Furthermore, at least one of the following processing is performed on the intermediate reasoning information: structuring the unstructured information, desensitizing the sensitive information, professionally interpreting the brief information, and re-expressing the content using customer service language, so as to achieve a unified structure of the target knowledge content, high professionalism, a language style that suits the customer service scenario, and does not contain sensitive information.
[0036] Furthermore, the visual enhancement model is used to perform visual enhancement processing on the target knowledge content. Visual enhancement processing refers to improving the readability, aesthetics and expression effect of the target knowledge content by changing its visual characteristics. Among them, improving the expression effect can be reflected in highlighting the key parts of the target knowledge content.
[0037] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0038] Figure 1 The following is a flow chart of a knowledge content processing method provided by an exemplary embodiment of the present application. Figure 1 As shown, the processing method includes:
[0039] S101: receiving initial knowledge content;
[0040] S102: generating first structured prompt words according to a first structured prompt word template, wherein the first structured prompt words include hierarchical knowledge reconstruction task prompt words;
[0041] S103: According to the first structured prompt word, the knowledge reconstruction model is called, and the initial knowledge content is reconstructed according to the hierarchical knowledge reconstruction task prompt words to obtain the target knowledge content.
[0042] In this embodiment, the initial knowledge content refers to the knowledge content that needs to be reconstructed. The initial knowledge content can be image information, graphic information, voice information and / or text information, that is, the initial knowledge content in the embodiment of the present application can be single information, such as image information, voice information or text information, or multimodal information, such as the fusion information of two or more of image information, graphic information, voice information and text information. Among them, text information refers to information forms that are mainly composed of various types of text information; image information can be an independent image containing static visual information, or a video frame in video data containing dynamic visual information; graphic information refers to information forms that contain both images and texts, text information refers to information forms that are mainly composed of various types of text information, and voice information refers to information forms that are mainly composed of audio or voice signals. In addition, in this embodiment, the source of the initial knowledge content is not limited, for example, it can be obtained from a commodity knowledge base; or, it can also be obtained from the Internet; or, it can also be manually input, etc., without limitation.
[0043] In this embodiment, a knowledge reconstruction model is introduced to reconstruct the initial knowledge content to obtain target knowledge content that meets the requirements. The knowledge reconstruction model is an artificial intelligence model that uses machine learning technology to understand and generate target knowledge content. Optionally, the knowledge reconstruction model can be a large language model, a computer vision model, or a multimodal model, etc., without limitation.
[0044] Among them, the prompt words can guide the knowledge reconstruction model to generate the desired output, so the quality and structure of the prompt words have a crucial impact on the output results of the knowledge reconstruction model. In order to guide the knowledge reconstruction model to output as expected, in this embodiment, the structured prompt words include hierarchical knowledge reconstruction task prompt words, and the hierarchical knowledge reconstruction task prompt words are used as the input of the knowledge reconstruction model to guide the model to gradually reconstruct the initial knowledge content according to the hierarchical knowledge reconstruction task prompt words, and quickly generate target knowledge content that meets the requirements, thereby improving the speed and quality of generating target knowledge content.
[0045] In order to facilitate the generation of structured prompt words required by the knowledge reconstruction model, in an embodiment of the present application, the concept of a structured prompt word template is proposed. Among them, the structured prompt word template is a standardized prompt word framework, in which hierarchical knowledge reconstruction task prompt words are embedded. The knowledge reconstruction task can clearly tell the knowledge reconstruction model the work steps for reconstructing the initial knowledge content, and can also clearly point out the specific requirements for the output target knowledge content, thereby improving the output performance of the model. Based on this, in this embodiment, a first structured prompt word is generated based on a first structured prompt word template, and the generated first structured prompt word can be used as the input of the knowledge reconstruction model to guide the knowledge reconstruction model to reconstruct the initial knowledge content.
[0046] In the embodiments of the present application, the specific implementation method of generating the first structured prompt word according to the first structured prompt word template is not limited. In an optional embodiment, the first structured prompt word template may include hierarchical knowledge reconstruction task prompt words corresponding to a variety of application scenarios. By determining the target application scenario to which the initial knowledge content belongs, the hierarchical knowledge reconstruction task prompt word corresponding to the target application scenario can be selected as the first structured prompt word; or, the hierarchical knowledge reconstruction task prompt words corresponding to other application scenarios can be deleted from the first structured prompt word template to obtain the first structured prompt word. In another optional embodiment, the first structured prompt word template includes hierarchical knowledge reconstruction task prompt words suitable for various application scenarios. Then, the hierarchical knowledge reconstruction task prompt words in the first structured prompt word template can be directly used as the first structured prompt word, or the first structured prompt word template can be directly used as the first structured prompt word. In another optional embodiment, in addition to the hierarchical knowledge reconstruction task prompt words, the first structured prompt word template also allows for filling in other contents. For example, in the process of constructing the first structured prompt word, the first structured prompt word template is filled with the initial knowledge content as the content to be filled in to obtain the first structured prompt word; the first structured prompt word includes the initial knowledge content and the hierarchical knowledge reconstruction task prompt word. Further optionally, the first structured prompt word template includes blank prompt words; when generating the first structured prompt word, the initial knowledge content can be filled into the blank prompt word in the first structured prompt word template to obtain the first structured prompt word.
[0047] In this embodiment, the knowledge reconstruction task prompt words are hierarchical and may include multiple levels, each level having corresponding work steps. Through the design of hierarchical knowledge reconstruction task prompt words, the structured prompt words can be better understood by the knowledge reconstruction model for its semantic information, and the knowledge reconstruction model can be guided step by step to process the initial knowledge content, and the knowledge reconstruction model can be more deeply mined and utilized to process the initial knowledge content, thereby improving the quality of the generated target knowledge content. At the same time, the structured prompt word template has the characteristics of standardization and modularization, which helps to directly build enterprise-level structured prompt words with good maintainability and reusability.
[0048] Further, in this embodiment, the knowledge reconstruction model is called according to the first structured prompt word, so that the knowledge reconstruction model gradually reconstructs the initial knowledge content according to the hierarchical knowledge reconstruction task prompt word to obtain the target knowledge content. It is explained here that when the first structured prompt word contains the initial knowledge content, the knowledge reconstruction model can be directly called according to the first structured prompt word, that is, the input of the knowledge reconstruction model is the first structured prompt word; when the first structured prompt word does not contain the initial knowledge content, the knowledge reconstruction model can be called according to the first structured prompt word and the initial knowledge content, that is, the input of the knowledge reconstruction model includes the initial knowledge content in addition to the first structured prompt word.
[0049] In an embodiment of the present application, structured prompt words are combined with a knowledge reconstruction model. The structured prompt words include hierarchical knowledge reconstruction task prompt words. The structured prompt words are used as input to the knowledge reconstruction model. Combined with the capabilities of the knowledge reconstruction model, the model is guided to gradually reconstruct the initial knowledge content according to the hierarchical knowledge reconstruction task prompt words, and the target knowledge content that meets the requirements is quickly generated. The speed and quality of generating the target knowledge content can be improved. At the same time, online customer service can be freed from tedious tasks such as knowledge content extraction and rewriting, thereby improving the work efficiency and service quality of online customer service.
[0050] Figure 2 A process diagram of a knowledge content processing method is provided for an exemplary embodiment of the present application. The process involves a consumer terminal device 20, an online customer service terminal device 23, and a knowledge reconstruction model 21; wherein, in this embodiment, there is no restriction on the deployment location of the knowledge reconstruction model 21; for example, the knowledge reconstruction model 21 can be deployed in the cloud; or, it can also be deployed on the online customer service terminal device 23, without restriction. Figure 2 In the figure, the knowledge reconstruction model 21 deployed in the cloud is taken as an example.
[0051] Among them, the embodiment of the present application does not limit the execution subject of the knowledge content processing method. The terminal device 23 of the online customer service is introduced as the execution subject of the knowledge content processing method provided by the embodiment of the present application. The terminal device 23 of the online customer service can be implemented as a terminal device such as a desktop computer, a laptop computer, a smart phone or an IOT (Internet of Things) device, or a service-end device such as a conventional server, a cloud server or a server array. Among them, the implementation type of the consumer's terminal device 20 is also not limited. The implementation type of the terminal device 23 of the online customer service can be referred to, and it will not be repeated here.
[0052] Among them, the consumer can ask questions about the target product and send relevant question information to the online customer service through the consumer's terminal device 20. After receiving the question information sent by the consumer, the terminal device 23 of the online customer service can first search the product knowledge base 22 to obtain the initial knowledge content related to the target product, and then the online customer service can provide the initial knowledge content to the terminal device 23. The terminal device 23 serves as an execution device of the knowledge content processing method and receives the initial knowledge content; Figure 2 As shown in ① and ②, according to the initial knowledge content and the first structured prompt word template, the first structured prompt word is generated, and the first structured prompt word includes the initial knowledge content and the hierarchical knowledge reconstruction task prompt word; further, as Figure 2 As shown in ③ and ④, according to the first structured prompt word, the knowledge reconstruction model is called, and the initial knowledge content is reconstructed according to the hierarchical knowledge reconstruction task prompt words to obtain the target knowledge content. Figure 2 In the illustrated embodiment, the example in which the first structured prompt word includes initial knowledge content is used for illustration and description, but the present invention is not limited thereto.
[0053] In this embodiment, the hierarchical knowledge reconstruction task prompt words include: task introduction prompt words and first workflow prompt words; the task introduction prompt words are used to briefly summarize the core content of the knowledge reconstruction task; the first workflow prompt words include multiple work step prompt words, which are used to describe the multiple work steps of knowledge reconstruction of the initial knowledge content. Further, the task introduction prompt words may include: task role prompt words and first task goal prompt words, wherein the task role prompt words are used to prompt the knowledge reconstruction model to simulate or play the role when reconstructing the initial knowledge content. By specifying the role, the output of the knowledge reconstruction model can be more accurately controlled to ensure that the output meets the needs of a specific scenario; the first task goal prompt words are used to prompt the knowledge reconstruction model to reconstruct the initial knowledge content with a preset goal. Optionally, the task role prompt words are used to prompt the knowledge reconstruction model to reconstruct the initial knowledge content with the role of online customer service; the first task goal prompt words are used to prompt the knowledge reconstruction model to reconstruct the initial knowledge content with the goal of obtaining knowledge content suitable for replying to the user.
[0054] Furthermore, in an optional embodiment, when reconstructing the initial knowledge content, the knowledge reconstruction model is called according to the first structured prompt word, and the initial knowledge content is reconstructed according to the task role prompt word, the first task target prompt word and multiple work step prompt words to obtain the target knowledge content.
[0055] Due to the "black box" nature of the knowledge reconstruction model, that is, the decision-making process within the knowledge reconstruction model is opaque, although the knowledge reconstruction model can make decisions, such as outputting target knowledge content, it is impossible to directly explain how the knowledge reconstruction model makes the decision. Even under similar input conditions, the knowledge reconstruction model may produce different outputs. This characteristic can be called the variability of the model. This variability leads to uncertainty in the output of the knowledge reconstruction model. Without the disclosure of a clear internal reasoning mechanism for knowledge reconstruction, it is difficult for users of the knowledge reconstruction model to understand or predict the intermediate conversion logic of the model-generated content, making it difficult to directly adapt to specific consulting scenario requirements.
[0056] In order to weaken the "black box" characteristics, in this embodiment, the knowledge reconstruction model is given the ability to generate intermediate reasoning information, so that the knowledge reconstruction model can output a logically coherent and hierarchical intermediate reasoning process, improving the applicability of the model to meet the needs of different consulting scenarios. Based on this, in this embodiment, if Figure 2As shown in the figure, when executing the intermediate reasoning steps, the knowledge reconstruction model can output the corresponding intermediate reasoning information. The intermediate reasoning information can be regarded as the intermediate state of the target knowledge content. By observing the intermediate reasoning information, the intermediate conversion logic of the knowledge reconstruction model can be understood, which improves the interpretability of the knowledge reconstruction model. Furthermore, by viewing the intermediate reasoning information, it is possible to quickly locate which intermediate reasoning steps do not meet expectations, so that the knowledge reconstruction model can be trained or adjusted in a targeted manner to achieve control of the intermediate conversion logic. Furthermore, based on the rewriting of the intermediate reasoning information of the intermediate state, the target knowledge content can be obtained.
[0057] Based on the above, in this embodiment, multiple work step prompt words include: intermediate reasoning step prompt words and information rewriting step prompt words; the intermediate reasoning step prompt words are used to describe the intermediate reasoning steps for the initial knowledge content, and the knowledge reconstruction model will output corresponding intermediate reasoning information when executing the intermediate reasoning steps; the information rewriting step prompt words are used to describe the steps of rewriting the intermediate reasoning information, and the rewriting includes but is not limited to rewriting the content and / or style of the intermediate reasoning information.
[0058] In this embodiment, when the initial knowledge content is reconstructed, it includes: executing the intermediate reasoning steps for the initial knowledge content according to the task role prompt words, the first task target prompt words and the intermediate reasoning step prompt words to obtain the intermediate reasoning information; rewriting the intermediate reasoning information in content and / or style according to the information rewriting step prompt words to obtain the target knowledge content. Among them, the knowledge reconstruction model can output the corresponding intermediate reasoning information when executing the intermediate reasoning steps, providing the online customer service with a clearer and traceable result explanation, so that the online customer service can judge whether the execution logic of each intermediate reasoning step meets the expectations according to the intermediate reasoning information, and decide whether to adopt the final target knowledge content based on this, thereby improving the practical value and user satisfaction of the overall solution. Optionally, when the execution logic corresponding to the intermediate reasoning information does not meet expectations, the reconstruction of the initial knowledge content can be terminated.
[0059] In an alternative embodiment, if Figure 2 As shown, the intermediate reasoning information can also be saved and output to offline operations so that offline operations can determine in advance whether the initial knowledge content in the knowledge base needs to be modified. In this way, when online customer service retrieves knowledge based on the product knowledge base, it can directly find the initial knowledge content that meets the needs without the need to reconstruct the initial knowledge content, thereby significantly improving the work efficiency and service quality of online customer service.
[0060] Optionally, before using the prompt word template, a structured prompt word template may be pre-built. Figure 3 Take the template as an example to explain the template construction process:
[0061] In this embodiment, the structured prompt word template is constructed around the requirements. In the process of constructing the template, the role and goal of the knowledge reconstruction task requirements can be analyzed. For example, Figure 3 As shown in , the demand analysis results of roles and goals include task roles and task goals. The task role is the role that the knowledge reconstruction model is to play or simulate in the process of processing the initial knowledge content, and the task goal is the goal that the knowledge reconstruction model is to complete when performing the knowledge reconstruction task; further, taking the online customer service in the e-commerce field as an example, the intermediate reasoning process of the demand is refined, and the demand analysis results of the intermediate reasoning process include: mining the target commodity information pointed to by the initial knowledge content, analyzing the user group information facing the initial knowledge content, and identifying the potential problem information of the initial knowledge content. It should be understood that the needs of different roles in different fields are diverse, and based on the diverse demand analysis, a variety of demand analysis results will also be obtained. Here, the online customer service in the e-commerce field is taken as an example, but it does not limit this embodiment.
[0062] Furthermore, the requirements are analyzed for information rewriting, and the requirements identification result for information rewriting is obtained, including rewriting the output of the intermediate reasoning process, ie, the intermediate reasoning information, in terms of content and / or style.
[0063] Furthermore, according to the above requirement recognition results, a structured prompt word template is constructed, including:
[0064] Based on the results of the role and goal demand analysis, construct the task briefing prompt words. The task briefing prompt words summarize the core content of the knowledge reconstruction task. The task briefing prompt words include task role prompt words and task goal prompt words.
[0065] Based on the demand identification result of the intermediate reasoning process, determine the intermediate reasoning step, optionally, the intermediate reasoning step may include at least one of the step of mining the target commodity information pointed to by the initial knowledge content, the step of analyzing the user group information targeted by the initial knowledge content, and the step of identifying the potential problem information existing in the initial knowledge content; based on the intermediate reasoning step, construct the intermediate reasoning step prompt word; and based on the demand identification result of information rewriting, determine the information rewriting step, and based on the information rewriting step, the information rewriting step prompt word can be constructed;
[0066] Among them, the intermediate reasoning step and the information rewriting step are both working steps. Figure 3As shown, each work step can have its own sub-goals and skills, where the sub-goals can be obtained based on the decomposition of the task goals. Compared with the task goals, the sub-goals are relatively small and easy to solve. By gradually achieving each sub-goal, the task goal can be finally achieved, reducing the complexity of achieving the task goal. Skills refer to the abilities to be demonstrated when executing work steps. Optionally, as Figure 3 As shown, the work step may also include constraints, which are rules, conditions or restrictions that the output results must comply with when executing the work step; Figure 3 Medium constraints are represented by dashed boxes, which means that the constraint is an optional item of a work step;
[0067] Based on the sub-goals and skills included in each of the above work steps, work step prompts are constructed. Work step prompts include sub-goal prompts and skill prompts; sub-goal prompts are used to prompt the work steps that the knowledge reconstruction model needs to perform, and skill prompts are used to prompt the knowledge reconstruction model to demonstrate the capabilities when performing the work step; further, optionally, the work step prompts may also include constraint prompts, which are used to prompt the knowledge reconstruction model to generate target knowledge content that meets specific rules, conditions or restrictions.
[0068] Based on multiple work step prompt words, a workflow prompt word is formed; based on the workflow prompt word and the task profile prompt word, a hierarchical knowledge reconstruction task prompt word is formed; and then, a structured prompt word template is generated based on the hierarchical knowledge reconstruction task prompt word. In some optional embodiments, a structured prompt word template can be generated directly based on the hierarchical knowledge reconstruction task prompt word, and the hierarchical knowledge reconstruction task prompt word has universality and applicability, and is applicable to various application scenarios. In other optional embodiments, the same method as above can be adopted to generate hierarchical knowledge reconstruction task prompt words corresponding to multiple application scenarios, and then a structured prompt word template is generated based on the hierarchical knowledge reconstruction task prompt words corresponding to multiple application scenarios. In some other optional embodiments, the structured prompt word template allows other content to be filled in, and then a structured prompt word template can be generated based on blank prompt words and hierarchical knowledge reconstruction task prompt words. In the embodiment of the present application, the blank prompt word is used to fill in the initial knowledge content.
[0069] In this embodiment, the structure of the structured prompt word template is rich and clear, with good readability and expressiveness, and the work step prompt words corresponding to each level can be adaptively adjusted according to different needs. The structured prompt words constructed based on the structured prompt word template can be better understood by the knowledge reconstruction model, and the processing ability of the knowledge reconstruction model itself for the initial knowledge content can be mined and utilized to a greater extent. At the same time, because the structured prompt word template has the characteristics of standardization and modularization, it is helpful to directly construct enterprise-level structured prompt words, which has good maintainability and reusability.
[0070] The details of the intermediate reasoning step prompt words and the information rewriting prompt words can be referred to the aforementioned embodiments, and will not be repeated here. In addition, in the subsequent embodiments, online customer service is taken as an example to illustrate the intermediate reasoning prompt words and information rewriting prompt words, and the details can be referred to the subsequent embodiments.
[0071] In this embodiment, the specific steps included in the intermediate reasoning step are not limited. The following is an example of the specific steps of the intermediate reasoning step using online customer service as an example, which does not limit the intermediate reasoning step. In an optional embodiment, the intermediate reasoning step includes at least one of the steps of mining the target product information pointed to by the initial knowledge content, analyzing the user group information targeted by the initial knowledge content, and identifying the potential problem information in the initial knowledge content; wherein, Figure 2 As shown, the "step of mining the target product information pointed to by the initial knowledge content" is referred to as the "product information mining step"; the "step of analyzing the user group information targeted by the initial knowledge content" is referred to as the "user information analysis step"; and the "step of identifying the potential problem information existing in the initial knowledge content" is referred to as the "potential problem identification step".
[0072] Further optionally, when executing the intermediate reasoning step for the initial knowledge content according to the task role prompt word, the first task goal prompt word and the intermediate reasoning step prompt word to obtain the intermediate reasoning information, it includes: performing at least one of the following operations according to the task role prompt word, the first task goal prompt word and the intermediate reasoning step prompt word: when executing the product information mining step, mining the target product information pointed to by the initial knowledge content as the intermediate reasoning information, in this process, it involves analyzing and summarizing the initial knowledge content to obtain the attributes and characteristics of the target product pointed to by the initial knowledge content; when executing the user information analysis step, analyzing the user group information facing the initial knowledge content as the intermediate reasoning information, in this process, it involves reasoning about the initial knowledge content to obtain the user group information, and based on this, analyzing the characteristics and needs of the user group; when executing the potential problem identification step, identifying the potential problem information existing in the initial knowledge content as the intermediate reasoning information, in this process, it involves inferring the potential doubts of the user when purchasing the target product based on the initial knowledge content, and guiding the knowledge reconstruction model to reason and analyze other problems that the user may have.
[0073] As described in the above embodiment, for each work step prompt word, it can include a sub-goal prompt word, a skill prompt word and a constraint prompt word. Among them, the sub-goal prompt word is used to prompt the work step that the knowledge reconstruction model needs to perform. The work step can be regarded as a hierarchical knowledge reconstruction task including a work step; and the sub-goal can be regarded as a sub-goal of the first task goal, that is, the sub-goal can be obtained by disassembling the first task goal. The skill prompt word is used to prompt the knowledge reconstruction model to demonstrate the ability when executing the work step. The constraint prompt word is used to prompt the knowledge reconstruction model to generate target knowledge content that meets specific rules, conditions or restrictions. For example, it can be a length constraint, format constraint and style constraint on the target knowledge content. The length constraint is used to prompt the knowledge reconstruction model to limit the number of words of the target knowledge content. The format constraint is used to prompt the knowledge reconstruction model to control the output structure, for example, a specific format such as a table or code can be generated. The style constraint is used to prompt the knowledge reconstruction model to generate the target knowledge content according to a specific tone, voice or style.
[0074] Based on the above, in an optional embodiment, the prompt words for the intermediate reasoning step include: a first sub-goal prompt word and a first skill prompt word; the first sub-goal prompt word is used to prompt the work steps that the knowledge reconstruction model needs to perform, and the first skill prompt word is used to prompt the ability that the knowledge reconstruction model needs to demonstrate when performing the work steps; if the prompt words for the intermediate reasoning step are used to describe the steps of mining the target product information pointed to by the initial knowledge content, then the first sub-goal prompt word is used to prompt the knowledge reconstruction model to mine the target product information, and the first skill prompt word is used to prompt the knowledge reconstruction model to have information mining capabilities; if the prompt words for the intermediate reasoning step are used to describe the steps of analyzing the user group information targeted by the initial knowledge content, then the first sub-goal prompt word is used to prompt the knowledge reconstruction model to analyze the user group information, and the first skill prompt word is used to prompt the knowledge reconstruction model to have information analysis capabilities; if the prompt words for the intermediate reasoning step are used to describe the steps of identifying potential problem information existing in the initial knowledge content, then the first sub-goal prompt word is used to prompt the knowledge reconstruction model to identify potential problem information, and the first skill prompt word is used to prompt the knowledge reconstruction model to have problem identification capabilities.
[0075] Further optionally, the information rewriting step prompt words include a second sub-goal prompt word, a second skill prompt word and a constraint prompt word; the second sub-goal prompt word is used to prompt the work steps that the knowledge reconstruction model needs to perform, and the second skill prompt word is used to prompt the model to demonstrate the ability to perform the work steps; in some optional embodiments, the second sub-goal prompt word is used to prompt the knowledge reconstruction model to rewrite the intermediate reasoning information as a goal, the second skill prompt word is used to prompt the knowledge reconstruction model to have the ability to use customer service scripts and professional rewrite capabilities, and the constraint prompt word is used to constrain the knowledge reconstruction model to meet the conditions of segmented rewriting, highlighting logic and reflecting customer service etiquette; then, when rewriting the intermediate reasoning information in content and / or style according to the information rewriting step prompt word, it includes: according to the second sub-goal prompt word, the second skill prompt word and the constraint prompt word, performing at least one of the following processing on the intermediate reasoning information: structuring unstructured information, desensitizing sensitive information, professionally interpreting short information, and re-expressing the content using customer service scripts.
[0076] In this embodiment, structuring unstructured information refers to converting unstructured data into structured information. Compared with unstructured information, structured information has a unified expression method, is more standardized, easy to understand, and can reduce ambiguity. Structuring intermediate reasoning information can enhance the readability and consistency of the target knowledge content obtained based on the intermediate reasoning information. And, desensitizing sensitive information refers to processing or converting sensitive information in the intermediate reasoning information to prevent unauthorized persons (such as consumers) from obtaining sensitive information. In addition, professional interpretation of short information and re-expression of content using customer service words may exist in the intermediate reasoning information that customers ask but the explanation is not detailed enough, so this part of the content can be explained more professionally based on the knowledge reconstruction model. Further, the content can be re-expressed using customer service words, for example, the content can be re-expressed in a warm, professional, friendly and positive tone to enhance the customer's consulting experience and trust in the platform.
[0077] like Figure 2 As shown, in an optional embodiment, the consumer's terminal device is deployed with a visual enhancement model 25, wherein, in this embodiment, there is no restriction on the deployment location of the visual enhancement model, for example, it can also be deployed on the terminal device 23 of the online customer service. Further, in the case of obtaining the target knowledge content, such as Figure 2 As shown in ⑥ and ⑦, the visual enhancement model 25 is called to perform visual enhancement processing on the target knowledge content. Visual enhancement processing refers to improving the readability, aesthetics and expression effect of the target knowledge content by changing the visual characteristics of the target knowledge content. Among them, improving the expression effect can be reflected in highlighting the key parts of the target knowledge content. The key parts of the target knowledge content include but are not limited to the answers to the questions, the core content and the keywords. The highlighting of the key parts can enhance its expression effect, and can guide the readers of the target knowledge content (such as consumers or online customer service) to quickly identify and capture the important information in the target knowledge content, which can not only improve the efficiency of information acquisition, but also enhance the accuracy and effectiveness of expression. In addition, when the target knowledge content is relatively complex, the complex knowledge content can be intuitively presented through visual enhancement processing to help readers understand the complex knowledge content more easily and improve the user experience. For example, when the online customer service views the knowledge content after visual enhancement processing, it can more quickly and accurately determine whether the knowledge content meets expectations. For another example, after the consumer views the knowledge content after visual enhancement processing, the important information in the target knowledge content can be quickly obtained. The process of visual enhancement processing is introduced in conjunction with the embodiment.
[0078] In an optional embodiment, a second structured prompt word is generated according to a second structured prompt word template. In the embodiment of the present application, the specific implementation method of generating the second structured prompt word according to the second structured prompt word template is not limited. In an optional embodiment, the second structured prompt word template may include hierarchical visual enhancement task prompt words corresponding to a plurality of application scenarios. Then, by determining the target application scenario to which the target knowledge content belongs, the hierarchical visual enhancement task prompt word corresponding to the target application scenario can be selected as the second structured prompt word; or, the hierarchical visual enhancement task prompt words corresponding to other application scenarios can be deleted from the second structured prompt word template to obtain the second structured prompt word. In another optional embodiment, the second structured prompt word template includes hierarchical visual enhancement task prompt words applicable to various application scenarios, that is, the hierarchical visual enhancement task prompt words are universal and general, then the hierarchical visual enhancement task prompt words in the second structured prompt word template can be directly used as the second structured prompt word, or the second structured prompt word template can be directly used as the second structured prompt word. In another optional embodiment, the second structured prompt word template, in addition to the hierarchical visual enhancement task prompt words, also allows other content to be filled in. Optionally, the second structured prompt word template includes blank prompt words and hierarchical visual enhancement task prompt words; then the target knowledge content can be filled into the blank prompt words in the second structured prompt word template to obtain the second structured prompt words.
[0079] On the basis of obtaining the second structured prompt word, according to the second structured prompt word, calling the visual enhancement model, performing visual enhancement processing on the target knowledge content according to the hierarchical visual enhancement task prompt word, and outputting the knowledge content after the visual enhancement processing. Optionally, the visual enhancement model can be a large language model, a computer vision model or a multimodal model, etc., which is not limited.
[0080] In an optional embodiment, the hierarchical visual enhancement task prompt words include: a second task target prompt word, a second workflow prompt word and a task constraint prompt word; the target knowledge content is visually enhanced according to the hierarchical visual enhancement task prompt words, including: according to the second workflow prompt words, identifying the question answer, core content and keywords in the target knowledge content; and, according to the second task target prompt words and the task constraint prompt words, highlighting the question answer information, core content and keywords respectively, to obtain the knowledge content after visual enhancement processing.
[0081] In the above embodiment, based on the knowledge reconstruction model, the reconstruction of the initial knowledge content is achieved to obtain the target knowledge content that meets the expectations, and then the target knowledge content is visually enhanced based on the visual enhancement model to obtain the visually enhanced knowledge content. It should be understood that the above method embodiment can be applied to online customer service, and the online customer service can be pre-sales customer service or after-sales customer service, without limitation. The knowledge content processing method provided in the embodiment of this application is introduced below in conjunction with pre-sales customer service.
[0082] based on Figure 2 The architecture shown in the figure, the embodiment of the present application also provides a knowledge question answering method, such as Figure 4 As shown, the method includes:
[0083] S401: receiving question information input by the user on the question-and-answer page;
[0084] S402: querying the question-answer knowledge base according to the question information to obtain initial knowledge content;
[0085] S403: generating first structured prompt words according to the first structured prompt word template, wherein the first structured prompt words include hierarchical knowledge reconstruction task prompt words;
[0086] S404: calling a knowledge reconstruction model according to the first structured prompt word, and performing knowledge reconstruction on the initial knowledge content according to the hierarchical knowledge reconstruction task prompt word to obtain target knowledge content;
[0087] S405: Output the target knowledge content as answer information to the question information on the question and answer page.
[0088] In this embodiment, the question information may be information for the target product. When the question information is received, a question-answering knowledge base may be queried. Optionally, the question-answering knowledge base may be implemented as a product knowledge base, which maintains knowledge content of different products.
[0089] Here, for details on generating a first structured prompt word according to a first structured prompt word template; and calling a knowledge reconstruction model according to the first structured prompt word, and reconstructing the initial knowledge content according to the hierarchical knowledge reconstruction task prompt words to obtain the target knowledge content, etc., please refer to the aforementioned embodiments and will not be repeated here.
[0090] In this embodiment, the target knowledge content is output on the question and answer page as answer information to the question information.
[0091] In an alternative embodiment, if Figure 5aAs shown, the Q&A page includes a Q&A area and a tool area, the Q&A area displays question information, and the tool area includes a first access entry corresponding to the Q&A knowledge base; querying the Q&A knowledge base according to the question information to obtain initial knowledge content includes: responding to a trigger operation of the first access entry, sending a query request to the Q&A knowledge base, the query request includes question information; and displaying the initial knowledge content output by the Q&A knowledge base in the tool area. Optionally, as Figure 5a As shown in ①, the online customer service can enter question information in the question and answer box, thereby triggering the first access entrance; Figure 5a As shown in ②, in response to the triggering operation of the first access entrance, a query request is sent to the question-answering knowledge base, and the query request includes question information; Figure 5a As shown in ③, the initial knowledge content output by the question and answer knowledge base is visualized. In response to the triggering operation of the first access portal, the corresponding question and answer knowledge base page (not shown in the figure) can be displayed to the online customer service in the tool area, or a new window can be popped up to display the question and answer knowledge base page, which is displayed in response to the triggering of the first access portal. According to the question information carried in the query request, the question and answer knowledge base can determine some knowledge content with high usage rate, so that the online customer service can determine the initial knowledge content from multiple knowledge contents, and after selection, it can be visualized in the tool area. The visualized display is conducive to the online customer service to perform subsequent processing on the initial knowledge content.
[0092] Further, if Figure 5b As shown in ①, the online customer service can input the initial knowledge content obtained in the above process into the question and answer box, and further, Figure 5b As shown in ②, in response to the trigger operation on the second access entry of the tool area, the knowledge reconstruction model is triggered to perform the operation of generating the first structured prompt word and subsequent operations. It should be understood that the method of inputting the initial knowledge content into the question and answer box is only an example, and the initial knowledge content can also be directly selected and the second access entry is triggered to trigger the knowledge reconstruction model to perform the operation of generating the first structured prompt word and subsequent operations.
[0093] In the process of executing the intermediate reasoning step, the knowledge reconstruction model will output the corresponding intermediate reasoning information. Figure 5b As shown in ③, the intermediate reasoning information can be visualized, including the titles [target product knowledge information], [user group information], and [potential problem information], as well as the detailed content under each title. Furthermore, the target knowledge content can be visually enhanced. Figure 5b④ As shown, the knowledge content after visual enhancement processing is visualized, and the "bold" font or underlined part belongs to the content of the target knowledge content that is visually enhanced. The visual enhancement processing method is not limited to bold font, underline, italic font, font color change and highlighting, etc., and there is no restriction on this. Any visual processing method that can highlight the key part from the target knowledge content belongs to the protection scope of this embodiment.
[0094] In an alternative embodiment, if Figure 5b As shown in ⑤, after obtaining the knowledge content after visual enhancement processing, the online customer service can move the knowledge content to the input box of the question and answer area. The movement can be to copy the knowledge content from the tool area to the question and answer area. Further, as Figure 5b As shown in ⑥, in response to the triggering operation of the "Send" button, the knowledge content is sent to the customer 1. It should be understood that the sending process of the knowledge content after visual enhancement processing here is only an optional embodiment. In the embodiment of the present application, the implementation method of the online customer service sending the knowledge content after visual enhancement is not limited. For example, a corresponding control can also be implemented in the tool area, and the control can respond to the triggering operation of the online customer service to directly send the knowledge content after visual enhancement processing to the consumer.
[0095] Alternatively, if Figure 5c As shown, the intermediate reasoning information can also be visually enhanced, and the intermediate reasoning information after visual enhancement can be output and displayed so that the online customer service can confirm whether to adopt the target knowledge content based on the intermediate reasoning information or so that the online customer can use the intermediate reasoning information as a basis for rewriting subsequent knowledge content.
[0096] In an optional embodiment, the workspace also includes a "stop" component. Optionally, the component can be implemented as a button, which can be used to stop the reconstruction of the initial knowledge content in response to a triggering operation of the "stop" button when the model executes intermediate reasoning steps and outputs intermediate reasoning information and the intermediate reasoning information is illogical.
[0097] The detailed implementation and beneficial effects of each step in the method of this embodiment have been described in detail in the aforementioned embodiments and will not be elaborated here.
[0098] It should be noted that the execution subject of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 101 to 103 can be device A; for another example, the execution subject of steps 101 and 102 can be device A, and the execution subject of step 103 can be device B; and so on.
[0099] In addition, in some of the processes described in the above embodiments and the accompanying drawings, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel, and the sequence numbers of the operations, such as 101, 102, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.
[0100] Figure 6 FIG. 1 is a schematic diagram of a structure of an electronic device provided by another exemplary embodiment of the present application. Figure 6 As shown, the electronic device 600 includes: a memory 64 and a processor 65 .
[0101] The memory 64 is used to store computer programs and can be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phone book data, messages, pictures, videos, etc.
[0102] The memory 64 can be implemented by any type of volatile or nonvolatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0103] The processor 65 is coupled to the memory 64 and is used to execute the computer program in the memory 64, so as to: receive initial knowledge content; generate a first structured prompt word according to a first structured prompt word template, wherein the first structured prompt word includes a hierarchical knowledge reconstruction task prompt word; based on the first structured prompt word, call a knowledge reconstruction model, and reconstruct the initial knowledge content according to the hierarchical knowledge reconstruction task prompt word to obtain the target knowledge content.
[0104] In an optional embodiment, the first structured prompt word template includes blank prompt words and the hierarchical knowledge reconstruction task prompt words; when the processor 65 generates the first structured prompt words according to the first structured prompt word template, it is specifically used to: fill the initial knowledge content into the blank prompt words in the first structured prompt word template to obtain the first structured prompt words.
[0105] In an optional embodiment, the hierarchical knowledge reconstruction task prompt words include: task introduction prompt words and first workflow prompt words; the task introduction prompt words include: task role prompt words and first task goal prompt words, and the first workflow prompt words include: multiple work step prompt words, which are used to describe the work steps for knowledge reconstruction of the initial knowledge content; when the processor 65 calls the knowledge reconstruction model according to the first structured prompt words, and reconstructs the initial knowledge content according to the hierarchical knowledge reconstruction task prompt words to obtain the target knowledge content, it is specifically used to: call the knowledge reconstruction model according to the first structured prompt words, and reconstruct the initial knowledge content according to the task role prompt words, the first task goal prompt words and the multiple work step prompt words to obtain the target knowledge content.
[0106] In an optional embodiment, the task role prompt is used to prompt the knowledge reconstruction model to reconstruct the initial knowledge content in the role of online customer service; the first task goal prompt is used to prompt the knowledge reconstruction model to reconstruct the initial knowledge content with the goal of obtaining knowledge content suitable for replying to the user.
[0107] In an optional embodiment, the multiple work step prompt words include: intermediate reasoning step prompt words and information rewriting step prompt words; the intermediate reasoning step prompt words are used to describe the intermediate reasoning steps for the initial knowledge content, and the intermediate reasoning steps output intermediate reasoning information; the information rewriting step prompt words are used to describe the steps of rewriting the intermediate reasoning information.
[0108] In an optional embodiment, when the processor 65 reconstructs the initial knowledge content according to the task role prompt words, the first task goal prompt words and the multiple work step prompt words to obtain the target knowledge content, it is specifically used to: execute the intermediate reasoning steps for the initial knowledge content according to the task role prompt words, the first task goal prompt words and the intermediate reasoning step prompt words to obtain intermediate reasoning information; and rewrite the intermediate reasoning information in content and / or style according to the information rewriting step prompt words to obtain the target knowledge content.
[0109] In an optional embodiment, the intermediate reasoning step includes at least one of the steps of mining the target product information pointed to by the initial knowledge content, analyzing the user group information targeted by the initial knowledge content, and identifying potential problem information existing in the initial knowledge content; when the processor 65 executes the intermediate reasoning step for the initial knowledge content according to the task role prompt word, the first task target prompt word and the intermediate reasoning step prompt word to obtain the intermediate reasoning information, it is specifically used to: perform at least one of the following operations according to the task role prompt word, the first task target prompt word and the intermediate reasoning step prompt word: mine the target product information pointed to by the initial knowledge content as the intermediate reasoning information; analyze the user group information targeted by the initial knowledge content as the intermediate reasoning information; identify potential problem information existing in the initial knowledge content as the intermediate reasoning information.
[0110] In an optional embodiment, the prompt words for the intermediate reasoning step include: a first sub-goal prompt word and a first skill prompt word; if the prompt words for the intermediate reasoning step are used to describe the step of mining the target product information pointed to by the initial knowledge content, the first sub-goal prompt word is used to prompt the knowledge reconstruction model to mine the target product information, and the first skill prompt word is used to prompt the knowledge reconstruction model to have information mining capabilities; if the prompt words for the intermediate reasoning step are used to describe the step of analyzing the user group information targeted by the initial knowledge content, the first sub-goal prompt word is used to prompt the knowledge reconstruction model to analyze the user group information, and the first skill prompt word is used to prompt the knowledge reconstruction model to have information analysis capabilities; if the prompt words for the intermediate reasoning step are used to describe the step of identifying potential problem information existing in the initial knowledge content, the first sub-goal prompt word is used to prompt the knowledge reconstruction model to identify the potential problem information, and the first skill prompt word is used to prompt the knowledge reconstruction model to have problem identification capabilities.
[0111] In an optional embodiment, the prompt words for the information rewriting step include a second sub-goal prompt word, a second skill prompt word and a constraint prompt word; the second sub-goal prompt word is used to prompt the knowledge reconstruction model to rewrite the intermediate reasoning information as a goal, the second skill prompt word is used to prompt the knowledge reconstruction model to have the ability to use customer service speech and professional rewriting ability, and the constraint prompt word is used to constrain the knowledge reconstruction model to meet the conditions of segmented rewriting, highlighting logic and reflecting customer service etiquette; when the processor 65 rewrites the intermediate reasoning information in content and / or style according to the information rewriting step prompt word to obtain the target knowledge content, it is specifically used to: according to the second sub-goal prompt word, the second skill prompt word and the constraint prompt word, perform at least one of the following processing on the intermediate reasoning information: structured processing of unstructured information, desensitization of sensitive information, professional interpretation of short information, and content re-expression using customer service speech.
[0112] In an optional embodiment, the processor 65 is also used to: generate a second structured prompt word based on a second structured prompt word template, wherein the second structured prompt word includes a hierarchical visual enhancement task prompt word; based on the second structured prompt word, call the visual enhancement model, perform visual enhancement processing on the target knowledge content according to the hierarchical visual enhancement task prompt word, and output the knowledge content after visual enhancement processing.
[0113] In an optional embodiment, the second structured prompt word template includes blank prompt words and the hierarchical visual enhancement task prompt words; when the processor 65 generates the second structured prompt words according to the second structured prompt word template, it is specifically used to: fill the target knowledge content into the blank prompt words in the second structured prompt word template to obtain the second structured prompt words.
[0114] In an optional embodiment, the hierarchical visual enhancement task prompt words include: a second task target prompt word, a second workflow prompt word and a task constraint prompt word; the processor 65 performs visual enhancement processing on the target knowledge content according to the hierarchical visual enhancement task prompt words, specifically for: according to the second workflow prompt words, identifying the question answer, core content and keywords in the target knowledge content; according to the second task target prompt words and the task constraint prompt words, highlighting the question answer information, core content and keywords respectively, to obtain the knowledge content after visual enhancement processing.
[0115] In an optional embodiment, the processor 65 is further used to: output the intermediate reasoning information so that the online customer service can confirm whether to adopt the target knowledge content based on the intermediate reasoning information or so that the online customer can use the intermediate reasoning information as a basis for rewriting subsequent knowledge content.
[0116] Further, if Figure 6 As shown, the electronic device also includes: a communication component 66, a display 67, a power component 68, an audio component 69 and other components. Figure 6 Only some components are shown schematically, which does not mean that the electronic device only includes Figure 6 In addition, Figure 6 The components in the dashed box are optional components, not mandatory components, and the specific components depend on the product form of the electronic device. The electronic device of this embodiment can be implemented as a terminal device such as a desktop computer, a laptop computer, a smart phone, or an IOT device, or a server device such as a conventional server, a cloud server, or a server array. If the electronic device of this embodiment is implemented as a terminal device such as a desktop computer, a laptop computer, a smart phone, etc., it can include Figure 6 If the electronic device of this embodiment is implemented as a server device such as a conventional server, a cloud server or a server array, it may not include Figure 6 Components within the dashed box.
[0117] The embodiment of the present application also provides an electronic device, the implementation structure of the electronic device is Figure 6 The implementation structure of the electronic device shown is the same or similar, and can refer to Figure 6 The electronic device provided in this embodiment is implemented as follows: Figure 6 The difference between the electronic devices in the illustrated embodiments mainly lies in that the functions implemented by the processor in the electronic device executing the computer program stored in the memory are different. For the electronic device provided in this embodiment, its processor executes the computer program stored in the memory, which can be used to: receive question information input by the user on the question and answer page; query the question and answer knowledge base according to the question information to obtain initial knowledge content; generate a first structured prompt word according to a first structured prompt word template, the first structured prompt word includes a hierarchical knowledge reconstruction task prompt word; according to the first structured prompt word, call the knowledge reconstruction model, and reconstruct the initial knowledge content according to the hierarchical knowledge reconstruction task prompt word to obtain the target knowledge content; output the target knowledge content as the answer information of the question information on the question and answer page.
[0118] In an optional embodiment, the question and answer page includes a question and answer area and a tool area, the question and answer area displays the question information, and the tool area includes a first access entry corresponding to the question and answer knowledge base; the processor queries the question and answer knowledge base based on the question information to obtain initial knowledge content, specifically for: responding to a trigger operation of the first access entry, sending a query request to the question and answer knowledge base, the query request including the question information; and displaying the initial knowledge content output by the question and answer knowledge base in the tool area.
[0119] In an optional embodiment, the tool area also includes a second access entry corresponding to the knowledge reconstruction model; the processor is also used to: respond to a trigger operation on the second access entry to trigger the execution of an operation of generating the first structured prompt word and subsequent operations.
[0120] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the processor is enabled to implement the steps in the above method.
[0121] An embodiment of the present application also provides a computer program product, which includes a computer program / instructions. When the computer program / instructions are executed by a processor, the processor is enabled to implement the steps in the above method embodiment.
[0122] The above-mentioned memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0123] The above-mentioned communication component is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G / LTE, 5G and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.
[0124] The above-mentioned display includes a screen, and the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
[0125] The power supply assembly provides power to various components of the device where the power supply assembly is located. The power supply assembly may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device where the power supply assembly is located.
[0126] The above-mentioned audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (Microphone, MIC), and when the device where the audio component is located is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in a memory or sent via a communication component. In some embodiments, the audio component also includes a speaker for outputting an audio signal.
[0127] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-readable storage media (including but not limited to disk storage, compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical storage, etc.) containing computer-usable program code.
[0128] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0129] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0130] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0131] In a typical configuration, a computing device includes one or more processors (Central Processing Unit, CPU), input / output interface, network interface and memory.
[0132] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0133] Computer readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0134] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0135] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A knowledge content processing method, characterized in that: include: Receive initial knowledge content; Generate first structured prompt words according to the first structured prompt word template, wherein the first structured prompt words include hierarchical knowledge reconstruction task prompt words; According to the first structured prompt word, a knowledge reconstruction model is called, and the initial knowledge content is reconstructed according to the hierarchical knowledge reconstruction task prompt word to obtain the target knowledge content.
2. The method according to claim 1, characterized in that The first structured prompt word template includes blank prompt words and the hierarchical knowledge reconstruction task prompt words; Generating a first structured prompt word according to the first structured prompt word template includes: The initial knowledge content is filled into the blank prompt word in the first structured prompt word template to obtain the first structured prompt word.
3. The method according to claim 1, characterized in that The hierarchical knowledge reconstruction task prompt words include: task introduction prompt words and first workflow prompt words; the task introduction prompt words include: task role prompt words and first task goal prompt words, and the first workflow prompt words include: multiple work step prompt words for describing the work steps of knowledge reconstruction of the initial knowledge content; According to the first structured prompt word, a knowledge reconstruction model is called, and the initial knowledge content is reconstructed according to the hierarchical knowledge reconstruction task prompt word to obtain target knowledge content, including: According to the first structured prompt word, the knowledge reconstruction model is called, and according to the task role prompt word, the first task target prompt word and the multiple work step prompt words, the initial knowledge content is reconstructed to obtain the target knowledge content.
4. The method according to claim 3, characterized in that The task role prompt is used to prompt the knowledge reconstruction model to reconstruct the initial knowledge content in the role of online customer service; The first task target prompt word is used to prompt the knowledge reconstruction model to reconstruct the initial knowledge content with the goal of obtaining knowledge content suitable for replying to the user.
5. The method according to claim 3 or 4, characterized in that: The plurality of work step prompt words include: intermediate reasoning step prompt words and information rewriting step prompt words; The intermediate reasoning step prompt word is used to describe the intermediate reasoning step for the initial knowledge content, and the intermediate reasoning step outputs intermediate reasoning information; the information rewriting step prompt word is used to describe the step of rewriting the intermediate reasoning information.
6. The method according to claim 5, characterized in that The initial knowledge content is reconstructed according to the task role prompt word, the first task target prompt word and the plurality of work step prompt words to obtain the target knowledge content, including: According to the task role prompt word, the first task target prompt word and the intermediate reasoning step prompt word, executing the intermediate reasoning step for the initial knowledge content to obtain intermediate reasoning information; According to the prompt words of the information rewriting step, the intermediate reasoning information is rewritten in content and / or style to obtain the target knowledge content.
7. The method according to claim 6, characterized in that The intermediate reasoning step includes at least one of the steps of mining target commodity information pointed to by the initial knowledge content, analyzing user group information targeted by the initial knowledge content, and identifying potential problem information existing in the initial knowledge content; According to the task role prompt word, the first task target prompt word and the intermediate reasoning step prompt word, the intermediate reasoning step is executed for the initial knowledge content to obtain intermediate reasoning information, including: According to the task role prompt word, the first task goal prompt word and the intermediate reasoning step prompt word, at least one of the following operations is performed: mining target commodity information pointed to by the initial knowledge content as the intermediate reasoning information; Analyzing user group information targeted by the initial knowledge content as the intermediate reasoning information; Potential problem information existing in the initial knowledge content is identified as the intermediate reasoning information.
8. The method according to claim 7, characterized in that The intermediate reasoning step prompt words include: a first sub-goal prompt word and a first skill prompt word; If the intermediate reasoning step prompt word is used to describe the step of mining the target product information pointed to by the initial knowledge content, the first sub-goal prompt word is used to prompt the knowledge reconstruction model to mine the target product information, and the first skill prompt word is used to prompt the knowledge reconstruction model to have information mining capability; If the intermediate reasoning step prompt word is used to describe the step of analyzing the user group information targeted by the initial knowledge content, the first sub-goal prompt word is used to prompt the knowledge reconstruction model to analyze the user group information as a goal, and the first skill prompt word is used to prompt the knowledge reconstruction model to have information analysis capabilities; If the intermediate reasoning step prompt word is used to describe the step of identifying potential problem information existing in the initial knowledge content, the first sub-goal prompt word is used to prompt the knowledge reconstruction model to identify the potential problem information, and the first skill prompt word is used to prompt the knowledge reconstruction model to have problem identification capability.
9. The method according to claim 6, characterized in that The prompt words of the information rewriting step include a second sub-goal prompt word, a second skill prompt word and a constraint prompt word; the second sub-goal prompt word is used to prompt the knowledge reconstruction model to rewrite the intermediate reasoning information as a goal, the second skill prompt word is used to prompt the knowledge reconstruction model to have the ability to use customer service words and professional rewriting ability, and the constraint prompt word is used to constrain the knowledge reconstruction model to meet the conditions of segmented rewriting, highlighting logic and reflecting customer service etiquette; According to the information rewriting step prompt words, the intermediate reasoning information is rewritten in content and / or style to obtain the target knowledge content, including: According to the second sub-goal prompt word, the second skill prompt word, and the constraint prompt word, at least one of the following processes is performed on the intermediate reasoning information: Structuring unstructured information, desensitizing sensitive information, providing professional interpretation for short information, and re-expressing the content using customer service language.
10. The method according to any one of claims 1 to 9, characterized in that: generating second structured prompt words according to the second structured prompt word template, wherein the second structured prompt words include hierarchical visual enhancement task prompt words; According to the second structured prompt word, the visual enhancement model is called, the target knowledge content is visually enhanced according to the hierarchical visual enhancement task prompt word, and the knowledge content after the visual enhancement process is output.
11. The method according to claim 10, characterized in that The second structured prompt word template includes blank prompt words and the hierarchical visual enhancement task prompt words; Generating a second structured prompt word according to the second structured prompt word template includes: The target knowledge content is filled into the blank prompt word in the second structured prompt word template to obtain the second structured prompt word.
12. The method according to claim 10, characterized in that The hierarchical visual enhancement task prompt words include: a second task target prompt word, a second workflow prompt word, and a task constraint prompt word; performing visual enhancement processing on the target knowledge content according to the hierarchical visual enhancement task prompt words includes: According to the second workflow prompt word, identifying the answer to the question, the core content and the key words in the target knowledge content; According to the second task target prompt word and the task constraint prompt word, the question answer information, core content and keywords are highlighted respectively to obtain the knowledge content after visual enhancement processing.
13. The method according to any one of claims 5 to 9, characterized in that: Also includes: The intermediate reasoning information is outputted so that the online customer service can confirm whether to adopt the target knowledge content according to the intermediate reasoning information or the online customer can use the intermediate reasoning information as a basis for rewriting subsequent knowledge content.
14. A knowledge question answering method, characterized in that: include: Receive question information entered by the user on the Q&A page; Querying a question-and-answer knowledge base according to the question information to obtain initial knowledge content; Generate first structured prompt words according to the first structured prompt word template, wherein the first structured prompt words include hierarchical knowledge reconstruction task prompt words; According to the first structured prompt word, calling the knowledge reconstruction model, and performing knowledge reconstruction on the initial knowledge content according to the hierarchical knowledge reconstruction task prompt word to obtain the target knowledge content; The target knowledge content is outputted as answer information of the question information on the question and answer page.
15. The method according to claim 14, characterized in that The question-and-answer page includes a question-and-answer area and a tool area, the question information is displayed in the question-and-answer area, and the tool area includes a first access entry corresponding to the question-and-answer knowledge base; The question-answering knowledge base is queried according to the question information to obtain initial knowledge content, including: In response to a triggering operation of the first access portal, sending a query request to the question-and-answer knowledge base, wherein the query request includes the question information; The initial knowledge content output by the question-and-answer knowledge base is displayed in the tool area.
16. The method according to claim 15, characterized in that The tool area also includes a second access entry corresponding to the knowledge reconstruction model; the method also includes: In response to the triggering operation on the second access entry, the operation of generating the first structured prompt word and subsequent operations are triggered.
17. An electronic device, characterized in that: The invention comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor is coupled to the memory and is used to execute the computer program to implement the steps in the method according to any one of claims 1 to 16.
18. A computer-readable storage medium storing a computer program / instruction, characterized in that: When the computer program / instructions are executed by a processor, the processor is enabled to implement the steps in the method according to any one of claims 1 to 16.
19. A computer program product, characterized in that include: A computer program / instruction, when executed by a processor, causes the processor to implement the steps of the method according to any one of claims 1 to 16.