Academic question and answer model training method and device, answer generation method and device and related products

By combining open source and academic datasets, pre-training and fine-tuning the Q&A model, and using labels to characterize the structured meaning of text, it solves the shortcomings of answer accuracy and rigor of large-scale language models in academic fields, and achieves higher professionalism Academic Q&A skills with sex and precision.

CN119311813APending Publication Date: 2025-01-14TONGFANG KNOWLEDGE NETWORK DIGITAL PUBLISHING TECHNOLOGY CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411117898.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2025-01-14

Smart Images

  • Figure CN119311813A_ABST
    Figure CN119311813A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of natural language processing, and discloses an academic question and answer model training method and device, an answer generation method and device and related products. The method comprises the following steps: acquiring an open source pre-training data set and an academic pre-training data set; the text data in the academic pre-training data set comprises at least one label, and the label is used for representing the meaning of a structured text in the text data; training the initial question and answer model by using the open source pre-training data set and the academic pre-training data set to obtain a pre-trained question and answer model; obtaining an instruction fine tuning data set constructed for the downstream academic task; and based on the instruction fine tuning data set, performing fine tuning training on a pre-trained question and answer model to obtain a target question and answer model. The open source data and the academic data are jointly used as the pre-training data; and the label representing the meaning of the structured text is added into the academic pre-training data, so that the model can better understand the academic content, and it is ensured that the generated answer has higher academic specialty.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of natural language processing, and in particular to an academic question-answering model training method, an answer generation method, a device and related products. Background Art

[0002] In recent years, with the rapid development of big data and artificial intelligence technology, intelligent question-answering robots have become an important tool in the field of natural language processing and personalized services. As the technical support for intelligent question-answering robots, large-scale language models can use massive amounts of text data to learn rich language knowledge and context understanding capabilities after the pre-training stage; and learn the ability to understand a series of complex questions after the fine-tuning stage, so that when answering questions, they can smoothly output diverse content.

[0003] In the related art, for the pre-training stage of the large-scale language model training process, the usual practice is to collect a large amount of data containing strings (such as web pages, books, encyclopedias, codes, news, etc.) in an open source environment; perform a series of cleaning operations on the collected data (such as deduplication, decryption, language screening, etc.); and use the processed text or code as training data to realize the pre-training process of the model. In the fine-tuning stage, the common practice is to send the open source data set, or the data set obtained by cleaning, expanding and diversifying the existing data using the existing large language model, into the model for supervised fine-tuning training to obtain a trained large model. In a wider range of application scenarios, it is also possible to directly use the open source model parameters as the base model, and then use methods such as low-rank adaptation or parameter freezing to perform small-scale parameter fine-tuning on the base model to obtain a trained large model.

[0004] The above training methods can enable large language models to have the ability to answer questions. However, in the academic field, since the knowledge in the academic field is highly professional and in-depth, the large models trained by these training methods have poor accuracy and rigor in generating answers when answering academic questions, and lack the corresponding professionalism. Therefore, it is urgent to solve this technical problem, which has great practical significance for scientific researchers. Summary of the invention

[0005] In view of the above situation, the embodiments of the present disclosure provide an academic question-answering model training method, an answer generation method, a device and related products, aiming to solve the above problems or at least partially solve the above problems.

[0006] In a first aspect, an embodiment of the present disclosure provides an academic question-answering model training method, the method comprising:

[0007] Obtain an open source pre-training data set and an academic pre-training data set; wherein each pre-training data set includes a plurality of text data, and the text data in the academic pre-training data set includes at least one label, and the label is used to characterize the meaning of the structured text in the text data;

[0008] Using the open source pre-training dataset and the academic pre-training dataset, the initial question-answering model is trained to obtain a pre-trained question-answering model;

[0009] Obtain instruction fine-tuning datasets built for downstream academic tasks;

[0010] Based on the instruction fine-tuning dataset, the pre-trained question-answering model is trained to obtain a target question-answering model.

[0011] In a second aspect, an embodiment of the present disclosure provides an answer generation method, the method comprising:

[0012] Get targeted academic questions;

[0013] Using a preset question-answering model to answer the target academic question and obtain the target academic answer;

[0014] Among them, the preset question and answer model is the target question and answer model trained by the academic question and answer model training method described in the first aspect above.

[0015] In a third aspect, the present disclosure also provides an academic question-answering model training device, the device comprising:

[0016] A first acquisition module is used to acquire an open source pre-training data set and an academic pre-training data set; wherein each pre-training data set includes a plurality of text data, and the text data in the academic pre-training data set includes at least one label, and the label is used to represent the meaning of the structured text in the text data;

[0017] A pre-training module, used to train the initial question-answering model using the open source pre-training dataset and the academic pre-training dataset to obtain a pre-trained question-answering model;

[0018] The second acquisition module is used to obtain instruction fine-tuning datasets built for downstream academic tasks;

[0019] A fine-tuning module is used to fine-tune the data set based on the instruction, train the pre-trained question-answering model, and obtain a target question-answering model.

[0020] In a fourth aspect, an embodiment of the present disclosure further provides an answer generating device, the device comprising:

[0021] The acquisition module is used to obtain academic questions input by users;

[0022] An answering module is used to answer the academic question using a preset question-answering model to obtain a target academic answer; wherein the preset question-answering model is a target question-answering model trained by the academic question-answering model training method described in the first aspect above.

[0023] In a fifth aspect, an embodiment of the present disclosure also provides an electronic device, comprising: a processor; and a memory arranged to store computer executable instructions, which, when executed, cause the processor to perform the steps of the above-mentioned academic question-and-answer model training method or answer generation method.

[0024] In the sixth aspect, the embodiments of the present disclosure also provide a computer-readable storage medium, which stores one or more programs. When the one or more programs are executed by an electronic device including multiple application programs, the electronic device executes the steps of the above-mentioned academic question and answer model training method or answer generation method.

[0025] In the seventh aspect, an optional implementation of the present disclosure also provides a computer program product, which carries a program code, and the instructions included in the program code can be used to execute the steps of the academic question-answering model training method as described in the first aspect, or execute the steps of the answer generation method as described in the second aspect.

[0026] By means of the above technical scheme, the academic question-answering model training method, answer generation method, device and related products provided by the embodiment of the present disclosure propose a new question-answering model training method. Specifically, the open source pre-training data set and the academic pre-training data set are used as the data set of the pre-training stage. The initial question-answering model is pre-trained using these two data sets, which can give full play to the advantages of the two data, so that the pre-trained model can not only understand universal knowledge and language expressions, but also learn the knowledge, structural characteristics and language style of the academic field, so that the pre-trained model has a higher generalization performance for the content knowledge in the academic field. Further, in view of the complexity of the academic text structure and the richness of the elements, the text data of the academic pre-training data set also includes labels for characterizing the meaning of structured text in the text data. These labels can effectively convey the unique meanings of various structured texts to the model, help the model effectively identify the key academic elements in the corpus, and significantly improve the model's ability to deeply understand the content and structure in the academic corpus, the sensitivity to academic data and its ability to finely interpret academic elements, so that the pre-trained large-scale language model can more deeply master the professional knowledge in the academic field. In summary, the model training method provided by the embodiments of the present disclosure can greatly improve the model's ability to answer academic knowledge while ensuring the answering ability of the large language model. When conducting academic questions and answers, the answers generated by the model are more accurate, rigorous, and professional.

[0027] The above description is only an overview of the technical solution of the present disclosure. In order to more clearly understand the technical means of the present disclosure, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present disclosure more obvious and easy to understand, the specific implementation methods of the present disclosure are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure. In the drawings:

[0029] Figure 1 A schematic diagram of the process of the academic question answering model training method provided by an embodiment of the present disclosure is shown;

[0030] Figure 2 A schematic diagram showing a flow chart of an answer generation method provided by an embodiment of the present disclosure;

[0031] Figure 3 A schematic diagram of the structure of the academic question-answering model training device provided by an embodiment of the present disclosure is shown;

[0032] Figure 4 A schematic diagram showing the structure of an answer generating device provided by an embodiment of the present disclosure is shown;

[0033] Figure 5 A schematic structural diagram of an electronic device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical solutions and advantages of the present disclosure clearer, the technical solutions of the present disclosure will be clearly and completely described below in combination with the specific embodiments of the present disclosure and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.

[0035] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0036] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such usage is interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the term "including" and its variants are to be interpreted as open-ended terms meaning "including but not limited to".

[0037] As mentioned above, in the related technology, for the pre-training stage of the large-scale language model training process, the usual practice is to collect a large amount of data containing strings (such as web pages, books, encyclopedias, codes, news, etc.) in an open source environment; perform a series of cleaning operations on the collected data (such as deduplication, de-harming, language screening, etc.); and use the processed text or code as training data to realize the pre-training process of the model. In the fine-tuning stage, the common practice is to send the open source data set, or the data set obtained by cleaning, expanding and diversifying the existing data using the existing large language model, to the model for supervised fine-tuning training to obtain a trained large model. In a wider range of application scenarios, it is also possible to directly use the open source model parameters as the base model, and then use methods such as low-rank adaptation or parameter freezing to perform small-scale parameter fine-tuning on the base model to obtain a trained large model.

[0038] The above training methods can enable the large language model to have the ability to answer questions. However, specifically in the academic field, since the knowledge in the academic field is highly professional and in-depth, the large model trained by these training methods generates answers with poor accuracy and rigor when conducting academic questions and answers, and lacks corresponding professionalism. Therefore, it is urgent to solve this technical problem, which has great practical significance for scientific researchers. Based on this, the present invention proposes an academic question and answer model training method, answer generation method, device and related products, and the present disclosure is described in detail below through specific embodiments.

[0039] To facilitate understanding of this embodiment, first, a detailed introduction is given to an academic question-answering model training method disclosed in the embodiment of the present disclosure. The executor of the academic question-answering model training method provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities, and the computer device includes, for example: a terminal device or a server or other processing device, and the terminal device can be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, etc. In some possible implementations, the academic question-answering model training method can be implemented by a processor calling computer-readable instructions stored in a memory.

[0040] Figure 1 A schematic diagram of the process flow of the academic question answering model training method provided by the embodiment of the present disclosure is shown, from Figure 1 It can be seen that the embodiment of the present disclosure at least includes steps S101-S104:

[0041] S101: Obtain an open source pre-training dataset and an academic pre-training dataset; wherein each pre-training dataset includes a plurality of text data, and the text data in the academic pre-training dataset includes at least one label, and the label is used to represent the meaning of structured text in the text data.

[0042] S102: Using the open source pre-training dataset and the academic pre-training dataset, train the initial question-answering model to obtain a pre-trained question-answering model.

[0043] S103: Obtain instruction fine-tuning datasets built for downstream academic tasks.

[0044] S104: Based on the instruction fine-tuning dataset, the pre-trained question-answering model is trained to obtain a target question-answering model.

[0045] from Figure 1 It can be seen from the method shown that the disclosed embodiment proposes a new question-answering model training method. Specifically, the open source pre-training data set and the academic pre-training data set are used together as the data set of the pre-training stage. The initial question-answering model is pre-trained using these two data sets, which can give full play to the advantages of the two data, so that the pre-trained model can not only understand universal knowledge and language expressions, but also learn knowledge, structural characteristics and language style in the academic field, so that the pre-trained model has a higher generalization performance for academic field content knowledge. Further, in view of the complexity of the academic text structure and the richness of elements, the text data of the academic pre-training data set also includes labels for characterizing the meaning of structured text in the text data. These labels can effectively convey the unique meanings of various structured texts to the model, help the model effectively identify the key academic elements in the corpus, and significantly improve the model's deep understanding of the content and structure in the academic corpus, the sensitivity to academic data and its ability to interpret academic elements in detail, so that the pre-trained large-scale language model can more deeply master the professional knowledge in the academic field. In summary, the model training method provided by the embodiments of the present disclosure can greatly improve the model's ability to answer academic knowledge while ensuring the answering ability of the large language model. When conducting academic questions and answers, the answers generated by the model are more accurate, rigorous, and professional.

[0046] The above S101-S104 are described in detail below.

[0047] Regarding S101 and S102 above:

[0048] In S101, the open source pre-training datasets cover a wide range of topics and fields, including but not limited to text data such as news reports, social media content, blog posts, books, etc. The open source pre-training datasets can provide the model with rich language samples and diverse knowledge, which helps the model establish a basic understanding and processing ability of natural language.

[0049] The text data in the academic pre-training data set includes but is not limited to academic papers, journal articles, conference papers, patent documents, professional research reports, etc. Academic text data often follows certain academic norms and standards and consists of multiple structured text parts. For example, for academic text data such as academic papers, it consists of structured text parts such as title text, abstract text, keyword text, introduction text, and literature review text. In this step, each academic text data contains one or more tags to characterize the meaning of the corresponding structured text.

[0050] In a possible implementation, the tags include at least one of the following: Chinese title, English title, research direction, Chinese abstract, English abstract, Chinese keywords, English keywords, first-level title, second-level title, third-level title, paragraph, and references.

[0051] In this embodiment, the tags include, but are not limited to: Chinese title, English title, research direction, Chinese abstract, English abstract, Chinese keywords, English keywords, first-level title, second-level title, third-level title, paragraph and references. Exemplarily, the target text data includes 10 tags: [title-zh], [title-en], [speciality], [keywords-zh], [keywords-en], [abstract-zh], [abstract-en], [title-first], [title-second], [para], [title-third], and [References]. During implementation, different tags can be set according to actual conditions, and this embodiment does not limit this.

[0052] In a possible implementation, the method further includes: obtaining an initial academic pre-training data set; for any text data to be processed in the initial academic pre-training data set, using a preset text structure recognition algorithm to process the text data to be processed to obtain multiple structured texts and corresponding structured text types; for any target structured text, according to the corresponding target structured text type and a preset type-label correspondence, obtaining a target label; placing each of the target labels before or after the corresponding target structured text to obtain processed text data; each of the processed text data constitutes the academic pre-training data set.

[0053] During implementation, for example, academic databases (such as PubMed, Google Scholar, CNKI, etc.) can be used to retrieve relevant academic literature, and the text data therein can be extracted as the initial academic pre-training data set. Existing open source academic data sets can also be directly used as the initial academic pre-training data set. The method for obtaining the initial academic pre-training data set is not limited in the disclosed embodiments.

[0054] After obtaining the initial academic pre-training data set, for any of the pending text data, a preset text structure recognition algorithm can be utilized to perform structural decomposition and text classification on the pending text data, and obtain one or more structured texts, and the structured text types corresponding to each other. Here, the preset text structure recognition algorithm is an algorithm that can perform structural decomposition and content classification on the text, such as a rule-based algorithm, an algorithm based on machine learning, or a hybrid method, which is not limited to the present embodiment. During implementation, a large number of academic text samples (such as the position and content of the parts such as the title, abstract, keywords, and introduction of the marking academic paper) can also be marked, and a supervised learning model is trained to automatically identify the structured text in the new academic text, and the corresponding structured element type.

[0055] For any target structured text, the corresponding target label is obtained according to the corresponding target structured text type and the preset type-label correspondence. For example, if the target structured text type is a Chinese abstract, then according to the preset type-label correspondence, the target label can be obtained as [abstract-zh]. The preset type-label correspondence here can be set according to actual needs, and this embodiment of the present disclosure is not limited to this. After obtaining the target label of each target structured text, each target label can be placed before or after the corresponding structured text, thereby obtaining the processed text data corresponding to the text data to be processed. Repeat the above steps for all text data to be processed, and finally, each processed text data together constitutes an academic pre-training data set.

[0056] For example, one of the processed text data in the academic pre-training data set is: "[title-zh]Enzymatic Production and Antioxidant Activity of Feruloylated Oligosaccharides from Corn Bra[speciality]Agricultural Product Processing and Storage Engineering[keywords-zh]Corn bran, Feruloylated oligosaccharides, Extraction, Isolation, Purification, Antioxidant[keywords-en]Corn bran, Feruloylatedligosaccharides, Extraction, Isolation, Purification, Antioxidant activities. [abstract-zh][para]Feruloyl oligosaccharide FO[para](1) Defatted, deproteinized and starched corn bran was used as raw material, and corn bran was hydrolyzed by composite cellulase to prepare FO[para](2) Defatted, deproteinized and starched corn bran was used as raw material, and corn bran was hydrolyzed by microwave assisted treatment and composite cellulase to prepare FO[para](3) Through static and dynamic experiments, Amber lite XAD-2 macroporous adsorption resin was selected from a variety of resins for chromatography purification of FO[para](4) The sample purified by Amberlite XAD-2 macroporous adsorption resin chromatography was further chromatographed by Sephadex LH-20 gel filtration column.[abstract-en][para]Feruloylated oligosaccharids FO[para](1)The production technology of composite celluloseenzymic preparation of corn bran FO[para](2)The production technology ofmicrowave radiation pretreatment of corn bran to prepare FO[para](3)The conditions of purification of corn bran FO[para](4)The preliminarypurification samples were fur ther purified by Sephadex LH-20filtering gelchromatography...[title-first]1 Introduction[title-se cond]1.1 Overview of corn production and utilization[para]Corn, also known as maize, is one of the three major food crops in the world. According to the United Nations Food and Agriculture Organization, in 1995, the world's corn planting area was 135 million hm2. The United States is the world's largest corn producer, with an annual output of more than 200 million tons, accounting for more than 20% of the world's sown area. The next largest planting areas are China, Brazil, Mexico and South Africa. [para] my country's annual corn production is about 110 million tons, and its total output is second only to rice and wheat. Its cultivated area and total output are both ranked second in the world. [para] Due to its high yield per unit area and great potential for increasing yield, corn plays an important role in agricultural production. As an industrial raw material, corn contains high fat and protein. Therefore, in the starch, starch sugar, alcohol and other industries, corn is increasingly used as a raw material, which has greatly promoted the development of corn production. [title-second]1.2 Comprehensive Utilization of Corn Bran [para] Corn bran is the main by-product of the wet processing of corn starch. It is mainly composed of the epidermis and endosperm of corn kernels, accounting for about 9-13% of the weight of corn kernels... ".

[0057] In step S102, the initial question-answering model may be an existing language model, such as a BERT (Bidirectional Encoder Representations from Transformers) model, an ERNIE (Enhanced Representation through kNowledge IntEgration) model, etc. The structure of the initial question-answering model is not limited in the embodiments of the present disclosure.

[0058] During implementation, open source pre-trained datasets and academic pre-trained datasets can be used to perform unsupervised training on the initial question-answering model, calculate the loss function through forward propagation, and update the model parameters of the initial question-answering model through back propagation, ultimately obtaining a pre-trained question-answering model.

[0059] Regarding S103 and S104 above:

[0060] In a possible implementation, the downstream academic tasks include at least one of the following: a generative question-answering task, an extractive question-answering task, and a closed question-answering task, wherein the generative question-answering task includes: a summary generation task, a paragraph title generation task, a paragraph continuation task, an outline generation task, and a paragraph content summary task; the extractive question-answering task includes a citation extraction task and a concept definition extraction task; and the closed question-answering task includes an academic knowledge selection task and a research field judgment task.

[0061] In this embodiment, the generative question-answering task refers to the task of generating answers based on given text or information; the extractive question-answering task refers to the task of extracting specific information fragments from a given text as answers; and the closed question-answering task refers to the task of selecting answers from a given answer set.

[0062] For the summary generation task, the task needs to generate a short summary of a given long text (such as an academic paper). Exemplarily, the input of each instruction data in the instruction fine-tuning dataset constructed for the summary generation task is the original long text, and the output is the corresponding summary text. For the paragraph title generation task, the task needs to create a title for the given paragraph content. Exemplarily, the input of each instruction data in the instruction fine-tuning dataset constructed for the paragraph title generation task is a paragraph text containing coherent topics and contextual information, and the output is the corresponding title. For the paragraph continuation task, the task needs to generate a natural, coherent and semantically reasonable continuation text based on a given paragraph. Exemplarily, the input of each instruction data in the instruction fine-tuning dataset constructed for the paragraph continuation task is a given paragraph, and the output is the corresponding continuation paragraph (consistent with the given paragraph in style, tone and content). For the outline generation task, the task needs to generate a structured outline based on a given long text (such as an academic paper, book chapter, report, etc.). Exemplarily, the input of each instruction data in the instruction fine-tuning dataset constructed for the outline generation task is the original long text, and the output is the corresponding outline. For the paragraph content induction task, this task needs to extract key information from a given paragraph and summarize it into a concise and coherent statement. Exemplarily, the input of each instruction data in the instruction fine-tuning dataset constructed for the paragraph content induction task is the original paragraph text, and the output is a refined summary of the paragraph content. For the citation extraction task, this task needs to automatically identify and extract the cited literature or data sources from the given text. Exemplarily, the input of each instruction data in the instruction fine-tuning dataset constructed for citation extraction is a paragraph or article containing a citation, and the output is the cited text and detailed information of the citation. For the concept definition extraction task, this task needs to automatically identify and extract the definition of a specific term or concept from the text. Exemplarily, the input of each instruction data in the instruction fine-tuning dataset constructed for the concept definition extraction task is a text paragraph containing a definition, and the output is the corresponding term and the definition content for the term. For the academic knowledge selection task, this task needs to select a correct answer from multiple given options to respond to a specific academic question. Exemplarily, the input of each instruction data in the instruction fine-tuning dataset constructed for the academic knowledge selection task is a question and an option, and the output is the corresponding correct option. For the research field judgment task, the task requires selecting a correct research field from multiple research field options based on a given text (such as a paragraph, paper title, etc.). Exemplarily, the input of each instruction data in the instruction fine-tuning dataset constructed for the research field judgment task is a given text and multiple research field options, and the output is the correct research field.

[0063] After obtaining the instruction fine-tuning datasets for each task, these instruction fine-tuning datasets can be used to perform supervised training on the pre-trained question-answering model, calculate the loss function through forward propagation, and update the model parameters through back propagation, finally obtaining a trained question-answering model.

[0064] This embodiment constructs a series of comprehensive and academic downstream academic tasks, and obtains a pre-built instruction fine-tuning dataset for each task. These instruction fine-tuning datasets are used to fine-tune the pre-trained question-answering model. This process not only enables the model to learn a wider range of features and knowledge, but also significantly improves the generalization ability, practicality and flexibility of the model by focusing on the specific needs of the academic field. Ultimately, it ensures that the academic answers generated by the model are more professional and accurate.

[0065] In one possible implementation, the instruction fine-tuning dataset is generated according to the following method: obtaining a pre-constructed multi-round academic question and answer data set, wherein each multi-round academic question and answer data in the set includes multiple groups of time-sequential question and answer data; for any target question and answer data of any target multi-round academic question and answer data in the pre-constructed multi-round academic question and answer data set, generating academic instruction data based on the target question and answer data and the previous question and answer data of the target question and answer data; each of the academic instruction data constitutes the instruction fine-tuning dataset.

[0066] In this embodiment, the pre-constructed multi-round academic question-answering data set may be manually constructed based on high-quality academic content.

[0067] For example, the target multi-round academic question answering data is:

[0068] Question 1: Please help me generate an outline for the topic "A"

[0069] Answer 1: 1.xxx

[0070] 2.xxx

[0071] 2.1xxx ...

[0073] Q2: Please help me generate the paragraphs for subheading 2.1xxx

[0074] Answer 2: Paragraph content M.

[0075] In the above multiple rounds of academic question and answer data, question 1 and answer 1 constitute question and answer data 1, and question 2 and answer 2 constitute question and answer data 2. During implementation, first for question and answer data 1, academic instruction data 1 (without prior question and answer data) can be generated based on question 1 and answer 1; then for question and answer data 2, academic instruction data 2 can be generated based on question 2, answer 2, and question 1 and answer 1.

[0076] During implementation, academic instruction data 2 can also be: question and answer data 1 + [input] + question 2 + [output] + answer 2. [input] and [output] are placeholders used to inform the question and answer model that the following contents are questions and answers, respectively. Academic instruction data 2 can also be: instruction prompt + question and answer data 1 + [input] + question 2 + [output] + answer 2. The instruction prompt is used to inform the model of its role and function. For example, the instruction prompt is: You are an intelligent question and answer robot.

[0077] This embodiment can automatically generate an instruction fine-tuning dataset using a pre-built multi-round academic question-answering dataset, greatly reducing labor costs and improving the efficiency of generating the instruction fine-tuning dataset. At the same time, historical conversation data (such as question-answering data 1 in academic instruction data 2) is introduced into the academic instruction data of the instruction fine-tuning dataset, which can greatly improve the interactive performance of the question-answering model, thereby improving the accuracy of the answers output by the question-answering model.

[0078] In a possible implementation manner, the method further includes:

[0079] Using the preset model guidance data, each of the academic instruction data is modified to obtain a processed instruction fine-tuning data set containing the preset model guidance data; the instruction fine-tuning data set is replaced with the processed instruction fine-tuning data set; wherein the preset model guidance data is generated based on at least one of the following: identification information of the initial question-answering model, model capability range description information, and health prompt information.

[0080] Exemplarily, the preset model guidance data is "You are an intelligent question-and-answer robot named A (identification information of the initial question-and-answer model). You can help users solve problems in the fields of natural language processing, knowledge question-and-answer, etc. (description information of the model's ability range). Your answers should not include any harmful, immoral, racist, sexist, toxic, dangerous or illegal content. Please make sure that your answers are socially fair and positive (health reminder information)". It should be noted that the examples given here are only illustrative and do not limit the embodiments of the present disclosure.

[0081] In this embodiment, the academic instruction data in the instruction fine-tuning data set also includes at least one of the identification information of the initial question-answering model, the description information of the model's capability range, and the health prompt information. Among them, the identification information of the initial question-answering model can remind the model of its own identity and the developer behind it, which helps the model better understand its role and responsibilities; the description information of the model's capability range ensures that the model can follow the prescribed fields and boundaries when answering questions, and provide users with accurate and targeted answers; the health prompt information can clearly inform the question-answering model that it should not answer content involving privacy, harm or unhealthy content, thereby ensuring that the information output by the model always meets the requirements of social ethics and laws and regulations. By adding the above information, the ability of the question-answering model can be further stimulated.

[0082] In one possible implementation, the multi-round academic question-and-answer data set is generated according to the following method: obtaining a plurality of academic texts to be processed; for any target academic text among the plurality of academic texts to be processed, using a preset open source big model, based on the target academic text, generating a plurality of questions and corresponding answer sets; for any target question among the plurality of questions, using a preset open source big model, scoring the answers in the corresponding target answer set to obtain a scoring result; judging whether there is a low-scoring answer in the target answer set according to a preset scoring threshold; and sorting the elements in the target answer set in descending order according to the scoring result to obtain a sorting result; if there is no low-scoring answer in the target answer set, the target answer set is sorted. If there is a low-scoring answer in the target answer set, then according to the sorting result, at least one answer ranked at the bottom and the target question are sent to the expert terminal; and at least one modified answer sent by the expert terminal is received; at least one answer ranked at the top in the target answer set and the at least one modified answer constitute the final answer set for the target question; based on the multiple questions and the corresponding final answer sets, a multi-round academic question and answer data subset is generated for the target academic text; each of the multi-round academic question and answer data subsets constitutes the multi-round academic question and answer data set.

[0083] In this embodiment, a plurality of academic texts to be processed may be obtained first. The academic text to be processed may be, for example, a paragraph in an academic paper, or a whole academic document, etc., which is not limited in this embodiment.

[0084] For any target academic text among multiple academic texts to be processed, a preset open source big model can be used to generate multiple questions and corresponding answer sets based on the target academic text. Specifically, the prompt project designed by the preset open source big model can be used to allow the big model to design multiple questions for the target academic text and give a set of answers to each question. Exemplarily, you can enter "The title of the document is "B". The document mentions: Content C. Please design a generative question, an extractive question and a closed question based on the above content and give at least one answer for each question" in the big model, and then the big model gives a response, including the following: generative questions and corresponding multiple answers, extractive questions and corresponding multiple answers, closed questions and corresponding multiple answers.

[0085] Next, for any target question, the preset open source big model is used to score the answers in the corresponding target answer set to obtain the scoring result of each answer. The elements in the target answer set can be sorted in descending order to obtain the sorting result. Then the preset scoring threshold can be used to compare with the scoring results of each answer respectively. If the scoring result of a certain answer is less than the preset scoring threshold, the answer is judged to be a low-scoring answer. Among them, the preset scoring threshold can be set according to actual needs, and this embodiment is not limited to this. If there is no low-scoring answer in the target answer set, one or more answers ranked in the front can be used as elements in the final answer set of the target question. If there is a low-scoring answer in the target answer set, one or more low-scoring answers can be selected and sent to the expert terminal together with the target question. The expert modifies each low-scoring answer according to his own experience, obtains the corresponding modified answer, and sends it to the execution subject of this embodiment. At this time, one or more answers ranked in the front of the target answer set and each modified answer can be used as elements in the final answer set of the target question. Among them, the two preset open source big models appearing in this embodiment can be the same or different. The preset open source large model may be, for example, Wenxinyiyan, Doubao, etc., which is not limited in this embodiment.

[0086] Finally, based on multiple questions and corresponding final answer sets, a subset of multi-round academic question and answer data for the target academic text is generated. Exemplarily, multiple questions include question 1 and question 2, the final answer set corresponding to question 1 includes answer 11, and the final answer set corresponding to question 2 includes answer 21 and answer 22, then question 1-answer 11, question 2-answer 21, can constitute a multi-round academic question and answer data 1, question 1-answer 11, question 2-answer 22, can constitute a multi-round academic question and answer data 2. Here, this embodiment does not limit the method for generating multi-round academic question and answer data based on multiple question and answer data. Multi-round academic question and answer data 1 and multi-round academic question and answer data 2 constitute a subset of multi-round academic question and answer data for the target academic text. Each subset of multi-round academic question and answer data constitutes the aforementioned multi-round academic question and answer data set for generating an instruction fine-tuning data set.

[0087] When generating a multi-round academic question-and-answer data set, this embodiment first uses an advanced open source big model to design multiple questions based on a given text and gives corresponding multiple answers. Then, for each question, the open source big model is used to automatically score each answer, and the more correct answer can be screened out as the final answer. Poor answers can also be screened out, and the questions and these poor answers are sent to the expert terminal. The expert modifies the wrong answers and gives the correct modified answers. Finally, the more correct answers and the modified answers are used as the final answers. Through this human-machine dual-channel answer scoring standard, this embodiment not only improves the efficiency of question-and-answer data generation and reduces labor costs, but also ensures the accuracy and authority of question-and-answer data, providing effective support for improving the model effect.

[0088] In a possible implementation, the pre-trained question-answering model is trained based on the instruction fine-tuning dataset to obtain a target question-answering model, including: using the instruction fine-tuning dataset and at least one open source instruction fine-tuning dataset to fine-tune the pre-trained question-answering model to obtain the target question-answering model.

[0089] In this embodiment, the open source instruction fine-tuning dataset can be, for example, Dolly (an instruction fine-tuning dataset focusing on daily dialogue tasks, including instructions of various dialogue types and corresponding input-output pairs), OpenAssistant (similar to Dolly, including a wider range of dialogue tasks and richer historical dialogue data), Alpaca, etc. This disclosure embodiment is not limited to this.

[0090] During implementation, assuming that the open source instruction fine-tuning dataset includes dataset 1 and dataset 2, the pre-trained question-answering model can be fine-tuned using the instruction fine-tuning dataset in sequence to obtain intermediate model 1; intermediate model 1 can be fine-tuned using dataset 1 to obtain intermediate model 2; intermediate model 2 can be fine-tuned using dataset 2 to obtain the target question-answering model. This embodiment does not limit the training method of fine-tuning using the instruction fine-tuning dataset and the open source instruction fine-tuning dataset.

[0091] This embodiment not only uses the instruction fine-tuning dataset in the academic field to fine-tune the pre-trained question-answering model, but also uses one or more other open source instruction fine-tuning datasets to fine-tune the pre-trained question-answering model, so that the model can learn a wider range of concepts and language patterns, thereby improving its generalization ability in different tasks and fields and adapting to different task requirements. In addition, when faced with texts from different sources and styles, the model can better handle language diversity and improve robustness to abnormal inputs. The training method of this embodiment can further enhance the professionalism of the answers output by the target question-answering model.

[0092] In one possible implementation, the open source instruction fine-tuning dataset includes historical conversation data; the method further includes: reconstructing the instruction data in the open source instruction fine-tuning dataset based on the preset model guidance data, and replacing the open source instruction fine-tuning dataset with the obtained reconstructed open source instruction fine-tuning dataset.

[0093] In this embodiment, the preset model guidance data can be used to reconstruct the instruction data in the open source instruction fine-tuning dataset to obtain a reconstructed open source instruction fine-tuning dataset. Exemplarily, for instruction data 1 in the open source instruction fine-tuning dataset, instruction data 1 is: historical conversation data + [input] + input + [ouput] + output. The reconstructed instruction data 1 is: preset model guidance data + historical conversation data + [input] + input + [ouput] + output. The reconstructed open source instruction fine-tuning dataset can be used as a new open source instruction fine-tuning dataset for fine-tuning the model.

[0094] This embodiment introduces preset model guidance data into the open source instruction fine-tuning dataset. The preset model guidance data includes at least one of identification information of the initial question-answering model, description information of the model capability range, and health prompt information. When the model is trained using the open source instruction fine-tuning dataset, this information can further stimulate the capabilities of the question-answering model.

[0095] During implementation, existing open source large models (such as Wenxin Yiyan, etc.) can also be used to clean the content of the reconstructed open source instruction fine-tuning data set, remove harmful content including crime, privacy, racial discrimination and other related content, and screen the open source instruction data by using open source models to score the instruction data.

[0096] In actual application scenarios, knowledge in the academic field is constantly updated, and the question-answering model obtained based on the existing training method cannot keep pace with the times, and the generated answers are less timely. Based on this, in a possible implementation of the present disclosure, the instruction fine-tuning dataset is constructed based on a preset academic knowledge corpus; the method also includes: updating the preset academic knowledge corpus to obtain an updated academic knowledge corpus; using the updated academic knowledge corpus to update the instruction fine-tuning dataset to obtain an updated instruction fine-tuning dataset; using the updated instruction fine-tuning dataset to fine-tune the target question-answering model to obtain a new target question-answering model.

[0097] In this embodiment, the academic knowledge relied on to construct the instruction fine-tuning dataset comes from a preset academic knowledge corpus. The preset academic knowledge corpus can be updated in real time, new corpus can be added, and new instruction data can be constructed based on new expectations, thereby realizing the update of the instruction fine-tuning dataset. When the preset time is reached, for example, after 1 year, the updated instruction fine-tuning dataset is used to fine-tune the target question-answering model obtained after fine-tuning again to obtain a new target question-answering model.

[0098] The disclosed embodiment uses an academic knowledge corpus and introduces a real-time update mechanism in the academic knowledge corpus. The content in the corpus can be continuously updated as academic research progresses, that is, the knowledge learned by the model is continuously updated, thereby ensuring the timeliness of the answers generated by the model and further improving the accuracy and rigor of the model's answers to academic questions.

[0099] Figure 2 A schematic diagram showing a flow chart of the answer generation method provided by the embodiment of the present disclosure is shown, from Figure 2 It can be seen that the embodiment of the present disclosure at least includes steps S201-S202:

[0100] S201: Obtain target academic questions.

[0101] S202: Use a preset question-and-answer model to answer the target academic question and obtain a target academic answer; wherein the preset question-and-answer model is a target question-and-answer model trained by any of the academic question-and-answer model training methods described above.

[0102] In this embodiment, after the target question-answering model is obtained by training based on any of the above-mentioned academic question-answering model training methods, the academic questions input by the user can be answered based on the obtained target question-answering model to obtain the target academic answer. Among them, the academic questions input by the user can be academic questions in actual application scenarios or in test sets. In this embodiment, there is no limitation on specific academic questions, and it can include any problem description in the academic field.

[0103] In this embodiment, the target academic question is processed through a preset question-answering model, and the output target academic answer is more accurate, professional, and timely.

[0104] The present disclosure also provides a method for generating an answer, comprising the following steps:

[0105] Step S1: Obtain an open source pre-training data set and an academic pre-training data set; wherein each pre-training data set includes multiple text data, and the text data in the academic pre-training data set includes at least one label, and the label is used to represent the meaning of the structured text in the text data.

[0106] Specifically, for any target text data in the academic pre-training dataset, the corresponding labels include: Chinese title, English title, research direction, Chinese abstract, English abstract, Chinese keywords, English keywords, first-level title, second-level title, third-level title, paragraph and references.

[0107] During implementation, the academic pre-training data set can be generated according to the following steps: obtaining an initial academic pre-training data set; for any text data to be processed in the initial academic pre-training data set, using a preset text structure recognition algorithm to process the text data to be processed, and obtain multiple structured texts and corresponding structured text types; for any target structured text, according to the corresponding target structured text type and the preset type-label correspondence, obtain a target label; place each target label before or after the corresponding target structured text to obtain processed text data; each processed text data constitutes the academic pre-training data set.

[0108] Step S2: Use open source pre-training datasets and academic pre-training datasets to train the initial question-answering model to obtain a pre-trained question-answering model.

[0109] Step S3: Obtain instruction fine-tuning datasets built for downstream academic tasks.

[0110] During implementation, downstream academic tasks include: generative question-answering tasks, extractive question-answering tasks and closed question-answering tasks. Among them, generative question-answering tasks include: summary generation tasks, paragraph title generation tasks, paragraph continuation tasks, outline generation tasks, paragraph content summary tasks; extractive question-answering tasks include citation extraction tasks and concept definition extraction tasks; closed question-answering tasks include academic knowledge selection tasks and research field judgment tasks.

[0111] Specifically, the instruction fine-tuning data set is generated according to the following method: obtain a pre-constructed multi-round academic question-and-answer data set, wherein each multi-round academic question-and-answer data in the set includes multiple groups of time-ordered question-and-answer data; for any target question-and-answer data of any target multi-round academic question-and-answer data in the pre-constructed multi-round academic question-and-answer data set, generate academic instruction data based on the target question-and-answer data and the previous question-and-answer data of the target question-and-answer data; each academic instruction data constitutes an instruction fine-tuning data set. It is also possible to modify each academic instruction data using the preset model guidance data to obtain a processed instruction fine-tuning data set containing the preset model guidance data; replace the instruction fine-tuning data set with the processed instruction fine-tuning data set; wherein the preset model guidance data is generated based on the following content: identification information of the initial question-and-answer model, description information of the model capability range, and health prompt information.

[0112] Preferably, the multi-round academic question-and-answer data set is generated according to the following method: obtaining a plurality of academic texts to be processed; for any target academic text among the plurality of academic texts to be processed, using a preset open source big model, based on the target academic text, generating a plurality of questions and corresponding answer sets; for any target question among the plurality of questions, using a preset open source big model, scoring the answers in the corresponding target answer set to obtain a scoring result; judging whether there is a low-scoring answer in the target answer set according to a preset scoring threshold; and sorting the elements in the target answer set in descending order according to the scoring result to obtain a sorting result; if there is no low-scoring answer in the target answer set, If there is a low-scoring answer in the target answer set, then according to the sorting result, at least one answer ranked at the back and the target question are sent to the expert terminal; and at least one modified answer sent by the expert terminal is received; at least one answer ranked at the front and at least one modified answer in the target answer set constitute the final answer set for the target question; based on multiple questions and the corresponding final answer sets, a multi-round academic question and answer data subset is generated for the target academic text; each multi-round academic question and answer data subset constitutes a multi-round academic question and answer data set.

[0113] Step S4: Use the instruction fine-tuning dataset and at least one open source instruction fine-tuning dataset to fine-tune the pre-trained question-answering model to obtain a target question-answering model.

[0114] During implementation, the instruction data in the open source instruction fine-tuning dataset can also be reconstructed based on the preset model guidance data, and the open source instruction fine-tuning dataset can be replaced with the obtained reconstructed open source instruction fine-tuning dataset.

[0115] Step S5: updating the preset academic knowledge corpus to obtain an updated academic knowledge corpus;

[0116] Step S6: using the updated academic knowledge corpus, updating the instruction fine-tuning dataset to obtain an updated instruction fine-tuning dataset;

[0117] Step S7: Use the updated instruction fine-tuning dataset to fine-tune the target question-answering model to obtain a new target question-answering model.

[0118] Step S8: Obtain target academic questions.

[0119] Step S9: Use the new target question-answering model to answer the target academic question and obtain the target academic answer.

[0120] Those skilled in the art will appreciate that, in the above method of the specific implementation manner, the writing order of the steps does not mean a strict execution order, but does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

[0121] It should be noted that, in practical applications, all possible implementations described above can be combined in any manner to form possible embodiments of the present disclosure, which will not be described one by one here.

[0122] Based on the same concept, the present disclosure also provides an academic question-answering model training device. Figure 3 A schematic diagram of the structure of the academic question answering model training device provided by the embodiment of the present disclosure is shown. Figure 3 As shown, the academic question answering model training device 300 provided in the embodiment of the present disclosure includes:

[0123] The first acquisition module 301 is used to acquire an open source pre-training data set and an academic pre-training data set; wherein each pre-training data set includes a plurality of text data, and the text data in the academic pre-training data set includes at least one label, and the label is used to represent the meaning of the structured text in the text data;

[0124] A pre-training module 302 is used to train the initial question-answering model using the open source pre-training data set and the academic pre-training data set to obtain a pre-trained question-answering model;

[0125] A second acquisition module 303 is used to acquire an instruction fine-tuning dataset constructed for downstream academic tasks;

[0126] The fine-tuning module 304 is used to train the pre-trained question-answering model based on the instruction fine-tuning data set to obtain a target question-answering model.

[0127] In a possible implementation, in the above-mentioned device, the label includes at least one of the following: Chinese title, English title, research direction, Chinese abstract, English abstract, Chinese keywords, English keywords, first-level title, second-level title, third-level title, paragraph and references.

[0128] In a possible implementation, the device also includes a first generation module, which is used to: obtain an initial academic pre-training data set; for any text data to be processed in the initial academic pre-training data set, use a preset text structure recognition algorithm to process the text data to be processed to obtain multiple structured texts and corresponding structured text types; for any target structured text, obtain a target label according to the corresponding target structured text type and a preset type-label correspondence; place each of the target labels before or after the corresponding target structured text to obtain processed text data; each of the processed text data constitutes the academic pre-training data set.

[0129] In a possible implementation, in the above-mentioned device, the downstream academic task includes at least one of the following: a generative question-answering task, an extractive question-answering task, and a closed question-answering task, wherein the generative question-answering task includes: a summary generation task, a paragraph title generation task, a paragraph continuation task, an outline generation task, and a paragraph content summarization task; the extractive question-answering task includes a citation extraction task and a concept definition extraction task; and the closed question-answering task includes an academic knowledge selection task and a research field judgment task.

[0130] In a possible implementation, the device also includes a second generation module, which is used to: obtain a pre-constructed multi-round academic question and answer data set, wherein each multi-round academic question and answer data in the set includes multiple groups of time-sequential question and answer data; for any target question and answer data of any target multi-round academic question and answer data in the pre-constructed multi-round academic question and answer data set, generate academic instruction data based on the target question and answer data and previous question and answer data of the target question and answer data; each of the academic instruction data constitutes the instruction fine-tuning data set.

[0131] In a possible implementation, the device also includes a modification module, which is used to: modify each of the academic instruction data using preset model guidance data to obtain a processed instruction fine-tuning data set containing the preset model guidance data; replace the instruction fine-tuning data set with the processed instruction fine-tuning data set; wherein the preset model guidance data is generated based on at least one of the following: identification information of the initial question-and-answer model, model capability range description information, and health prompt information.

[0132] In a possible implementation manner, the device further includes a question-answer data generating module, which is used to:

[0133] Acquire multiple academic texts to be processed; for any target academic text among the multiple academic texts to be processed, use a preset open source big model to generate multiple questions and corresponding answer sets based on the target academic text; for any target question among the multiple questions, use the preset open source big model to score the answers in the corresponding target answer set to obtain a scoring result; according to a preset scoring threshold, determine whether there is a low-scoring answer in the target answer set; and according to the scoring result, sort the elements in the target answer set in descending order to obtain a sorting result; if there is no low-scoring answer in the target answer set, according to the sorting result, sort the elements ranked at the top. at least one answer as the final answer set for the target question; if there is a low-scoring answer in the target answer set, then according to the sorting result, at least one answer ranked later and the target question are sent to the expert terminal; and at least one modified answer sent by the expert terminal is received; at least one answer ranked earlier in the target answer set and the at least one modified answer constitute the final answer set for the target question; based on the multiple questions and the corresponding final answer sets, a multi-round academic question and answer data subset is generated for the target academic text; each of the multi-round academic question and answer data subsets constitutes the multi-round academic question and answer data set.

[0134] In a possible implementation, in the above-mentioned device, the fine-tuning module 304 is used to: use the instruction fine-tuning dataset and at least one open source instruction fine-tuning dataset to fine-tune the pre-trained question-answering model to obtain the target question-answering model.

[0135] In one possible implementation, the open source instruction fine-tuning dataset includes historical conversation data; the device also includes a reconstruction module, which is used to: reconstruct the instruction data in the open source instruction fine-tuning dataset based on the preset model guidance data, and replace the open source instruction fine-tuning dataset with the obtained reconstructed open source instruction fine-tuning dataset.

[0136] In one possible implementation, the instruction fine-tuning dataset is constructed based on a preset academic knowledge corpus; the device also includes a model updating module, which is used to: perform knowledge updates on the preset academic knowledge corpus to obtain an updated academic knowledge corpus; use the updated academic knowledge corpus to update the instruction fine-tuning dataset to obtain an updated instruction fine-tuning dataset; use the updated instruction fine-tuning dataset to fine-tune the target question and answer model to obtain a new target question and answer model.

[0137] It should be noted that any of the above-mentioned academic question and answer model training devices can implement the aforementioned academic question and answer model training method one-to-one, which will not be repeated here.

[0138] Based on the same concept, the embodiment of the present disclosure also provides an answer generating device. Figure 4 A schematic diagram of the structure of the answer generation device provided by the embodiment of the present disclosure is shown. Figure 4 As shown, the answer generation device 400 provided in the embodiment of the present disclosure includes:

[0139] The acquisition module 401 is used to acquire the academic question input by the user;

[0140] The answering module 402 is used to use a preset question-answering model to answer the academic question and obtain a target academic answer; wherein the preset question-answering model is a target question-answering model trained by any of the academic question-answering model training methods described above.

[0141] Figure 5 FIG. 1 shows a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 5 As shown, at the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. Among them, the memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage, etc. Of course, the electronic device may also include hardware required for other services.

[0142] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0143] The memory is used to store programs. Specifically, the program may include program code, and the program code includes computer operation instructions. The memory may include internal memory and non-volatile memory, and provides instructions and data to the processor.

[0144] The processor reads the corresponding computer program from the non-volatile memory into the memory, and then runs it, forming a model training device or an answer generation device at the logical level. The processor executes the program stored in the memory and is specifically used to execute the corresponding method mentioned above.

[0145] The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present disclosure may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present disclosure may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0146] The electronic device can execute the academic question-answering model training method provided by multiple embodiments of the present disclosure, and realize the academic question-answering model training device in Figure 3 The functions of the embodiments shown in the figure, and the answer generation method provided by the embodiments of the present disclosure are implemented as an answer generation device in Figure 4 The functions of the illustrated embodiments will not be described in detail in the embodiments of the present disclosure.

[0147] The embodiments of the present disclosure also propose a computer-readable storage medium, which stores one or more programs, and the one or more programs include instructions. When the instructions are executed by an electronic device including multiple application programs, the electronic device can execute the academic question-answering model training method or answer generation method provided by multiple embodiments of the present disclosure.

[0148] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0149] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0150] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0151] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0152] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0153] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0154] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape, disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0155] The embodiments of the present disclosure also provide a computer program product, which carries a program code. The instructions included in the program code can be used to execute the steps of the academic question-answering model training method or the answer generation method described in the above method embodiments. Please refer to the above method embodiments for details, which will not be repeated here.

[0156] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).

[0157] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity or device including the element.

[0158] It will be appreciated by those skilled in the art that the embodiments of the present disclosure may be provided as methods, systems or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0159] The above are only embodiments of the present disclosure and are not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the scope of the claims of the present disclosure.

Claims

1. A method for training an academic question-answering model, characterized in that: The method comprises: Obtain an open source pre-training data set and an academic pre-training data set; wherein each pre-training data set includes a plurality of text data, and the text data in the academic pre-training data set includes at least one label, and the label is used to characterize the meaning of the structured text in the text data; Using the open source pre-training dataset and the academic pre-training dataset, the initial question-answering model is trained to obtain a pre-trained question-answering model; Obtain instruction fine-tuning datasets built for downstream academic tasks; Based on the instruction fine-tuning dataset, the pre-trained question-answering model is trained to obtain a target question-answering model.

2. The method according to claim 1, characterized in that The tags include at least one of the following: Chinese title, English title, research direction, Chinese abstract, English abstract, Chinese keywords, English keywords, first-level title, second-level title, third-level title, paragraph and references.

3. The method according to claim 1, characterized in that The method further comprises: Get the initial academic pre-training dataset; For any text data to be processed in the initial academic pre-training data set, a preset text structure recognition algorithm is used to process the text data to be processed to obtain a plurality of structured texts and corresponding structured text types; For any target structured text, a target label is obtained according to the corresponding target structured text type and the preset type-label correspondence relationship; Each of the target tags is placed before or after the corresponding target structured text to obtain processed text data; each of the processed text data constitutes the academic pre-training data set.

4. The method according to claim 1, characterized in that: The downstream academic tasks include at least one of the following: a generative question-answering task, an extractive question-answering task, and a closed question-answering task. The generative question-answering task includes: a summary generation task, a paragraph title generation task, a paragraph continuation task, an outline generation task, and a paragraph content summary task. The extractive question-answering task includes a citation extraction task and a concept definition extraction task. The closed question-answering task includes an academic knowledge selection task and a research field judgment task.

5. A method for generating an answer, characterized in that: The method comprises: Get targeted academic questions; Using a preset question-answering model to answer the target academic question and obtain the target academic answer; Among them, the preset question and answer model is the target question and answer model trained by the academic question and answer model training method described in any one of claims 1-4 above.

6. An academic question-answering model training device, characterized in that: The device comprises: A first acquisition module is used to acquire an open source pre-training data set and an academic pre-training data set; wherein each pre-training data set includes a plurality of text data, and the text data in the academic pre-training data set includes at least one label, and the label is used to represent the meaning of the structured text in the text data; A pre-training module, used to train the initial question-answering model using the open source pre-training dataset and the academic pre-training dataset to obtain a pre-trained question-answering model; The second acquisition module is used to obtain instruction fine-tuning datasets built for downstream academic tasks; A fine-tuning module is used to fine-tune the data set based on the instruction, train the pre-trained question-answering model, and obtain a target question-answering model.

7. An answer generation device, characterized in that: The device comprises: The acquisition module is used to obtain academic questions input by users; An answering module is used to answer the academic question using a preset question-answering model to obtain a target academic answer; wherein the preset question-answering model is a target question-answering model trained by the academic question-answering model training method described in any one of claims 1 to 4 above.

8. An electronic device comprising: processor; as well as A memory arranged to store computer-executable instructions, characterized in that when the executable instructions are executed, the processor executes the steps of the academic question-answering model training method as described in any one of claims 1 to 4, or executes the steps of the answer generation method as described in claim 5.

9. A computer-readable storage medium storing one or more programs, characterized in that: When the one or more programs are executed by an electronic device including multiple applications, the electronic device executes the steps of the academic question-answering model training method as described in any one of claims 1 to 4, or executes the steps of the answer generation method as described in claim 5.

10. A computer program product, characterized in that The computer program product carries a program code, and the instructions included in the program code can be used to execute the steps of the academic question-answering model training method as described in any one of claims 1 to 4, or to execute the steps of the answer generation method as described in claim 5.

Citation Information

Cited By

  • Feed raw material nutritional value data synthesis method based on large language model

    CN119538986A

  • A method for synthesizing nutritional value data of feed raw materials based on large language model

    CN119538986B