Task processing method and automatic question answering method

By filtering out the target knowledge source from multiple knowledge sources and combining factual task reasoning information, the factual error problem when the big model generates content is solved, and the accuracy of task processing is improved.

CN119759507APending Publication Date: 2025-04-04ALIBABA DAMO (HANGZHOU) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311246226.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-25
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

Existing large models are prone to factual errors when generating content, resulting in extremely poor task processing accuracy.

Method used

By filtering out target knowledge sources with high matching degree with the pending data from multiple knowledge sources, combining factual task reasoning information of the pending data and the target knowledge source, inputting them into the deep learning model to obtain more accurate task processing results.

Benefits of technology

It improves the authenticity and accuracy of the content generated by the task processing model and reduces the occurrence of factual errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119759507A_ABST
    Figure CN119759507A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a task processing method and an automatic question answering method. The task processing method comprises the steps of obtaining to-be-processed data; initial task reasoning information corresponding to the to-be-processed data is determined, a target knowledge source corresponding to the to-be-processed data is screened out from multiple knowledge sources, and the knowledge sources comprise multiple pieces of task reasoning information; extracting target task reasoning information from the target knowledge source according to the initial task reasoning information; the to-be-processed data and the target task reasoning information are input into a task processing model, a task processing result is obtained, and the task processing model is a deep learning model. The target knowledge source with high matching degree with the to-be-processed data is screened out from the multiple knowledge sources, and the to-be-processed data and the factual target task reasoning information from the target knowledge source are further combined, so that the authenticity and accuracy of the content generated by the task processing model are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification relate to the field of computer technology, and more particularly to a task processing method. One or more embodiments of this specification also relate to an automatic question-answering method, a task processing apparatus, an automatic question-answering apparatus, a computing device, a computer-readable storage medium, and a computer program. Background Art

[0002] With the advancement of computer technology, large models have begun to shine. Their remarkable capabilities in language understanding, generation, interaction, and reasoning have led to their widespread application in natural language processing fields such as dialogue, translation, and code generation. Since commonly used large models are probabilistic generative models based on decoders, factual errors are inevitable during their generation process. Therefore, enhancing the accuracy of the content generated by large models has become a particularly important issue in natural language processing.

[0003] Currently, in the process of large-scale model content generation, natural language prompt information is usually added to assist in content generation. However, using only natural language as the prompt information knowledge source is single, and factual errors will still appear in the large-scale model generation process, resulting in extremely poor task processing accuracy. Therefore, a high-accuracy task processing solution is urgently needed. Summary of the Invention

[0004] In view of this, embodiments of this specification provide a task processing method. One or more embodiments of this specification also relate to an automatic question-answering method, a task processing apparatus, an automatic question-answering apparatus, a computing device, a computer-readable storage medium, and a computer program to address technical deficiencies in the prior art.

[0005] According to a first aspect of an embodiment of this specification, a task processing method is provided, including:

[0006] Get the data to be processed;

[0007] Determining initial task reasoning information corresponding to the data to be processed, and screening a target knowledge source corresponding to the data to be processed from multiple knowledge sources, wherein the knowledge source includes multiple task reasoning information;

[0008] Extracting target task reasoning information from the target knowledge source based on the initial task reasoning information;

[0009] The data to be processed and the target task reasoning information are input into the task processing model to obtain the task processing result, wherein the task processing model is a deep learning model.

[0010] According to a second aspect of the embodiments of this specification, there is provided an automatic question-answering method, comprising:

[0011] Get questions to be answered;

[0012] Determining initial answer reasoning information corresponding to the problem to be answered, and screening a target knowledge source corresponding to the problem to be answered from multiple knowledge sources, wherein the knowledge source includes multiple answer reasoning information;

[0013] Extracting target solution reasoning information from the target knowledge source based on the initial solution reasoning information;

[0014] The question to be answered and the target answer reasoning information are input into the task processing model to obtain the question answer result, wherein the task processing model is a deep learning model.

[0015] According to a third aspect of the embodiments of this specification, there is provided a task processing device, including:

[0016] A first acquisition module is configured to acquire data to be processed;

[0017] A first screening module is configured to determine initial task reasoning information corresponding to the data to be processed, and screen a target knowledge source corresponding to the data to be processed from a plurality of knowledge sources, wherein the knowledge source includes a plurality of task reasoning information;

[0018] a first extraction module configured to extract target task reasoning information from a target knowledge source based on the initial task reasoning information;

[0019] The first input module is configured to input the data to be processed and the target task reasoning information into the task processing model to obtain the task processing result, wherein the task processing model is a deep learning model.

[0020] According to a fourth aspect of the embodiments of this specification, an automatic question-answering device is provided, comprising:

[0021] A second acquisition module is configured to acquire questions to be answered;

[0022] The second screening module is configured to determine initial answer reasoning information corresponding to the question to be answered, and screen a target knowledge source corresponding to the question to be answered from a plurality of knowledge sources, wherein the knowledge source includes a plurality of answer reasoning information;

[0023] a second extraction module configured to extract target solution reasoning information from the target knowledge source based on the initial solution reasoning information;

[0024] The second input module is configured to input the question to be answered and the target answer reasoning information into the task processing model to obtain the question answer result, wherein the task processing model is a deep learning model.

[0025] According to a fifth aspect of the embodiments of this specification, there is provided a computing device, including:

[0026] memory and processor;

[0027] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method provided in the first aspect or the second aspect are implemented.

[0028] According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions. When the instructions are executed by a processor, the steps of the method provided in the first or second aspect above are implemented.

[0029] According to a seventh aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the method provided in the first aspect or the second aspect above.

[0030] An embodiment of this specification provides a task processing method, which obtains data to be processed; determines initial task reasoning information corresponding to the data to be processed, and filters out a target knowledge source corresponding to the data to be processed from multiple knowledge sources, wherein the knowledge source includes multiple task reasoning information; extracts target task reasoning information from the target knowledge source based on the initial task reasoning information; inputs the data to be processed and the target task reasoning information into a task processing model to obtain a task processing result, wherein the task processing model is a deep learning model. By filtering out a target knowledge source with a high degree of match with the data to be processed from multiple knowledge sources, and further combining the data to be processed with the factual target task reasoning information from the target knowledge source, the authenticity and accuracy of the content generated by the task processing model are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 This is an architecture diagram of a task processing system provided by one embodiment of this specification;

[0032] Figure 2 This is an architecture diagram of another task processing system provided by one embodiment of this specification;

[0033] Figure 3 This is a flowchart of a task processing method provided by one embodiment of this specification;

[0034] Figure 4 This is a flow chart of an automatic question-answering method provided by one embodiment of this specification;

[0035] Figure 5 This is a process flow chart of a task processing method provided by one embodiment of this specification;

[0036] Figure 6is a process flow chart of another task processing method provided by one embodiment of this specification;

[0037] Figure 7 This is a schematic diagram of an automatic question-and-answer interface provided by an embodiment of this specification;

[0038] Figure 8 This is a structural diagram of a task processing device provided by one embodiment of this specification;

[0039] Figure 9 This is a schematic diagram of the structure of an automatic question-answering device provided by one embodiment of this specification;

[0040] Figure 10 This is a structural block diagram of a computing device provided by one embodiment of this specification. DETAILED DESCRIPTION

[0041] The following description sets forth many specific details to facilitate a thorough understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the scope of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.

[0042] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a," "the," and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0043] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0044] In addition, it should be noted that 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 one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0045] In one or more embodiments of this specification, a large model refers to a deep learning model with large-scale model parameters, typically containing hundreds of millions, tens of billions, hundreds of billions, trillions, or even more than ten trillion model parameters. A large model can also be called a cornerstone model / foundation model. By pre-training a large model with large-scale unlabeled corpus, a pre-trained model with more than 100 million parameters is produced. This model can adapt to a wide range of downstream tasks and has good generalization capabilities, such as a large-scale language model (LLM) and a multi-modal pre-training model.

[0046] When large models are used in practice, only a small number of samples are needed to fine-tune the pre-trained model and it can be applied to different tasks. Large models can be widely used in natural language processing (NLP), computer vision and other fields. Specifically, they can be applied to computer vision tasks such as visual question answering (VQA), image description (IC), image generation, as well as natural language processing tasks such as text-based sentiment classification, text summary generation, and machine translation. The main application scenarios of large models include digital assistants, intelligent robots, search, online education, office software, e-commerce, intelligent design, etc.

[0047] First, the terms involved in one or more embodiments of this specification are explained.

[0048] Large-scale language models (LLMs), also known as large language models or large language models, are deep learning-based AI models designed to simulate human language abilities. They are trained using large text datasets and learn the semantic and grammatical relationships between words, phrases, and sentences. LLMs can understand and generate natural language text and engage in conversations by generating coherent and accurate responses.

[0049] Hallucination: The hallucination problem in large language models occurs when the generated content is often coherent and convincing, leading to the misperception that the model possesses true understanding and knowledge. However, these models actually lack true understanding and are merely mimicking the patterns and statistical regularities in the training data, resulting in factual errors in the generated content.

[0050] Knowledge Adaptation: Knowledge adaptation is the process by which a system adjusts and flexibly applies existing knowledge to meet task requirements. Knowledge adaptation involves understanding, integrating, and applying new information to adapt to changes and evolving requirements.

[0051] In recent years, enhancing the accuracy of content generated by large models has become a crucial issue in natural language processing. Because commonly used large models, such as the Large Language Model Meta AI (LLaMA) pre-trained language model, are probabilistic generative models based on decoders, hallucinations are unavoidable during their generation process, leading to factual errors.

[0052] Currently, to address the problem of large model hallucinations, natural language or a single source of external knowledge is often used to assist in large model content generation. However, using only natural language as external knowledge and a single source of knowledge can still lead to factual errors during large model generation, resulting in extremely poor task processing accuracy.

[0053] To address the aforementioned issues, embodiments of this specification propose automatically selecting the most appropriate knowledge source for a specific question. Furthermore, embodiments of this specification propose a query generation model (an adaptive query generator) that further enhances the ability to find the most appropriate knowledge from the selected knowledge source to answer the question, thereby further increasing the accuracy of the model's answering.

[0054] Specifically, the process involves obtaining data to be processed; determining initial task reasoning information corresponding to the data to be processed, and filtering out a target knowledge source corresponding to the data to be processed from multiple knowledge sources, wherein the knowledge source includes multiple pieces of task reasoning information; extracting target task reasoning information from the target knowledge source based on the initial task reasoning information; and inputting the data to be processed and the target task reasoning information into a task processing model, which is a deep learning model, to obtain a task processing result. By filtering out a target knowledge source with a high degree of match to the data to be processed from multiple knowledge sources and further combining the data to be processed with the factual target task reasoning information from the target knowledge source, the authenticity and accuracy of the content generated by the task processing model are improved.

[0055] In this specification, a task processing method is provided. This specification also involves an automatic question-answering method, a task processing device, an automatic question-answering device, a computing device, a computer-readable storage medium, and a computer program, which are described in detail one by one in the following embodiments.

[0056] See also Figure 1 , Figure 1 1 shows an architecture diagram of a task processing system provided by an embodiment of the present specification. The task processing system may include a client 100 and a server 200.

[0057] The client 100 is used to send data to be processed to the server 200;

[0058] The server 200 is configured to determine initial task reasoning information corresponding to the data to be processed, and to select a target knowledge source corresponding to the data to be processed from multiple knowledge sources, wherein the knowledge source includes multiple task reasoning information; extract target task reasoning information from the target knowledge source based on the initial task reasoning information; input the data to be processed and the target task reasoning information into a task processing model to obtain a task processing result, wherein the task processing model is a deep learning model; and send the task processing result to the client 100;

[0059] The client 100 is also used to receive the task processing result sent by the server 200.

[0060] By applying the solution of the embodiments of this specification, the authenticity and accuracy of the content generated by the task processing model are improved by screening out target knowledge sources with a high degree of match with the data to be processed from multiple knowledge sources, and further combining the data to be processed with the factual target task reasoning information from the target knowledge source.

[0061] See also Figure 2 , Figure 2 The following figure shows an architecture diagram of another task processing system provided by one embodiment of the present specification. The task processing system may include multiple clients 100 and a server 200. The multiple clients 100 can establish a communication connection through the server 200. In the task processing scenario, the server 200 is used to provide task processing services between the multiple clients 100. The multiple clients 100 can act as senders or receivers, respectively, and communicate through the server 200.

[0062] Users can interact with the server 200 through the client 100 to receive data sent by other clients 100, or send data to other clients 100. In the task processing scenario, users can publish data streams to the server 200 through the client 100. The server 200 generates task processing results based on the data stream and pushes the task processing results to other clients with which communication has been established.

[0063] The client 100 and the server 200 are connected via a network. The network provides a medium for the communication link between the client 100 and the server 200. The network can include various connection types, such as wired or wireless communication links or fiber optic cables. The data transmitted by the client 100 may need to be encoded, transcoded, compressed, or other processing before being released to the server 200.

[0064] The client 100 can be a browser, an APP (Application), or a web application such as an H5 (HyperText Markup Language 5, Hypertext Markup Language 5) application, or a light application (also known as a mini-program, a lightweight application) or a cloud application. The client 100 can be based on the software development kit (SDK) of the corresponding service provided by the server 200, such as developed based on the real-time communication (RTC) SDK. The client 100 can be deployed in an electronic device and needs to rely on the device to run or certain APPs in the device to run. For example, the electronic device can have a display screen and support information browsing, such as a personal mobile terminal such as a mobile phone, a tablet computer, a personal computer, etc. Various other types of applications can also be configured in the electronic device, such as human-computer dialogue applications, model training applications, text processing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0065] The server 200 may include servers that provide various services, such as servers that provide communication services to multiple clients, servers that support background training for models used on clients, and servers that process data sent by clients. It should be noted that the server 200 can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. The server can also be a server in a distributed system, or a server that integrates a blockchain. The server can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.

[0066] It is worth noting that the task processing methods provided in the embodiments of this specification are generally executed by the server. However, in other embodiments of this specification, the client may also have similar functions to the server and thus execute the task processing methods provided in the embodiments of this specification. In other embodiments, the task processing methods provided in the embodiments of this specification may also be executed jointly by the client and the server.

[0067] See also Figure 3 , Figure 3 A flowchart of a task processing method provided by an embodiment of this specification is shown, which specifically includes the following steps:

[0068] Step 302: Obtain data to be processed.

[0069] In one or more embodiments of the present specification, in response to a task processing request, data to be processed may be obtained, and the data to be processed may be further processed to obtain a task processing result.

[0070] Specifically, the data to be processed refers to the processing object during the task processing process. This means that by processing the data to be processed, the corresponding task processing results can be obtained. The data to be processed can be data from different fields, such as query data in the medical field or consulting data in the e-commerce field. Furthermore, the data to be processed can be in different forms, such as audio data, image data, video data, text data, and so on.

[0071] It should be noted that if the data to be processed is in any form other than text data, it can be converted to obtain text data. For example, if the data to be processed is image data, optical character recognition (OCR) can be performed on the data to obtain text data corresponding to the image data. If the data to be processed is audio data, an audio-to-text conversion tool can be used to process the data to obtain text data corresponding to the audio data.

[0072] In actual applications, there are many ways to obtain data to be processed, and the specific method is selected according to the actual situation. The embodiments of this specification do not impose any restrictions on this. In one possible implementation of this specification, the data to be processed sent by the user can be received, for example, the task processing request carries the data to be processed. In another possible implementation of this specification, the data to be processed can be read from other data acquisition devices or databases. For example, the task processing request carries the storage information or data identification of the data to be processed, and the data to be processed can be read from other data acquisition devices or databases based on the storage information or data identification of the data to be processed.

[0073] Step 304: Determine initial task reasoning information corresponding to the data to be processed, and select a target knowledge source corresponding to the data to be processed from multiple knowledge sources, wherein the knowledge source includes multiple task reasoning information.

[0074] In one or more embodiments of this specification, after obtaining the data to be processed, further, initial task reasoning information corresponding to the data to be processed can be determined, and a target knowledge source corresponding to the data to be processed can be screened out from multiple knowledge sources.

[0075] Specifically, a knowledge source refers to a source of factual knowledge, and the knowledge source includes multiple task reasoning information for guiding the task processing process. Multiple knowledge sources can be knowledge sources of the same type but different task reasoning information, or they can be knowledge sources of different types and different task reasoning information. The multiple task reasoning information included in the knowledge source is true and can be understood as factual knowledge and factual task reasoning information. For example, the task reasoning information may be "whales are mammals." The initial task reasoning information is used to guide the processing process of the data to be processed. The initial task reasoning information may be true factual task reasoning information, or it may be untrue non-factual task reasoning information. The target knowledge source is the knowledge source with the highest matching degree with the data to be processed among multiple knowledge sources. The target knowledge source refers to a knowledge source that includes factual task reasoning information that can guide the processing process of the data to be processed.

[0076] It should be noted that after determining the initial task reasoning information corresponding to the data to be processed, the initial task reasoning information corresponding to the data to be processed and the data to be processed can be directly input into the task processing model to obtain the task processing result. However, since the initial task reasoning information corresponding to the data to be processed may be factual knowledge or non-factual knowledge, in order to ensure the accuracy of the task processing result, in one possible implementation of this specification, it can be determined whether the initial task reasoning information corresponding to the data to be processed is factual knowledge. If so, the initial task reasoning information corresponding to the data to be processed and the data to be processed are input into the task processing model to obtain the task processing result; if not, it is determined that the task processing has failed.

[0077] Another possible implementation of this specification, to avoid the problem of poor task processing accuracy caused by inaccurate initial task reasoning information, can obtain actual target task reasoning information corresponding to the data to be processed from a knowledge source. Furthermore, to provide more reliable target task reasoning information, in an embodiment of this specification, a target knowledge source corresponding to the data to be processed can be first determined from multiple knowledge sources, and then the target task reasoning information can be extracted from the target knowledge source.

[0078] In practical applications, there are multiple ways to determine the initial task reasoning information corresponding to the data to be processed. The specific method is selected based on the actual situation, and the embodiments of this specification do not impose any restrictions on this. In one possible implementation of this specification, the initial task reasoning information can be received from the user or the initial task reasoning information corresponding to the data to be processed can be searched from a pre-set reasoning information library.

[0079] In another possible implementation of this specification, the task processing model may be used to determine initial task reasoning information corresponding to the data to be processed. That is, the above-mentioned determination of the initial task reasoning information corresponding to the data to be processed may include the following steps:

[0080] The data to be processed is input into the task processing model to obtain the initial task reasoning information corresponding to the data to be processed.

[0081] It should be noted that the task processing model is a deep learning model. It can be an existing large model or a model trained based on multiple training data sets and corresponding training and inference labels for each training data set. The task processing methods proposed in the embodiments of this specification can be flexibly adapted to any language model to improve the authenticity of the generated content, such as chat generators, large multimodal language models, and so on.

[0082] Applying the solutions of the embodiments of this specification, the data to be processed is input into the task processing model to obtain the initial task reasoning information corresponding to the data to be processed. By using the Chain of Thought (CoT) method of the task processing model to determine the initial task reasoning information of the data to be processed, the reasoning steps required for the task processing process can be generated, ensuring that the task processing process is guideable.

[0083] In practical applications, there are many ways to filter out the target knowledge source corresponding to the data to be processed from multiple knowledge sources. The specific selection depends on the actual situation, and the embodiments of this specification do not impose any restrictions on this. In one possible implementation of this specification, the data to be processed can be input into a task processing model to determine the target knowledge source corresponding to the data to be processed. The task processing model can be an existing large model or a model trained based on multiple training data and the training knowledge source labels corresponding to each training data.

[0084] In another possible implementation of the present specification, the multiple knowledge sources are heterogeneous knowledge sources of different types, and a target knowledge source corresponding to the data to be processed can be screened out from the heterogeneous knowledge sources. That is, the above-mentioned screening of the target knowledge source corresponding to the data to be processed from the multiple knowledge sources can include the following steps:

[0085] Identify the data type of the data to be processed;

[0086] According to the data type, the target knowledge source corresponding to the data to be processed is screened out from the heterogeneous knowledge sources.

[0087] Specifically, heterogeneous knowledge sources refer to different types of knowledge sources. Heterogeneous knowledge sources can provide diverse information and perspectives for integrating and expanding knowledge. Different types of knowledge sources can be knowledge sources in different fields or have different information formats. For example, heterogeneous knowledge sources can include knowledge sources in the general knowledge field, knowledge sources in the medical field, etc., and can also include knowledge sources with information formats in tabular format, knowledge sources in Wikidata format, etc.

[0088] It should be noted that the data type of the data to be processed can be divided according to the field to which the data to be processed belongs, or according to the data format of the data to be processed. There are many ways to identify the data type of the data to be processed, and the specific selection is made according to the actual situation. The embodiments of this specification do not impose any restrictions on this. In one possible implementation of this specification, the data to be processed can be matched with pre-set type classification keywords, and the data type of the data to be processed is determined based on the matching results. In another possible implementation of this specification, the data to be processed can be input into a pre-set data type recognition model to determine the data type of the data to be processed, wherein the data type recognition model is trained based on multiple training data and the data type labels corresponding to each training data.

[0089] Furthermore, after identifying the data type of the data to be processed, the data type of the data to be processed can be compared with the knowledge source type of each knowledge source in the heterogeneous knowledge source, and a target knowledge source with the same knowledge source type as the data type can be screened out from the heterogeneous knowledge source.

[0090] Using the solutions of the embodiments of this specification, the data type of the data to be processed is identified; based on the data type, a target knowledge source corresponding to the data to be processed is screened from heterogeneous knowledge sources. Because heterogeneous knowledge sources include different types of knowledge sources that can provide diverse information and perspectives, the accuracy of the target knowledge source is ensured by screening the target knowledge source from the heterogeneous knowledge sources based on the data type of the data to be processed.

[0091] Step 306: Extract target task reasoning information from the target knowledge source based on the initial task reasoning information.

[0092] In one or more embodiments of the present specification, after obtaining the data to be processed, determining the initial task reasoning information corresponding to the data to be processed, and screening out the target knowledge source corresponding to the data to be processed from multiple knowledge sources, further, target task reasoning information can be extracted from the target knowledge source based on the initial task reasoning information.

[0093] It should be noted that while initial task reasoning information can guide the processing of the data to be processed, it is not necessarily true and accurate task reasoning information. Therefore, target task reasoning information can be extracted from a target knowledge source containing factual knowledge based on the initial task reasoning information. Target task reasoning information can be understood as external supporting information for the task processing process. It is used to accurately guide the processing of the data to be processed. Since the target task reasoning information comes from the target knowledge source, it is true and factual task reasoning information.

[0094] In practical applications, there are multiple ways to extract target task reasoning information from the target knowledge source based on the initial task reasoning information. The specific method to be selected depends on the actual situation, and the embodiments of this specification do not impose any restrictions on this. In one possible implementation of this specification, the similarity between each task reasoning information in the target knowledge source and the initial task reasoning information can be calculated, and the task reasoning information in the target knowledge source that has a high similarity with the initial task reasoning information is used as the target task reasoning information.

[0095] In another possible implementation of this specification, the target query generation model may be used to extract target task reasoning information from the target knowledge source. That is, the above-mentioned extraction of target task reasoning information from the target knowledge source based on the initial task reasoning information may include the following steps:

[0096] Determine the target query generation model corresponding to the target knowledge source;

[0097] Input the initial task reasoning information into the target query generation model to obtain the initial query statement;

[0098] According to the initial query statement, the target task reasoning information is extracted from the target knowledge source.

[0099] Specifically, the query generation model, referred to as an adaptive query generator (AQG), is used to generate initial query statements corresponding to the initial task reasoning information. The initial query statements are used to query factual knowledge in the target knowledge source and extract the target task reasoning information from the target knowledge source. The target query generation model is the query generation model corresponding to the target knowledge source and is trained based on multiple sample data and the sample labels carried by each sample data. The sample labels have the same format as the query statements corresponding to the target knowledge source.

[0100] It should be noted that one knowledge source corresponds to one query generation model, and for the first query generation model, the sample labels used to train the first query generation model are the same as the query statement format of the knowledge source corresponding to the query generation model, wherein the first query generation model is any query model. The statement format of the initial query statement is determined based on the information format corresponding to the target knowledge source. For example, assuming that the information format corresponding to the target knowledge source is a table format, the statement format of the initial query statement is Structured Query Language (SQL); if the information format corresponding to the target knowledge source is a Wikidata format, the statement format of the initial query statement is SPARQL (SPARQL Protocol And RDF Query Language); if the information format corresponding to the target knowledge source is a Medical Flashcard, the statement format of the initial query statement is a natural sentence.

[0101] In actual applications, there are many ways to determine the target query generation model corresponding to the target knowledge source, and the specific selection is based on the actual situation. The embodiments of this specification do not impose any restrictions on this. In one possible implementation of this specification, the target knowledge source can be fed back to the user, and the identifier of the target query generation model corresponding to the target knowledge source sent by the user is received, and the target query generation model corresponding to the target knowledge source is determined based on the identifier of the target query generation model. In another possible implementation of this specification, the target query generation model corresponding to the target knowledge source can be determined based on the knowledge source type of the target knowledge source.

[0102] Furthermore, after determining the target query generation model corresponding to the target knowledge source, the initial task reasoning information can be input into the target query generation model to obtain an initial query statement. Further, the initial query statement can be executed, and the query results obtained by querying the target knowledge source based on the initial query statement can be parsed to determine the target task reasoning information.

[0103] Using the solutions of the embodiments of this specification, a target query generation model corresponding to a target knowledge source is determined; initial task reasoning information is input into the target query generation model to obtain an initial query statement; and based on the initial query statement, target task reasoning information is extracted from the target knowledge source. By utilizing the target query generation model for knowledge adaptation, the ability to find the most appropriate knowledge from the target knowledge source to process the data to be processed is further enhanced.

[0104] In an optional embodiment of the present specification, the above-mentioned determination of the target query generation model corresponding to the target knowledge source may include the following steps:

[0105] Acquire the knowledge source type of the target knowledge source;

[0106] According to the type of knowledge source, a target query generation model is selected from multiple pre-trained query generation models.

[0107] Specifically, knowledge source types can be divided based on the domain to which the knowledge source corresponds, or based on the information format within the knowledge source. These types include, but are not limited to, general knowledge sources, medical knowledge sources, tabular knowledge sources, and Wikidata-based knowledge sources.

[0108] In actual applications, there are many ways to obtain the knowledge source type of the target knowledge source, which can be selected based on actual conditions. This specification does not impose any restrictions on this. In one possible implementation of this specification, the target knowledge source can be fed back to the user, and the knowledge source type of the target knowledge source sent by the user can be received. In another possible implementation of this specification, a knowledge source type recognition model can be used to identify the knowledge source type of the target knowledge source, wherein the knowledge source type recognition model is trained based on multiple training data and knowledge source type labels corresponding to each training data.

[0109] It should be noted that after obtaining the knowledge source type of the target knowledge source, the knowledge source type of the target knowledge source can be matched with the type of knowledge source corresponding to each query generation model, and the target query generation model can be screened out from the pre-trained multiple query generation models based on the matching results, wherein the knowledge source corresponding to the target query generation model is the same as the target knowledge source.

[0110] By applying the solution of the embodiment of this specification, the knowledge source type of the target knowledge source is obtained; according to the knowledge source type, the target query generation model is screened out from multiple pre-trained query generation models, thereby ensuring the accuracy of the target query generation model.

[0111] In an optional embodiment of the present specification, before inputting the initial task reasoning information into the target query generation model to obtain the initial query statement, the following steps may also be included:

[0112] Obtaining a sample set, wherein the sample set includes a plurality of sample data, the sample data carries a sample label, and the sample label has the same format as the query statement corresponding to the target knowledge source;

[0113] Extracting first sample data from the sample set, wherein the first sample data is any one of the plurality of sample data;

[0114] Inputting the first sample data into the basic query model to obtain a first predicted query statement;

[0115] According to the first predicted query statement and the first sample label carried by the first sample data, parameters of the basic query model are adjusted to obtain a target query generation model.

[0116] Specifically, the base query model is a large model, such as the LLaMA model. The target query generation model is trained using supervised training, meaning that each sample in the sample set carries a true sample label. The sample label serves as the generation target for the base query model, guiding the parameter adjustment process of the base query model.

[0117] It should be noted that there are multiple ways to obtain a sample set, and the specific method to be selected depends on the actual situation. The embodiments of this specification do not impose any restrictions on this. In one possible implementation of this specification, multiple sample data corresponding to the target knowledge source and sample query statement labels corresponding to each sample data can be read from other data acquisition devices or databases to form a sample set. In another possible implementation of this specification, multiple sample data can be obtained, and sample query statements corresponding to each sample data can be generated according to the query statement format corresponding to the target knowledge source, and a sample set can be constructed based on the multiple sample data and the sample query statements corresponding to each sample data.

[0118] In practical applications, when adjusting the parameters of the basic query model based on the first predicted query statement and the first sample label carried by the first sample data, a first loss value can be calculated based on the first predicted query statement and the first sample label, the model parameters of the basic query model can be adjusted based on the first loss value, and the step of extracting the first sample data from the sample set is returned to be executed until the first preset stopping condition is reached, thereby obtaining the target query generation model. Specifically, the first loss value can be calculated using the log-likelihood function, that is, the first loss value can be calculated using the following formula (1):

[0119]

[0120] Among them, logp(x) represents the first loss value, ∏ is the operator symbol of the multiplication of each item, 1(x i ) represents the first predicted query statement x i Whether it appears in the first sample label, if it appears, it is 1, if it does not appear, it is 0. i |x <i ) represents a given x i The previous token generates x i probability.

[0121] In one possible implementation of this specification, the first preset stopping condition includes the first loss value being less than or equal to a first preset threshold. After calculating the first loss value based on the first predicted query statement and the first sample label, the first loss value is compared with the first preset threshold.

[0122] Specifically, if the first loss value is greater than the first preset threshold, it means that the difference between the first predicted query statement and the first sample label is large, and the basic query model has poor prediction ability for the first sample data. At this time, the model parameters of the basic query model can be adjusted, and the step of extracting the first sample data from the sample set can be returned to, and the parameters of the basic query model can be continued to be adjusted until the first loss value is less than or equal to the first preset threshold, indicating that the difference between the first predicted query statement and the first sample label is small, and the first preset stop condition is reached, and the target query generation model that has completed training is obtained.

[0123] In another possible implementation of the present specification, in addition to comparing the first loss value and the first preset threshold, the number of iterations may be combined to determine whether the parameter adjustment of the current basic query model is complete.

[0124] Specifically, if the first loss value is greater than the first preset threshold, the model parameters of the basic query model are adjusted, and the step of extracting the first sample data from the sample set is returned to execute, and the parameters of the basic query model are continued to be adjusted until the first preset number of iterations is reached, and the iteration is stopped to obtain a target query generation model that has completed training. The first preset threshold and the first preset number of iterations are selected according to actual conditions, and the embodiments of this specification do not impose any restrictions on this.

[0125] Using the solution of the embodiments of this specification, a first loss value is calculated based on the first predicted query statement and the first sample label. The first loss value is compared with a first preset stopping condition. If the first preset stopping condition is not met, the parameters of the base query model are continuously adjusted until the first preset stopping condition is met, completing the training and obtaining the target query generation model. By continuously adjusting the model parameters of the base query model, the resulting target query generation model can be made more accurate.

[0126] In an optional embodiment of the present specification, the obtaining of the sample set may include the following steps:

[0127] Get multiple sample data;

[0128] For any sample data, generate a first sample query statement corresponding to the sample data according to the query statement format corresponding to the target knowledge source;

[0129] A sample set is constructed according to the plurality of sample data and the first sample query statements corresponding to the plurality of sample data.

[0130] It should be noted that when generating the first sample query statement corresponding to the sample data according to the query statement format corresponding to the target knowledge source, an accurate first sample query statement can be generated using a query statement generator, or an accurate first sample query statement can be generated using a query statement generation model.

[0131] In actual applications, when constructing a sample set based on multiple sample data and the first sample query statements corresponding to the multiple sample data, for any sample data, the first sample query statement corresponding to the sample data can be used as the sample label of the sample data, thereby constructing a sample set based on the multiple sample data and the sample labels carried by each sample data.

[0132] By applying the solution of the embodiments of this specification, multiple sample data are obtained; for any sample data, a first sample query statement corresponding to the sample data is generated according to the query statement format corresponding to the target knowledge source; a sample set is constructed based on the multiple sample data and the first sample query statements corresponding to each of the multiple sample data, thereby ensuring the accuracy of the sample labels and further ensuring the accuracy of the target query generation model.

[0133] In another optional embodiment of the present specification, after generating the first sample query statement corresponding to the sample data according to the query statement format corresponding to the target knowledge source, the following steps may also be included:

[0134] Obtaining a second sample query statement corresponding to the first sample query statement, wherein the second sample query statement is obtained by adjusting the first sample query statement;

[0135] Constructing a sample set according to a plurality of sample data and first sample query statements corresponding to the plurality of sample data may include the following steps:

[0136] A sample set is constructed according to the plurality of sample data and the first sample query statements and the second sample query statements corresponding to the plurality of sample data.

[0137] It should be noted that, to further improve the accuracy of the target query generation model, in the embodiments of this specification, a sample set can be constructed using a comparison instruction fine-tuning approach. That is, after obtaining an accurate first sample query, the first sample query can be adjusted to generate an incorrect second sample query. This allows both the correct first sample query and the incorrect second sample query to serve as sample labels, and a sample set can be constructed based on the sample labels and sample data.

[0138] In practical applications, there are multiple ways to obtain a second sample query statement corresponding to a first sample query statement, and the specific method to be used depends on the actual situation. This specification does not impose any restrictions on this. In one possible implementation of this specification, the first sample query statement can be fed back to the user, and a second sample query statement input by the user can be received. In another possible implementation of this specification, the query keywords in the first sample query statement can be directly deleted, replaced, or added to generate a second sample query statement.

[0139] By applying the solution of the embodiment of this specification, a second sample query statement corresponding to the first sample query statement is obtained, wherein the second sample query statement is obtained by adjusting the first sample query statement; a sample set is constructed based on multiple sample data and the first sample query statements and the second sample query statements corresponding to each of the multiple sample data, and the accuracy of the target query generation model is further improved by fine-tuning the comparison instructions.

[0140] Step 308: Input the data to be processed and the target task reasoning information into the task processing model to obtain the task processing result, wherein the task processing model is a deep learning model.

[0141] In one or more embodiments of the present specification, data to be processed is obtained; initial task reasoning information corresponding to the data to be processed is determined, and a target knowledge source corresponding to the data to be processed is screened out from multiple knowledge sources; after target task reasoning information is extracted from the target knowledge source based on the initial task reasoning information, the data to be processed and the target task reasoning information can be further input into a task processing model to obtain a task processing result.

[0142] By applying the solution of the embodiments of this specification, the authenticity and accuracy of the content generated by the task processing model are improved by screening out target knowledge sources with a high degree of match with the data to be processed from multiple knowledge sources, and further combining the data to be processed with the factual target task reasoning information from the target knowledge source.

[0143] In an optional embodiment of the present specification, before inputting the to-be-processed data and the target task reasoning information into the task processing model and obtaining the task processing result, the following steps may be further included:

[0144] Get the processing format of the task processing model;

[0145] Performing format conversion on the target task reasoning information according to the processing format to obtain the target task reasoning information after format conversion;

[0146] Inputting the data to be processed and the target task reasoning information into the task processing model to obtain the task processing results may include the following steps:

[0147] The data to be processed and the target task reasoning information after format conversion are input into the task processing model to obtain the task processing results.

[0148] It should be noted that the processing format of the task processing model includes but is not limited to text format, image format, etc. If the information format of the target task reasoning information is different from the processing format of the task processing model, it means that the task processing model cannot process the target task reasoning information. In this case, the target task reasoning information can be format-converted according to the processing format to obtain the target task reasoning information after format conversion, wherein the task processing model can process the target task reasoning information after format conversion; if the information format of the target task reasoning information is the same as the processing format of the task processing model, it means that the task processing model can process the target task reasoning information. In this case, there is no need to format-convert the target task reasoning information according to the processing format. The data to be processed and the target task reasoning information can be directly input into the task processing model to obtain the task processing result. Similarly, in the case where the data format of the data to be processed is different from the processing format of the task processing model, the data to be processed can also be format-converted according to the processing format to obtain the data to be processed after format conversion.

[0149] Applying the solution of the embodiments of this specification, the processing format of the task processing model is obtained; according to the processing format, the target task reasoning information is format-converted to obtain the target task reasoning information after the format conversion; the data to be processed and the format-converted target task reasoning information are input into the task processing model to obtain the task processing result. This ensures that the task processing model can successfully perform task processing.

[0150] In an optional embodiment of the present specification, after inputting the to-be-processed data and the target task reasoning information into the task processing model and obtaining the task processing result, the following steps may be further included:

[0151] According to the display requirement information, the task processing result is sent to the client so that the client can display the task processing result to the user.

[0152] It should be noted that display requirement information represents a user's need to view task processing results. This includes, but is not limited to, displaying only task processing results, displaying task processing results and corresponding target task reasoning information, or displaying task processing results and target knowledge sources. This information is configured based on the user's actual needs and is not limited in this specification.

[0153] By applying the solution of the embodiment of this specification, the task processing result is sent to the client according to the display requirement information, so that the client can display the task processing result to the user, thereby increasing the interaction with the user and improving user satisfaction.

[0154] In an optional embodiment of the present specification, after sending the task processing result to the client according to the display requirement information, the following steps may also be included:

[0155] Receive adjustment sample data sent by the user based on the task processing result, and adjust the model parameters of the target query generation model according to the adjustment sample data.

[0156] It should be noted that after receiving the task processing results, if the user is dissatisfied with them, they can send adjustment sample data based on the task processing results to retrain the target query generation model and perform secondary task processing. The implementation method of "adjusting the model parameters of the target query generation model based on the adjustment sample data" is the same as the implementation method of training the target query generation model described above, and will not be further described in this embodiment of the specification.

[0157] By applying the solution of the embodiment of this specification, adjustment sample data sent by the user based on the task processing result is received, and the model parameters of the target query generation model are adjusted according to the adjustment sample data, the interaction with the user is increased and the user satisfaction is improved.

[0158] It is worth noting that the task processing method provided in the embodiments of this specification can be applied to a variety of scenarios, including but not limited to general knowledge question-and-answer scenarios, medical knowledge question-and-answer scenarios, and product search question-and-answer scenarios in e-commerce. Taking the product search question-and-answer scenario in e-commerce as an example, large models are widely used in e-commerce scenarios. For example, in e-commerce scenarios, a conversational robot is built based on the generation capability of a large model to answer users' questions. The model that has been adapted through the use of multiple knowledge sources can provide more accurate answers to questions. For example, if a user asks about a specific product, without the intervention of an external knowledge source, the large model cannot answer it relying solely on internal knowledge. Therefore, external knowledge can be used to make the content generated by the large model more factually correct.

[0159] The following combined Figure 4 , taking the application of the task processing method provided in this specification in the intelligent question-answering scenario as an example, the task processing method is further explained. Figure 4 A flowchart of an automatic question-answering method provided by an embodiment of this specification is shown, which specifically includes the following steps:

[0160] Step 402: Obtain questions to be answered.

[0161] Step 404: Determine initial answer reasoning information corresponding to the problem to be answered, and select a target knowledge source corresponding to the problem to be answered from multiple knowledge sources, wherein the knowledge source includes multiple answer reasoning information.

[0162] Step 406: Extract target answer reasoning information from the target knowledge source based on the initial answer reasoning information.

[0163] Step 408: Input the question to be answered and the target answer reasoning information into the task processing model to obtain the question answer result, wherein the task processing model is a deep learning model.

[0164] It should be noted that the implementation of step 402 to step 408 is the same as the implementation of step 302 to step 308 described above, and will not be described in detail in this embodiment of the specification.

[0165] For example, assuming that the question to be answered is "When is the birthday of Zhang San's wife", first determine the initial answer reasoning information corresponding to the question to be answered as "Zhang San's wife is Li Si, and Li Si's birthday is January 1st", and select the target knowledge source corresponding to the question to be answered from a knowledge source as a local table, and extract the target answer reasoning information from the target knowledge source based on the initial answer reasoning information as "Zhang San's wife is Wang Wu, and Wang Wu's birthday is June 1st", and input the question to be answered and the target answer reasoning information into the task processing model to obtain the question answer result as "June 1st".

[0166] By applying the solution of the embodiments of this specification, the authenticity and accuracy of the question answering results generated by the task processing model are improved by screening out target knowledge sources with a high degree of match with the question to be answered from multiple knowledge sources, and further combining the question to be answered with the factual target task reasoning information from the target knowledge source.

[0167] See also Figure 5 , Figure 5 A flowchart of a task processing method provided by an embodiment of this specification is shown, which specifically includes the following steps:

[0168] Step 502: Obtain data to be processed.

[0169] Step 504: Determine the initial task reasoning information corresponding to the data to be processed, and select the target knowledge source corresponding to the data to be processed from the heterogeneous knowledge source, wherein the heterogeneous knowledge source includes multiple different types of knowledge sources, and the knowledge source includes multiple task reasoning information.

[0170] Step 506: Filter out a target query generation model corresponding to the target knowledge source from multiple pre-trained query generation models, wherein the target query generation model is trained based on multiple sample data and sample labels carried by the sample data, and the sample labels have the same format as the query statement corresponding to the target knowledge source.

[0171] Step 508: Input the initial task reasoning information into the target query generation model to obtain an initial query statement.

[0172] Step 510: Extract target task reasoning information from the target knowledge source according to the initial query statement.

[0173] Step 512: Input the data to be processed and the target task reasoning information into the task processing model to obtain the task processing result, wherein the task processing model is a deep learning model.

[0174] It should be noted that the implementation of steps 502 to 512 is the same as the implementation of steps 302 to 308 described above, and will not be described in detail in this embodiment of the specification.

[0175] By applying the solutions of the embodiments of this specification, by utilizing heterogeneous knowledge sources, the task processing model automatically selects the knowledge source that best answers the question. Furthermore, the query generation model further enhances the ability to find the most appropriate knowledge from the selected knowledge source, thereby further enhancing the accuracy of the model's data processing.

[0176] See also Figure 6 , Figure 6 The flowchart of another task processing method provided by an embodiment of this specification is shown. In order to integrate the knowledge of heterogeneous knowledge sources to improve the factual accuracy of the task processing model, this embodiment of the specification proposes a knowledge adaptation framework. By integrating factual information from heterogeneous knowledge sources, the factual accuracy of the content generated by the large model is improved and the fictitious content is reduced. In addition, the knowledge adaptation framework also utilizes structured knowledge sources (such as Wikipedia data, tables, etc.) to provide more reliable factual information. Figure 6 As shown, the knowledge adaptation framework includes three stages: reasoning preparation, knowledge adaptation, and answer integration. At the same time, the embodiments of this specification also propose a customized adaptive query generator for the knowledge adaptation stage. The adaptive query generator combines a contrastive fine-tuning learning method to generate query statements for effective knowledge source queries. The adaptive query generator supports multiple query languages, such as query languages ​​and data acquisition protocols, natural statements, and structured query languages.

[0177] Reasoning preparation phase: Given a problem, the KA framework first generates reasoning, obtains the necessary reasoning steps, and screens knowledge sources, identifying relevant knowledge sources from multiple knowledge sources (such as knowledge source 1, knowledge source 2, and knowledge source 3), that is, obtaining the data to be processed; determines the initial task reasoning information corresponding to the data to be processed, and screens the target knowledge source corresponding to the data to be processed from the heterogeneous knowledge sources. Then enters the knowledge adaptation phase;

[0178] Knowledge adaptation stage: In this stage, each reasoning step in the reasoning path is input into an adaptive query generator specifically trained for the selected knowledge source to generate queries and obtain an initial query statement. After obtaining the initial query statement, the query results of the statement are executed and parsed to obtain external support information for the final answer integration, that is, to determine the target query generation model corresponding to the target knowledge source; the initial task reasoning information is input into the target query generation model to obtain the initial query statement; based on the initial query statement, the target task reasoning information is extracted from the target knowledge source (knowledge source 1). Then enter the answer integration stage;

[0179] Answer integration stage: Based on the external support information obtained in the knowledge adaptation stage, the large model generates the final answer, that is, the data to be processed and the target task reasoning information are input into the task processing model to obtain the task processing result, among which the task processing model is a deep learning model.

[0180] Overall, the knowledge adaptation framework effectively enhances the large model's use of diverse knowledge sources, thereby improving the factual accuracy of its generated content. Experimental results show that the knowledge adaptation framework improves the accuracy of the large model and reduces hallucinations on knowledge-intensive tasks, achieving an average improvement of 5.9% across four datasets.

[0181] In practical applications, the embodiments of this specification prove the effectiveness of the knowledge adaptation framework (KA, Knowledge Adapting) through a large number of experiments. Among them, experiments were conducted on data sets that require different knowledge fields, including common sense fields (such as FEVER, AdveHotpotQA), medical fields (MedMCQA) and other specific fields (FeTaQA), where the knowledge sources include but are not limited to open domain question answering systems (DrQA) and keyword (Auto) data. In addition, one-shot and six-shot learning methods were used to compare with standard prompts (Standard, Standard prompting), chain of thought prompts (CoT, Chain-of-Thought prompting), self-consistent chain of thought prompts (CoT-SC, CoT with self-consistency) and verification and editing (VE, Verify-and-Edit), and evaluated from the dimensions of accuracy (Acc, Accuracy), exact match index (EM, Exact Match), and bilingual evaluation substitute (BLEU, Bilingual Evaluation Understudy). The results are shown in the experimental results table below Table 1:

[0182] Table 1 Experimental results

[0183]

[0184]

[0185] As can be seen from Table 1, under two settings, single and five example inputs, the knowledge adaptation framework proposed in the embodiments of this specification has a continuous improvement compared with other methods.

[0186] To verify the flexibility and effectiveness of the knowledge adaptation framework, as shown in Table 2 below, which shows the performance results of different query statements, under the same knowledge source, the embodiments of this specification use different query statements to achieve improved results, thus proving that the knowledge adaptation framework can be flexibly applied to various query languages:

[0187] Table 2 Performance results of different query statements

[0188] plan Query statement type Knowledge Source EM CoT × × 20.3 KA DrQA Wikidata 24.3 KA triplet Wikidata 23.7 KA SPARQL Wikidata 26.3

[0189] As shown in Table 3 below, different knowledge sources are used to answer questions in the medical field. Table 3 shows the performance results of different knowledge sources. As can be seen from Table 3, using the flashcard dataset corresponding to the medical field achieves a greater improvement than using Wikidata, thus demonstrating the importance of automatically selecting knowledge sources in the task processing method proposed in the embodiments of this specification:

[0190] Table 3 Performance results of different knowledge sources

[0191] plan Knowledge Source Acc CoT × 65.5 KA Wikidata 67.5 KA Flashcards 69.7 KA Flashcards + Wikidata 70.2 KA Auto 70.0

[0192] For the adaptive query generator, experiments were conducted using a fine-tuning training method that included both regular instruction fine-tuning and comparative instruction fine-tuning. Table 4 below shows the performance results of different adaptive query generators. On FeTaQA, the chat generator effectively generated instructions for common query languages ​​such as SQL. Comparative instruction fine-tuning achieved even greater improvements on AdvHotpotQA.

[0193] Table 4 Performance results of different adaptive query generators

[0194]

[0195] See also Figure 7 , Figure 7 This diagram illustrates an automated question-and-answer interface provided by one embodiment of this specification. The automated question-and-answer interface is divided into a question-handling request input interface and a question-handling result display interface. The question-handling request input interface includes a request input box, an "OK" control, and a "Cancel" control. The question-handling result display interface includes a result display box.

[0196] The user enters a question processing request in the request input box displayed on the client. The question processing request carries the question to be answered. The user clicks the "OK" control. The server receives the question to be answered sent by the client, determines the initial answer reasoning information corresponding to the question to be answered, and selects the target knowledge source corresponding to the question to be answered from multiple knowledge sources. The knowledge source includes multiple answer reasoning information. Based on the initial answer reasoning information, the target answer reasoning information is extracted from the target knowledge source. The question to be answered and the target answer reasoning information are input into the task processing model to obtain the question answer result, which is then sent to the client. The client displays the question answer result in the result display box.

[0197] In actual applications, users can operate controls by clicking, double-clicking, touching, hovering the mouse, sliding, long pressing, voice control, or shaking, etc. The specific selection is based on the actual situation, and the embodiments of this specification do not impose any restrictions on this.

[0198] Corresponding to the above-mentioned task processing method embodiment, this specification also provides a task processing device embodiment, Figure 8 FIG1 shows a schematic diagram of the structure of a task processing device provided by an embodiment of this specification. Figure 8 As shown, the device includes:

[0199] A first acquisition module 802 is configured to acquire data to be processed;

[0200] A first screening module 804 is configured to determine initial task reasoning information corresponding to the data to be processed, and screen a target knowledge source corresponding to the data to be processed from a plurality of knowledge sources, wherein the knowledge source includes a plurality of task reasoning information;

[0201] A first extraction module 806 is configured to extract target task reasoning information from the target knowledge source based on the initial task reasoning information;

[0202] The first input module 808 is configured to input the data to be processed and the target task reasoning information into the task processing model to obtain the task processing result, wherein the task processing model is a deep learning model.

[0203] Optionally, the first extraction module 806 is further configured to determine a target query generation model corresponding to the target knowledge source; input the initial task reasoning information into the target query generation model to obtain an initial query statement; and extract the target task reasoning information from the target knowledge source based on the initial query statement.

[0204] Optionally, the first extraction module 806 is further configured to obtain a knowledge source type of the target knowledge source; and select a target query generation model from a plurality of pre-trained query generation models according to the knowledge source type.

[0205] Optionally, the device also includes: a training module, configured to obtain a sample set, wherein the sample set includes multiple sample data, the sample data carries a sample label, and the sample label has the same format as the query statement corresponding to the target knowledge source; extracting first sample data from the sample set, wherein the first sample data is any one of the multiple sample data; inputting the first sample data into the basic query model to obtain a first predicted query statement; adjusting the parameters of the basic query model according to the first predicted query statement and the first sample label carried by the first sample data to obtain a target query generation model.

[0206] Optionally, the training module is further configured to obtain multiple sample data; for any sample data, generate a first sample query statement corresponding to the sample data according to the query statement format corresponding to the target knowledge source; and construct a sample set based on the multiple sample data and the first sample query statements corresponding to each of the multiple sample data.

[0207] Optionally, the training module is further configured to obtain a second sample query statement corresponding to the first sample query statement, wherein the second sample query statement is obtained by adjusting the first sample query statement; and construct a sample set based on multiple sample data and the first sample query statements and the second sample query statements corresponding to each of the multiple sample data.

[0208] Optionally, the first screening module 804 is further configured to input the data to be processed into the task processing model to obtain initial task reasoning information corresponding to the data to be processed.

[0209] Optionally, the multiple knowledge sources are heterogeneous knowledge sources of different types; the first screening module 804 is further configured to identify the data type of the data to be processed; and screen out the target knowledge source corresponding to the data to be processed from the heterogeneous knowledge sources according to the data type.

[0210] Optionally, the device also includes: a conversion module, configured to obtain the processing format of the task processing model; according to the processing format, the target task reasoning information is format converted to obtain the target task reasoning information after format conversion; the first input module 808 is further configured to input the data to be processed and the target task reasoning information after format conversion into the task processing model to obtain the task processing result.

[0211] Optionally, the device further includes: a sending module configured to send the task processing result to the client according to the display requirement information, so that the client displays the task processing result to the user.

[0212] Optionally, the device further includes: an adjustment module configured to receive adjustment sample data sent by the user based on the task processing result, and adjust model parameters of the target query generation model according to the adjustment sample data.

[0213] By applying the solution of the embodiments of this specification, the authenticity and accuracy of the content generated by the task processing model are improved by screening out target knowledge sources with a high degree of match with the data to be processed from multiple knowledge sources, and further combining the data to be processed with the factual target task reasoning information from the target knowledge source.

[0214] The above is a schematic scheme of a task processing device of this embodiment. It should be noted that the technical scheme of the task processing device and the technical scheme of the task processing method described above are of the same concept. For details not described in detail in the technical scheme of the task processing device, please refer to the description of the technical scheme of the task processing method described above.

[0215] Corresponding to the above-mentioned automatic question-answering method embodiment, this specification also provides an automatic question-answering device embodiment, Figure 9 FIG1 shows a schematic diagram of the structure of an automatic question-answering device provided by an embodiment of this specification. Figure 9 As shown, the device includes:

[0216] The second acquisition module 902 is configured to acquire a question to be answered;

[0217] The second screening module 904 is configured to determine initial answer reasoning information corresponding to the question to be answered, and screen a target knowledge source corresponding to the question to be answered from a plurality of knowledge sources, wherein the knowledge source includes a plurality of answer reasoning information;

[0218] The second extraction module 906 is configured to extract target solution reasoning information from the target knowledge source based on the initial solution reasoning information;

[0219] The second input module 908 is configured to input the question to be answered and the target answer reasoning information into the task processing model to obtain the question answer result, wherein the task processing model is a deep learning model.

[0220] By applying the solution of the embodiments of this specification, the authenticity and accuracy of the question answering results generated by the task processing model are improved by screening out target knowledge sources with a high degree of match with the question to be answered from multiple knowledge sources, and further combining the question to be answered with the factual target task reasoning information from the target knowledge source.

[0221] The above is a schematic diagram of an automatic question-answering device according to this embodiment. It should be noted that the technical solution of this automatic question-answering device and the technical solution of the automatic question-answering method described above are based on the same concept. For details not described in detail in the technical solution of the automatic question-answering device, please refer to the description of the technical solution of the automatic question-answering method described above.

[0222] Figure 101000 is a block diagram of a computing device according to an embodiment of the present disclosure. Components of the computing device 1000 include, but are not limited to, a memory 1010 and a processor 1020. The processor 1020 is connected to the memory 1010 via a bus 1030, and a database 1050 is used to store data.

[0223] The computing device 1000 also includes an access device 1040 that enables the computing device 1000 to communicate via one or more networks 1060. Examples of such networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 1040 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0224] In one embodiment of the present specification, the above components of the computing device 1000 and Figure 10 Other components not shown in the figure may also be connected to each other, for example, via a bus. Figure 10 The computing device structure block diagram shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art may add or replace other components as needed.

[0225] Computing device 1000 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, personal digital assistant, laptop computer, notebook computer, netbook computer, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smartwatch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or personal computer (PC). Computing device 1000 may also be a mobile or stationary server.

[0226] The processor 1020 is configured to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the above-mentioned task processing method or automatic question-answering method.

[0227] The above is a schematic diagram of a computing device according to this embodiment. It should be noted that the technical solution of this computing device is based on the same concept as the technical solutions of the task processing method and the automatic question-answering method described above. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solutions of the task processing method or the automatic question-answering method described above.

[0228] An embodiment of the present specification further provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned task processing method or automatic question-answering method.

[0229] The above is a schematic diagram of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium is based on the same concept as the technical solutions of the task processing method and the automatic question-answering method described above. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solutions of the task processing method or the automatic question-answering method described above.

[0230] An embodiment of the present specification further provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned task processing method or automatic question-answering method.

[0231] The above is a schematic diagram of a computer program according to this embodiment. It should be noted that the technical solution of this computer program is based on the same concept as the technical solutions of the task processing method and the automatic question-answering method described above. For details not described in detail in the technical solution of the computer program, please refer to the description of the technical solutions of the task processing method or the automatic question-answering method described above.

[0232] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0233] The computer instructions include computer program code, which may be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media does not include electric carrier signals and telecommunication signals.

[0234] It should be noted that for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

[0235] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0236] The preferred embodiments disclosed above are intended only to help illustrate this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made based on the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that those skilled in the art can better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. A task processing method, comprising: Get the data to be processed; Determine initial task reasoning information corresponding to the data to be processed, and select a target knowledge source corresponding to the data to be processed from a plurality of knowledge sources, wherein the knowledge source includes a plurality of task reasoning information; Extracting target task reasoning information from the target knowledge source according to the initial task reasoning information; The data to be processed and the target task reasoning information are input into a task processing model to obtain a task processing result, wherein the task processing model is a deep learning model.

2. According to the method of claim 1, extracting target task reasoning information from the target knowledge source according to the initial task reasoning information comprises: Determine a target query generation model corresponding to the target knowledge source; Inputting the initial task reasoning information into the target query generation model to obtain an initial query statement; According to the initial query statement, target task reasoning information is extracted from the target knowledge source.

3. According to the method of claim 2, the step of determining the target query generation model corresponding to the target knowledge source comprises: Acquire the knowledge source type of the target knowledge source; The target query generation model is selected from a plurality of pre-trained query generation models according to the type of the knowledge source.

4. The method according to claim 2, before inputting the initial task reasoning information into the target query generation model to obtain the initial query statement, further comprises: Acquire a sample set, wherein the sample set includes a plurality of sample data, the sample data carries a sample label, and the sample label has the same format as the query statement corresponding to the target knowledge source; Extracting first sample data from the sample set, wherein the first sample data is any one of the multiple sample data; Inputting the first sample data into a basic query model to obtain a first prediction query statement; According to the first prediction query statement and the first sample label carried by the first sample data, parameters of the basic query model are adjusted to obtain a target query generation model.

5. The method according to claim 4, wherein obtaining the sample set comprises: Get multiple sample data; For any sample data, generating a first sample query statement corresponding to the sample data according to the query statement format corresponding to the target knowledge source; A sample set is constructed according to the plurality of sample data and first sample query statements respectively corresponding to the plurality of sample data.

6. The method according to claim 5, after generating the first sample query statement corresponding to the sample data according to the query statement format corresponding to the target knowledge source, further comprising: Obtaining a second sample query statement corresponding to the first sample query statement, wherein the second sample query statement is obtained by adjusting the first sample query statement; The step of constructing a sample set according to the plurality of sample data and first sample query statements respectively corresponding to the plurality of sample data includes: A sample set is constructed according to the plurality of sample data, and the first sample query statements and the second sample query statements respectively corresponding to the plurality of sample data.

7. According to the method of claim 1, the determining of the initial task reasoning information corresponding to the data to be processed comprises: The data to be processed is input into a task processing model to obtain initial task reasoning information corresponding to the data to be processed.

8. The method according to claim 1, wherein the plurality of knowledge sources are heterogeneous knowledge sources of different types; The step of selecting a target knowledge source corresponding to the data to be processed from a plurality of knowledge sources includes: Identify the data type of the data to be processed; According to the data type, a target knowledge source corresponding to the data to be processed is screened out from heterogeneous knowledge sources.

9. The method according to claim 1, before inputting the data to be processed and the target task reasoning information into the task processing model to obtain the task processing result, further comprises: Acquiring a processing format of the task processing model; According to the processing format, the target task reasoning information is format-converted to obtain the target task reasoning information after format conversion; The step of inputting the data to be processed and the target task reasoning information into a task processing model to obtain a task processing result includes: The data to be processed and the target task reasoning information after the format conversion are input into a task processing model to obtain a task processing result.

10. The method according to claim 1, after inputting the data to be processed and the target task reasoning information into the task processing model and obtaining the task processing result, further comprises: The task processing result is sent to the client according to the display requirement information, so that the client displays the task processing result to the user.

11. The method according to claim 10, after sending the task processing result to the client according to the display requirement information, further comprising: Receive adjustment sample data sent by the user based on the task processing result, and adjust model parameters of the target query generation model according to the adjustment sample data.

12. An automatic question-answering method, comprising: Get questions to be answered; Determine initial answer reasoning information corresponding to the problem to be answered, and select a target knowledge source corresponding to the problem to be answered from multiple knowledge sources, wherein the knowledge source includes multiple answer reasoning information; extracting target solution reasoning information from the target knowledge source according to the initial solution reasoning information; The question to be answered and the target answer reasoning information are input into a task processing model to obtain a question answer result, wherein the task processing model is a deep learning model.

13. A computing device comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method described in any one of claims 1 to 11 or claim 12 are implemented.

14. A computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the method described in any one of claims 1 to 11 or claim 12.