Information processing method and device, computer readable storage medium and electronic equipment
By using a target neural network model to adjust the vector output by the embedding representation model in a question-answering scenario, the problem of low vector accuracy caused by the inability to fine-tune the general embedding representation model is solved, thereby improving the accuracy of domain-specific knowledge question answering.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ALIBABA CLOUD COMPUTING CO LTD
- Filing Date
- 2024-11-05
- Publication Date
- 2026-05-08
AI Technical Summary
In question-answering scenarios, when a general embedding representation model cannot be fine-tuned, the vectors obtained by using a general embedding representation model to process domain-specific knowledge have low accuracy, resulting in low accuracy of domain-specific knowledge question answering.
An embedded representation model is used to perform vector transformation on the target problem. The initial vector is updated by a target neural network model. Knowledge search is performed using reference knowledge in the target knowledge domain to determine the target response information. The target neural network model is trained based on the reference knowledge in the target knowledge domain.
It improves the accuracy of text representation vectors corresponding to target questions, enhances the accuracy of knowledge search, improves the accuracy of domain-specific knowledge question answering, and avoids fine-tuning of the embedded representation model.
Smart Images

Figure CN121996744A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence, and more specifically, to an information processing method, apparatus, computer-readable storage medium, and electronic device. Background Technology
[0002] In recent years, with the continuous evolution of artificial intelligence technology, the application of intelligent question answering technology has become extremely popular. A typical scenario for intelligent question answering is domain-specific knowledge question answering. This involves building an intelligent question answering system that can understand the proprietary knowledge of an enterprise or organization within its specialized domain and answer related questions. In this scenario, when the intelligent question answering system receives a user's question, it first uses an embedding model to understand and represent the user's question text, converting it into a digital vector that a computer can understand and compute. Then, based on this digital vector and the proprietary knowledge of the specialized domain, it provides an answer to the user's question.
[0003] Currently, related technologies typically employ general embedding representation models trained on publicly available data. However, for the users of these models (such as the management organizations of intelligent question-answering systems), these embedding representation models are usually black boxes. Users cannot access the model parameters or fine-tune the model, resulting in low accuracy of the vectors obtained when using general embedding representation models to process domain-specific knowledge, thus leading to the problem of low accuracy in domain-specific knowledge question answering.
[0004] There is currently no effective solution to the above problems. Summary of the Invention
[0005] This application provides an information processing method, apparatus, computer-readable storage medium, and electronic device to at least solve the technical problem that in question-answering scenarios, the accuracy of vectors obtained by using a general embedding representation model to process domain-specific knowledge is low when the general embedding representation model cannot be fine-tuned, thus leading to low accuracy in domain-specific knowledge question answering.
[0006] According to one aspect of the embodiments of this application, an information processing method is provided, comprising: acquiring a target question involving a target knowledge domain; performing vector transformation processing on the target question using an embedded representation model to obtain an initial vector; performing vector update processing on the initial vector using a target neural network model to obtain a target vector, wherein the target neural network model is trained based on reference knowledge in the target knowledge domain; performing knowledge search in the reference knowledge of the target knowledge domain according to the target vector, and determining the target response information corresponding to the target question based on the search results.
[0007] Furthermore, the knowledge search based on the target vector in the reference knowledge of the target knowledge domain includes: obtaining the knowledge vector of the reference knowledge in the target knowledge domain; determining the target reference knowledge from the reference knowledge in the target knowledge domain based on the similarity between the target vector and the knowledge vector; and determining the search results based on the target reference knowledge.
[0008] Furthermore, obtaining the knowledge vector of the reference knowledge in the target knowledge domain includes: performing vector transformation processing on the reference knowledge using an embedded representation model to obtain an initial knowledge vector; and performing vector update processing on the initial knowledge vector through the target neural network model to obtain the final knowledge vector.
[0009] Furthermore, the search results include at least one target reference knowledge. Determining the target response information corresponding to the target question based on the search results includes: inputting the target question and at least one target reference knowledge into a large language model, and determining the target response information corresponding to the target question through the large language model.
[0010] Furthermore, the target neural network model is obtained through the following steps: obtaining an initial training sample set, wherein the initial training samples in the initial training sample set include at least a sample problem in the target knowledge domain, a first sample reference knowledge corresponding to the sample problem, and a second sample reference knowledge. The first sample reference knowledge includes knowledge that can solve the sample problem, while the second sample reference knowledge does not include knowledge that can solve the sample problem. The initial training samples are then processed by vector transformation using an embedding representation model to obtain training samples, and a training sample set is constructed based on the training samples. The initial neural network model is trained based on the training sample set to obtain the target neural network model.
[0011] Furthermore, the initial training samples in the initial training sample set also include third sample reference knowledge corresponding to the sample problem. Here, sample problems other than the sample problem are determined as target sample problems, and the third sample reference knowledge is randomly selected from the first sample reference knowledge and / or the second sample reference knowledge corresponding to the target sample problem.
[0012] Further, training an initial neural network model based on the training sample set to obtain the target neural network model includes: for training samples in the training sample set, updating the vectors corresponding to the sample questions in the training samples using the initial neural network model to obtain a first vector; updating the vectors corresponding to the sample reference knowledge in the training samples using the initial neural network model to obtain a second vector, wherein the sample reference knowledge includes first sample reference knowledge, second sample reference knowledge, and third sample reference knowledge; calculating the loss function value of the initial neural network model based on the similarity between the first vector and the second vector; and optimizing the initial neural network model based on the loss function value, so that the target neural network model is obtained when the loss function value of the optimized initial neural network model is less than a preset threshold.
[0013] Furthermore, the reference knowledge in the target knowledge domain includes: first reference knowledge belonging to the question-answering type and second reference knowledge belonging to the non-question-answering type. Obtaining the initial training sample set includes: identifying the questions in the first reference knowledge as sample questions, and using an embedding representation model to perform vector transformation processing on the sample questions to obtain a third vector; performing knowledge search in the second reference knowledge based on the third vector to obtain multiple target second reference knowledge; and determining the initial training samples based on the first reference knowledge and the multiple target second reference knowledge corresponding to the first reference knowledge to obtain the initial training sample set.
[0014] Further, determining the initial training samples based on the first reference knowledge and the multiple target second reference knowledge corresponding to the first reference knowledge includes: constructing multiple reference knowledge sets based on the multiple target second reference knowledge, wherein the reference knowledge sets include some target second reference knowledge from the multiple target second reference knowledge; inputting the sample question and the reference knowledge sets into a large language model, determining the response information for the sample question through the large language model, and obtaining the first response information corresponding to the reference knowledge set; determining the true response information corresponding to the sample question from the first reference knowledge, and outputting the processing result through the large language model based on the first response information and the true response information, the processing result being used to characterize whether the first response information can solve the sample question; and determining the initial training samples based on the processing results corresponding to the multiple reference knowledge sets.
[0015] Furthermore, constructing multiple reference knowledge sets based on multiple target second reference knowledge includes: inputting the sample problem and multiple target second reference knowledge into a large language model; determining the response information for the sample problem through the large language model to obtain second response information; outputting the target result through the large language model based on the second response information and the actual response information, wherein the target result is one of the following: a first target result representing that the second response information can solve the sample problem; a second target result representing that the second response information cannot solve the sample problem; and constructing multiple reference knowledge sets based on multiple target second reference knowledge when the target result is the first target result.
[0016] Further, the processing result is one of the following: a first processing result indicating that the first response information cannot solve the sample problem, and a second processing result indicating that the first response information can solve the sample problem. Based on the processing results corresponding to multiple reference knowledge sets, the initial training samples are determined as follows: for each reference knowledge set among the multiple reference knowledge sets, the missing target second reference knowledge relative to the multiple target second reference knowledge is determined; if the processing result corresponding to the reference knowledge set is the first processing result, the missing target second reference knowledge is determined as the first sample reference knowledge; if the processing result corresponding to the reference knowledge set is the second processing result, the missing target second reference knowledge is determined as the second sample reference knowledge; the initial training samples are determined based on the sample problem, the first sample reference knowledge, and the second sample reference knowledge.
[0017] According to another aspect of the embodiments of this application, an information processing method is also provided, comprising: acquiring a target question involving a target knowledge domain uploaded by a client; performing vector transformation processing on the target question using an embedded representation model in a cloud server to obtain an initial vector; performing vector update processing on the initial vector using a target neural network model to obtain a target vector; performing knowledge search in the reference knowledge of the target knowledge domain based on the target vector; and determining the target response information corresponding to the target question based on the search results, wherein the target neural network model is trained based on the reference knowledge of the target knowledge domain; and feeding back the target response information to the client.
[0018] According to another aspect of the embodiments of this application, an information processing apparatus is also provided, comprising: a first acquisition unit, configured to acquire a target question in a target knowledge domain; a first processing unit, configured to perform vector transformation processing on the target question using an embedded representation model to obtain an initial vector; a second processing unit, configured to perform vector update processing on the initial vector through a target neural network model to obtain a target vector, wherein the target neural network model is trained based on reference knowledge in the target knowledge domain; and a determination unit, configured to perform knowledge search in the reference knowledge of the target knowledge domain based on the target vector, and determine the target response information corresponding to the target question based on the search results.
[0019] Furthermore, the determining unit also includes: an acquisition subunit for acquiring knowledge vectors of reference knowledge in the target knowledge domain; a first determining subunit for determining target reference knowledge from the reference knowledge in the target knowledge domain based on the similarity between the target vector and the knowledge vector; and a second determining subunit for determining search results based on the target reference knowledge.
[0020] Furthermore, the acquisition sub-unit also includes: a first processing module, used to perform vector transformation processing on the reference knowledge using an embedded representation model to obtain an initial knowledge vector; and a second processing module, used to perform vector update processing on the initial knowledge vector through a target neural network model to obtain a knowledge vector.
[0021] Furthermore, the search results include at least one target reference knowledge, and the determining unit further includes: a third determining subunit, used to input the target question and at least one target reference knowledge into the large language model, and determine the target response information corresponding to the target question through the large language model.
[0022] Furthermore, the information processing device further includes: a second acquisition unit, used to acquire an initial training sample set, wherein the initial training samples in the initial training sample set include at least a sample problem in the target knowledge domain, a first sample reference knowledge corresponding to the sample problem, and a second sample reference knowledge, wherein the first sample reference knowledge includes knowledge capable of solving the sample problem, and the second sample reference knowledge does not include knowledge capable of solving the sample problem; a third processing unit, used to perform vector transformation processing on the initial training samples using an embedded representation model to obtain training samples, and to construct a training sample set based on the training samples; and a fourth processing unit, used to train an initial neural network model based on the training sample set to obtain a target neural network model.
[0023] Furthermore, the initial training samples in the initial training sample set also include third sample reference knowledge corresponding to the sample problem. Here, sample problems other than the sample problem are determined as target sample problems, and the third sample reference knowledge is randomly selected from the first sample reference knowledge and / or the second sample reference knowledge corresponding to the target sample problem.
[0024] Furthermore, the fourth processing unit also includes: a first processing subunit, used to update the vectors corresponding to sample questions in the training samples in the training sample set using the initial neural network model to obtain a first vector; a second processing subunit, used to update the vectors corresponding to sample reference knowledge in the training samples using the initial neural network model to obtain a second vector, wherein the sample reference knowledge includes first sample reference knowledge, second sample reference knowledge, and third sample reference knowledge; a calculation subunit, used to calculate the loss function value of the initial neural network model based on the similarity between the first vector and the second vector; and a third processing subunit, used to optimize the initial neural network model based on the loss function value, so as to obtain the target neural network model when the loss function value of the optimized initial neural network model is less than a preset threshold.
[0025] Furthermore, the reference knowledge in the target knowledge domain includes: first reference knowledge belonging to the question-answering type and second reference knowledge belonging to the non-question-answering type. The second acquisition unit also includes: a fourth processing subunit, used to determine the question in the first reference knowledge as a sample question, and use an embedding representation model to perform vector transformation processing on the sample question to obtain a third vector; a fifth processing subunit, used to perform knowledge search in the second reference knowledge based on the third vector to obtain multiple target second reference knowledge; and a fourth determination subunit, used to determine the initial training samples based on the first reference knowledge and the multiple target second reference knowledge corresponding to the first reference knowledge to obtain an initial training sample set.
[0026] Furthermore, the fourth determining subunit also includes: a third processing module, used to construct multiple reference knowledge sets based on multiple target second reference knowledge, wherein the reference knowledge sets include a portion of the target second reference knowledge from the multiple target second reference knowledge; a first determining module, used to input the sample question and the reference knowledge sets into a large language model, and determine the response information for the sample question through the large language model to obtain the first response information corresponding to the reference knowledge set; a fourth processing module, used to determine the true response information corresponding to the sample question from the first reference knowledge, and output the processing result through the large language model based on the first response information and the true response information, the processing result being used to characterize whether the first response information can solve the sample question; and a second determining module, used to determine the initial training samples based on the processing results corresponding to the multiple reference knowledge sets.
[0027] Furthermore, the third processing module also includes: a first processing submodule, used to input the sample problem and multiple target second reference knowledge into the large language model, and determine the response information for the sample problem through the large language model to obtain the second response information; a second processing submodule, used to output the target result through the large language model based on the second response information and the actual response information, wherein the target result is one of the following: a first target result representing that the second response information can solve the sample problem, and a second target result representing that the second response information cannot solve the sample problem; and a third processing submodule, used to construct multiple reference knowledge sets based on the multiple target second reference knowledge when the target result is the first target result.
[0028] Further, the processing result is one of the following: a first processing result indicating that the first response information cannot solve the sample problem, and a second processing result indicating that the first response information can solve the sample problem. The second determining module further includes: a first determining submodule, used to determine, for a set of reference knowledge in a set of reference knowledge, the target second reference knowledge that is missing from the set of reference knowledge relative to the multiple target second reference knowledge; a second determining submodule, used to determine the missing target second reference knowledge as the first sample reference knowledge when the processing result corresponding to the set of reference knowledge is the first processing result; a third determining submodule, used to determine the missing target second reference knowledge as the second sample reference knowledge when the processing result corresponding to the set of reference knowledge is the second processing result; and a fourth determining submodule, used to determine the initial training sample based on the sample problem, the first sample reference knowledge, and the second sample reference knowledge.
[0029] According to another aspect of the present invention, an electronic device is also provided, comprising: a memory storing an executable program; and a processor for running the program, wherein the program executes the information processing method described above during runtime.
[0030] According to another aspect of the present invention, a computer-readable storage medium is also provided, wherein the storage medium stores a program, wherein the program controls the device where the storage medium is located to execute any of the above-described information processing methods during runtime.
[0031] According to another aspect of the present invention, a computer program product is also provided, including a computer program that, when executed by a processor, implements the information processing method described above.
[0032] In this embodiment, the process involves: acquiring a target question within a target knowledge domain; performing vector transformation on the target question using an embedding representation model to obtain an initial vector; updating the initial vector using a target neural network model to obtain a target vector, wherein the target neural network model is trained based on reference knowledge within the target knowledge domain; performing knowledge search within the reference knowledge of the target knowledge domain based on the target vector; and determining the target response information corresponding to the target question based on the search results. Since the target neural network model is trained based on reference knowledge within the target knowledge domain, it possesses good text representation capabilities within the target knowledge domain. By adding a target neural network model to adjust the vectors output by the embedding representation model, the accuracy of the text representation vectors corresponding to the target question is improved. Furthermore, the text representation capabilities of the embedding representation model in the target knowledge domain can be relatively ignored, eliminating the need to worry about whether the embedding representation model can be fine-tuned. This avoids the need for fine-tuning the embedding representation model, thus effectively improving the accuracy of vectors obtained from domain-specific knowledge processing even when the general embedding representation model cannot be fine-tuned. Consequently, the accuracy of knowledge search is improved during knowledge search based on the target vector, and the accuracy of the target response information corresponding to the target question is enhanced, thereby improving the accuracy of domain-specific question answering. This achieves the goal of adjusting the vectors output by the embedding representation model based on the target neural network model, realizing the technical effect of improving the accuracy of domain-specific question answering. It also solves the technical problem of low accuracy in question answering scenarios when using a general embedding representation model to process domain-specific knowledge vectors, especially when the general embedding representation model cannot be fine-tuned, leading to low accuracy in domain-specific question answering. Attached Figure Description
[0033] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0034] Figure 1 This is a schematic diagram of a computer terminal provided according to Embodiment 1 of this application;
[0035] Figure 2 This is a flowchart of the information processing method provided according to Embodiment 1 of this application;
[0036] Figure 3 This is a flowchart illustrating the optional process of determining the first sample reference knowledge and the second sample reference knowledge according to Embodiment 1 of this application.
[0037] Figure 4This is a flowchart illustrating the optional process for determining target response information according to Embodiment 1 of this application;
[0038] Figure 5 This is a flowchart of the information processing method provided according to Embodiment 2 of this application;
[0039] Figure 6 This is a schematic diagram of an information processing apparatus provided according to Embodiment 3 of this application;
[0040] Figure 7 This is a structural block diagram of an electronic device provided according to Embodiment 4 of this application. Detailed Implementation
[0041] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0042] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0043] 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, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant regions, and corresponding operation portals are provided for users to choose to authorize or refuse.
[0044] First, some nouns or terms that appear in the description of the embodiments of this application shall be interpreted as follows:
[0045] Domain-specific knowledge refers to proprietary knowledge within a specific domain. This type of knowledge differs from publicly available knowledge on the internet (such as news). Its textual semantics and expression possess strong domain-specific characteristics; that is, the content described is only related to a particular domain, and its expression style has strong domain-specific features. Furthermore, this type of data is usually privately owned by companies and is almost impossible to make publicly available online, making it difficult to use as pre-training data for artificial intelligence models. The following are some typical examples of domain-specific knowledge: medical case data, aerospace parts repair knowledge, customer service Q&A knowledge in the telecommunications industry, new energy vehicle battery repair knowledge, courtroom trial knowledge in legal institutions, and relevant knowledge from financial institutions.
[0046] Intelligent question answering system: refers to an intelligent system that can automatically understand and use a local knowledge base to answer user questions.
[0047] Embedding technology, also known as embedded representation technology, is an important concept in the field of artificial intelligence—natural language processing. Essentially, embedding technology transforms text, sentences, or texts into digital representations that computers can understand and process. Specifically, this type of technology takes text of any language and content as input and outputs a one-dimensional vector as a representation of the input text.
[0048] Embedding models, also known as embedding representation models, are neural network models that implement embedding technology. After pre-training on publicly available data, these models possess the ability to provide reasonable digital representations of publicly available, commonly used text. The number of parameters in these models is typically below one billion.
[0049] Large language models: These refer to language models with a parameter count typically ranging from tens of billions to hundreds of billions. These models are generally generative, capable of understanding input text and generating responses. Due to their large parameter scale and pre-training on extremely large datasets and intent alignment training before leaving the factory, they possess strong text understanding and instruction following capabilities.
[0050] Black-box model service: This generally refers to the situation where when a user purchases a model service (which may be an embedding model or a large language model) from a model provider, they can only send a request text to a specified address via an API (Application Programming Interface) and obtain the model's output. The user has no access to the model's parameters throughout the process, and therefore cannot train or fine-tune the model.
[0051] Model fine-tuning refers to incremental training of a pre-trained model. While pre-trained models possess basic language understanding capabilities, their performance is often subpar when directly applied to specific domain scenarios. Fine-tuning is necessary to improve their effectiveness in such applications. However, in the case of black-box model services, users cannot access the model parameters, making fine-tuning difficult.
[0052] Example 1
[0053] According to an embodiment of this application, an information processing method is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0054] The method embodiment provided in Embodiment 1 of this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing an information processing method is shown. Figure 1 As shown, the computer terminal (or mobile device) 10 may include a processor set 102 (the processor set 102 may include, but is not limited to, processing devices such as microprocessors (MCUs) or field-programmable gate arrays (FPGAs), and the processor set 102 may include a processor set, Figure 1 (Illustrated using 102a, 102b, ..., 102n), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may include: a display, an input / output interface (I / O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0055] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be wholly or partially embodied in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be wholly or partially integrated into any other element within the computer terminal 10 (or mobile device).
[0056] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the information processing method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the above-mentioned information processing method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0057] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0058] The display may be a touchscreen LCD display that allows the user to interact with the user interface of the computer terminal 10 (or mobile device).
[0059] In recent years, with the continuous evolution of artificial intelligence technology, the application of intelligent question answering technology has become extremely popular. A typical scenario for intelligent question answering is domain-specific knowledge question answering. This involves building an intelligent question answering system that can understand the proprietary knowledge of an enterprise or organization within its specialized domain and answer related questions. In this scenario, the intelligent question answering system typically first performs knowledge representation based on embedding technology. That is, it uses an embedding model to understand and represent the proprietary knowledge, breaking it down into numerical vectors that a computer can understand and compute. Subsequently, when the intelligent question answering system receives a user's question, it also uses the same embedding model to convert the question text into a vector. By calculating the similarity between the question text vector and the knowledge representation vector, the knowledge most relevant to the original question can be determined. Finally, the question and the relevant knowledge are input into a generative model, which then integrates the above information to provide an answer.
[0060] In the aforementioned application scenarios, the embedding models used by intelligent question-answering systems are generally general models trained on publicly available data. During the usage phase, these models demonstrate good representation capabilities for texts similar to those in the publicly available dataset. However, domain-specific knowledge is typically private, non-public data with significantly different textual characteristics compared to publicly available data. If a general embedding model is directly used for the vectorized representation of domain-specific knowledge text, the embedding model lacks fine-grained textual semantic representation and similarity measurement capabilities. Consequently, knowledge with high similarity scores may not actually be the most useful for resolving user questions.
[0061] When an embedding model performs poorly, fine-tuning it using proprietary domain-specific data is often considered. However, most currently available embedding models only provide API interfaces. That is, the embedding model is a black box to the user; the user can only input text to obtain dense numeric vectors, but cannot obtain the specific parameter weights of the embedding model. Since fine-tuning the model requires prior knowledge of the model parameters, this approach becomes infeasible in the aforementioned situation. Furthermore, when a general embedding representation model cannot be fine-tuned, the vectors obtained by processing domain-specific knowledge using a general embedding representation model have low accuracy, resulting in low accuracy in domain-specific question answering.
[0062] Against the above-mentioned technical background, this application provides as follows Figure 2 The information processing method shown. Figure 2 This is a flowchart of an information processing method according to Embodiment 1 of this application. The method includes:
[0063] Step S201: Obtain the target problem in the target knowledge domain.
[0064] Optionally, electronic devices, application systems, servers, and other devices can be used as the execution subject of this application. In this embodiment, the target question-answering system is used as the execution subject to execute the information processing method. Optionally, the target question-answering system can be understood as a domain-specific intelligent question-answering system, that is, a system specializing in domain-specific knowledge intelligent question answering.
[0065] Optionally, the target knowledge domain can be any knowledge domain, and the target knowledge domain can vary depending on the actual application scenario. For example, the target knowledge domain can be the medical knowledge domain, aerospace knowledge domain, communication knowledge domain, new energy vehicle knowledge domain, legal knowledge domain, financial knowledge domain, etc.
[0066] Optionally, the domain-specific knowledge can vary depending on the target knowledge domain. For example, the domain-specific knowledge in the medical knowledge domain could be medical case data, the domain-specific knowledge in the aerospace knowledge domain could be aerospace parts repair knowledge, the domain-specific knowledge in the communications knowledge domain could be communications industry customer service Q&A knowledge, the domain-specific knowledge in the new energy vehicle knowledge domain could be new energy vehicle battery repair knowledge, the domain-specific knowledge in the legal knowledge domain could be legal institution case trial knowledge, and the domain-specific knowledge in the financial knowledge domain could be financial institution task knowledge.
[0067] For example, if the target knowledge domain is the financial knowledge domain, the target question could be "how to apply for a loan".
[0068] Optionally, the target question-answering system in this embodiment can be applied to scenarios including but not limited to intelligent customer service for e-commerce platforms targeting consumers (equivalent to the aforementioned users), intelligent customer service for sales enterprises targeting consumers (e.g., intelligent customer service for cloud service products, intelligent customer service for electronic products, etc.), and question-answering robots for organizations targeting internal staff (equivalent to the aforementioned users).
[0069] In one optional embodiment, the target question-answering system can receive target information to obtain the aforementioned target question. The target information may be information sent by a user, carrying a target question related to the target knowledge domain. Optionally, the target information may only carry the target question, or it may include the target question and other information input by the user. The other information may be domain information of the target knowledge domain, information from a knowledge base used to store reference knowledge of the target knowledge domain, etc.
[0070] Step S202: The target problem is vectorized using an embedded representation model to obtain an initial vector.
[0071] Optionally, the embedding representation model is a model pre-trained on publicly available data. Since domain-specific knowledge is usually private data, i.e., data that is prohibited from being made public, this embedding representation model has not been trained or fine-tuned using domain-specific knowledge from the target knowledge domain. This embedding representation model can be understood as a general embedding representation model.
[0072] Optionally, the target question answering system can input the target question into the embedding representation model, and perform vector transformation processing on the target question through the embedding representation model to obtain the initial vector corresponding to the target question.
[0073] Step S203: The initial vector is updated by the target neural network model to obtain the target vector. The target neural network model is trained based on reference knowledge in the target knowledge domain.
[0074] Since the embedded representation model has not been trained and fine-tuned using domain-specific knowledge from the target knowledge domain, its ability to understand the language of knowledge in the target knowledge domain is poor. Therefore, the accuracy of the initial vector obtained by the embedded representation model in processing the target question in the target knowledge domain is poor. In this case, the target question answering system can additionally build a target neural network model, which receives the output of the embedded representation model, performs its own calculations, and then outputs a vector, thereby using the vector as a domain-specific vector representation of the relevant knowledge.
[0075] Optionally, the target neural network model is trained based on reference knowledge in the target knowledge domain, which belongs to the domain-specific knowledge of the target knowledge domain. In some embodiments, the reference knowledge of the target knowledge domain is recorded in a domain-specific knowledge base. The domain-specific knowledge base can contain two types of data. One type can be a document library, which is a collection of complete documents, such as "New Energy Vehicle Battery Repair Operation Manual" or "Patient Symptoms and Treatment Records"; the second type can be historical question-and-answer records, which can be records of customer service representatives correctly resolving customer problems in the past, such as "Customer Service Question-and-Answer Records of Financial Institutions" or "Customer Service Question-and-Answer Records of Mobile Operators".
[0076] Optionally, the target question answering system can construct a training sample set based on reference knowledge in the target knowledge domain, and then train an initial neural network model based on the training sample set to obtain the target neural network model. For example, the training samples in the training sample set include: vectors of sample questions in the target knowledge domain, vectors of useful reference knowledge corresponding to the sample questions in the target knowledge domain, and vectors of useless reference knowledge corresponding to the sample questions in the target knowledge domain. Alternatively, the training samples in the training sample set may include: vectors of reference knowledge in the target knowledge domain, vectors of reference knowledge in the target knowledge domain that have a high similarity to the reference knowledge, and vectors of reference knowledge in the target knowledge domain that have a low similarity to the reference knowledge. Training the initial neural network model based on the aforementioned training sample set effectively enhances the initial neural network model's ability to identify subtle differences between knowledge in the target knowledge domain during training, thereby improving the trained target neural network model's representation ability of knowledge in the target knowledge domain.
[0077] In one alternative embodiment, the target neural network model may receive and adjust the vectorized representation (e.g., initial vector) output by the embedding representation model, and then output a vectorized representation (e.g., target vector) of the same shape, which can be considered as the result of a domain-adjusted version of the output of the embedding representation model.
[0078] Step S204: Perform a knowledge search in the reference knowledge of the target knowledge domain based on the target vector, and determine the target response information corresponding to the target question based on the search results.
[0079] Optionally, the target question answering system can obtain knowledge vectors corresponding to reference knowledge in the target knowledge domain, and then perform knowledge search in the reference knowledge of the target knowledge domain based on the similarity between the target vector and the knowledge vector to obtain search results. Optionally, the search results include at least one target reference knowledge, which can refer to reference knowledge with a high similarity between the knowledge vector and the target vector (e.g., similarity greater than a preset similarity).
[0080] In one alternative embodiment, the target reference knowledge may be in the form of document content, question and answer records, or other forms.
[0081] Optionally, after determining the search results, the target question answering system can determine the target response information corresponding to the target question based on the search results. For example, the target question and at least one target reference knowledge can be input into a large language model, and the target response information corresponding to the target question can be determined through the large language model, so as to answer the target question based on the target response information. Another example is that any one of the at least one target reference knowledge can be directly used as the target response information.
[0082] In this scheme, since the target neural network model is trained based on reference knowledge in the target knowledge domain, it possesses good text representation capabilities within that domain. By adding the target neural network model to the embedded representation model to adjust the vectors output by the embedded representation model, the accuracy of the text representation vectors corresponding to the target question is improved. Furthermore, the text representation capabilities of the embedded representation model in the target knowledge domain can be relatively ignored, eliminating the need to worry about whether the embedded representation model can be fine-tuned. This avoids the need for fine-tuning the embedded representation model, thus effectively improving the accuracy of vectors obtained from domain-specific knowledge processing even when the general embedded representation model cannot be fine-tuned. Consequently, the accuracy of knowledge search is effectively improved during the process of knowledge search based on the target vector and determining the target response information corresponding to the target question based on the search results, thereby enhancing the accuracy of domain-specific knowledge question answering. This achieves the goal of adjusting the vector output by the embedding representation model based on the target neural network model, thereby improving the accuracy of domain-specific knowledge question answering. It also solves the technical problem that in question answering scenarios, when the general embedding representation model cannot be fine-tuned, the vectors obtained by using the general embedding representation model to process domain-specific knowledge have low accuracy, which leads to low accuracy of domain-specific knowledge question answering.
[0083] To improve the accuracy of knowledge search, the information processing method provided in Embodiment 1 of this application includes the following steps in performing knowledge search in the reference knowledge of the target knowledge domain based on the target vector: obtaining the knowledge vector of the reference knowledge in the target knowledge domain; determining the target reference knowledge from the reference knowledge in the target knowledge domain based on the similarity between the target vector and the knowledge vector; and determining the search results based on the target reference knowledge.
[0084] In one optional embodiment, the target question answering system can obtain knowledge vectors of reference knowledge in the target knowledge domain from a preset storage area. The preset storage area can be the domain-specific knowledge base mentioned above, or other storage areas, such as a vector library.
[0085] Optionally, after obtaining the knowledge vectors of the reference knowledge in the target knowledge domain, the target question answering system can calculate the similarity between the target vector and the knowledge vectors, and then determine the target reference knowledge from the reference knowledge in the target knowledge domain based on the similarity between the target vector and the knowledge vectors. For example, the reference knowledge corresponding to the knowledge vectors with a similarity greater than a preset similarity can be determined as the target reference knowledge. Another example is to sort the reference knowledge in descending order of similarity, and then determine the top k sorted reference knowledge as the target reference knowledge, where k is a positive integer.
[0086] Optionally, the target question answering system can directly identify the obtained target reference knowledge as the search result.
[0087] It should be noted that by determining the target reference knowledge based on the similarity between the vector of the target question and the vector of the reference knowledge, the accuracy of knowledge search is improved, and the identification of reference knowledge that is highly relevant to the target question is achieved, thereby facilitating the improvement of the accuracy of knowledge question answering.
[0088] To improve the accuracy of the acquired knowledge vector of the reference knowledge, the information processing method provided in Embodiment 1 of this application includes: performing vector transformation processing on the reference knowledge using an embedded representation model to obtain an initial knowledge vector; and performing vector update processing on the initial knowledge vector using a target neural network model to obtain the knowledge vector.
[0089] Optionally, the target question answering system can input the reference knowledge into the aforementioned embedding representation model, and perform vector transformation processing on the reference knowledge through the embedding representation model to obtain the initial knowledge vector corresponding to the reference knowledge. Then, the target question answering system can input the initial knowledge vector into the target neural network model, and perform vector update processing on the initial knowledge vector through the target neural network model to obtain the knowledge vector corresponding to the reference knowledge.
[0090] It should be noted that since the target neural network model has good text representation capabilities in the target knowledge domain, by combining the embedding representation model and the target neural network model to process the reference knowledge and obtain the knowledge vector of the reference knowledge, the accuracy of the knowledge vector can be effectively improved, thereby facilitating the improvement of the accuracy of knowledge search.
[0091] To improve the accuracy of the determined target response information, in the information processing method provided in Embodiment 1 of this application, the search results include at least one target reference knowledge. Determining the target response information corresponding to the target question based on the search results includes: inputting the target question and at least one target reference knowledge into a large language model, and determining the target response information corresponding to the target question through the large language model.
[0092] In one optional embodiment, the target question-answering system can generate a first prompt statement based on the target question and at least one target reference knowledge, and then input the first prompt statement into a large language model, which then outputs target response information based on the first prompt statement. The first prompt statement guides the large language model to determine the target response information based on at least one target reference knowledge and the target question; the first prompt statement can be a prompt for the large language model.
[0093] Optionally, the target question-answering system can obtain a prompt template, thereby importing the target question and at least one target reference knowledge into the prompt template to obtain a first prompt statement. For example, an optional first prompt statement is as follows:
[0094] Please answer the questions based on the given information;
[0095] Question: How do I apply for a loan?
[0096] material:
[0097] -{Text content of document A}
[0098] -{Text content of document B}
[0099] -{Text content of data C}.
[0100] In the first prompt statement above, "Question:" is used to fill in the target question, and "Reference:" is used to fill in the target reference knowledge.
[0101] It should be noted that by utilizing large language models to determine the target response information, both the accuracy and efficiency of determining the target response information can be effectively improved.
[0102] Obtaining a high-performance target neural network model is crucial. Therefore, in the information processing method provided in Embodiment 1 of this application, the target neural network model is obtained in the following manner: obtaining an initial training sample set, wherein the initial training samples in the initial training sample set include at least a sample problem in the target knowledge domain, a first sample reference knowledge corresponding to the sample problem, and a second sample reference knowledge. The first sample reference knowledge includes knowledge that can solve the sample problem, while the second sample reference knowledge does not include knowledge that can solve the sample problem. The initial training samples are processed by vector transformation using an embedding representation model to obtain training samples, and a training sample set is constructed based on the training samples. The initial neural network model is trained based on the training sample set to obtain the target neural network model.
[0103] Optionally, the initial training samples in the initial training sample set can be manually labeled or automatically determined by the target question answering system. The initial training samples must include at least sample questions from the target knowledge domain, first-sample reference knowledge corresponding to the sample questions, and second-sample reference knowledge corresponding to the sample questions. The aforementioned labeling process refers to labeling the reference knowledge as either first-sample reference knowledge or second-sample reference knowledge.
[0104] In one optional embodiment, the sample problem in the target knowledge domain, the first sample reference knowledge corresponding to the sample problem, and the second sample reference knowledge are determined from the reference knowledge in the target knowledge domain. The first sample reference knowledge can be understood as useful reference knowledge corresponding to the sample problem, and the second sample reference knowledge can be understood as useless reference knowledge corresponding to the sample problem.
[0105] Optionally, after obtaining the initial training sample set, the target question answering system can use an embedding representation model to perform vector transformation on the initial training samples to obtain training samples. For example, the embedding representation model can be used to perform vector transformation on the sample questions in the initial training samples to obtain a first initial vector (i.e., the vector corresponding to the sample question), and the embedding representation model can be used to perform vector transformation on the sample reference knowledge in the initial training samples to obtain a second initial vector (i.e., the vector corresponding to the sample reference knowledge). Thus, the first initial vector and the second initial vector corresponding to the initial training samples constitute the training samples, and a training sample set is constructed based on the training samples. Here, the sample reference knowledge may include the first sample reference knowledge and the second sample reference knowledge, and the aforementioned second initial vector refers to the second initial vector corresponding to the first sample reference knowledge and the second initial vector corresponding to the second sample reference knowledge.
[0106] Optionally, in the process of constructing a training sample set based on training samples, the target question answering system can use a first label to label the first sample reference knowledge in the training samples and a second label to label the second sample reference knowledge in the training samples to obtain labeled training samples. The first label is used to indicate positive samples and the second label is used to indicate negative samples, thereby constructing a training sample set based on the labeled training samples.
[0107] Optionally, after obtaining the training sample set, the target question answering system can train an initial neural network model based on the training sample set to obtain the target neural network model, wherein the initial neural network model undergoes comparative learning during the training process.
[0108] In one optional embodiment, the initial neural network model is a neural network model with m layers, t input layer neurons, and t output layer neurons. The number of layers m and the number of neurons in each intermediate layer can be manually specified hyperparameters, and the network parameters can be randomly initialized. Here, m and t are positive integers.
[0109] In one alternative embodiment, after training the target neural network model, the target neural network model can receive and adjust the vectorized representation (e.g., initial vector, initial knowledge vector) output by the embedded representation model, and then output a vectorized representation (e.g., target vector, knowledge vector) of the same shape. This vectorized representation can be considered as the result of domain-specific adjustment of the vectorized representation of the embedded representation model.
[0110] It should be noted that by determining the training sample set based on the aforementioned sample problem, the first sample reference knowledge, and the second sample reference knowledge, and training the target neural network model based on this training sample set, on the one hand, the target neural network model is effectively trained based on the reference knowledge of the target knowledge domain, enabling the target neural network model to learn the complex relationships and structures between the reference knowledge. On the other hand, the target neural network model is trained based on positive and negative sample pairs, which can help enhance the model's understanding ability. Thus, the processing performance of the target neural network model in the target knowledge domain can be effectively improved.
[0111] In order to improve the model performance of the target neural network model, in the information processing method provided in Embodiment 1 of this application, the initial training samples in the initial training sample set also include third sample reference knowledge corresponding to the sample problem. In this method, sample problems other than the sample problem are determined as the target sample problem, and the third sample reference knowledge is randomly selected from the first sample reference knowledge and / or the second sample reference knowledge corresponding to the target sample problem.
[0112] Optionally, the aforementioned sample reference knowledge may be first sample reference knowledge, second sample reference knowledge, or third sample reference knowledge.
[0113] Optionally, after determining the first and second sample reference knowledge corresponding to the sample question, for a sample question in the target knowledge domain, the target question answering system can identify sample questions other than the target sample question as the target sample question, and then randomly select p sample reference knowledge from the first and / or second sample reference knowledge corresponding to the target sample question to obtain the third sample reference knowledge. Here, p is a positive integer greater than 1.
[0114] In an optional embodiment, the aforementioned sample reference knowledge may include first sample reference knowledge, second sample reference knowledge, and third sample reference knowledge. The aforementioned second initial vector may refer to the second initial vector corresponding to the first sample reference knowledge, the second initial vector corresponding to the second sample reference knowledge, and the second initial vector corresponding to the third sample reference knowledge. During the process of constructing a training sample set based on training samples, the target question answering system may use a first label to label the first sample reference knowledge in the training samples, a second label to label the second sample reference knowledge in the training samples, and a third label to label the third sample reference knowledge in the training samples, thereby obtaining labeled training samples. The first label indicates positive samples, the second label indicates negative samples, and the third label indicates noise samples (or random samples), thus constructing a training sample set based on the labeled training samples. Positive samples can be understood as samples that are close to or relatively similar to the sample question in the feature space, while negative samples and noise samples can be understood as samples that are far from or relatively dissimilar to the sample question in the feature space.
[0115] It should be noted that by setting the initial training samples to include third-party sample reference knowledge corresponding to the sample problem, the richness of the content in the training samples can be effectively improved, thereby improving the training effect of the initial neural network model, that is, improving the model performance of the target neural network model.
[0116] To efficiently obtain the initial training sample set, the information processing method provided in Embodiment 1 of this application includes the following reference knowledge in the target knowledge domain: first reference knowledge belonging to the question-answering type and second reference knowledge belonging to the non-question-answering type. Obtaining the initial training sample set includes: determining the questions in the first reference knowledge as sample questions, and performing vector transformation processing on the sample questions using an embedding representation model to obtain a third vector; performing knowledge search in the second reference knowledge based on the third vector to obtain multiple target second reference knowledge; and determining the initial training samples based on the first reference knowledge and the multiple target second reference knowledge corresponding to the first reference knowledge to obtain the initial training sample set.
[0117] In one optional embodiment, the first reference knowledge belonging to the question-and-answer type includes the question and the actual response information to the question. The actual response information may be the response information of a human who has correctly solved the question in history. For example, the first reference knowledge may be "customer service Q&A records of financial institutions" or "customer service Q&A records of mobile operators". The second reference knowledge belonging to the non-question-and-answer type may be a document type, which may include document content. For example, the second reference knowledge may be "New Energy Vehicle Battery Repair Operation Manual" or "Patient Symptoms and Treatment Records".
[0118] In one optional embodiment, the target question-answering system can identify the question in the first reference knowledge as a sample question and use an embedding representation model to perform vector transformation on the sample question to obtain a third vector. For example, the sample question Q is input into the embedding representation model to obtain the vectorized representation of the sample question, emb(Q) (i.e., the third vector), which is a one-dimensional vector of length t. The specific value of t is related to the embedding representation model, for example, t = 128.
[0119] In one optional embodiment, the target question-answering system can pre-acquire multiple documents, and then split the document content of the documents in the multiple documents to obtain n pieces of second reference knowledge [d1, d2, ..., dn] corresponding to the multiple documents. n Optionally, the target document system can split the document content based on the input size window constraint of the embedded representation model.
[0120] Optionally, the target question-answering system can use an embedded representation model to perform vector transformation on the second reference knowledge to obtain a fourth vector corresponding to the second reference knowledge. For example, n pieces of second reference knowledge [d1, d2, ..., d...] n The input is fed into the embedded representation model to obtain n pieces of second reference knowledge [d1, d2, ..., dn]. n The vectorized representation of ] [emb(d1), ..., emb(d2)] n [emb(d1), ..., emb(d)] (also known as the fourth vector), where [emb(d1), ..., emb(d)] n The vector representation in ] can be a one-dimensional vector of length t.
[0121] Subsequently, the target question-answering system can perform knowledge searches in the second reference knowledge based on the third vector to obtain multiple target second reference knowledge items. Optionally, the target question-answering system can calculate the similarity between the third vector and the fourth vector, and thus determine the target second reference knowledge from the second reference knowledge based on the similarity between the third vector and the fourth vector. For example, the second reference knowledge corresponding to the fourth vector with a similarity greater than a preset similarity can be determined as the target second reference knowledge. Alternatively, the second reference knowledge can be sorted from high to low similarity, and the top K sorted second reference knowledge items can be determined as the target second reference knowledge, where K is a positive integer greater than 1.
[0122] Optionally, the multiple target second reference knowledge corresponding to the third vector can be determined to correspond to the first reference knowledge to which the third vector belongs. The target question answering system can determine the questions in the first reference knowledge as sample questions, and determine the first sample reference knowledge and the second sample reference knowledge from the multiple target second reference knowledge corresponding to the first reference knowledge based on the first reference knowledge. Thus, the initial training samples are determined based on the sample questions, the first sample reference knowledge, and the second sample reference knowledge to obtain the initial training sample set.
[0123] Optionally, in the process of determining the first sample reference knowledge and the second sample reference knowledge from multiple target second reference knowledge based on the first reference knowledge, the target question answering system can use a large language model to determine the response information for the question (i.e., the sample question) in the first reference knowledge based on the target second reference knowledge, and then determine the first sample reference knowledge and the second sample reference knowledge from multiple target second reference knowledge based on the response information and the real response information corresponding to the sample question.
[0124] For example, a single large language model is used to determine the response information for sample questions in the first reference knowledge based on a single target second reference knowledge. Then, based on the response information and the actual response information, the single target second reference knowledge is classified in the first sample reference knowledge and the second sample reference knowledge.
[0125] For example, assuming there are K target second reference knowledge items, a single large language model is used to determine the response information for the sample questions in the first reference knowledge based on K-1 target second reference knowledge items. Then, based on the response information and the actual response information, the target second reference knowledge items that were not used to determine the response information are classified in the first sample reference knowledge and the second sample reference knowledge.
[0126] In one alternative embodiment, the target question-answering system can calculate the similarity between the response information and the actual response information, and then perform the above classification based on the relationship between the similarity and the target threshold.
[0127] In an alternative embodiment, the target question-answering system may also input the response information and the actual response information into a large language model, and use the large language model to determine whether the response information can solve the sample problem, and then perform the above classification based on the judgment result.
[0128] It should be noted that the above process enables the target question-answering system to automatically search for knowledge relevant to the sample question and construct initial training samples based on this relevant knowledge, thereby improving the efficiency of constructing the initial training sample set. Furthermore, by constructing positive and negative samples in the initial training set based on knowledge relevant to the sample question, the initial neural network model can effectively learn the subtle differences between similar knowledge in the target knowledge domain during training, thus effectively improving the performance of the trained target neural network model.
[0129] To improve the accuracy of determining initial training samples, the information processing method provided in Embodiment 1 of this application, which determines initial training samples based on first reference knowledge and multiple target second reference knowledge corresponding to the first reference knowledge, includes: constructing multiple reference knowledge sets based on multiple target second reference knowledge, wherein the reference knowledge sets include some target second reference knowledge from the multiple target second reference knowledge; inputting the sample question and the reference knowledge sets into a large language model, determining the response information for the sample question through the large language model, and obtaining the first response information corresponding to the reference knowledge set; determining the true response information corresponding to the sample question from the first reference knowledge, and outputting the processing result through the large language model based on the first response information and the true response information, wherein the processing result is used to characterize whether the first response information can solve the sample question; and determining the initial training samples based on the processing results corresponding to the multiple reference knowledge sets.
[0130] Optionally, the target question answering system can construct multiple reference knowledge sets based on multiple target second reference knowledge, wherein the reference knowledge set includes a portion of the target second reference knowledge from the multiple target second reference knowledge. For example, assuming there are K target second reference knowledge, the reference knowledge set can include K-1 target second reference knowledge, and different reference knowledge sets are not completely identical, so there can be K reference knowledge sets.
[0131] Subsequently, for each of the multiple reference knowledge sets, the target question answering system can input the sample question and the reference knowledge set into a large language model. The large language model then determines the response information for the sample question, obtaining the first response information corresponding to the reference knowledge set. For example, a second prompt statement is generated based on the target second reference knowledge in the reference knowledge set and the sample question. This second prompt statement is then input into the large language model, which determines the first response information based on the second prompt statement. Optionally, the second prompt statement guides the large language model to determine the response information for the sample question based on the sample question and the reference knowledge set. The method for determining the second prompt statement is the same as the method for determining the first prompt statement, so it will not be elaborated here.
[0132] Optionally, after obtaining the first response information corresponding to multiple reference knowledge sets (e.g., obtaining K first response information), the target question answering system can determine the real response information corresponding to the sample question from the first reference knowledge. For the first response information in the first response information corresponding to multiple reference knowledge sets, the system uses a large language model to determine whether the first response information can solve the sample question corresponding to the real response information based on the first response information and the real response information, and outputs the processing result.
[0133] For example, the target response system can generate a third prompt statement based on the first response and the actual response, and input the third prompt statement into a large language model. The large language model then determines the processing result based on the third prompt statement. Optionally, the third prompt statement guides the large language model to determine whether the first response can solve the sample problem corresponding to the actual response. The method for determining the third prompt statement is the same as the method for determining the first prompt statement, so it will not be described again here.
[0134] Subsequently, the target question answering system can determine the initial training samples based on the processing results corresponding to multiple reference knowledge sets. For example, it can determine the target second reference knowledge that is missing from the reference knowledge set relative to multiple target second reference knowledge sets, and classify the missing target second reference knowledge in the first sample reference knowledge and the second sample reference knowledge according to the processing results. Thus, the initial training samples are determined based on the sample question, the determined first sample reference knowledge, and the second sample reference knowledge.
[0135] It should be noted that since the reference knowledge is used to answer questions, determining the positive and negative samples in the initial training samples based on the relationship between the response information corresponding to the target second reference knowledge and the actual response information can effectively improve the accuracy of the determined initial training samples. Furthermore, utilizing a large language model to evaluate the relationship between the response information corresponding to the target second reference knowledge and the actual response information can effectively improve both processing efficiency and processing accuracy.
[0136] To avoid invalid construction of reference knowledge sets, the information processing method provided in Embodiment 1 of this application includes constructing multiple reference knowledge sets based on multiple target second reference knowledge as follows: inputting a sample problem and multiple target second reference knowledge into a large language model; determining response information for the sample problem through the large language model to obtain second response information; outputting a target result through the large language model based on the second response information and the actual response information, wherein the target result is one of the following: a first target result indicating that the second response information can solve the sample problem; a second target result indicating that the second response information cannot solve the sample problem; and constructing multiple reference knowledge sets based on the multiple target second reference knowledge when the target result is the first target result.
[0137] Since the initial training samples need to include both positive and negative samples, and the multiple target second reference knowledge corresponding to a sample problem may not necessarily include knowledge that can solve the sample problem, before constructing multiple reference knowledge sets based on multiple target second reference knowledge, the target question answering system can first determine whether the multiple target second reference knowledge corresponding to the sample problem includes knowledge that can solve the sample problem.
[0138] Optionally, the target question answering system can input a sample question and multiple target second reference knowledge into a large language model. The large language model then determines the response information for the sample question, thus obtaining the second response information. For example, the target question answering system can generate a fourth prompt statement based on the sample question and multiple target second reference knowledge. This fourth prompt statement guides the large language model to determine the response information for the sample question based on the multiple target second reference knowledge. The fourth prompt statement is then input into the large language model, which outputs the second response information based on it. The method for determining the fourth prompt statement is the same as the method for determining the first prompt statement, and therefore will not be elaborated here.
[0139] Optionally, after receiving the second response, the target question-answering system can use a large language model to determine whether the second response can solve the sample problem corresponding to the real response, based on the second response and the real response, and output the target result. For example, a fifth prompt statement is generated based on the second and real responses. This fifth prompt statement guides the large language model to determine whether the second response can solve the sample problem corresponding to the real response, thus inputting the fifth prompt statement into the large language model, which then determines the target result based on the fifth prompt statement. The method for determining the fifth prompt statement is the same as the method for determining the first prompt statement, so it will not be described again here.
[0140] Optionally, when the target result is the first target result, the multiple target second reference knowledge corresponding to the sample problem is determined to include knowledge that can solve the sample problem, so that multiple reference knowledge sets can be constructed based on the multiple target second reference knowledge.
[0141] Optionally, when the target result is the second target result, the multiple target second reference knowledge corresponding to the sample problem does not include knowledge that can solve the sample problem, so that multiple reference knowledge sets are not constructed based on the multiple target second reference knowledge.
[0142] It should be noted that, through the above process, when the information required to construct the initial training samples is included in the multiple target second reference knowledge corresponding to the determined sample problem, multiple reference knowledge sets can be constructed based on the multiple target second reference knowledge. This avoids the situation where multiple reference knowledge sets are constructed ineffectively when the information required to construct the initial training samples is not included in the multiple target second reference knowledge, thereby avoiding the ineffective occupation of system resources.
[0143] To obtain accurate initial training samples, in the information processing method provided in Embodiment 1 of this application, the processing result is one of the following: a first processing result indicating that the first response information cannot solve the sample problem, and a second processing result indicating that the first response information can solve the sample problem. Determining the initial training samples based on the processing results corresponding to multiple reference knowledge sets includes: for each reference knowledge set in the multiple reference knowledge sets, determining the target second reference knowledge that is missing from the reference knowledge set relative to the multiple target second reference knowledge; if the processing result corresponding to the reference knowledge set is the first processing result, determining the missing target second reference knowledge as the first sample reference knowledge; if the processing result corresponding to the reference knowledge set is the second processing result, determining the missing target second reference knowledge as the second sample reference knowledge; and determining the initial training samples based on the sample problem, the first sample reference knowledge, and the second sample reference knowledge.
[0144] For example, suppose there are K target second reference knowledge items, and the reference knowledge set includes K-1 target second reference knowledge items, and assume K = 5, with the multiple target second reference knowledge items being knowledge A, knowledge B, knowledge C, knowledge D, and knowledge E respectively. Under this assumption, if a certain reference knowledge set includes knowledge A, knowledge B, knowledge D, and knowledge E, then the target second reference knowledge item missing from that reference knowledge set relative to the multiple target second reference knowledge items is determined to be knowledge C.
[0145] Optionally, if the processing result corresponding to the reference knowledge set is the first processing result, then knowledge C is determined as the first sample reference knowledge; if the processing result corresponding to the reference knowledge set is the second processing result, then knowledge C is determined as the second sample reference knowledge.
[0146] In some embodiments, the target question answering system may construct an initial training sample based on a sample question and all first sample reference knowledge and all second sample reference knowledge corresponding to the sample question.
[0147] In some embodiments, the target question answering system may also randomly extract S first sample reference knowledge from the first sample reference knowledge corresponding to the sample question, and randomly extract U second sample reference knowledge from the second sample reference knowledge corresponding to the sample question, thereby constructing an initial training sample based on the sample question, the extracted S first sample reference knowledge, and the U second sample reference knowledge. Wherein, S and U are positive integers.
[0148] Optionally, after determining the first and second sample reference knowledge corresponding to the sample question, for a sample question in the target knowledge domain, the target question answering system can randomly select p sample reference knowledge points from the first and / or second sample reference knowledge points corresponding to sample questions other than the sample question itself, to obtain the third sample reference knowledge. Here, p is a positive integer greater than 1.
[0149] Optionally, if the first processing result or the second processing result is not present in the processing results of the multiple reference knowledge sets corresponding to the sample question, it can be determined that the multiple target second reference knowledge sets corresponding to the sample question do not have positive and negative samples at the same time. In this case, the target question answering system may not generate initial training samples based on the sample question.
[0150] After determining the sample question and the corresponding first and second sample reference knowledge, the target question answering system can determine the initial training samples based on the sample question, the first and second sample reference knowledge. For example, an optional initial training sample may include: the sample question Q, truly useful knowledge [d1, d4, ...] (i.e., the first sample reference knowledge), and relatively useless knowledge [d2, d3, ...] (i.e., the second sample reference knowledge).
[0151] It should be noted that, through the above method, the initial training sample set required for training the target neural network model can be automatically constructed using historical question and answer records and question and answer content in domain-specific knowledge, thereby reducing the cost of manual annotation and improving the efficiency of generating initial training samples.
[0152] In an alternative embodiment, the following can be employed: Figure 3The diagram shown illustrates how to determine the first and second sample reference knowledge corresponding to a sample problem. Figure 3 This is a flowchart illustrating the optional process for determining the first sample reference knowledge and the second sample reference knowledge according to Embodiment 1 of this application, as shown below. Figure 3 As shown, the target question answering system can input questions (i.e. sample questions) from the domain-specific historical question answering records (i.e., first reference knowledge) into the embedding representation model to obtain the original question representation (i.e., the third vector), input the document content (i.e., second reference knowledge) from the domain-specific document library into the embedding representation model to obtain the original document representation (i.e., the fourth vector), and then, based on the similarity between the original question representation and the original document representation, determine K document contents (i.e., target second reference knowledge) that are highly relevant to the question from the domain-specific document library.
[0153] After identifying the K documents whose content is most relevant to the problem, such as Figure 3 As shown, the target question-answering system can input the original question and the content of K highly relevant documents into the large model in K rounds. For each of the K rounds, one of the K document contents is deleted. The test model uses the remaining K-1 contents (i.e., the reference knowledge set) to answer the corresponding question. Then, the human answer to the question (i.e., the real response information) and the K responses from the large model (i.e., the first response information) are input into the large language model. The large language model determines which responses solved the original question and which did not based on the human standard answer. If there are cases where the question was successfully solved, it is determined that the K document contents contain knowledge that is truly useful for solving the original question. Then, it finds which knowledge was deleted from the group that did not successfully solve the original question and marks that knowledge as truly useful. Knowledge that does not affect the successful solution of the question after deletion is marked as relatively useless knowledge. This achieves the determination of the first sample reference knowledge (i.e., the aforementioned useful knowledge) and the second sample reference knowledge (i.e., the aforementioned useless knowledge).
[0154] To obtain a target neural network model with superior performance, the information processing method provided in Embodiment 1 of this application, which trains an initial neural network model based on a training sample set to obtain the target neural network model, includes: for training samples in the training sample set, performing vector update processing on the vectors corresponding to sample questions in the training samples using the initial neural network model to obtain a first vector; performing vector update processing on the vectors corresponding to sample reference knowledge in the training samples using the initial neural network model to obtain a second vector, wherein the sample reference knowledge includes first sample reference knowledge, second sample reference knowledge, and third sample reference knowledge; calculating the loss function value of the initial neural network model based on the similarity between the first vector and the second vector; and optimizing the initial neural network model based on the loss function value, so that the target neural network model is obtained when the loss function value of the optimized initial neural network model is less than a preset threshold.
[0155] In one optional embodiment, the target question answering system can input the vector corresponding to the sample question in the training samples into the target neural network model, and then perform vector update processing on the target neural network model to obtain a first vector. For example, inputting the sample question Q into the target neural network model yields the first vector vec(Q).
[0156] In one optional embodiment, the aforementioned sample reference knowledge includes first sample reference knowledge, second sample reference knowledge, and third sample reference knowledge.
[0157] In one alternative embodiment, the target question answering system can input the vectors corresponding to the first sample reference knowledge, the second sample reference knowledge, and the third sample reference knowledge in the training samples into the target neural network model for training.
[0158] Optionally, the target question answering system can input the vector corresponding to the first sample reference knowledge in the training samples into the target neural network model, and then perform vector update processing on the target neural network model to obtain the second vector vec(d) corresponding to the first sample reference knowledge. a ).
[0159] Optionally, the target question answering system can input the vector corresponding to the second sample reference knowledge in the training samples into the target neural network model, and then perform vector update processing on the vector through the target neural network model to obtain the second vector vec(d) corresponding to the second sample reference knowledge. b ).
[0160] Optionally, the target question answering system can input the vector corresponding to the third sample reference knowledge in the training samples into the target neural network model, and then perform vector update processing on the target neural network model to obtain the second vector vec(d) corresponding to the third sample reference knowledge.c ).
[0161] In an alternative instance, where the first and second sample reference knowledge in the training samples are singular (e.g., the case where S=1 and U=1 in the random sampling process described above), and p is greater than 1, an alternative loss function for the initial neural network model can be as follows:
[0162]
[0163] Where loss represents the loss function value, log is the logarithmic function, exp is the exponential function, vec()·vec() is the dot product of two vectors (representing the similarity between the vectors in the two (), τ is the temperature coefficient, which is the hyperparameter of the initial neural network model, p represents the number of third-sample reference knowledge in the training samples, i represents the i-th third-sample reference knowledge in the training samples, and vec(Q)·vec(d) a ), vec(Q)·vec(d) b )as well as This is equivalent to the similarity between the first and second vectors mentioned above.
[0164] Optionally, the target question answering system can calculate the loss function value of the initial neural network model based on the loss function described above and the similarity between the first vector and the second vector.
[0165] In an optional embodiment, the aforementioned sample reference knowledge includes first sample reference knowledge and second sample reference knowledge. Optionally, in this case, the selected loss function can be adapted from the loss function in the example described above. This part is obtained after removing it.
[0166] The target question answering system can use the backpropagation algorithm to optimize the parameter weights of the initial neural network model by reducing the aforementioned loss. The optimization idea is to reduce this loss, i.e., increase the logical part of the logarithm, which means increasing the representation similarity between truly useful knowledge and the sample question compared to relatively useless and random knowledge. Optionally, if the loss function value is greater than a preset threshold, the initial neural network model can be optimized based on the loss function value to obtain an optimized initial neural network model. Then, the steps of calculating the first and second vectors for training samples in the training sample set, and calculating the loss function value of the initial neural network model based on the similarity between the first and second vectors, can be repeated until the loss function value of the optimized initial neural network model is less than the preset threshold, thus obtaining the target neural network model.
[0167] In some embodiments, during training, the target question-answering system can optimize the initial neural network model based on the loss function value to obtain an optimized initial neural network model. Then, it can update the first, second, and third sample reference knowledge in the training samples of the training sample set to obtain an updated training sample set. The next round of iterative training can then be performed based on the updated training sample set. Optionally, the process of updating the first, second, and third sample reference knowledge in the training samples can be understood as follows: S first sample reference knowledge points are randomly selected from the first sample reference knowledge corresponding to the sample question; U second sample reference knowledge points are randomly selected from the second sample reference knowledge corresponding to the sample question; and p sample reference knowledge points are randomly selected from the first and / or second sample reference knowledge corresponding to sample questions other than the sample question itself to obtain new third sample reference knowledge. The training samples are then updated based on the newly selected first, second, and new third sample reference knowledge to obtain an updated training sample set.
[0168] It should be noted that, through the above process, the loss function value is calculated based on the similarity between the sample problem and the positive and negative samples, and the model is optimized based on the loss function value. This helps to improve the learning effect of the initial neural network model on the text representation of knowledge in the target knowledge domain during the training process, thereby improving the application performance of the target neural network model.
[0169] In an alternative embodiment, the following can be employed: Figure 4 The diagram shown illustrates how to determine the target response information. Figure 4 This is a flowchart illustrating the optional process for determining target response information according to Embodiment 1 of this application, such as... Figure 4 As shown, the target question answering system can input reference knowledge belonging to the target knowledge domain from the domain-specific knowledge base into the embedding representation model to obtain the corresponding vector. Then, the vector output by the embedding representation model is input into the target neural network model to obtain the domain-specific vector representation of the reference knowledge (i.e., the knowledge vector). Upon receiving a target question, the target question answering system can input the target question into the embedding representation model to obtain the corresponding vector. Then, the vector output by the embedding representation model is input into the target neural network model to obtain the domain-specific vector representation of the target question (i.e., the target vector).
[0170] After obtaining the domain-specific vector representation of the target question, the target question answering system can perform similarity calculation based on the domain-specific vector representation of the reference knowledge and the domain-specific vector representation of the target question. Then, based on the similarity, it can search for k reference knowledge items that are more relevant to the target question (i.e., target reference knowledge) from the reference knowledge. The target question and the k reference knowledge items that are more relevant to the target question are then input into the large language model, and the target response information is determined through the large language model.
[0171] In this embodiment, the process involves: acquiring a target question within a target knowledge domain; performing vector transformation on the target question using an embedding representation model to obtain an initial vector; updating the initial vector using a target neural network model to obtain a target vector, wherein the target neural network model is trained based on reference knowledge within the target knowledge domain; performing knowledge search within the reference knowledge of the target knowledge domain based on the target vector; and determining the target response information corresponding to the target question based on the search results. Since the target neural network model is trained based on reference knowledge within the target knowledge domain, it possesses good text representation capabilities within the target knowledge domain. By adding a target neural network model to adjust the vectors output by the embedding representation model, the accuracy of the text representation vectors corresponding to the target question is improved. Furthermore, the text representation capabilities of the embedding representation model in the target knowledge domain can be relatively ignored, eliminating the need to worry about whether the embedding representation model can be fine-tuned. This avoids the need for fine-tuning the embedding representation model, thus effectively improving the accuracy of vectors obtained from domain-specific knowledge processing even when the general embedding representation model cannot be fine-tuned. Consequently, the accuracy of knowledge search is improved during knowledge search based on the target vector, and the accuracy of the target response information corresponding to the target question is enhanced, thereby improving the accuracy of domain-specific question answering. This achieves the goal of adjusting the vectors output by the embedding representation model based on the target neural network model, realizing the technical effect of improving the accuracy of domain-specific question answering. It also solves the technical problem of low accuracy in question answering scenarios when using a general embedding representation model to process domain-specific knowledge vectors, especially when the general embedding representation model cannot be fine-tuned, leading to low accuracy in domain-specific question answering.
[0172] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0173] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0174] Example 2
[0175] According to embodiments of this application, an information processing method is also provided, such as... Figure 5 As shown, the method includes:
[0176] Step S501: Obtain the target problem in the target knowledge domain uploaded by the client.
[0177] Step S502: In the cloud server, the target problem is vectorized using an embedded representation model to obtain an initial vector. The initial vector is then updated using a target neural network model to obtain a target vector. Knowledge search is performed in the reference knowledge of the target knowledge domain based on the target vector. The target response information corresponding to the target problem is determined based on the search results. The target neural network model is trained based on the reference knowledge of the target knowledge domain.
[0178] Step S503: Send the target response information back to the client.
[0179] The above approach, by training the target neural network model based on reference knowledge in the target knowledge domain, possesses superior text representation capabilities within that domain. By adding the target neural network model to the embedded representation model to adjust its output vector, the accuracy of the text representation vector corresponding to the target question is improved. Furthermore, the text representation capabilities of the embedded representation model in the target knowledge domain can be relatively ignored, eliminating the need to fine-tune the model. This avoids the need for fine-tuning the embedded representation model, effectively improving the accuracy of vectors obtained from domain-specific knowledge processing even when the general embedded representation model cannot be fine-tuned. Consequently, the accuracy of knowledge search is significantly improved during knowledge search based on the target vector, and the accuracy of the target response information corresponding to the target question is enhanced based on the search results, ultimately improving the accuracy of domain-specific question answering. This achieves the goal of adjusting the vector output by the embedding representation model based on the target neural network model, thereby improving the accuracy of domain-specific knowledge question answering. It also solves the technical problem that in question answering scenarios, when the general embedding representation model cannot be fine-tuned, the vectors obtained by using the general embedding representation model to process domain-specific knowledge have low accuracy, which leads to low accuracy of domain-specific knowledge question answering.
[0180] The specific methods for information processing in the cloud server are the same as those in Example 1, and will not be repeated here.
[0181] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0182] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0183] Example 3
[0184] According to embodiments of this application, an information processing apparatus for implementing the above-described information processing method is also provided, such as... Figure 6 As shown, the device includes: a first acquisition unit 601, a first processing unit 602, a second processing unit 603, and a determination unit 604.
[0185] The first acquisition unit 601 is used to acquire the target problem involving the target knowledge domain;
[0186] The first processing unit 602 is used to perform vector transformation processing on the target problem using an embedded representation model to obtain an initial vector;
[0187] The second processing unit 603 is used to perform vector update processing on the initial vector through the target neural network model to obtain the target vector, wherein the target neural network model is trained based on reference knowledge in the target knowledge domain;
[0188] The determining unit 604 is used to perform knowledge search in the reference knowledge of the target knowledge domain based on the target vector, and determine the target response information corresponding to the target question based on the search results.
[0189] In the information processing apparatus provided in Embodiment 3 of this application, a first acquisition unit 601 acquires a target question involving a target knowledge domain; a first processing unit 602 performs vector transformation processing on the target question using an embedded representation model to obtain an initial vector; a second processing unit 603 performs vector update processing on the initial vector using a target neural network model to obtain a target vector, wherein the target neural network model is trained based on reference knowledge in the target knowledge domain; and a determination unit 604 performs knowledge search in the reference knowledge of the target knowledge domain according to the target vector, and determines the target response information corresponding to the target question based on the search results. In this scheme, since the target neural network model is trained based on reference knowledge in the target knowledge domain, it possesses good text representation capabilities within that domain. By adding the target neural network model to the embedded representation model to adjust the vectors output by the embedded representation model, the accuracy of the text representation vectors corresponding to the target question is improved. Furthermore, the text representation capabilities of the embedded representation model in the target knowledge domain can be relatively ignored, eliminating the need to worry about whether the embedded representation model can be fine-tuned. This avoids the need for fine-tuning the embedded representation model, thus effectively improving the accuracy of vectors obtained from domain-specific knowledge processing even when the general embedded representation model cannot be fine-tuned. Consequently, the accuracy of knowledge search is effectively improved during the process of knowledge search based on the target vector and determining the target response information corresponding to the target question based on the search results, thereby enhancing the accuracy of domain-specific knowledge question answering. This achieves the goal of adjusting the vector output by the embedding representation model based on the target neural network model, thereby improving the accuracy of domain-specific knowledge question answering. It also solves the technical problem that in question answering scenarios, when the general embedding representation model cannot be fine-tuned, the vectors obtained by using the general embedding representation model to process domain-specific knowledge have low accuracy, which leads to low accuracy of domain-specific knowledge question answering.
[0190] Optionally, in the information processing apparatus provided in Embodiment 3 of this application, the determining unit further includes: an acquisition subunit, used to acquire the knowledge vector of the reference knowledge in the target knowledge domain; a first determining subunit, used to determine the target reference knowledge from the reference knowledge in the target knowledge domain based on the similarity between the target vector and the knowledge vector; and a second determining subunit, used to determine the search results based on the target reference knowledge.
[0191] Optionally, in the information processing apparatus provided in Embodiment 3 of this application, the acquisition subunit further includes: a first processing module, used to perform vector transformation processing on the reference knowledge using an embedded representation model to obtain an initial knowledge vector; and a second processing module, used to perform vector update processing on the initial knowledge vector through a target neural network model to obtain a knowledge vector.
[0192] Optionally, in the information processing apparatus provided in Embodiment 3 of this application, the search results include at least one target reference knowledge, and the determining unit further includes: a third determining subunit, used to input the target question and at least one target reference knowledge into the large language model, and determine the target response information corresponding to the target question through the large language model.
[0193] Optionally, in the information processing apparatus provided in Embodiment 3 of this application, the information processing apparatus further includes: a second acquisition unit, configured to acquire an initial training sample set, wherein the initial training samples in the initial training sample set include at least a sample problem in the target knowledge domain, a first sample reference knowledge corresponding to the sample problem, and a second sample reference knowledge, wherein the first sample reference knowledge includes knowledge capable of solving the sample problem, and the second sample reference knowledge does not include knowledge capable of solving the sample problem; a third processing unit, configured to perform vector transformation processing on the initial training samples using an embedded representation model to obtain training samples, and construct a training sample set based on the training samples; and a fourth processing unit, configured to train an initial neural network model based on the training sample set to obtain a target neural network model.
[0194] Optionally, in the information processing apparatus provided in Embodiment 3 of this application, the initial training samples in the initial training sample set further include third sample reference knowledge corresponding to the sample problem, wherein sample problems other than the sample problem are determined as target sample problems, and the third sample reference knowledge is randomly selected from the first sample reference knowledge and / or the second sample reference knowledge corresponding to the target sample problem.
[0195] Optionally, in the information processing apparatus provided in Embodiment 3 of this application, the fourth processing unit further includes: a first processing subunit, used to perform vector update processing on the vectors corresponding to sample questions in the training samples in the training sample set through an initial neural network model to obtain a first vector; a second processing subunit, used to perform vector update processing on the vectors corresponding to sample reference knowledge in the training samples through the initial neural network model to obtain a second vector, wherein the sample reference knowledge includes first sample reference knowledge, second sample reference knowledge, and third sample reference knowledge; a calculation subunit, used to calculate the loss function value of the initial neural network model based on the similarity between the first vector and the second vector; and a third processing subunit, used to optimize the initial neural network model based on the loss function value, so as to obtain a target neural network model when the loss function value of the optimized initial neural network model is less than a preset threshold.
[0196] Optionally, in the information processing apparatus provided in Embodiment 3 of this application, the reference knowledge in the target knowledge domain includes: first reference knowledge belonging to the question-and-answer type and second reference knowledge belonging to the non-question-and-answer type. The second acquisition unit further includes: a fourth processing subunit, used to determine the question in the first reference knowledge as a sample question and to perform vector transformation processing on the sample question using an embedding representation model to obtain a third vector; a fifth processing subunit, used to perform knowledge search in the second reference knowledge based on the third vector to obtain multiple target second reference knowledge; and a fourth determining subunit, used to determine initial training samples based on the first reference knowledge and the multiple target second reference knowledge corresponding to the first reference knowledge to obtain an initial training sample set.
[0197] Optionally, in the information processing apparatus provided in Embodiment 3 of this application, the fourth determining subunit further includes: a third processing module, configured to construct multiple reference knowledge sets based on multiple target second reference knowledge, wherein the reference knowledge sets include a portion of the target second reference knowledge among the multiple target second reference knowledge; a first determining module, configured to input the sample question and the reference knowledge sets into a large language model, determine the response information for the sample question through the large language model, and obtain the first response information corresponding to the reference knowledge set; a fourth processing module, configured to determine the real response information corresponding to the sample question from the first reference knowledge, and output the processing result through the large language model based on the first response information and the real response information, wherein the processing result is used to characterize whether the first response information can solve the sample question; and a second determining module, configured to determine the initial training sample based on the processing result corresponding to the multiple reference knowledge sets.
[0198] Optionally, in the information processing apparatus provided in Embodiment 3 of this application, the third processing module further includes: a first processing submodule, used to input the sample problem and multiple target second reference knowledge into a large language model, and determine the response information for the sample problem through the large language model to obtain second response information; a second processing submodule, used to output a target result through the large language model based on the second response information and the actual response information, wherein the target result is one of the following: a first target result indicating that the second response information can solve the sample problem, and a second target result indicating that the second response information cannot solve the sample problem; a third processing submodule, used to construct multiple reference knowledge sets based on multiple target second reference knowledge when the target result is the first target result.
[0199] Optionally, in the information processing apparatus provided in Embodiment 3 of this application, the processing result is one of the following: a first processing result indicating that the first response information cannot solve the sample problem, and a second processing result indicating that the first response information can solve the sample problem. The second determining module further includes: a first determining submodule, used to determine, for a set of reference knowledge in a set of reference knowledge in a set of reference knowledge, the target second reference knowledge that is missing from the set of reference knowledge relative to the multiple target second reference knowledge; a second determining submodule, used to determine the missing target second reference knowledge as first sample reference knowledge when the processing result corresponding to the set of reference knowledge is the first processing result; a third determining submodule, used to determine the missing target second reference knowledge as second sample reference knowledge when the processing result corresponding to the set of reference knowledge is the second processing result; and a fourth determining submodule, used to determine an initial training sample based on the sample problem, the first sample reference knowledge, and the second sample reference knowledge.
[0200] It should be noted that the first acquisition unit 601, the first processing unit 602, the second processing unit 603, and the determination unit 604 mentioned above correspond to steps S201 to S204 in Embodiment 1. The instances and application scenarios implemented by the above units and corresponding steps are the same, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above modules, as part of the device, can run in the computer terminal 10 provided in Embodiment 1.
[0201] It should be noted that the preferred implementation schemes involved in the above embodiments of this application are the same as the schemes, application scenarios and implementation processes provided in Embodiment 1, but are not limited to the schemes provided in Embodiment 1.
[0202] Example 4
[0203] Embodiments of this application may provide an electronic device, which may be any one of a group of electronic devices. Optionally, in this embodiment, the aforementioned electronic device may also be replaced by a terminal device such as a mobile terminal.
[0204] Optionally, in this embodiment, the aforementioned electronic device may be located in at least one of a plurality of network devices in a computer network.
[0205] In this embodiment, the electronic device can execute the program code corresponding to the steps in the information processing method provided in any of the above method embodiments.
[0206] Optionally, Figure 7 This is a structural block diagram of an electronic device according to an embodiment of this application. Figure 7 As shown, the electronic device 70 may include: one or more ( Figure 7(Only one is shown) Processor 702 and memory 704. The electronic device 70 may also include a memory controller to control and manage the memory 704; the electronic device 70 may also include a peripheral interface to connect to a radio frequency module, an audio module, and a display screen, etc.
[0207] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the information processing method and apparatus in this application embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby realizing the aforementioned information processing method. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0208] The processor can access the information and application programs stored in the memory via the transmission device to execute the program code corresponding to the steps in the information processing method provided in any of the above method embodiments.
[0209] Those skilled in the art will understand that Figure 7 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones (such as Android phones, iOS phones, etc.), tablets, PDAs, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 7 This does not limit the structure of the aforementioned electronic device. For example, electronic device 70 may also include components that are more... Figure 7 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 7 The different configurations shown.
[0210] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0211] Example 5
[0212] Embodiments of this application also provide a computer-readable storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the information processing method provided in Embodiment 1.
[0213] Optionally, in this embodiment, the storage medium may be located in any electronic device in a group of electronic devices in a computer network, or in any mobile terminal in a group of mobile terminals.
[0214] Example 6
[0215] Embodiments of this application also provide a computer program product. Optionally, in this embodiment, the computer program product may include a computer program that, when executed by a processor, implements the information processing method provided in Embodiment 1.
[0216] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0217] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0218] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of units or modules may be electrical or other forms.
[0219] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0220] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0221] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0222] The above are merely preferred embodiments of this application. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. An information processing method, characterized in that, include: To identify the target problem within the target knowledge domain; An embedding representation model is used to perform vector transformation on the target problem to obtain an initial vector; The initial vector is updated by a target neural network model to obtain a target vector, wherein the target neural network model is trained based on reference knowledge in the target knowledge domain. Based on the target vector, a knowledge search is performed in the reference knowledge of the target knowledge domain, and the target response information corresponding to the target question is determined based on the search results.
2. The method according to claim 1, characterized in that, The knowledge search based on the target vector in the reference knowledge of the target knowledge domain includes: Obtain the knowledge vector of the reference knowledge in the target knowledge domain; Based on the similarity between the target vector and the knowledge vector, target reference knowledge is determined from the reference knowledge in the target knowledge domain; The search results are determined based on the target reference knowledge.
3. The method according to claim 2, characterized in that, The knowledge vector for obtaining reference knowledge in the target knowledge domain includes: The embedded representation model is used to perform vector transformation on the reference knowledge to obtain an initial knowledge vector; The initial knowledge vector is updated by the target neural network model to obtain the knowledge vector.
4. The method according to claim 1, characterized in that, The search results include at least one target reference knowledge, and the target response information corresponding to the target question is determined based on the search results, including: The target question and at least one target reference knowledge are input into a large language model, and the target response information corresponding to the target question is determined through the large language model.
5. The method according to claim 1, characterized in that, The target neural network model is obtained in the following way: Obtain an initial training sample set, wherein the initial training samples in the initial training sample set include at least a sample problem in the target knowledge domain, a first sample reference knowledge corresponding to the sample problem, and a second sample reference knowledge. The first sample reference knowledge includes knowledge that can solve the sample problem, while the second sample reference knowledge does not include knowledge that can solve the sample problem. The initial training samples are processed by vector transformation using the embedded representation model to obtain training samples, and a training sample set is constructed based on the training samples. The initial neural network model is trained based on the training sample set to obtain the target neural network model.
6. The method according to claim 5, characterized in that, The initial training samples in the initial training sample set also include the third sample reference knowledge corresponding to the sample problem. The sample problems other than the sample problem are determined as the target sample problems. The third sample reference knowledge is randomly selected from the first sample reference knowledge and / or the second sample reference knowledge corresponding to the target sample problem.
7. The method according to claim 6, characterized in that, The initial neural network model is trained based on the training sample set, and the target neural network model is obtained by including: For the training samples in the training sample set, the vector corresponding to the sample problem in the training samples is updated using the initial neural network model to obtain the first vector; The vector corresponding to the sample reference knowledge in the training samples is updated by the initial neural network model to obtain the second vector, wherein the sample reference knowledge includes the first sample reference knowledge, the second sample reference knowledge and the third sample reference knowledge; The loss function value of the initial neural network model is calculated based on the similarity between the first vector and the second vector. The initial neural network model is optimized based on the loss function value, so that the target neural network model is obtained when the loss function value of the optimized initial neural network model is less than a preset threshold.
8. The method according to claim 5, characterized in that, The reference knowledge in the target knowledge domain includes: first reference knowledge belonging to the question-answering type and second reference knowledge belonging to the non-question-answering type. Obtaining the initial training sample set includes: The problem in the first reference knowledge is identified as a sample problem, and the embedded representation model is used to perform vector transformation on the sample problem to obtain a third vector; Based on the third vector, a knowledge search is performed in the second reference knowledge to obtain multiple target second reference knowledge; The initial training samples are determined based on the first reference knowledge and multiple target second reference knowledge corresponding to the first reference knowledge, so as to obtain the initial training sample set.
9. The method according to claim 8, characterized in that, The initial training samples are determined based on the first reference knowledge and multiple target second reference knowledge corresponding to the first reference knowledge, including: Multiple reference knowledge sets are constructed based on the multiple target second reference knowledge, wherein the reference knowledge sets include a portion of the target second reference knowledge among the multiple target second reference knowledge; The sample question and the reference knowledge set are input into the large language model, and the response information for the sample question is determined by the large language model to obtain the first response information corresponding to the reference knowledge set. The system determines the true response information corresponding to the sample problem from the first reference knowledge, and outputs the processing result based on the first response information and the true response information through the large language model. The processing result is used to characterize whether the first response information can solve the sample problem. The initial training samples are determined based on the processing results corresponding to the multiple sets of reference knowledge.
10. The method according to claim 9, characterized in that, Constructing multiple sets of reference knowledge based on the aforementioned multiple target second reference knowledge includes: The sample question and the multiple target second reference knowledge are input into the large language model, and the response information for the sample question is determined by the large language model to obtain the second response information. The large language model outputs a target result based on the second response information and the actual response information, wherein the target result is one of the following: a first target result indicating that the second response information can solve the sample problem, and a second target result indicating that the second response information cannot solve the sample problem; If the target result is the first target result, the plurality of reference knowledge sets are constructed based on the plurality of target second reference knowledge.
11. The method according to claim 9, characterized in that, The processing result is one of the following: a first processing result indicating that the first response information cannot solve the sample problem; a second processing result indicating that the first response information can solve the sample problem; and, based on the processing results corresponding to the multiple reference knowledge sets, the initial training samples are determined to include: For each of the plurality of reference knowledge sets, determine the target second reference knowledge that is missing from the reference knowledge set relative to the plurality of target second reference knowledge sets; If the processing result corresponding to the reference knowledge set is the first processing result, the missing target second reference knowledge is determined as the first sample reference knowledge. If the processing result corresponding to the reference knowledge set is the second processing result, the missing target second reference knowledge is determined as the second sample reference knowledge. The initial training samples are determined based on the sample problem, the first sample reference knowledge, and the second sample reference knowledge.
12. An information processing method, characterized in that, include: Retrieve the target questions uploaded by the client that relate to the target knowledge domain; In a cloud server, an embedded representation model is used to perform vector transformation on the target problem to obtain an initial vector. The initial vector is then updated using a target neural network model to obtain a target vector. Knowledge search is performed based on the target vector in the reference knowledge of the target knowledge domain, and the target response information corresponding to the target problem is determined based on the search results. The target neural network model is trained based on the reference knowledge of the target knowledge domain. The target response information is then sent back to the client.
13. An information processing device, characterized in that, include: The first acquisition unit is used to acquire target questions involving the target knowledge domain; The first processing unit is used to perform vector transformation processing on the target problem using an embedded representation model to obtain an initial vector; The second processing unit is used to perform vector update processing on the initial vector through the target neural network model to obtain the target vector, wherein the target neural network model is trained based on reference knowledge in the target knowledge domain; The determining unit is used to perform knowledge search in the reference knowledge of the target knowledge domain based on the target vector, and determine the target response information corresponding to the target question based on the search results.
14. An electronic device, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program, when running, performs the information processing method of any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device on which the storage medium is located to perform the information processing method of any one of claims 1 to 12.
16. A computer program product, characterized in that, It includes a computer program or instructions that, when executed by a processor, implement the information processing method according to any one of claims 1 to 12.