Data processing method, system, electronic device and computer readable storage medium
By exploring the knowledge boundaries and dynamically supplementing the knowledge of large language models, we can identify and correct the model's weaknesses, generate target language models, solve the illusion problem, improve the accuracy and timeliness of the model in specific domains, and reduce labor costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ALIBABA (CHINA) CO LTD
- Filing Date
- 2025-01-21
- Publication Date
- 2026-07-21
AI Technical Summary
Large language models often suffer from the illusion problem when dealing with mid-to-long-tail knowledge in specific domains, resulting in the generation of inaccurate or fictitious information. Furthermore, existing solutions cannot be updated in real time, have high labor costs, and cannot guarantee the accuracy and timeliness of search results.
By acquiring the original query dataset, the knowledge boundary of the pre-trained language model is explored, hallucination query data is identified, knowledge mining is performed, multimedia data is collected, question-answer pairs are constructed for model training, and a target language model is generated to solve the hallucination problem.
This has improved the model's performance in specific fields, enhanced the accuracy and timeliness of retrieval results, reduced manual maintenance costs, and increased its application potential in high-precision fields.
Smart Images

Figure CN122432344A_ABST
Abstract
Description
Technical Field
[0001] This application relates to data processing technology and large model technology, and more specifically, to a data processing method, system, electronic device and computer-readable storage medium. Background Technology
[0002] With the rapid development of deep learning technology, Large Language Models (LLMs) have become a core tool in the field of Natural Language Processing (NLP). However, when processing mid-to-long-tail knowledge in specific domains, LLMs often exhibit the "illusion" problem, where they generate inaccurate or even completely fictitious information. This illusion problem primarily stems from the insufficient coverage or shallow understanding of the domain's knowledge by the LLM, especially in highly specialized or niche areas. This not only undermines the reliability of LLMs but also severely limits their application in vertical fields with extremely high accuracy requirements, such as medicine, law, and education.
[0003] Currently, the illusion problem in large language models is usually addressed by methods such as static knowledge injection, fine-tuning, and retrieve-and-generate. However, these methods have their own problems, such as the inability to update in real time, high manual costs, and the inability to guarantee the accuracy and timeliness of retrieval results.
[0004] There is currently no effective solution to the above problems. Summary of the Invention
[0005] This application provides a data processing method, system, electronic device, and computer-readable storage medium to at least solve the technical problems in related technologies, such as the inability to update knowledge injection in real time, high manual costs, and the inability to guarantee the accuracy and timeliness of retrieval results in large language models.
[0006] According to one aspect of the embodiments of this application, a data processing method is provided, comprising: acquiring an original query dataset; using the original query dataset to perform knowledge boundary exploration on a pre-trained language model to obtain exploration results, wherein the exploration results are used to indicate hallucination query data in the original query dataset; performing knowledge mining on the exploration results to obtain multimedia data associated with the exploration results; and training the pre-trained language model based on the exploration results and the multimedia data to generate a target language model, wherein the target language model is used to process questions to generate answers.
[0007] According to another aspect of the embodiments of this application, a data processing method is provided, comprising: obtaining a target question; processing the target question using a target language model to generate a target answer; wherein the target language model is obtained according to any of the above data processing methods.
[0008] According to another aspect of the embodiments of this application, a data processing method is provided, comprising: obtaining a legal question; processing the legal question using a target language model to generate a legal question answer; wherein the target language model is obtained according to any of the above data processing methods.
[0009] According to another aspect of the embodiments of this application, a data processing method is provided, comprising: obtaining a data processing request through a first application programming interface, wherein the request data carried in the data processing request includes a target question; and returning a data processing response through a second application programming interface, wherein the response data carried in the data processing response includes a target answer, wherein the target answer is generated by processing the target question using a target language model, and the target language model is obtained according to any of the above data processing methods.
[0010] According to another aspect of the embodiments of this application, a data processing method is provided, comprising: responding to a query command applied to an operation interface and inputting a target question; responding to a processing command applied to the operation interface and displaying a target answer on the operation interface, wherein the target answer is generated by processing the target question using a target language model, and the target language model is obtained according to any of the above data processing methods.
[0011] According to another aspect of the embodiments of this application, a data processing system is provided, including: a client for sending a target question; a server connected to the client for processing the target question using a target language model to generate a target answer, wherein the target language model is obtained according to any of the above data processing methods; and the client is also used to output the target answer.
[0012] According to another aspect of the embodiments of this application, an electronic device is also provided, including: a memory storing an executable program; and a processor connected to the memory via a bus for running the program, wherein the program executes any of the above-described data processing methods during runtime.
[0013] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein, when the executable program is running, it controls the device where the computer-readable storage medium is located to perform any of the above-described data processing methods.
[0014] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements any of the above-described data processing methods.
[0015] In this embodiment, an original query dataset is obtained, and then the pre-trained language model is subjected to knowledge boundary exploration using the original query dataset to obtain exploration results. The exploration results are used to indicate the illusion query data in the original query dataset. Then, knowledge mining is performed on the exploration results to obtain the multimedia data associated with the exploration results. Finally, the pre-trained language model is trained based on the exploration results and multimedia data to generate a target language model for processing questions and generating answers. This achieves the goal of using a model generated by dynamic knowledge boundary exploration and knowledge supplementation methods to process data and generate answers to questions in a timely and accurate manner, thereby overcoming the illusion problem of the model, improving the performance of the model in specific domains, improving the accuracy and timeliness of model retrieval results, reducing manual maintenance costs, and enhancing the application potential of the model in high-precision demand domains. This solves the technical problems of large language models in related technologies, such as the inability to update knowledge injection in real time, high manual costs, and the inability to guarantee the accuracy and timeliness of retrieval results.
[0016] It is worth noting that the general description above and the detailed description that follow are merely for illustrative purposes and do not constitute a limitation on this application. Attached Figure Description
[0017] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0018] Figure 1 This is a schematic diagram illustrating an application scenario of a data processing method according to an embodiment of this application;
[0019] Figure 2 This is a flowchart of a data processing method according to an embodiment of this application;
[0020] Figure 3 This is a flowchart of a large model pre-training method based on dynamic knowledge enhancement according to an embodiment of this application;
[0021] Figure 4 This is a flowchart of a data processing method according to an embodiment of this application;
[0022] Figure 5 This is a flowchart of a data processing method according to an embodiment of this application;
[0023] Figure 6 This is a flowchart of a data processing method according to an embodiment of this application;
[0024] Figure 7 This is a flowchart of a data processing method according to an embodiment of this application;
[0025] Figure 8 This is a schematic diagram of the structure of a data processing system according to an embodiment of this application;
[0026] Figure 9 This is a schematic diagram of the structure of a data processing apparatus according to an embodiment of this application;
[0027] Figure 10 This is a schematic diagram of the structure of another data processing apparatus according to an embodiment of this application;
[0028] Figure 11 This is a schematic diagram of the structure of another data processing apparatus according to an embodiment of this application;
[0029] Figure 12 This is a schematic diagram of the structure of another data processing apparatus according to an embodiment of this application;
[0030] Figure 13 This is a schematic diagram of the structure of another data processing apparatus according to an embodiment of this application;
[0031] Figure 14 This is a structural block diagram of a computing device according to an embodiment of this application;
[0032] Figure 15 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0033] 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.
[0034] 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.
[0035] The technical solution provided in this application is mainly implemented using large-scale model technology. Here, "large-scale model" refers to a deep learning model with a massive number of parameters, typically containing hundreds of millions, tens of billions, hundreds of billions, trillions, or even tens of trillions of parameters. Large-scale models can also be called foundation models. They are pre-trained using large-scale unlabeled corpora to produce pre-trained models with hundreds of millions of parameters. Such models can adapt to a wide range of downstream tasks and have good generalization ability. Examples include Large Language Models (LLMs) and multi-modal pre-training models.
[0036] It should be noted that, in practical applications, large models can be fine-tuned using a small number of samples to adapt them to different tasks. For example, large models can be widely applied in Natural Language Processing (NLP), computer vision, and speech processing. Specifically, they can be applied to computer vision tasks such as Visual Question Answering (VQA), Image Captioning (IC), and Image Generation, as well as NLP tasks such as text-based sentiment classification, text summarization, and machine translation. Therefore, the main application scenarios for large models include, but are not limited to, digital assistants, intelligent robots, search, online education, office software, e-commerce, and intelligent design. In this embodiment, the example of data processing using a target language model trained according to this application is provided for illustration.
[0037] First, some nouns or terms that appear in the description of the embodiments of this application shall be interpreted as follows:
[0038] Large Language Model (LLM): A deep learning model with a large number of parameters and trained on large-scale data, possessing powerful natural language understanding and generation capabilities.
[0039] Hallucination refers to the problem where large models generate inaccurate, fictitious, or unfounded information due to incomplete knowledge or misunderstandings when generating content.
[0040] Mid-to-long-tail knowledge: Compared to high-frequency "head" knowledge, it covers low-frequency but equally important professional or niche knowledge.
[0041] Pre-training Corpus: A large-scale text dataset used for the initial training of a large model, which determines the model's basic knowledge and language understanding capabilities.
[0042] Question-answer pair (Q&A Pair): A data pair consisting of a question and its corresponding correct answer, used to train the model to understand and generate accurate answers.
[0043] Information retrieval: Techniques for retrieving relevant information from large amounts of data to support the knowledge replenishment process.
[0044] With the rapid development of deep learning technology, Large Language Models (LLMs) have become a core tool in the field of Natural Language Processing (NLP). Leveraging their superior natural language understanding and generation capabilities, they have achieved remarkable results in numerous applications such as text generation, question answering systems, and machine translation. However, when processing mid-to-long-tail knowledge in specific domains, LLMs often exhibit the "illusion" problem, where they generate inaccurate or even completely fictitious information. This illusion problem mainly stems from the insufficient coverage or shallow understanding of knowledge within the specific domain by the LLM, especially in highly specialized or niche areas. This not only undermines the credibility of LLMs but also severely limits their application in vertical fields with extremely high accuracy requirements, such as medicine, law, and education.
[0045] Currently, solutions to the illusion problem in large language models typically employ static knowledge injection, fine-tuning, and retrieval-and-generate methods. Static knowledge injection integrates data from a specific knowledge base into the model during pre-training, enhancing its knowledge coverage. However, this static knowledge injection cannot be updated in real-time, making it difficult to adapt to new knowledge or correct existing knowledge gaps. Furthermore, it usually requires extensive manual data selection and organization, resulting in high labor costs and low efficiency. Fine-tuning utilizes domain-specific data to fine-tune the pre-trained model, improving its performance in that domain. However, this approach requires a large amount of labeled data and repeated fine-tuning for different domains, wasting time and resources. Additionally, the fine-tuning process may lead to performance degradation in other domains. Retrieval-and-generate methods retrieve relevant knowledge in real-time during the generation process and combine it with the generated answer, improving information accuracy. However, this approach relies on the performance of the retrieval system, potentially leading to inaccurate or delayed retrieval results. It also increases the complexity and computational cost of the generation process, impacting response speed.
[0046] In summary, current solutions to the illusion problem in large language models have drawbacks such as untimely knowledge updates, reliance on manual intervention, high costs, and difficulty in fully covering knowledge blind spots, making it difficult to effectively solve the illusion problem in large language models.
[0047] To address the aforementioned deficiencies, no effective solution has been proposed prior to this application.
[0048] According to an embodiment of this application, a data processing method is 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.
[0049] Considering the large number of model parameters in large models and the limited computing resources of mobile terminals, the method provided in this application embodiment can be applied to, for example, Figure 1 The application scenarios shown are not limited to these. In, for example... Figure 1 In the application scenario shown, the large model is deployed on server 10. Server 10 can connect to one or more client devices 20 via a local area network (LAN), wide area network (WAN), internet connection, or other types of data network. These client devices 20 may include, but are not limited to, smartphones, tablets, laptops, PDAs, personal computers, smart home devices, and in-vehicle devices. Client devices 20 can interact with users through a graphical user interface to access the large model, thereby implementing the method provided in this embodiment.
[0050] In this embodiment, the system consisting of a client device and a server can perform the following steps: the client device performs steps such as obtaining the original query dataset and sending the original query dataset to the server; the server performs steps such as using the original query dataset to explore the knowledge boundaries of the pre-trained language model, obtaining the exploration results, performing knowledge mining on the exploration results to obtain the multimedia data associated with the exploration results, training the pre-trained language model based on the exploration results and the multimedia data to generate the target language model, and returning the target language model to the client device. It should be noted that, provided that the operating resources of the client device can meet the deployment and operation conditions of the large model, this embodiment can be performed on the client device.
[0051] It should be noted that with the rapid development of high-performance computing units, the methods provided in this application embodiment can also be applied to model-in-machine systems in other application scenarios. In one optional embodiment, the model-in-machine system has multiple built-in models, and users can select one model to adjust as needed to obtain their own model. The high-performance computing unit built into the model-in-machine system can then directly call the adjusted model to execute the methods provided in this application embodiment. In another optional embodiment, the large model-in-machine system has a pre-trained model built-in, and the high-performance computing unit built into the model-in-machine system can then directly call that model to execute the methods provided in this application embodiment.
[0052] Furthermore, when users need to train their own models, they can upload their own datasets via the client. These datasets are then sent to the server, allowing the server to adjust the pre-trained model using the dataset to obtain the user's customized model, which can then be deployed to the production environment. To facilitate users' model adjustment needs, the server provides complete adjustment tools, development frameworks, and processes, supporting multiple adjustment strategies. This allows the adjusted model to better adapt to different application domains and achieve a high degree of customization.
[0053] Under the aforementioned operating environment, this application provides the following: Figure 2 The data processing method shown. Figure 2 This is a flowchart of a data processing method according to an embodiment of this application. Figure 2 As shown, the method may include the following steps:
[0054] Step S21: Obtain the original query dataset;
[0055] Step S22: Use the original query dataset to explore the knowledge boundaries of the pre-trained language model and obtain the exploration results, wherein the exploration results are used to indicate the hallucination query data in the original query dataset;
[0056] Step S23: Perform knowledge mining on the exploration results to obtain multimedia data associated with the exploration results;
[0057] Step S24: Based on the exploration results and multimedia data, train the pre-trained language model to generate a target language model, wherein the target language model is used to process the question to generate an answer.
[0058] In this embodiment, the original query dataset can be understood as a collection of original queries from multiple sources. A query can be understood as a question or query request raised by a user. For example, the sources of queries may include public datasets, real user queries after the product is launched, knowledge questions in specific professional fields, etc. Obtaining the original query dataset facilitates subsequent analysis and model training.
[0059] A pre-trained language model can be a large language model, which can be understood as a deep learning model that has been trained on large-scale text data. This pre-trained language model has the ability to generate and understand natural language.
[0060] Using the original query dataset to probe the knowledge boundaries of a pre-trained language model can be understood as identifying and locating the boundaries of the pre-trained language model's knowledge mastery, and exploring which domains or knowledge points the pre-trained language model lacks complete knowledge, has insufficient understanding, or suffers from illusion problems. Here, the knowledge boundary can be understood as the edge of the pre-trained language model's knowledge coverage; beyond this knowledge boundary, the pre-trained language model may produce inaccurate or unfounded answers.
[0061] The knowledge boundaries of a pre-trained language model are explored using the original query dataset, yielding exploration results. These results are used to identify illusory query data within the original query dataset. Understandably, when using a pre-trained language model for question answering or text generation based on the original query dataset, the model often produces illusions for mid-to-long-tail questions due to incomplete knowledge or misunderstandings. This means the generated answers or content contain inaccurate, fictitious, or unfounded information that contradicts the actual context, standard answer, or facts of the query or question. Therefore, illusory query data can be understood as questions outside the knowledge boundaries of the pre-trained language model; that is, queries in the original query dataset that are prone to producing illusions, thus causing the pre-trained language model to generate inaccurate, fictitious, or unfounded information during processing.
[0062] The exploration results represent the hallucination query data identified through the knowledge boundary exploration method, i.e., the set of questions that the pre-trained language model is prone to generating inaccurate or fictitious information when processing. Therefore, by using the original query dataset to explore the knowledge boundaries of the pre-trained language model and obtaining the exploration results, we can accurately locate the knowledge weaknesses of the pre-trained language model based on the exploration results, providing a basis for further knowledge mining. For example, the exploration results include a list of all original questions identified as hallucination questions, along with their corresponding incorrect predicted answers.
[0063] Knowledge mining of the exploration results yields multimedia data associated with those results. This can be understood as retrieving information related to the identified hallucination query data through retrieval, i.e., multimedia data. For example, information retrieval technology can be used to automatically collect detailed information on relevant knowledge points from authoritative knowledge bases, professional databases, or trusted internet resources. This can include various forms of data such as documents, images, and videos, without limitation. Therefore, through automated knowledge mining, high-quality information targeting the knowledge gaps of pre-trained language models can be collected promptly and comprehensively, providing richer training materials and enhancing their understanding and memorization of mid-to-long-tail knowledge.
[0064] Training the pre-trained language model based on the exploration results and multimedia data can be understood as constructing question-answer pairs from the aforementioned multimedia data and corresponding exploration results, supplementing them into the pre-training corpus, and then retraining the pre-trained language model to enhance its performance on the knowledge points involved in the hallucination query data.
[0065] Based on the exploration results and multimedia data, a pre-trained language model is trained to generate a target language model. This target language model is used to process questions and generate answers. The target language model can be understood as a large language model that has undergone knowledge augmentation and training; that is, the model obtained after training the pre-trained language model. The target language model can generate more accurate and reliable answers when processing questions, especially for mid-to-long-tail knowledge questions outside the boundaries of the pre-trained language model. Therefore, through dynamic knowledge supplementation and model training of the pre-trained language model, the final trained target language model can significantly reduce illusion problems, improve accuracy and coverage in mid-to-long-tail knowledge domains, and enhance the overall performance and application value of the model, particularly in professional or niche applications.
[0066] As can be seen, this application obtains the original query dataset, then uses it to probe the knowledge boundaries of a pre-trained language model, yielding exploration results. These results indicate the illusion query data within the original query dataset. Knowledge mining is then performed on the exploration results to obtain the multimedia data associated with them. Finally, the pre-trained language model is trained based on the exploration results and the multimedia data to generate a target language model for processing questions and generating answers. This approach can identify, enhance, and optimize the performance of large models (i.e., pre-trained language models) on mid-to-long-tail knowledge, overcoming the illusion problem while improving the model's reliability and practicality.
[0067] Therefore, the automated knowledge boundary exploration and knowledge supplementation method proposed in this application can not only identify knowledge blind spots and weaknesses of large models in real time through knowledge boundary exploration, achieving precise positioning, but also dynamically inject knowledge and train large models in real time, thereby improving the performance of large models in specific domains. Simultaneously, it reduces the cost of manual intervention and maintenance. Furthermore, it reduces the probability of large models generating erroneous information, expands the knowledge coverage of large models, improves the accuracy and timeliness of generated content, and enhances the application potential of large models in high-precision domains.
[0068] The data processing methods provided in this application can be applied, but are not limited to, to data querying applications in fields such as e-commerce services, education services, legal services, medical services, conference services, social networking services, financial product services, logistics services, and navigation services. For example, data querying for e-commerce services, data querying for education services, and data querying for legal services are not limited here.
[0069] By employing the embodiments of this application, an original query dataset is obtained, and then the knowledge boundary of a pre-trained language model is explored using the original query dataset to obtain exploration results. These exploration results indicate illusory query data in the original query dataset. Knowledge mining is then performed on the exploration results to obtain multimedia data associated with the exploration results. Finally, the pre-trained language model is trained based on the exploration results and multimedia data to generate a target language model for processing questions and generating answers. This achieves the goal of using a model generated through dynamic knowledge boundary exploration and knowledge supplementation methods to process data and generate answers to questions in a timely and accurate manner, thereby overcoming the model's illusion problem. This improves the model's performance in specific domains, enhances the accuracy and timeliness of model retrieval results, reduces manual maintenance costs, and enhances the model's application potential in high-precision domains. Furthermore, it solves the technical problems of large language models in related technologies, such as the inability to update knowledge injection in real time, high manual costs, and the inability to guarantee the accuracy and timeliness of retrieval results.
[0070] In an optional embodiment, in step S22, the knowledge boundary of the pre-trained language model is explored using the original query dataset to obtain the exploration results, including the following method steps:
[0071] Step S221: Use a pre-trained language model to make multiple predictions on the original question in the original query dataset to obtain multiple predicted answers;
[0072] Step S222: Identify the hallucination query data based on multiple predicted answers to obtain the exploration results.
[0073] In this embodiment of the application, when using the original query dataset to explore the knowledge boundary of the pre-trained language model and obtain the exploration results, the pre-trained language model can be used to make multiple predictions on the original question in the original query dataset to obtain multiple predicted answers. Then, based on the multiple predicted answers, the hallucination query data can be identified to obtain the exploration results.
[0074] It is understood that, in order to test the performance of the pre-trained language model under different random seed settings, the same original question will be processed multiple times by the pre-trained language model, that is, the pre-trained language model will generate answers to the same original query multiple times. For example, multiple times can be set to more than or equal to 10 times, which is not limited here.
[0075] A pre-trained language model processes the same original query multiple times, thereby generating multiple different predicted answers, such as generating N sets of answers {P1,...,PN}, where N is a positive integer.
[0076] Therefore, by making multiple predictions on the same original question, we can collect the model's answers under different random states, thus allowing us to observe the consistency and accuracy of the content generated by the model. If the model's answers to the same question show significant differences or errors in multiple predictions, it indicates that the model has knowledge boundaries on that knowledge point, meaning its knowledge mastery is insufficient. This helps to more accurately locate the model's knowledge blind spots, providing specific directions for subsequent knowledge mining and model optimization.
[0077] After obtaining multiple predicted answers, the hallucination query data is then identified based on these multiple predicted answers. If the pre-trained language model generates an incorrect answer in one instance, or if the answers from the pre-trained language model are inconsistent in multiple responses, it is determined that the pre-trained language model does not have a sufficient grasp of the query and the underlying knowledge points, which means that the query is outside the knowledge boundary of the pre-trained language model, thus obtaining the exploration result.
[0078] Therefore, it is possible to automatically identify illusion problems in the model's knowledge of the mid-to-long tail and pinpoint the specific location of knowledge blind spots. By identifying illusion query data, it is possible to clarify which domains of knowledge need further enhancement and which knowledge point representations need optimization, thereby enabling targeted improvement of the model's performance in specific domains, reducing the occurrence of illusion problems, and enhancing the model's reliability and practicality.
[0079] In an optional embodiment, in step S221, the original question in the original query dataset is predicted multiple times using a pre-trained language model to obtain multiple predicted answers, including the following method steps:
[0080] Step S2211: Based on the preset random number seed, the pre-trained language model is driven to make multiple predictions on the original question in the original query dataset to obtain multiple predicted answers. The random number seed is used to control the pre-trained language model to generate the same or similar predicted answers when making multiple predictions for the same question. The number of multiple predicted answers is determined according to the number of random number seeds.
[0081] In this embodiment of the application, when using a pre-trained language model to make multiple predictions on the original question in the original query dataset and obtain multiple predicted answers, the pre-trained language model can be driven to make multiple predictions on the original question in the original query dataset based on a preset random number seed to obtain multiple predicted answers.
[0082] The random number seed controls whether the pre-trained language model generates the same or similar predicted answers when making multiple predictions for the same question. The number of multiple predicted answers is determined by the number of random number seeds. Furthermore, the random number seed is a value used to initialize the random number generator, which determines the specific path of the generated content. Different random number seeds will cause the model to adopt different random states during the generation process, potentially producing different results. Understandably, the setting of the random number seed has a significant impact on the diversity and consistency of the model's output.
[0083] For example, for questions with standard answers (such as publicly available datasets, manually labeled business data, etc.), the question-answer pair is labeled as...<Q,A> The random number seed can be set to N groups, where N is an integer greater than or equal to 10, and there is no restriction here. These N different random number seeds are denoted as {S1,...,SN}. Driven by the random number seeds, the pre-trained language model makes multiple predictions for the same original question, generating one predicted answer each time. This can be understood as using the pre-trained language model to predict the answer Pi of Q under the setting of random number seed Si, i.e., LLM(Q,Si)=Pi, thus obtaining multiple predicted answers, i.e., obtaining N sets of answers {P1,...,PN}.
[0084] Therefore, by changing the random number seed and making multiple predictions, we can more comprehensively observe the changes in the model's output when dealing with the same problem, which helps to identify the model's knowledge boundaries for specific knowledge points. If the model's predicted answer shows significant differences or errors in multiple predictions, it indicates that the model's knowledge of that knowledge point is insufficient, making it prone to hallucination problems. Multiple predictions can improve the accuracy of hallucination problem identification.
[0085] At the same time, different random number seeds will cause the model to generate different answers, which helps to collect the diverse answers of the model when dealing with the same question, and also allows us to check the consistency of the model output, that is, whether the model can maintain a certain degree of similarity in its answers to the same question under different random states.
[0086] Furthermore, by comparing multiple predicted answers obtained from various predictions, the illusion problem of the model can be quantified—that is, in what proportion of predictions the model generated inaccurate or fictitious information. This helps subsequent improvement measures, such as knowledge mining and model training, to specifically target which knowledge points for optimization.
[0087] Therefore, this application can not only identify the knowledge boundaries and illusion problems of pre-trained language models on specific knowledge points, but also ensure the diversity and consistency of generated answers, thereby providing a more accurate and comprehensive basis for subsequent model optimization and knowledge enhancement.
[0088] In an optional embodiment, in step S222, the hallucination query data is identified based on multiple predicted answers to obtain the exploration results, including the following method steps:
[0089] Step S2221: Obtain the first text prompt word, wherein the first text prompt word is used to indicate whether the predicted answer corresponding to the given question is correct based on the given question and the given answer;
[0090] Step S2222: Use the first text prompt word to drive the answer determination model to determine the correctness of multiple predicted answers and obtain the determination result. The determination result is used to determine whether there is an incorrect answer among the multiple predicted answers.
[0091] Step S2223: In response to the determination result indicating that any one of the multiple predicted answers is an incorrect answer, the original question corresponding to the multiple predicted answers is determined to be hallucination query data, and the exploration result is obtained.
[0092] In this embodiment of the application, the answer determination model can be understood as a model specifically used to evaluate the correctness of the predicted answer. The answer determination model can be another pre-trained large model or deep learning model, or it can be a model that has been specifically trained to compare the similarity or consistency between the predicted answer and the standard answer. There are no restrictions here.
[0093] When identifying hallucination query data based on multiple predicted answers and obtaining the exploration results, a first text prompt can be obtained. This first text prompt is used to instruct the answer determination model to determine whether the predicted answer corresponding to the given question is correct, based on the given question and the given answer (standard answer). It can be understood that the first text prompt is a specific text indicator used to guide the answer determination model in judging the correctness of the predicted answer based on the given question and the given answer (standard answer). It is understood that the first text prompt is usually customized based on the original question and the known correct answer (standard answer) to ensure that the answer determination model can accurately identify the correctness of the predicted answer.
[0094] After obtaining the first text prompt, the answer determination model is driven by the first text prompt to determine the correctness of multiple predicted answers, obtaining a determination result. This determination result is used to determine whether there are any incorrect answers among the multiple predicted answers; that is, the determination result can be understood as a conclusion about the correctness of the predicted answers based on the correctness determination. The determination result is used to identify whether there is erroneous information in the predicted answers, thereby determining whether the original question is a hallucination query.
[0095] For example, the first text prompt could be in the form of: Given a question and a standard answer, please determine whether the response is correct, where question: {Q}; standard answer: {A}; response: {Pi}. The output of the answer determination model could be {"is_correct": <true false>The wording here is not restricted. For example, the first text prompt could be designed as: "Given question: What is the main cause of myocardial infarction? Standard answer: Blockage of the coronary arteries. Please judge whether the following response is correct: The main cause of myocardial infarction is improper diet." The wording here is not restricted.
[0096] Then, the correctness of all generated answers {P1,...,PN} is judged by the answer determination model. If the determination result shows that any of the multiple predicted answers does not match the given standard answer, that is, there is an incorrect answer, and the output of the answer determination model is {"is_correct":false}, it means that the pre-trained language model has produced an inaccurate or fictitious answer when processing the question, that is, a hallucination question has occurred. Therefore, it is determined that the Q is outside the knowledge boundary of the large model, thus identifying the original question corresponding to the multiple predicted answers as hallucination query data and obtaining the exploration result.
[0097] Therefore, this application can automatically determine the correctness of multiple predicted answers generated by a pre-trained language model, driven by a first text prompt word, and ultimately identify illusory query data. This yields specific exploration results regarding the knowledge boundaries of the pre-trained language model, effectively exploring its knowledge boundaries. It can identify which knowledge domains the pre-trained language performs poorly, allowing for targeted knowledge mining and model training, thus improving the overall performance and application value of the model. Furthermore, automation reduces the need for manual checking of model output and ensures the accuracy and efficiency of knowledge boundary exploration.
[0098] In an optional embodiment, in step S23, knowledge mining is performed on the exploration results to obtain multimedia data associated with the exploration results, including the following method steps:
[0099] Step S231: Retrieve multimedia data associated with the exploration results from the information resources corresponding to the preset information retrieval method.
[0100] In this embodiment, when knowledge mining is performed on the exploration results to obtain multimedia data associated with the exploration results, the multimedia data associated with the exploration results can be retrieved from information resources corresponding to a preset information retrieval method. This can be understood as automatically retrieving relevant information about the identified illusion problem (i.e., weak knowledge point) from authoritative knowledge bases or trusted internet resources using information retrieval technology, and retaining the text data therein to prepare for constructing question-answer pairs.
[0101] The preset information retrieval method can be understood as a set of pre-defined retrieval strategies and algorithms used to find relevant content from various information resources. Preset information retrieval methods may include techniques such as keyword search, semantic matching, and data mining, aiming to efficiently locate multimedia data related to the hallucination query data from massive amounts of data; no restrictions are imposed here.
[0102] Information resources can be understood as various types of accessible data sources, including but not limited to the internet, specialized databases, social media, academic papers, and multimedia libraries. These resources contain a wealth of information and knowledge, forming an important foundation for knowledge mining.
[0103] Therefore, this application can collect information related to knowledge points outside the knowledge boundary of the pre-trained language model from multiple angles and sources, not limited to text data, but also including multimedia content such as images, audio, and video, which helps to build richer pre-training corpora, improve the ability of the pre-trained language model to process long-tail knowledge, reduce the occurrence of illusion problems, and enhance the reliability and application value of the pre-trained language model.
[0104] In an optional embodiment, in step S24, the pre-trained language model is trained based on the exploration results and multimedia data to generate the target language model, including the following method steps:
[0105] Step S241: Construct multiple question-answer pairs based on the exploration results and multimedia data, wherein the multiple question-answer pairs are augmented corpora to supplement the long-tail knowledge of the pre-trained language model;
[0106] Step S242: Add multiple question-answer pairs to the pre-training corpus;
[0107] Step S243: Train the pre-trained language model using the pre-trained corpus to generate the target language model.
[0108] In this embodiment, when training the pre-trained language model based on the exploration results and multimedia data to generate the target language model, multiple question-answer pairs can be constructed based on the exploration results and multimedia data. This can be understood as constructing a series of questions and their corresponding correct answers based on the retrieved multimedia data related to the hallucination query data, thus forming question-answer pairs. Therefore, by analyzing the media data content to construct question-answer pairs, relevant knowledge points are extracted and transformed into question and answer formats, facilitating model learning.
[0109] Among them, several question-answer pairs are augmented corpora to supplement the mid-to-long-tail knowledge of the pre-trained language model, thus making up for the deficiencies of the pre-trained language model in mid-to-long-tail knowledge. Understandably, the construction of the augmented corpora is dynamic, aiming to update the model's knowledge in real time and reduce the illusion problem in the content generated by the pre-trained language model.
[0110] Then, multiple question-answer pairs are added to the pre-training corpus for the next round of model pre-training. Thus, the constructed question-answer pairs are integrated into the model's pre-training corpus, updating and expanding the existing corpus. These supplementary question-answer pairs, as new training data, together with the original corpus, form a new foundation for model learning. This supplementation method enables dynamic updating of the pre-training corpus, ensuring that the model can continuously learn new knowledge and information.
[0111] Then, the pre-trained language model is trained using the pre-trained corpus to generate the target language model. This can be understood as retraining the original pre-trained language model using the updated pre-trained corpus to generate the target language model, enabling the model to handle the original problem more accurately and reducing the occurrence of hallucination problems.
[0112] In an optional embodiment, in step S241, multiple question-answer pairs are constructed based on the exploration results and multimedia data, including the following method steps:
[0113] Step S2411: Obtain the second text prompt word, wherein the second text prompt word is used to indicate asking and answering questions from multiple perspectives based on the given question and the associated data of the given question;
[0114] Step S2412: Use the second text prompt word to drive the pre-trained language model to construct question-answer pairs between the exploration results and multimedia data, and obtain multiple question-answer pairs.
[0115] In this embodiment of the application, when constructing multiple question-answer pairs based on the exploration results and multimedia data, a second text prompt word can be obtained. The second text prompt word is used to instruct the question and answer from multiple perspectives based on the given question and the associated data of the given question. It can be understood that the second text prompt word is used to guide the pre-trained language model to ask questions from multiple perspectives and give corresponding answers, so as to ensure that the constructed question-answer pairs cover multiple aspects of relevant knowledge points and improve the comprehensiveness and accuracy of knowledge.
[0116] For example, the second text prompt could be in the form of: "There is a question and related background knowledge. Please construct targeted question-and-answer pairs based on the background knowledge, asking and answering questions from different aspects of this knowledge point." Where: Question: {Q}; Background knowledge: {D}. For example, for the question "What are the latest developments in artificial intelligence?", the associated multimedia data might include recent AI research papers, news reports, and technical blogs. The second text prompt could instruct a pre-trained language model to construct a series of questions and their corresponding answers from different angles, such as "What are the latest breakthroughs in AI research?", "How is AI technology applied in the medical field?", and "What are the main trends in AI development in the next few years?", etc., without limitation.
[0117] Then, the pre-trained language model is driven by the second text prompt word to construct question-answer pairs between the exploration results and multimedia data, resulting in multiple question-answer pairs. For example, the question-answer pairs can be in the following forms: 1. {"question":<Question 1>,"answer":<Answer 1>}; 2. {"question":<Question 2>,"answer":<Answer 2>}; 3. {"question":<Question 3>,"answer":<Answer 3>}, without limitation.
[0118] As can be seen, this application takes into account the diverse and varied formats of information retrieved from the internet, thus requiring further construction into a question-and-answer format to facilitate model enhancement and understanding, thereby covering relevant knowledge points. Furthermore, internet information retrieved for specific knowledge can be used to generate multiple questions and answers through a large model and rule templates, ensuring the accuracy and diversity of question-and-answer pairs while maintaining natural and fluent language. Specifically, questions and corresponding web pages / documents can be obtained first through searching.<Q,D> d\in D represents a single webpage / document. Then, using a larger model, through a second text prompt word, ...<Q,D> Further develop it into a question-and-answer format.
[0119] Therefore, by acquiring second text prompts and using these prompts to drive the pre-trained language model to construct question-answer pairs, the goal of dynamically constructing enhanced corpora from exploration results and multimedia data was achieved. The second text prompts ensured the diversity of questions and the comprehensiveness of perspectives, and by constructing multiple question-answer pairs covering related knowledge points, rich content was provided for subsequent pre-training corpus supplementation and model training.
[0120] In an optional embodiment, in step S243, the pre-trained language model is trained using pre-trained corpus to generate the target language model, including the following method steps:
[0121] Step S2431: Train the pre-trained language model using pre-trained corpus and determine the target loss;
[0122] Step S2432: Update the model parameters of the pre-trained language model based on the target loss to generate the target language model.
[0123] In this embodiment of the application, when training a pre-trained language model using pre-trained corpus to generate a target language model, the pre-trained language model can be trained using pre-trained corpus to determine the target loss. This can be understood as using the pre-trained corpus supplemented with multiple question-answer pairs as described above, and using these enhanced corpus to further train the pre-trained language model in order to optimize the performance of the pre-trained language model on medium and long tail knowledge.
[0124] Understandably, during training, the pre-trained language model calculates the loss between the generated answer and the standard answer in the question-answer pair. This loss value reflects the gap between the current output generated by the pre-trained language model and the expected output. The target loss refers to the loss value that the pre-trained language model attempts to minimize during training, typically achieved by adjusting model parameters through optimization algorithms.
[0125] After obtaining the target loss, the model parameters of the pre-trained language model are updated based on the target loss to generate the target language model. For example, after determining the target loss, the contribution of the pre-trained language model parameters to the loss, i.e., the gradient, is calculated through the backpropagation algorithm. Then, based on the calculated gradient, the model parameters of the pre-trained language model are adjusted using update algorithms such as stochastic gradient descent to reduce the target loss and improve model performance, thereby generating the target language model.
[0126] As can be seen, this application integrates all question-and-answer pairs about weak knowledge points into the pre-training corpus of the large model, and participates in the model pre-training in the next round of model version iteration, thereby completing the optimization and upgrade of the large model and strengthening the model's memory and understanding of mid-to-long-tail knowledge.
[0127] This enables dynamic knowledge enhancement of the pre-trained language model on long-tail knowledge, and the generated target language model can handle the original problem more accurately and reliably, reducing the occurrence of illusion problems and improving the overall performance and application value of the model.
[0128] Figure 3 This is a flowchart of a large model pre-training method based on dynamic knowledge enhancement according to an embodiment of this application, such as... Figure 3 As shown, this proposal presents a large-scale model pre-training method based on dynamic knowledge enhancement, aiming to improve the model's memory and comprehension capabilities for mid-to-long-tail knowledge by automatically exploring and supplementing its knowledge blind spots. First, it acquires queries, including publicly available dataset queries, product line queries, and professional domain queries. These queries form the foundational data for exploring the knowledge boundaries of the large model, identifying areas where the model might exhibit illusion problems.
[0129] Then, a query is used to explore the knowledge boundaries of the large model, determining its limits and identifying the queries that cause hallucinations. These queries represent areas where the model's knowledge is weak or vague. The large model is trained using pre-training corpora. After identifying the hallucination queries, a search engine is used to retrieve relevant information from web pages. Combining this with the large model and rule templates, a series of question-answer pairs related to the hallucination queries are constructed. These question-answer pairs cover different aspects of the knowledge points, ensuring comprehensiveness and diversity, which helps the model understand and remember long-tail knowledge.
[0130] Subsequently, the constructed question-answer pairs are added to the pre-training corpus for the next round of pre-training of the large model, thus achieving dynamic updates to the pre-training corpus and introducing more diverse knowledge to optimize the model's ability to handle mid-to-long-tail knowledge. Finally, the pre-training corpus, supplemented with enhanced corpus data, is used to retrain the large model. This process may involve multiple iterations, each based on new knowledge boundary exploration results and constructed question-answer pairs. Ultimately, through multiple iterations of training, high-quality question-answer pairs are generated, signifying a significant improvement in the model's ability to handle mid-to-long-tail knowledge and reducing or eliminating the illusion problem.
[0131] In summary, this application achieves automatic and accurate identification of knowledge blind spots in large models through dynamic knowledge boundary exploration, overcoming the shortcomings of traditional solutions that rely on manual identification and static knowledge injection. The automated knowledge mining and question-answer pair construction ensure the timeliness and accuracy of knowledge supplementation, avoiding the high costs and low efficiency issues in post-training fine-tuning. Furthermore, the systematic process design of this application reduces computational and management costs, achieving automation and efficiency in the knowledge enhancement process.
[0132] It is easy to understand that the beneficial effects of the data processing method provided in this application include the following points.
[0133] Beneficial effects (1) Reduce the illusion problem. This application uses a knowledge boundary exploration method to identify the knowledge blind spots and weaknesses of the large model in real time, and supplements the knowledge blind spots and weak knowledge points of the large model, thereby reducing the probability of the model generating incorrect information. That is, by exploring the knowledge boundary of the large model, focusing on the construction of enhanced corpora of mid-to-long-tail knowledge, the model's shortcomings in the low-frequency domain are made up for, and the illusion problem is effectively reduced.
[0134] Beneficial effect (2): Improved knowledge coverage. This application enhances the model's performance in the mid-to-long-tail knowledge domain and expands its application scope. That is, by retrieving and automatically generating high-quality question-answer pairs, the pre-training corpus is dynamically supplemented, thereby improving knowledge coverage.
[0135] Beneficial effect (3): Improved model reliability. The enhanced knowledge base of this application improves the accuracy and credibility of the model output.
[0136] Beneficial effects (4) Reduced maintenance costs: The automated process of this application reduces the need for manual intervention and improves the efficiency of knowledge updating and maintenance.
[0137] 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 countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.
[0138] Furthermore, it should be noted that, for the sake of simplicity, the aforementioned 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. Secondly, 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.
[0139] 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, and of course, they can also be implemented by hardware. 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 described in the various embodiments of this application.
[0140] According to embodiments of this application, the following are also provided: Figure 4 The data processing method shown is as follows: Figure 4 This is a flowchart of a data processing method according to an embodiment of this application, such as... Figure 4 As shown, the method includes:
[0141] Step S41, obtain the target problem;
[0142] Step S42: Process the target question using the target language model to generate the target answer; wherein the target language model is obtained according to any of the above data processing methods.
[0143] In this embodiment, the target problem may include, but is not limited to, user input, API calls, system logs, or business data. The target problem obtained can be about any domain, but special attention is paid to problems in mid-to-long-tail knowledge domains that the model may not handle well or produce illusions in the initial version.
[0144] The target language model is used to process the target question and generate the target answer. The target language model is obtained according to any of the data processing methods mentioned above, which will not be elaborated here. The target language model will generate a more accurate and reliable target answer based on the content of the target question and its optimized knowledge and abilities.
[0145] Therefore, the automated knowledge boundary exploration and knowledge supplementation method proposed in this application can not only identify the knowledge blind spots and weaknesses of large models in real time through knowledge boundary exploration, achieving precise positioning, but also dynamically inject knowledge and train large models in real time, thereby improving the performance of large models in specific domains. Simultaneously, it reduces the cost of manual intervention and maintenance. Furthermore, it reduces the probability of large models generating erroneous information, expands the knowledge coverage of large models, improves the accuracy and timeliness of generated content, and enhances the application potential of large models in high-precision demand domains. Thus, when the optimized target language model is used to process target problems from various sources in practical applications, it can generate high-quality and accurate target answers.
[0146] The data processing methods provided in this application can be applied, but are not limited to, to data querying applications in fields such as e-commerce services, education services, legal services, medical services, conference services, social networking services, financial product services, logistics services, and navigation services. For example, data querying for e-commerce services, data querying for education services, and data querying for legal services are not limited here.
[0147] By employing the embodiments of this application, a target question is obtained, and then a target language model is used to process the target question to generate a target answer. The target language model is obtained according to any of the aforementioned data processing methods. This achieves the goal of generating the answer corresponding to the question in a timely and accurate manner through data processing using a model generated by dynamic knowledge boundary exploration and knowledge supplementation methods. This overcomes the model illusion problem, improves the model's performance in specific domains, enhances the accuracy and timeliness of model retrieval results, reduces manual maintenance costs, and strengthens the model's application potential in high-precision demand areas. Furthermore, it solves the technical problems of large language models in related technologies, such as the inability to update knowledge injection in real time, high manual costs, and the inability to guarantee the accuracy and timeliness of retrieval results.
[0148] It should be noted that the preferred implementation of this embodiment can be found in the relevant descriptions in the embodiments, and will not be repeated here.
[0149] According to embodiments of this application, the following are also provided: Figure 5 The data processing method shown is as follows: Figure 5 This is a flowchart of a data processing method according to an embodiment of this application, such as... Figure 5 As shown, the method includes:
[0150] Step S51, obtain legal information;
[0151] Step S52: The target language model is used to process the legal question and generate a solution to the legal question; wherein the target language model is obtained according to any of the above data processing methods.
[0152] In this application embodiment, legal issues can be understood as specific issues involving legal knowledge. These issues may include the understanding of regulations, case analysis, interpretation of legal terminology, etc., especially in low-frequency or professional knowledge points, that is, the mid-to-long tail of legal knowledge.
[0153] The target language model is used to process legal questions and generate answers to them. The target language model is obtained according to any of the data processing methods mentioned above, which will not be elaborated here. The target language model will generate more accurate and reliable answers to legal questions based on the content of the legal questions and its optimized knowledge and capabilities.
[0154] Therefore, the automated knowledge boundary exploration and knowledge supplementation method proposed in this application can not only identify the knowledge blind spots and weaknesses of large models in real time through knowledge boundary exploration, achieving precise positioning, but also dynamically inject knowledge and train large models in real time, thereby improving the performance of large models in specific domains. Simultaneously, it reduces the cost of manual intervention and maintenance. Furthermore, it reduces the probability of large models generating erroneous information, expands the knowledge coverage of large models, improves the accuracy and timeliness of generated content, and enhances the application potential of large models in high-precision demand domains. Thus, when the optimized target language model is used to process target problems from various sources in practical applications, it can generate high-quality and accurate target answers.
[0155] The data processing methods provided in this application can be applied, but are not limited to, to data querying applications in fields such as e-commerce services, education services, legal services, medical services, conference services, social networking services, financial product services, logistics services, and navigation services. For example, data querying for e-commerce services, data querying for education services, and data querying for legal services are not limited here.
[0156] By employing the embodiments of this application, a legal question is obtained, and then a target language model is used to process the legal question to generate a legal question answer. The target language model is obtained according to any of the aforementioned data processing methods. This achieves the goal of generating the answer to the question in a timely and accurate manner through data processing using a model generated by dynamic knowledge boundary exploration and knowledge supplementation methods. This overcomes the model illusion problem, improves the model's performance in specific domains, enhances the accuracy and timeliness of model retrieval results, reduces manual maintenance costs, and strengthens the model's application potential in high-precision demand areas. Furthermore, it solves the technical problems of large language models in related technologies, such as the inability to update knowledge injection in real time, high manual costs, and the inability to guarantee the accuracy and timeliness of retrieval results.
[0157] In an optional embodiment, the data processing method further includes the following method steps:
[0158] Step S53: Respond to the editing and / or commenting operations performed on the legal question answer, and obtain user feedback information associated with the legal question answer;
[0159] Step S54: Update the model parameters of the target language model based on user feedback information.
[0160] In this embodiment of the application, the user may further adjust the generated legal question answers. If the user performs editing and / or commenting operations on the legal question answers, this application can also obtain user feedback information associated with the legal question answers based on the editing and / or commenting operations performed on the legal question answers.
[0161] The editing operation can be understood as the user potentially modifying the solution generated by the target language model to correct errors, add missing information, or adjust the expression to better meet the professional and accurate requirements of the legal field. The commenting operation can be understood as the user potentially commenting on the solution generated by the target language model, including feedback on the solution's correctness, completeness, and usability, etc., and there are no restrictions here.
[0162] After obtaining user feedback information related to legal question answers, the model parameters of the target language model are updated based on the user feedback information, thereby achieving continuous optimization and improvement of the target language model.
[0163] This not only improves the accuracy and professionalism of the target language model in processing long-tail knowledge in the legal field, but also enhances the interaction and feedback loop between the target language model and the user, providing a more reliable and practical solution for applications in high-precision fields such as legal consultation.
[0164] It should be noted that the preferred implementation of this embodiment can be found in the relevant descriptions in the embodiments, and will not be repeated here.
[0165] According to embodiments of this application, the following are also provided: Figure 6 This illustrates a data processing method. Figure 6 This is a flowchart of a data processing method according to an embodiment of this application, such as... Figure 6 As shown, the method includes:
[0166] Step S61: Obtain a data processing request through the first application programming interface, wherein the request data carried in the data processing request includes: the target question;
[0167] Step S62: Return a data processing response through the second application programming interface. The response data carried in the data processing response includes: the target answer, which is generated by processing the target question using the target language model. The target language model is obtained according to any of the above data processing methods.
[0168] The first and second application programming interfaces (APIs) mentioned above can be the same or different APIs. In one optional embodiment, the interface parameters in the first and second APIs may include, but are not limited to: a global interface identifier, an interface signing key, an interface timestamp, an interface request identifier, and a system call credential identifier. The first API can use GET or POST as the interface request method to obtain the file processing request. The second API can use JSON format to return the file processing response.
[0169] In this embodiment, the request data carried in the data processing request includes: the target question. The data processing request can be understood as a request to process the target question. The response data carried in the data processing response includes: the target answer. The data processing response can be understood as an answer to the data processing request, and the target answer is the answer to the target question. The target answer is generated by processing the target question using a target language model. The target language model is obtained according to any of the data processing methods described above, which will not be elaborated here.
[0170] Therefore, the automated knowledge boundary exploration and knowledge supplementation method proposed in this application can not only identify knowledge blind spots and weaknesses of large models in real time through knowledge boundary exploration, achieving precise positioning, but also dynamically inject knowledge and train large models in real time, thereby improving the performance of large models in specific domains. Simultaneously, it reduces the cost of manual intervention and maintenance. Furthermore, it reduces the probability of large models generating erroneous information, expands the knowledge coverage of large models, improves the accuracy and timeliness of generated content, and enhances the application potential of large models in high-precision domains.
[0171] The data processing methods provided in this application can be applied, but are not limited to, to data querying applications in fields such as e-commerce services, education services, legal services, medical services, conference services, social networking services, financial product services, logistics services, and navigation services. For example, data querying for e-commerce services, data querying for education services, and data querying for legal services are not limited here.
[0172] By employing the embodiments of this application, a data processing request is obtained through a first application programming interface (API), wherein the request data carried in the data processing request includes a target question. Then, a data processing response is returned through a second API, wherein the response data carried in the data processing response includes a target answer. The target answer is generated by processing the target question using a target language model, which is obtained according to any of the above-mentioned data processing methods. This achieves the goal of generating the answer corresponding to the question in a timely and accurate manner through data processing using a model generated by dynamic knowledge boundary exploration and knowledge supplementation methods. This overcomes the illusion problem of the model, improves the performance of the model in a specific domain, enhances the accuracy and timeliness of the model retrieval results, reduces manual maintenance costs, and enhances the application potential of the model in high-precision demand domains. This solves the technical problems of large language models in related technologies, such as the inability to update knowledge injection in real time, high manual costs, and the inability to guarantee the accuracy and timeliness of retrieval results.
[0173] It should be noted that the preferred implementation of this embodiment can be found in the relevant descriptions in the embodiments, and will not be repeated here.
[0174] According to embodiments of this application, the following are also provided: Figure 7 This illustrates a data processing method. Figure 7 This is a flowchart of a data processing method according to an embodiment of this application, such as... Figure 7 As shown, the method includes:
[0175] Step S71: Respond to the query command applied to the operation interface and input the target question;
[0176] Step S72: In response to the processing command applied to the operation interface, the target answer is displayed on the operation interface. The target answer is generated by processing the target question using the target language model, and the target language model is obtained according to any of the above data processing methods.
[0177] In this embodiment of the application, the query instruction can be understood as an instruction entered or selected by the user on the operation interface to query or request specific information. For example, in a legal consultation scenario, the user may enter a query instruction on issues such as contract law, intellectual property or labor law, which is not limited here.
[0178] The target question can be understood as a legal question entered by the user on the user interface that needs to be processed by the target language model. These questions may involve complex legal situations, technical terms, or questions about specific regulations.
[0179] When a user issues a query command on the user interface, the system responds by inputting the user's target question into the processing system, ready to process it using the optimized target language model.
[0180] Processing instructions can be understood as commands issued by the user on the interface, requesting the system to process the submitted target question and display the answer, such as when the user clicks the "Query" or "Get Answer" button; there are no restrictions on this.
[0181] The target answer can be understood as the solution generated by the target language model for the input target question. The target language model obtains the answer by following any of the data processing methods mentioned above, which will not be elaborated on here.
[0182] Therefore, the automated knowledge boundary exploration and knowledge supplementation method proposed in this application can not only identify knowledge blind spots and weaknesses of large models in real time through knowledge boundary exploration, achieving precise positioning, but also dynamically inject knowledge and train large models in real time, thereby improving the performance of large models in specific domains. Simultaneously, it reduces the cost of manual intervention and maintenance. Furthermore, it reduces the probability of large models generating erroneous information, expands the knowledge coverage of large models, improves the accuracy and timeliness of generated content, and enhances the application potential of large models in high-precision domains.
[0183] The data processing methods provided in this application can be applied, but are not limited to, to data querying applications in fields such as e-commerce services, education services, legal services, medical services, conference services, social networking services, financial product services, logistics services, and navigation services. For example, data querying for e-commerce services, data querying for education services, and data querying for legal services are not limited here.
[0184] By employing the embodiments of this application, a target question is input in response to a query command applied to the operation interface. Then, in response to a processing command applied to the operation interface, the target answer is displayed on the operation interface. The target answer is generated by processing the target question using a target language model, which is obtained according to any of the aforementioned data processing methods. This achieves the goal of generating the answer to the question in a timely and accurate manner through data processing using a model generated by dynamic knowledge boundary exploration and knowledge supplementation methods. This overcomes the illusion problem of models, improves the performance of models in specific domains, enhances the accuracy and timeliness of model retrieval results, reduces manual maintenance costs, and enhances the application potential of models in high-precision fields. This solves the technical problems of large language models in related technologies, such as the inability to update knowledge injection in real time, high manual costs, and the inability to guarantee the accuracy and timeliness of retrieval results.
[0185] It should be noted that the preferred implementation of this embodiment can be found in the relevant descriptions in the embodiments, and will not be repeated here.
[0186] According to embodiments of this application, the following are also provided: Figure 8 The data processing system shown is a data processing system. Figure 8 This is a schematic diagram of the structure of a data processing system according to an embodiment of this application, such as... Figure 8 As shown, the system includes:
[0187] The client is used to send the target question;
[0188] The server connects to the client and is used to process the target question using the target language model to generate the target answer. The target language model is obtained according to any of the data processing methods mentioned above.
[0189] The client is also used to output the target answer.
[0190] In this embodiment, the data processing system includes a client and a server connected by interconnection. The client sends a target question to the server, and the server processes the target question sent by the client using a target language model, generates a target answer, and feeds the target answer back to the client. The client also outputs the target answer. The target language model is obtained according to any of the data processing methods described above, which will not be elaborated further here.
[0191] Therefore, the automated knowledge boundary exploration and knowledge supplementation method proposed in this application can not only identify knowledge blind spots and weaknesses of large models in real time through knowledge boundary exploration, achieving precise positioning, but also dynamically inject knowledge and train large models in real time, thereby improving the performance of large models in specific domains. Simultaneously, it reduces the cost of manual intervention and maintenance. Furthermore, it reduces the probability of large models generating erroneous information, expands the knowledge coverage of large models, improves the accuracy and timeliness of generated content, and enhances the application potential of large models in high-precision domains.
[0192] The data processing system provided in this application embodiment can be applied, but is not limited to, to application scenarios involving data queries in fields such as e-commerce services, education services, legal services, medical services, conference services, social networking services, financial product services, logistics services, and navigation services. For example, query requests for e-commerce services, query requests for academic explanations, query requests for medical treatments, etc., are not limited here.
[0193] By employing the embodiments of this application, the data processing system achieves the goal of generating timely and accurate answers to questions through data processing of models generated by dynamic knowledge boundary exploration and knowledge supplementation methods. This overcomes the illusion problem of models, improves the performance of models in specific domains, enhances the accuracy and timeliness of model retrieval results, reduces manual maintenance costs, and strengthens the application potential of models in high-precision fields. In turn, it solves the technical problems of large language models in related technologies, such as the inability to update knowledge injection in real time, high manual costs, and the inability to guarantee the accuracy and timeliness of retrieval results.
[0194] It should be noted that the preferred implementation of this embodiment can be found in the relevant descriptions in the embodiments, and will not be repeated here.
[0195] According to an embodiment of this application, an apparatus embodiment for implementing the above-described data processing method is also provided. Figure 9 This is a schematic diagram of the structure of a data processing apparatus according to an embodiment of this application, such as... Figure 9 As shown, the device includes:
[0196] The first acquisition module 901 is used to acquire the original query dataset;
[0197] The exploration module 902 is used to explore the knowledge boundaries of the pre-trained language model using the original query dataset and obtain exploration results, wherein the exploration results are used to indicate the hallucination query data in the original query dataset;
[0198] The mining module 903 is used to perform knowledge mining on the exploration results to obtain multimedia data associated with the exploration results;
[0199] Training module 904 is used to train the pre-trained language model based on the exploration results and multimedia data to generate a target language model, wherein the target language model is used to process the question to generate an answer.
[0200] Optionally, the exploration module 902 is further configured to: use a pre-trained language model to make multiple predictions on the original question in the original query dataset to obtain multiple predicted answers; and identify the hallucination query data based on the multiple predicted answers to obtain exploration results.
[0201] Optionally, the exploration module 902 is further configured to: drive the pre-trained language model to make multiple predictions on the original question in the original query dataset based on a preset random number seed, and obtain multiple predicted answers. The random number seed is used to control the pre-trained language model to generate the same or similar predicted answers when making multiple predictions on the same question. The number of multiple predicted answers is determined according to the number of random number seeds.
[0202] Optionally, the exploration module 902 is further configured to: obtain a first text prompt word, wherein the first text prompt word is used to indicate whether the predicted answer corresponding to the given question is correct based on the given question and the given answer; use the first text prompt word to drive the answer determination model to determine the correctness of multiple predicted answers and obtain a determination result, wherein the determination result is used to determine whether there is an incorrect answer among the multiple predicted answers; in response to the determination result indicating that any answer among the multiple predicted answers is an incorrect answer, determine that the original question corresponding to the multiple predicted answers is hallucination query data and obtain exploration results.
[0203] Optionally, the above-mentioned mining module 903 is also used to: retrieve multimedia data associated with the exploration results from information resources corresponding to the preset information retrieval method.
[0204] Optionally, the training module 904 is further configured to: construct multiple question-answer pairs based on the exploration results and multimedia data, wherein the multiple question-answer pairs are augmented corpora to supplement the long-tail knowledge of the pre-trained language model; supplement the multiple question-answer pairs to the pre-trained corpora; and train the pre-trained language model using the pre-trained corpora to generate the target language model.
[0205] Optionally, the training module 904 is further configured to: obtain a second text prompt word, wherein the second text prompt word is used to indicate asking and answering questions from multiple perspectives based on the given question and the associated data of the given question; and use the second text prompt word to drive the pre-trained language model to construct question-answer pairs between the exploration results and multimedia data to obtain multiple question-answer pairs.
[0206] Optionally, the training module 904 is further configured to: train the pre-trained language model using pre-trained corpus to determine the target loss; and update the model parameters of the pre-trained language model based on the target loss to generate the target language model.
[0207] This application's embodiments involve obtaining an original query dataset, then using this dataset to probe the knowledge boundaries of a pre-trained language model, yielding exploration results. These results indicate illusory query data within the original query dataset. Knowledge mining is then performed on the exploration results to obtain multimedia data associated with them. Finally, the pre-trained language model is trained based on the exploration results and multimedia data to generate a target language model for processing questions and generating answers. This achieves the goal of using a model generated through dynamic knowledge boundary exploration and knowledge supplementation to process data and generate timely and accurate answers to questions, thus overcoming the model's illusion problem. This improves the model's performance in specific domains, enhances the accuracy and timeliness of retrieval results, reduces manual maintenance costs, and strengthens the model's application potential in high-precision domains. Furthermore, it solves the technical problems of large language models in related technologies, such as the inability to update knowledge injection in real time, high manual costs, and the inability to guarantee the accuracy and timeliness of retrieval results.
[0208] It should be noted that the first acquisition module 901, exploration module 902, mining module 903, and training module 904 mentioned above correspond to steps S21 to S24 in the embodiments. The four modules and their corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the above embodiments. It should be noted that the above modules or units can be hardware or software components stored in memory and processed by one or more processors, and the above modules can also run in the server 10 provided in the embodiments.
[0209] According to an embodiment of this application, another embodiment of an apparatus for implementing the above-described data processing method is also provided. Figure 10 This is a schematic diagram of another data processing apparatus according to an embodiment of this application, such as... Figure 10 As shown, the device includes:
[0210] The second acquisition module 1001 is used to acquire the target problem;
[0211] The first processing module 1002 is used to process the target problem using the target language model and generate the target answer; wherein the target language model is obtained according to any of the above data processing methods.
[0212] By employing the embodiments of this application, a target question is obtained, and then a target language model is used to process the target question to generate a target answer. The target language model is obtained according to any of the aforementioned data processing methods. This achieves the goal of generating the answer corresponding to the question in a timely and accurate manner through data processing using a model generated by dynamic knowledge boundary exploration and knowledge supplementation methods. This overcomes the model illusion problem, improves the model's performance in specific domains, enhances the accuracy and timeliness of model retrieval results, reduces manual maintenance costs, and strengthens the model's application potential in high-precision demand areas. Furthermore, it solves the technical problems of large language models in related technologies, such as the inability to update knowledge injection in real time, high manual costs, and the inability to guarantee the accuracy and timeliness of retrieval results.
[0213] It should be noted that the second acquisition module 1001 and the first processing module 1002 mentioned above correspond to steps S41 and S42 in the embodiments. The two modules and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the above embodiments. It should be noted that the above modules or units can be hardware components or software components stored in memory and processed by one or more processors. The above modules can also run in the server 10 provided in the embodiments.
[0214] According to an embodiment of this application, another embodiment of an apparatus for implementing the above-described data processing method is also provided. Figure 11 This is a schematic diagram of the structure of another data processing apparatus according to an embodiment of this application, such as... Figure 11 As shown, the device includes:
[0215] The third acquisition module 1101 is used to acquire legal issues;
[0216] The second processing module 1102 is used to process legal issues using a target language model and generate answers to legal issues; wherein the target language model is obtained according to any of the above data processing methods.
[0217] Optionally, the device further includes an update module, configured to: respond to editing and / or commenting operations performed on the legal question answer, obtain user feedback information associated with the legal question answer, and update the model parameters of the target language model based on the user feedback information.
[0218] By employing the embodiments of this application, a legal question is obtained, and then a target language model is used to process the legal question to generate a legal question answer. The target language model is obtained according to any of the aforementioned data processing methods. This achieves the goal of generating the answer to the question in a timely and accurate manner through data processing using a model generated by dynamic knowledge boundary exploration and knowledge supplementation methods. This overcomes the model illusion problem, improves the model's performance in specific domains, enhances the accuracy and timeliness of model retrieval results, reduces manual maintenance costs, and strengthens the model's application potential in high-precision demand areas. Furthermore, it solves the technical problems of large language models in related technologies, such as the inability to update knowledge injection in real time, high manual costs, and the inability to guarantee the accuracy and timeliness of retrieval results.
[0219] It should be noted that the third acquisition module 1101 and the second processing module 1102 mentioned above correspond to steps S51 and S52 in the embodiments. The two modules and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the above embodiments. It should be noted that the above modules or units can be hardware components or software components stored in memory and processed by one or more processors. The above modules can also run in the server 10 provided in the embodiments.
[0220] According to an embodiment of this application, an apparatus embodiment for implementing the above-described data processing method is also provided. Figure 12 This is a schematic diagram of the structure of a data processing apparatus according to an embodiment of this application, such as... Figure 12 As shown, the device includes:
[0221] The fourth acquisition module 1201 is used to acquire a data processing request through the first application programming interface, wherein the request data carried in the data processing request includes: the target question;
[0222] The return module 1202 is used to return a data processing response through a second application programming interface. The response data carried in the data processing response includes: the target answer, which is generated by processing the target question using the target language model. The target language model is obtained according to any of the above data processing methods.
[0223] By employing the embodiments of this application, a data processing request is obtained through a first application programming interface (API), wherein the request data carried in the data processing request includes a target question. Then, a data processing response is returned through a second API, wherein the response data carried in the data processing response includes a target answer. The target answer is generated by processing the target question using a target language model, which is obtained according to any of the above-mentioned data processing methods. This achieves the goal of generating the answer corresponding to the question in a timely and accurate manner through data processing using a model generated by dynamic knowledge boundary exploration and knowledge supplementation methods. This overcomes the illusion problem of the model, improves the performance of the model in a specific domain, enhances the accuracy and timeliness of the model retrieval results, reduces manual maintenance costs, and enhances the application potential of the model in high-precision demand domains. This solves the technical problems of large language models in related technologies, such as the inability to update knowledge injection in real time, high manual costs, and the inability to guarantee the accuracy and timeliness of retrieval results.
[0224] It should be noted that the fourth acquisition module 1201 and return module 1202 mentioned above correspond to steps S61 and S62 in the embodiments. The two modules and their corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the above embodiments. It should be noted that the above modules or units can be hardware components or software components stored in memory and processed by one or more processors. The above modules can also run in the server 10 provided in the embodiments.
[0225] According to an embodiment of this application, an apparatus embodiment for implementing the above-described data processing method is also provided. Figure 13 This is a schematic diagram of the structure of a data processing apparatus according to an embodiment of this application, such as... Figure 13 As shown, the device includes:
[0226] Input module 1301 is used to respond to query commands applied to the operation interface and input the target question;
[0227] Display module 1302 is used to respond to processing instructions applied to the operation interface and display the target answer on the operation interface. The target answer is generated by processing the target question using the target language model, and the target language model is obtained according to any of the above data processing methods.
[0228] By employing the embodiments of this application, a target question is input in response to a query command applied to the operation interface. Then, in response to a processing command applied to the operation interface, the target answer is displayed on the operation interface. The target answer is generated by processing the target question using a target language model, which is obtained according to any of the aforementioned data processing methods. This achieves the goal of generating the answer to the question in a timely and accurate manner through data processing using a model generated by dynamic knowledge boundary exploration and knowledge supplementation methods. This overcomes the illusion problem of models, improves the performance of models in specific domains, enhances the accuracy and timeliness of model retrieval results, reduces manual maintenance costs, and enhances the application potential of models in high-precision fields. This solves the technical problems of large language models in related technologies, such as the inability to update knowledge injection in real time, high manual costs, and the inability to guarantee the accuracy and timeliness of retrieval results.
[0229] It should be noted that the input module 1301 and display module 1302 mentioned above correspond to steps S71 and S74 in the embodiments. The two modules and their corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the above embodiments. It should be noted that the above modules or units can be hardware components or software components stored in memory and processed by one or more processors. The above modules can also run in the server 10 provided in the embodiments.
[0230] 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 the embodiments, but are not limited to the schemes provided in the embodiments.
[0231] Embodiments of this application may provide a computing device. Figure 14 This is a structural block diagram of a computing device according to an embodiment of this application. Figure 14 As shown, the computing device A may include one or more ( Figure 14 Only one of the following is shown: processor 1402, memory 1404, memory controller, and peripheral interface. The peripheral interface can be connected to radio frequency modules, audio modules, and displays, etc., which are not limited here.
[0232] The aforementioned computing device A can be understood as an integrated smart terminal, including but not limited to servers, desktop computers, PCs (Personal Computers), all-in-one model machines, etc., and the computing device may have the model described in the above embodiments of this application pre-installed.
[0233] Specifically, computing device A can pre-install various types of models, including but not limited to models in natural language processing, visual processing, speech processing, code processing, and multimodal task processing, thus providing diverse model selection. In different product forms, computing device A can support one or more model usage methods, including but not limited to model training, model invocation, model fine-tuning, model deployment, model inference, and application. In some product forms, computing device A also supports model management, including but not limited to multi-type model management (supporting the management of discriminative, generative, and other model types), model version control (supporting the control of different model versions), and model evaluation (evaluating model performance and effectiveness based on model evaluation tools). In other product forms, computing device A can also create applications based on models, providing API calling capabilities, allowing models to be called into created applications through API interfaces, and providing application management tools for application management and monitoring.
[0234] Furthermore, the computing device A can also include data management (supporting the creation and management of model tuning datasets), a training center (providing abundant training resources to help users learn and master AI technology), and basic control capabilities (providing enterprise-level basic control capabilities to ensure the security and efficient operation of the system). Through the above functions, it provides a comprehensive and integrated device for AI development, training, deployment, and application.
[0235] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the methods and apparatus in the embodiments of this application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby implementing the methods in the above embodiments. 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 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.
[0236] The processor can invoke an executable program stored in memory via a transmission device to execute the method described in any of the above embodiments.
[0237] Those skilled in the art will understand that, Figure 14 The structure shown is for illustrative purposes only. Computing device A can also be a smartphone (such as an Android phone, iOS phone, etc.), tablet computer, PDA, mobile internet device (MID), PAD, or other terminal device. Figure 14 This does not limit the structure of the aforementioned computing device. For example, computing device A may also include components that are more advanced than those described above. Figure 14 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same as the Figure 14 The different configurations shown.
[0238] Embodiments of this application may provide an electronic device. Figure 15 This is a structural block diagram of an electronic device according to an embodiment of this application. Figure 15 As shown, the electronic device may include: an input / output device 152; a memory 154; and a processor 156, wherein the processor 156 is connected to the input / output device 152 and the memory 154 via a bus 158.
[0239] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the methods and apparatus in the embodiments of this application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby implementing the methods in the above embodiments. 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 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.
[0240] The processor can invoke an executable program stored in memory via a transmission device to execute the method described in any of the above embodiments.
[0241] 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.
[0242] Embodiments of this application also provide a computer-readable storage medium. Optionally, in this embodiment, the computer-readable storage medium can be used to store program code executed by the data processing method provided in the above embodiments.
[0243] Optionally, in this embodiment, the computer-readable storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.
[0244] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements any of the above-described data processing methods.
[0245] 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.
[0246] 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 displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0247] 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.
[0248] 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.
[0249] 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 described in 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.
[0250] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.< / true>
Claims
1. A data processing method, characterized in that, include: Obtain the original query dataset; The knowledge boundary of the pre-trained language model is explored using the original query dataset to obtain exploration results, wherein the exploration results are used to indicate the hallucination query data in the original query dataset; Knowledge mining is performed on the exploration results to obtain multimedia data associated with the exploration results; The pre-trained language model is trained based on the exploration results and the multimedia data to generate a target language model, wherein the target language model is used to process the question to generate an answer.
2. The data processing method according to claim 1, characterized in that, The knowledge boundary of the pre-trained language model is explored using the original query dataset, and the exploration results include: The pre-trained language model is used to make multiple predictions on the original question in the original query dataset to obtain multiple predicted answers. The hallucination query data is identified based on the multiple predicted answers to obtain the exploration results.
3. The data processing method according to claim 2, characterized in that, The pre-trained language model is used to make multiple predictions on the original question in the original query dataset to obtain the multiple predicted answers, including: The pre-trained language model is driven by a preset random number seed to make multiple predictions on the original question in the original query dataset, thereby obtaining multiple predicted answers. The random number seed is used to control the pre-trained language model to generate the same or similar predicted answers when making multiple predictions on the same question. The number of multiple predicted answers is determined based on the number of random number seeds.
4. The data processing method according to claim 2, characterized in that, The hallucination query data is identified based on the multiple predicted answers, and the exploration results include: Obtain a first text prompt word, wherein the first text prompt word is used to indicate whether the predicted answer corresponding to the given question is correct based on the given question and the given answer; The first text prompt word-driven answer determination model is used to determine the correctness of the multiple predicted answers, and a determination result is obtained, wherein the determination result is used to determine whether there are any incorrect answers among the multiple predicted answers; In response to the determination result indicating that any one of the multiple predicted answers is an incorrect answer, the original question corresponding to the multiple predicted answers is determined to be the hallucination query data, and the exploration result is obtained.
5. The data processing method according to any one of claims 1-4, characterized in that, Knowledge mining is performed on the exploration results to obtain the multimedia data associated with the exploration results, including: The multimedia data associated with the exploration results is retrieved from the information resources corresponding to the preset information retrieval method.
6. The data processing method according to any one of claims 1-4, characterized in that, Training the pre-trained language model based on the exploration results and the multimedia data to generate the target language model includes: Based on the exploration results and the multimedia data, multiple question-answer pairs are constructed, wherein the multiple question-answer pairs are augmented corpora to supplement the long-tail knowledge of the pre-trained language model; The aforementioned question-answer pairs are then added to the pre-training corpus. The pre-trained language model is trained using the pre-trained corpus to generate the target language model.
7. The data processing method according to claim 6, characterized in that, Constructing the multiple question-answer pairs based on the exploration results and the multimedia data includes: Obtain a second text prompt word, wherein the second text prompt word is used to indicate asking and answering questions from multiple perspectives based on the given question and the association data of the given question; The second text prompt word is used to drive the pre-trained language model to construct question-answer pairs between the exploration results and the multimedia data, thereby obtaining the multiple question-answer pairs.
8. The data processing method according to claim 6, characterized in that, Training the pre-trained language model using the pre-trained corpus to generate the target language model includes: The pre-training language model is trained using the pre-training corpus, and the target loss is determined. The model parameters of the pre-trained language model are updated based on the target loss to generate the target language model.
9. A data processing method, characterized in that, include: Identify the target problem; The target language model is used to process the target question and generate the target answer; The target language model is obtained according to the data processing method described in any one of claims 1 to 8.
10. A data processing method, characterized in that, include: Obtain legal advice; The legal issues are processed using a target language model to generate solutions. The target language model is obtained according to the data processing method described in any one of claims 1 to 8.
11. The data processing method according to claim 10, characterized in that, The data processing method further includes: In response to editing and / or commenting operations performed on the legal question answer, obtain user feedback information associated with the legal question answer; The model parameters of the target language model are updated based on the user feedback information.
12. A data processing method, characterized in that, include: A data processing request is obtained through a first application programming interface, wherein the request data carried in the data processing request includes: the target question; A data processing response is returned through a second application programming interface, wherein the response data carried in the data processing response includes: a target answer, which is generated by processing the target question using a target language model, and the target language model is obtained according to the data processing method of any one of claims 1 to 8.
13. A data processing method, characterized in that, include: Respond to the query command applied to the user interface and input the target question; In response to a processing instruction applied to the operation interface, a target answer is displayed on the operation interface, wherein the target answer is generated by processing the target question using a target language model, and the target language model is obtained according to the data processing method described in any one of claims 1 to 8.
14. A data processing system, characterized in that, include: The client is used to send the target question; A server, connected to the client, is configured to process the target question using a target language model to generate a target answer, wherein the target language model is obtained according to the data processing method described in any one of claims 1 to 8; The client is also used to output the target answer.
15. 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 data processing method according to any one of claims 1 to 13.
16. 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 computer-readable storage medium is located to perform the data processing method according to any one of claims 1 to 13.
17. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the data processing method according to any one of claims 1 to 13.