Domain knowledge enhancement-based industry chain large model construction method and system
By constructing a large-scale industry chain model based on domain knowledge enhancement, the problem of lack of knowledge in the industry chain domain of general large-scale models is solved, achieving higher accuracy and professionalism, effectively answering industry chain-related questions, and avoiding misunderstandings.
Patent Information
- Application Number
- CN202510950771.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-10
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2045-07-10
AI Technical Summary
The lack of key knowledge in the industry chain domain in general large models leads to problems such as rapid knowledge updates, large data volume, wide coverage, and high requirements for accuracy and reliability. Direct use may introduce illusions, fail to effectively solve problems, and may cause misunderstandings for users.
We construct a large-scale industry chain model based on domain knowledge enhancement. We continuously pre-train the base model by building a text corpus dataset related to the industry chain. We combine document interpretation, enterprise and talent profiling, and industry chain graph cognition tasks to generate instruction-response question-answer pairs. We use external knowledge bases for retrieval enhancement and optimize the model to improve its accuracy and professionalism in the industry chain domain.
It has achieved a rich and comprehensive knowledge base in the industry chain field, improved the model's performance in multiple evaluations, and can better answer industry chain-related questions, avoid misanswering irrelevant questions, and meet high-standard user needs.
Smart Images

Figure CN120851201B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of large language models and industry chain cognitive decision-making, and particularly relates to a method and system for constructing a large industry chain model based on domain knowledge enhancement. Background Technology
[0002] "Industry" refers to a sector or sector in economic activity that produces, manufactures, or provides goods and services, encompassing the entire process from raw material acquisition and product processing to market sales and service provision. "Industrial chain" macroscopically refers to the chain-like interconnectedness of various components within an industry, based on specific technological and economic links and spatial-temporal relationships. Specifically, the industrial chain refers to the concrete processes by which related industries develop products and provide services, with enterprises and products at its core. The innovation chain refers to the accumulation of relevant knowledge from basic scientific research, guiding technological innovation and leading to the application of this knowledge by industries, resulting in more advanced products and services, thereby realizing the value of technological innovation. The capital chain refers to the flow of funds within an industry, specifically the cycle from financing to investment and ultimately repaying external financing through the sale of products and services. The talent chain refers to the flow of talent as a resource element, using relevant knowledge, experience, technology, and achievements as carriers, in various industrial segments to help the industry iterate and develop.
[0003] For a specific industry, the scale of its related industrial chain, innovation chain, capital chain, and talent chain is quite large. The cognitive cost of related practitioners to the elements of the four chains is relatively high, which is reflected in the large workload of collecting relevant information and the difficulty of judging the relevance.
[0004] Since general-purpose large-scale models are typically trained on large-scale general text, they may lack key industry knowledge or have an inaccurate understanding of this knowledge. Industry-specific questions are characterized by rapid knowledge updates, large data volumes, wide coverage, and high accuracy and reliability requirements. Directly using general-purpose large-scale models for industry chain-related question answering may introduce illusions, not only failing to solve problems effectively but also potentially causing misunderstandings for users. Therefore, when using large-scale models to assist in solving problems in industry chain-related professional tasks, knowledge augmentation is necessary. This involves integrating additional industry chain-related knowledge into the large-scale model's problem-solving process through various means during model training and prediction. Knowledge augmentation of large-scale models can improve their accuracy, real-time performance, and professionalism, meeting users' high-standard needs in the industry chain field. Summary of the Invention
[0005] Existing general-purpose large-scale models are typically trained on large amounts of general text, which may lack key industry knowledge or have an inaccurate understanding of this knowledge. Industry-specific questions are characterized by rapid knowledge updates, large data volumes, broad coverage, and high requirements for accuracy and reliability. Directly using general-purpose large-scale models for industry chain-related question answering may introduce illusions, not only failing to solve problems effectively but also potentially causing misunderstandings for users. The purpose of this invention is to address the problems existing in the prior art and provide a method for constructing and applying industry chain large-scale models based on domain knowledge enhancement.
[0006] The specific technical solution adopted in this invention is as follows:
[0007] Firstly, this invention provides a method for constructing a large-scale industry chain model based on domain knowledge enhancement, the steps of which are as follows:
[0008] S1. Using a pre-trained large language model as the base model, construct the first dataset consisting of text corpora related to the industry chain domain. Use the first dataset to continuously pre-train the base model in the domain, and introduce industry chain domain-related knowledge into the existing base model to form the industry chain model.
[0009] S2. Based on three tasks—document interpretation, enterprise and talent profiling, and industry chain diagram recognition—instruction-response question-and-answer pairs are generated respectively. A second dataset consisting of instruction-response question-and-answer pairs for each task is constructed using a general large model. The second dataset is used to fine-tune the industry chain large model. Then, the second dataset and the general instruction-response question-and-answer pair dataset are combined to form a third dataset. The third dataset is used to optimize the industry chain large model directly for industry chain domain preferences, so that the industry chain large model can answer questions related to the industry chain domain but not questions related to non-industry chain domains.
[0010] S3. Based on the sub-datasets corresponding to the enterprise and talent profiling tasks in the second dataset, and combined with the search results of keywords in the instructions from the external knowledge base as contextual information, a fourth dataset is obtained and used to fine-tune the large-scale industrial chain model after preference optimization, thereby obtaining a large-scale industrial chain model with enhanced search capabilities.
[0011] As a preferred embodiment of the first aspect above, in S1, the method for constructing the first dataset and training the base large model is as follows:
[0012] First, a binary classifier is trained using pre-collected and screened industry chain-related text samples to determine whether a text is related to the industry chain. Then, the trained binary classifier is used to classify and label each text sample in the general corpus, and the set of text corpora related to the industry chain is selected as the first dataset.
[0013] Then, based on the first dataset, the next-token prediction task is used to perform domain-specific continuous pre-training on the base model. During training, the lower limit learning rate of the base model pre-training stage is used as the initial learning rate. In the training process, the learning rate is first gradually increased linearly from 0 to the initial learning rate using a warmup strategy at the beginning of training. Then, the learning rate is gradually decreased from the initial learning rate in a cosine decreasing manner until the minimum learning rate is reached, thus completing the domain-specific continuous pre-training and obtaining the industry chain large model base.
[0014] As a preferred embodiment of the first aspect above, in step S2, the method for constructing the second dataset is as follows:
[0015] S21. For the document interpretation task, input the document sample and prompt words into the general model. The general model generates different questions for the document sample from both macro and micro levels. Then, the general model is asked to answer each of the generated questions, thereby constructing the instruction-response question-answer pair corresponding to the document interpretation task.
[0016] S22. For the enterprise and talent profiling task, a given detailed text information of an enterprise or talent is input into the general model along with prompt words. The general model generates a relevant question for the input enterprise or talent. Then, the general model is asked to answer the generated question based on the provided information, thereby constructing an instruction-response question-answer pair corresponding to the enterprise and talent profiling task.
[0017] S23. For the industry chain diagram recognition task, a given industry or technology is input into the general model along with prompt words. The general model generates a question under a fixed theme based on the input industry or technology. Then, the input industry or technology is used as the search keywords. Background knowledge is obtained by searching an external knowledge base. The general model is then asked to answer the generated question based on the obtained background knowledge, thereby constructing the instruction-response question-answer pair corresponding to the industry chain diagram recognition task.
[0018] S24. Integrate the instruction-response question-answer pairs obtained in S21 to S23 to construct the second dataset.
[0019] As a preferred embodiment of the first aspect mentioned above, in the document interpretation task, the macro-level problem is the overall theme of the currently input document sample, and the micro-level problem is the detailed interpretation of the currently input document sample; the types of document interpretation include research report interpretation, information interpretation, policy interpretation, patent interpretation, paper interpretation, and project interpretation;
[0020] The enterprise and talent profiling task generates questions on topics including basic enterprise information, main business, key technologies, branches, equity relationships, senior management information, intellectual property rights, scientific and technological innovation evaluation, basic talent information, research fields, and research achievements.
[0021] In the aforementioned industry chain diagram recognition task, the topics for generating questions include industry maps, industry technologies, industry investments, industry rankings, technology chain diagrams, technology trends, and technological achievements.
[0022] As a preferred embodiment of the first aspect above, in step S3, the method for constructing the fourth dataset is as follows:
[0023] From the second dataset, extract instruction-response question-answer pairs corresponding to the enterprise and talent profiling tasks. Then, for each extracted instruction-response question-answer pair, extract keywords related to the enterprise or talent entity from the instruction. Retrieve relevant information from an external knowledge base using the extracted keywords. Input the retrieval results as context information along with the original instruction into a general large model. The general large model regenerates the response text. Construct instruction-response question-answer pair samples containing retrieval enhancement information from the original instruction, context information, and regenerated text, and add them to the fourth dataset.
[0024] As a preferred option in the first aspect mentioned above, for the large industrial chain model with enhanced retrieval capabilities obtained after completing preference optimization, it is necessary to further build a tool library for its application scenarios, and use the sub-datasets corresponding to the enterprise and talent profiling task and the industrial chain diagram cognition task in the second dataset to fine-tune the tool calling capability of the large industrial chain model, so that the model can master the timing of tool calling and the ability to generate calling parameters.
[0025] Secondly, this invention provides a system for constructing a large-scale industry chain model based on domain knowledge enhancement, which includes:
[0026] The domain pre-training module is used to construct a first dataset consisting of text corpora related to the industry chain domain, using a pre-trained large language model as the base model. The base model is then continuously pre-trained using the first dataset, and knowledge related to the industry chain domain is introduced into the existing base model to form an industry chain model.
[0027] The instruction fine-tuning and preference optimization module generates instruction-response question-answer pairs for three tasks: document interpretation, enterprise and talent profiling, and industry chain diagram recognition. It then constructs a second dataset consisting of instruction-response question-answer pairs for each task using a general large model. This second dataset is used to fine-tune the industry chain large model. Finally, the second dataset and the general instruction-response question-answer pair dataset are combined to form a third dataset. This third dataset is used to directly optimize the industry chain large model for industry chain domain preferences, enabling the model to answer industry chain domain-related questions but not non-industry chain domain-related questions.
[0028] The remaining capability building modules are used to obtain a fourth dataset based on the sub-datasets corresponding to the enterprise and talent profile tasks in the second dataset, combined with the search results of keywords in the instructions introduced from the external knowledge base as context information. This dataset is then used to fine-tune the large-scale industry chain model after preference optimization, thereby obtaining a large-scale industry chain model with enhanced search capabilities.
[0029] Thirdly, the present invention provides a computer program product, including a computer program / instruction, which, when executed by a processor, can realize the method for constructing a large-scale industry chain model based on domain knowledge enhancement as described in any of the first aspects above.
[0030] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method for constructing a large-scale industry chain model based on domain knowledge enhancement as described in any of the first aspects above.
[0031] Fifthly, the present invention provides a computer electronic device, which includes a memory and a processor;
[0032] The memory is used to store computer programs;
[0033] The processor is configured to, when executing the computer program, implement the method for constructing a large industry chain model based on domain knowledge enhancement as described in any of the first aspects above.
[0034] Compared with the prior art, the present invention has the following advantages:
[0035] 1. This invention constructs a knowledge evaluation system for the industrial chain based on industrial texts. By using a multi-sample learning approach, it can directly evaluate the knowledge of the industrial chain on a base model that has not been fine-tuned by instructions.
[0036] 2. This invention uses a multi-model comparison evaluation method based on reference answers to solve the problem that traditional open-ended questions and answers are difficult to evaluate.
[0037] 3. Based on a general large-scale model, this invention uses a large amount of collected text related to the industrial chain for continuous pre-training, resulting in a large-scale language model base with rich knowledge reserves and comprehensive understanding of the industrial chain. It outperforms the general large-scale model in multiple evaluations and provides a potentially better pre-trained model for tasks in the mid-to-downstream of the industrial chain.
[0038] 4. This invention synthesizes a large amount of diverse instruction fine-tuning data for industry chain-related tasks through industry texts and existing knowledge interfaces, and fine-tunes the instructions on the industry chain base to obtain an industry chain dialogue model that can answer user-related questions. It outperforms existing general models in the evaluation of multiple industry chains. Attached Figure Description
[0039] Figure 1 A schematic diagram illustrating the steps involved in constructing a large-scale industry chain model based on domain knowledge enhancement;
[0040] Figure 2 This is a model structure diagram of the encoder, decoder, and encoder-decoder;
[0041] Figure 3 This is a schematic diagram illustrating the working principle of instruction fine-tuning;
[0042] Figure 4 Fine-tune the data building process to interpret the task instructions for the document;
[0043] Figure 5 Fine-tune the data construction process for creating profiles of enterprises and talents;
[0044] Figure 6 Fine-tune the data construction process for the task instruction of understanding the industry chain map;
[0045] Figure 7 This is a schematic diagram illustrating the enhanced retrieval process for large models.
[0046] Figure 8 This is a schematic diagram of the large model tool call process;
[0047] Figure 9 This shows the decrease in loss during model pre-training;
[0048] Figure 10 This shows the overall change in perplexity of the model;
[0049] Figure 11The model perplexity variation data is presented across different data sources, including 12 categories: baike, company, expert, information, institution, patent, policy, project_benying, project_keyan, publication_global, publication_lz, and report. Detailed Implementation
[0050] The present invention will be further described and illustrated below with reference to the accompanying drawings and specific embodiments. The technical features of each embodiment of the present invention can be combined accordingly, provided that there is no mutual conflict.
[0051] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention can be practiced in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below. Technical features in various embodiments of the present invention can be combined accordingly without mutual conflict.
[0052] In the description of this invention, it should be understood that when an element is considered to be "connected" to another element, it can be a direct connection to the other element or an indirect connection, i.e., there is an intermediate element. Conversely, when an element is said to be "directly" connected to another element, there is no intermediate element.
[0053] In the description of this invention, it should be understood that the terms "first" and "second" are used only for descriptive purposes and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature.
[0054] like Figure 1 As shown, in a preferred embodiment of the present invention, a method for constructing a large-scale industry chain model based on domain knowledge enhancement is provided, the steps of which are as follows:
[0055] S1. Using a pre-trained large language model as the base model, construct the first dataset consisting of text corpora related to the industry chain domain. Use the first dataset to continuously pre-train the base model in the domain, and introduce industry chain domain-related knowledge into the existing base model to form the industry chain model.
[0056] In this invention, the base large model is a pre-trained large language model (LLM). The specific structural form of the large language model will not be elaborated here, but its core is... Figure 2 The diagram shows a Transformer-based encoder-decoder architecture. When training a large language model, a word prediction task can be used for training. The purpose is to fine-tune the base model with domain-specific instructions to obtain a large dialogue model usable in that domain. The principle is as follows... Figure 3 As shown. Before training, this invention requires pre-constructing a fixed-size vocabulary and a word segmenter. The word segmenter is used to convert the text into a sequence on the vocabulary. Since the decoder architecture predicts the next word from left to right based on the preceding text, the next-token prediction task can be transformed into a classification task. Cross-entropy loss is typically used to measure the difference between the probability distribution of the model's predicted words and the target words. For a given text sequence {x1, x2, ..., x...} T The loss function is expressed as follows.
[0057]
[0058] Where T is the length of the text sequence, x t+1 For the target word, P(x) t+1 |x1,x2,,x t The model predicts the next word as the target word x. t+1 The probability of.
[0059] The method for constructing the first dataset and training the base large model in step S1 of the present invention is as follows:
[0060] First, a binary classifier is trained using pre-collected and screened industry chain-related text samples to determine whether a text is related to the industry chain. Then, the trained binary classifier is used to classify and label each text sample in the general corpus, and the set of text corpora related to the industry chain is selected as the first dataset.
[0061] Then, based on the first dataset, the base model is continuously pre-trained in the domain using the following word prediction task. During training, the initial learning rate is the lower limit learning rate of the base model pre-training stage (i.e., the learning rate at the end of the base model pre-training). During the training process, the learning rate is first linearly increased from 0 to the initial learning rate using a warmup strategy at the beginning of training. Then, the learning rate is gradually decreased from the initial learning rate in a cosine decreasing manner until the minimum learning rate is reached, thus completing the domain continuous pre-training and obtaining the base model of the industrial chain.
[0062] In an embodiment of the present invention, a preferred implementation of the method for constructing the first dataset and training the base large model is as follows:
[0063] S11. Use web crawling technology to crawl available relevant information on the Internet to collect industry chain-related text. A method is adopted to retrieve industry chain-related text from general texts; a FastText-based text binary classifier is trained and used to classify and label each text sample in a large-scale general corpus, determining whether the text is relevant to the industry chain. Finally, a set of industry chain-related text corpora is selected to form the first dataset.
[0064] It should be noted that the industry data in S12 mainly includes four parts. Information on entities within the industry chain, including relevant information about enterprises, talent, institutions, and other industry entities. 1) For enterprise information, this includes the enterprise's name, historical name, status, industry, business scope, registered address, registered capital, establishment date, business term, enterprise type, legal representative, unified social credit code, registration authority, business registration number, number of employees, website, contact number, and company profile; for talent information, this includes the talent's name, gender, primary employing institution, list of employing institutions, professional title, country of origin, address, resume, year of birth, job position, contact number, email, research field, highest degree, place of origin, honors and awards, awards, patents, papers, and projects; for institutions, this includes the institution's name, affiliated unit, affiliated enterprise, field, address, type, level, website, telephone number, and brief introduction. 2) Related industry texts within the industry chain, including texts generated during industry activities such as news, policies, and research reports. For news texts, information includes the title, publication time, industry, and main text; for policy texts, information includes the title, publication time, issuing unit, level, type, location of publication, and main text; for research report texts, information includes the title, type, industry, author, publication time, issuing institution, and main text. 3) Relevant knowledge texts in the industry chain, including knowledge texts related to papers, patents, and projects. For papers, this invention collects domestic and international papers, including the title, abstract, keywords, author, year, institution, discipline, journal, and publishing institution; for patents, this invention collects the titles and abstracts of domestic and international patents; for project information, this invention collects the name, type, Chinese abstract, English abstract, approval year, funding, leader, affiliated institution, output results, keywords, project start time, and project completion time for each project. 4) Industry encyclopedia, mainly including explanations of terms frequently appearing in the industry chain.
[0065] S12. The large-scale model of the base is fine-tuned using the first dataset. During training, the initial learning rate is set to the lower limit of the large-scale model. From the start of training, a warmup strategy is used to gradually increase the learning rate linearly to the initial learning rate. The warmup strategy can better stabilize the model training process in the early stages of training, avoiding numerical problems or unstable gradient updates. Subsequently, this invention sets a learning rate descent rate. Specifically, the learning rate will gradually decrease to 10% of the initial learning rate using a cosine descent method, ultimately completing the model training. The cosine descent method results in a higher learning rate at the beginning of training, ensuring rapid model convergence. Near the end of training, the learning rate approaches the minimum learning rate, resulting in a more stable optimization process. The learning rate calculation method at each time point during the cosine descent process is as follows:
[0066]
[0067] Where η t η is the learning rate at step t. min It is the minimum value of the learning rate, η. max It is the initial value of the learning rate, T. max This is the total number of training steps.
[0068] Additionally, during model training, samples can be drawn from the training set as a validation set for evaluating the model training process. During model training, the average perplexity PPL of the model on all samples in this validation set is dynamically calculated. avg The calculation formula is as follows:
[0069]
[0070] Where N represents the total number of words in the test sample, P(x i |x1,x2,...,x i-1 ) represents the conditional probability of the model predicting the i-th word. Furthermore, this invention calculates the average perplexity of the general model pedestal used for continuous pre-training on the validation set as a baseline, and observes the improvement of the model after continuous pre-training relative to the baseline model to evaluate the training effect.
[0071] S13. To demonstrate the effectiveness of training in steps S11-S12, a general large model can be used. Given the model prompts for constructing evaluation data and data samples sampled from the training set, the large model is required to generate multiple evaluation samples based on the given data text, ultimately forming a test set for model knowledge evaluation. Multi-sample prompts are used to guide the model in text generation. Using metrics such as ROUGE-L, BERTScore, BLEURT, and model score, the question, reference answer, model answer, and pre-designed evaluation prompts are submitted as input to the general large model for evaluation. The model outputs the corresponding score as the final evaluation result.
[0072] It should be noted that the above-mentioned step S13 is merely an embodiment of the present invention introduced for evaluating the training effect, but is not a necessary step.
[0073] S2. Based on three tasks—document interpretation, enterprise and talent profiling, and industry chain diagram recognition—instruction-response question-and-answer pairs are generated respectively. A second dataset consisting of instruction-response question-and-answer pairs for each task is constructed using a general large model. The second dataset is used to fine-tune the industry chain large model. Then, the second dataset and the general instruction-response question-and-answer pair dataset are combined to form a third dataset. The third dataset is used to directly optimize the industry chain large model for industry chain domain preferences, so that the industry chain large model can answer questions related to the industry chain domain but not questions related to non-industry chain domains.
[0074] In step S2 of the present invention, the method for constructing the second dataset is as follows:
[0075] S21. For the document interpretation task, input the document sample and prompt words into the general model. The general model generates multiple questions for the document sample from both macro and micro levels. Then, the general model is asked to answer each of the generated questions based on the information provided in the document sample, thereby constructing the instruction-response question-answer pair corresponding to the document interpretation task.
[0076] S22. For the enterprise and talent profiling task, a given detailed text information of an enterprise or talent is input into the general model along with prompt words. The general model generates a relevant question under a fixed theme for the input enterprise or talent. Then, the general model is asked to answer the generated question, thereby constructing an instruction-response question-answer pair corresponding to the enterprise and talent profiling task.
[0077] S23. For the industry chain diagram recognition task, a given industry or technology is input into the general model along with prompt words. The general model generates a question under a fixed theme based on the input industry or technology. Then, the input industry or technology is used as the search keywords. Background knowledge is obtained by searching an external knowledge base. The general model is then asked to answer the generated question based on the obtained background knowledge, thereby constructing the instruction-response question-answer pair corresponding to the industry chain diagram recognition task.
[0078] S24. Integrate the instruction-response question-answer pairs obtained in S21 to S23 to construct the second dataset.
[0079] It should be noted that the "general large model" in this invention and the "base large model" in S1 are two different large models. The "general large model" is a large model trained on a large-scale general text dataset, which has good generalization reasoning ability for different task instructions and is not limited to a specific industry field. In this invention, the powerful reasoning ability of the "general large model" is used to assist in constructing various training data. The specific form of the "general large model" is not limited. In the embodiments of this invention, the "general large model" can adopt glm-4-plus, while the "base large model" can adopt Qwen2-7B.
[0080] Furthermore, in the three task scenarios of this invention, the general large model needs to generate instruction-response question-answer pairs for a specific theme song. The specific selectable themes are as follows:
[0081] In document interpretation tasks, the macro-level problem is the overall theme of the current input document sample, while the micro-level problem is the detailed interpretation of the current input document sample. The types of document interpretation include research report interpretation, information interpretation, policy interpretation, patent interpretation, paper interpretation, and project interpretation.
[0082] In the enterprise and talent profiling task, the topics of the generated questions include basic enterprise information, main business of the enterprise, key technologies of the enterprise, branches of the enterprise, equity relationship of the enterprise, information of senior executives of the enterprise, intellectual property rights of the enterprise, scientific and technological innovation evaluation of the enterprise, basic information of talents, research fields of talents, and scientific research achievements of talents.
[0083] In the task of understanding the industry chain map, the topics of the generated questions include industry maps, industry technologies, industry investments, industry rankings, technology chain diagrams, technology trends, and technological achievements.
[0084] In an embodiment of the present invention, the specific implementation sub-steps of step S2 are as follows:
[0085] S21. Based on common tasks in the industry chain, this invention designs three types of tasks that can be solved by a large vertical model: document interpretation, enterprise and talent profiling, and industry chain diagram cognition.
[0086] For document interpretation tasks, such as Figure 4 As shown, this invention uses a two-stage data construction method, where the first stage is question generation and the second stage is answer generation. In the first stage, this invention provides a fixed hint from a general large model and the original text of an industry document, requiring the model to raise three different questions, one of which is a more macro-level question, and the other two are more micro-level questions. In the second stage, this invention provides the original text of the industry document corresponding to the question and the production question from the first stage, requiring the general large model to answer the question, thereby constructing the answer in the question-answer pair.
[0087] For tasks involving profiling businesses and talent, such as Figure 5 As shown, this invention employs a two-stage data construction method, where the first stage is question generation and the second stage is document-enhanced answer generation. In the question generation stage, this invention provides a fixed hint from a general large model and a given company name or talent name, requiring the large model to generate a question under a fixed topic. In the document-enhanced answer generation stage, this invention provides relevant information about the company name or talent name from the general large model, requiring the general large model to answer the question generated in the first stage based on the given company or talent information, thereby constructing the answer in the question-answer pair.
[0088] For tasks involving understanding supply chain diagrams, such as Figure 6 As shown, this invention employs a three-stage data construction method, where the first stage is question generation, the second stage is knowledge acquisition, and the third stage is answer generation with knowledge enhancement. In the question generation stage, this invention provides a fixed hint from a general large-scale model and a given industry name or technology name, requiring the large-scale model to generate a question under a fixed topic. In the knowledge acquisition stage, this invention requests an existing data interface, passing the industry name or technology name given in the previous stage as a parameter to acquire relevant knowledge. In the answer generation stage with knowledge enhancement, this invention provides the general large-scale model with the relevant knowledge acquired in the previous stage, requiring the general large-scale model to answer the question generated in the first stage based on the given knowledge, thereby constructing the answer in the question-answer pair.
[0089] It should be noted that the above-mentioned document interpretation refers to asking macro and micro questions about relevant documents in the industry. Macro questions mainly concern the topics covered by the documents provided by the user, while micro questions specifically focus on the details of the content to be interpreted. The general model will answer based on the micro questions and the documents provided by the user. The types of document interpretation mainly include: research report interpretation, information interpretation, policy interpretation, patent interpretation, paper interpretation, and project interpretation. Enterprise and talent profiling mainly involves asking questions about a specific enterprise or expert. The fixed themes include: basic enterprise information, main business, key technologies, branches, equity relationships, senior management information, intellectual property, scientific and technological innovation evaluation, basic talent information, research fields, and research achievements. Industry chain diagram cognition refers to the cognition of industries and technologies in the industry chain. The fixed themes include: industry map, industry technology, industry investment, industry rankings, technology chain diagram, technology trends, and technological achievements.
[0090] The instruction-response question-answer pair data constructed in step S21 above can be integrated to form a second dataset. Each instruction-response question-answer pair in the second dataset consists of two parts: an instruction and a response. The instruction is the corresponding question, and the response is the text answer given to the question. It should be noted that external knowledge information retrieved through external interfaces in the supply chain graph recognition task does not need to be included in the instruction-response question-answer pairs.
[0091] S22. Use the second dataset constructed in step S21 to fine-tune the large industry chain model. During fine-tuning, repeatedly train the dataset in multiple rounds so that the model can be trained in more rounds with a small amount of data.
[0092] S23. Based on the second dataset constructed in S21 and the general instruction-question-answer pair data sampled from the Internet, a preference alignment dataset, namely the third dataset, is constructed. The general instruction-question-answer pair data in this dataset is not specifically collected for industry chain domains. This invention aims to enable the large industry chain model to reject instructions in these general instruction-question-answer pairs, focusing instead on answering instructions relevant to the industry chain. Therefore, in the third dataset, preference data is constructed based on whether the question belongs to the industry chain domain and whether a rejection occurs. For industry chain-related questions, the adopted answer is the response to the question, and the rejected answer is the rejection text; for non-industry chain-related questions, the adopted answer is the rejection text, and the rejected answer is the response to the question.
[0093] A third dataset will be composed of the second dataset and the general instruction question-answering pair dataset. The third dataset will be used to directly optimize the industry chain domain preference of the industry chain model, so that the industry chain model can answer questions related to the industry chain domain but not questions related to non-industry chain domains.
[0094] S24. Use the third dataset to perform direct industry chain domain preference optimization on the large industry chain model, so that the large industry chain model can answer questions related to the industry chain domain but not questions related to non-industry chain domains. In this step, the model saving time interval can be shortened, the model state during the training process can be recorded at a higher frequency, multiple model saving points can be carefully evaluated, the changing trend of model performance at different training stages can be analyzed, and the training point with the best performance can be selected.
[0095] S25. To evaluate the effectiveness of steps S21-S24, the training and test sets of the second dataset constructed in S21 were hierarchically split into training and test sets at a ratio of 9:1. That is, 90% of the samples were randomly sampled from different instruction categories as the training set, and the remaining 10% were used as the test set for zero-shot inference. The model was evaluated for industry chain-related tasks using three methods: hard scoring, soft scoring, and comparative scoring based on baseline output. Given a fixed prompt from the general model, a question from the test sample, and the output of the model to be tested for that question, the general model was required to determine whether the response generated by the model was a refusal to answer, and to determine whether the model's behavior was correct based on whether the question belonged to the industry chain-related question.
[0096] It should also be noted that the above-mentioned step S25 is merely an embodiment of the present invention introduced for evaluating the training effect, but is not a necessary step.
[0097] S3. Based on the sub-datasets corresponding to the enterprise and talent profiling tasks in the second dataset, and combined with the search results of keywords in the instructions from the external knowledge base as contextual information, a fourth dataset is obtained and used to fine-tune the large-scale industrial chain model after preference optimization, thereby obtaining a large-scale industrial chain model with enhanced search capabilities.
[0098] In step S3 of the present invention, the method for constructing the fourth dataset is as follows:
[0099] From the second dataset, extract instruction-response question-answer pairs corresponding to the enterprise and talent profiling tasks. Then, for each extracted instruction-response question-answer pair, extract keywords related to the enterprise or talent entity from the instruction. Retrieve relevant information from an external knowledge base using the extracted keywords. Input the retrieval results as context information along with the original instruction into a general large model. The general large model regenerates the response text. Construct instruction-response question-answer pair samples containing retrieval enhancement information from the original instruction, context information, and regenerated text, and add them to the fourth dataset.
[0100] Furthermore, in this invention, for the large industrial chain model with enhanced retrieval capabilities obtained after preference optimization, a tool library can be further constructed according to actual needs for its application scenarios. The tool calling capabilities of the large industrial chain model can be fine-tuned using the subsets corresponding to the enterprise and talent profiling task and the industrial chain graph cognition task in the second dataset, so that the model can master the timing of tool calling and the ability to generate calling parameters.
[0101] Therefore, in the embodiments of the present invention, the specific implementation sub-steps of step S3 are as follows:
[0102] S31. The principle behind the enhanced retrieval capability of the large-scale industry chain model of this invention is as follows: Figure 7 As shown, user instructions are used to retrieve relevant information from external document libraries or knowledge bases. The retrieved documents are passed to the large model along with the user instructions as contextual information, helping the model generate more accurate and reliable answers based on this external knowledge. Finally, the large model combines the retrieved external knowledge to output the final results for the user's question. Therefore, in order to train the retrieval enhancement capability of the industry chain large model, it is necessary to use the constructed knowledge base index to match the corresponding documents for the enterprises or talents in the instructions, and modify the model input of each training sample so that it not only includes the user's question, but also the relevant documents retrieved from the external knowledge base. Thus, in step S21, the instruction-response question-answer pair corresponding to the enterprise and talent profile task in the second dataset introduces contextual information retrieved from the external knowledge base based on the keywords in the instructions. Since the instruction-response question-answer pair introduces new contextual information, its format also needs to be modified accordingly, that is, the original instruction-response question-answer pair is transformed into a format that combines the retrieved external knowledge information to reply. The instruction-response question-answer pair does not change the other original data, thus forming a new instruction fine-tuning data containing retrieval enhancement samples, namely the fourth dataset.
[0103] It should be noted that in S31 of this invention, the enterprise information text and talent information text constructed in S12 can be used as the text knowledge base for implementing retrieval enhancement. That is to say, retrieval enhancement only needs to be introduced for enterprise and talent profiling tasks, while other tasks do not require the introduction of retrieval enhancement operations.
[0104] S32. To evaluate the training effect of step S31 above, the enterprise and talent profile task in step S25 is used as the evaluation task for this part; all evaluation samples in the enterprise and talent profile evaluation set are tagged with the retrieved document tags, and the accuracy, precision, recall and F1 score of the retrieval process are calculated during the evaluation process.
[0105] S33, the principle of the supply chain large model calling tool capability of the present invention is as follows: Figure 8As shown, this invention further constructs three types of tools for the large-scale industrial chain model with enhanced retrieval capabilities obtained after preference optimization: enterprise-related tools, industry-related tools, and technology-related tools. Enterprise-related tools involve extracting content from aspects such as the enterprise's main business, key technologies, branches, shareholder information, senior management information, patent information, and scientific and technological innovation evaluation. Extraction of each aspect requires generating a separate tool through coding. Industry-related tools involve content from aspects such as industry maps, industry technologies, industry investments, and industry rankings. Extraction of each aspect requires generating a separate tool through coding. Technology-related tools involve content from aspects such as technology routes, technology trends, and technological achievements. Extraction of each aspect requires generating a separate tool through coding. This invention extracts user instructions for using tools from enterprise and talent profile data and industrial chain diagram cognition data. It then uses the generated instructions to fine-tune the metadata in the data for single tool calls and saves the call results. This information is then used to generate answers using a general large-scale model, thus generating a complete set of tool call data. Instruction data that can be completed without calling the tool is mixed in, enabling the model to understand when to call the tool. Tasks from the enterprise and talent profile and industrial chain diagram cognition categories are used as evaluation tasks for this part.
[0106] It should be noted that whether the above-mentioned tool calling capabilities are enabled can be designed according to actual needs, and the tools included in the specific tool library can also be designed according to the actual business scenario, which will not be specifically explained.
[0107] Additionally, it should be noted that during human preference alignment in step S24, besides the approach described in the foregoing embodiments of this invention, direct preference optimization can also be replaced with reinforcement learning based on human feedback. This involves two stages: a reward model training stage, where a reward model is trained to distinguish the quality of a predicted answer to a given question by collecting rankings of different outputs generated by the model from human annotators; and a reinforcement learning stage, where the trained reward model is used as a scoring criterion, and reinforcement learning algorithms such as proximal policy optimization are used to further fine-tune the parameters of the large model, thereby optimizing the generation strategy of the large model.
[0108] It should be noted that the method steps shown in S1 to S3 above can essentially be implemented in the form of computer programs or software functional modules.
[0109] Therefore, based on the same inventive concept, this invention also provides a system for constructing a large-scale industrial chain model based on domain knowledge enhancement, corresponding to the domain knowledge-enhanced method for constructing a large-scale industrial chain model provided in the above embodiments, comprising:
[0110] The domain pre-training module is used to construct a first dataset consisting of text corpora related to the industry chain domain, using a pre-trained large language model as the base model. The base model is then continuously pre-trained using the first dataset, and knowledge related to the industry chain domain is introduced into the existing base model to form an industry chain model.
[0111] The instruction fine-tuning and preference optimization module generates instruction-response question-answer pairs for three tasks: document interpretation, enterprise and talent profiling, and industry chain diagram recognition. It then constructs a second dataset consisting of instruction-response question-answer pairs for each task using a general large model. This second dataset is used to fine-tune the industry chain large model. Finally, the second dataset and the general instruction-response question-answer pair dataset are combined to form a third dataset. This third dataset is used to directly optimize the industry chain large model for industry chain domain preferences, enabling the model to answer industry chain domain-related questions but not non-industry chain domain-related questions.
[0112] The remaining capability building modules are used to obtain a fourth dataset based on the sub-datasets corresponding to the enterprise and talent profile tasks in the second dataset, combined with the search results of keywords in the instructions introduced from the external knowledge base as context information. This dataset is then used to fine-tune the large-scale industry chain model after preference optimization, thereby obtaining a large-scale industry chain model with enhanced search capabilities.
[0113] In addition, based on the same inventive concept, the present invention also provides a computer electronic device corresponding to the domain knowledge-enhanced industrial chain large model construction method provided in the above embodiments, which includes a memory and a processor;
[0114] The memory is used to store computer programs;
[0115] The processor is used to implement the aforementioned method for constructing a large-scale industry chain model based on domain knowledge enhancement when executing the computer program.
[0116] Furthermore, the logical instructions in the aforementioned memory can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a portion 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 the present invention.
[0117] Therefore, based on the same inventive concept, this invention provides a computer-readable storage medium corresponding to the method for constructing a large-scale industrial chain model based on domain knowledge enhancement. The storage medium stores a computer program, which, when executed by a processor, can realize the method for constructing a large-scale industrial chain model based on domain knowledge enhancement as described above.
[0118] Therefore, based on the same inventive concept, the present invention provides a computer program product, including a computer program / instruction, which, when executed by a processor, can realize the aforementioned method for constructing a large-scale industry chain model based on domain knowledge enhancement.
[0119] Specifically, in the computer-readable storage medium of the above three embodiments, the stored computer program is executed by a processor, which can perform the aforementioned steps S1 to S3.
[0120] It is understood that the aforementioned storage media may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Furthermore, the storage media may also be various media capable of storing program code, such as USB flash drives, external hard drives, magnetic disks, or optical discs.
[0121] It is understood that the processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0122] It should also be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the system described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here. In the embodiments provided in this application, the division of steps or modules in the system and method is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple modules or steps may be combined or integrated together, and a module or step may also be split.
[0123] The present invention will further demonstrate the detailed implementation process and technical effects of the domain knowledge-enhanced industrial chain large model construction method shown in steps S1 to S3 above on a specific dataset through a specific embodiment, so as to facilitate understanding of the essence of the present invention.
[0124] Example
[0125] The steps in this embodiment are the same as those in steps S1 to S3 above, which are used to construct a large-scale industry chain model based on domain knowledge enhancement. They will not be repeated here. The main focus is on the specific dataset, some specific parameter settings, and implementation results of this embodiment.
[0126] For training the FastText classifier, this invention first randomly sampled 10,000 samples from each category of existing industry chain domain corpora obtained from the Internet, totaling 100,000 samples as positive examples. Then, a large-scale open-source Chinese pre-training corpus named WuDaoCorporaText was collected, and 100,000 samples were randomly sampled from it as negative examples. These texts and labels were split into training and testing sets with a ratio of 9:1. A FastText text binary classifier was constructed on the training set, and the accuracy of the binary classifier on the testing set was verified to be 93.8%. This classifier was then used to classify and label the remaining text samples in WuDaoCorporaText, and samples were filtered based on the label "industry chain related," ultimately obtaining 6.51 million Chinese text data as a supplement to the industry chain domain corpus.
[0127] In this embodiment, the MinHash algorithm was used to deduplicate the text during data preprocessing, and the Qwen2-7B tokenizer was used to segment, truncate, and concatenate the data. Using the Megatron-LM and ModelLink frameworks, the constructed domain text data was continuously pre-trained on the Qwen2-7B general-purpose large model base, ultimately resulting in the industry chain domain base model Qwen2-7B-iChainGPT. The hyperparameters used in the training are shown in the table below.
[0128]
[0129]
[0130] The decrease in loss during model pre-training is as follows: Figure 9 As shown, because the model training was restarted multiple times, therefore... Figure 9 The three sub-graphs show the decrease in loss as the model is trained to different steps.
[0131] In addition, this embodiment calculates the model perplexity on datasets from different sources and observes the decrease in model perplexity across different data sources. The overall change in model perplexity and the change in model perplexity across different data sources are as follows: Figure 10 and Figure 11 As shown, the orange horizontal line represents the perplexity of the base model Qwen2-7B before continuous pre-training, and the blue curve represents the continuous pre-training process of the large-scale industrial chain model carried out by this invention.
[0132] Overall, the decrease in model perplexity is in line with expectations, and the downward trend is consistent across different data sources, proving that the continuous pre-training of the large-scale industry chain model in this invention is effective.
[0133] The knowledge evaluation results of the continuous pre-training model of the large industry chain model are shown in the table below:
[0134]
[0135] As can be seen from the table above, the model has achieved significant improvements on multiple evaluation metrics, indicating that the model has gradually learned the industry knowledge in the pre-training data. The relevant knowledge has been learned by the model parameters, and the continuous pre-training effect is significant.
[0136] The two models before and after pre-training were evaluated using two common evaluation sets, C-Eval and CMMLU. The results are shown in the table below.
[0137]
[0138]
[0139] Since the large model constructed in this invention is a single-domain vertical large model, the knowledge requirements of other domains are relatively low, and the forgetting rate is relatively acceptable.
[0140] For instruction fine-tuning, the constructed supply chain instruction set is used to fine-tune the instructions, resulting in the supply chain instruction question-answering model Qwen2-7B-iChainGPT-SFT. The hyperparameters used in training are shown in the table below.
[0141]
[0142] For preference alignment, the LLaMA-Factory framework is used. On the dialogue model Qwen2-7B-iChainGPT-SFT trained in the previous step, direct preference optimization is performed using the constructed industry chain preference alignment dataset to obtain the industry chain instruction question answering model Qwen2-7B-iChainGPT-DPO. The hyperparameters used in training are shown in the table below.
[0143]
[0144] On the large model base Qwen2-7B-iChainGPT-Step18000, fine-tuning of instructions using the constructed industry chain instruction set resulted in the dialogue model Qwen2-7B-iChainGPT-RAG, which has enhanced retrieval capabilities for the large industry chain model, and the dialogue model with the ability to invoke tools from the large industry chain model.
[0145] The hyperparameters used in training Qwen2-7B-iChainGPT-TOOL are shown in the table below.
[0146]
[0147] The evaluation results of tasks related to the industrial chain are shown in the table below.
[0148]
[0149] The rejection evaluation results of the large-scale industry chain model are shown in the table below.
[0150]
[0151] The constructed industry chain preference alignment data and the direct preference optimization helped the model acquire the ability to refuse answers. The model can refuse to answer questions from outside the industry chain domain, while it can answer relevant questions from the industry chain domain correctly. The preference-aligned model was also evaluated on industry chain-related tasks, and the results are shown in the table below.
[0152]
[0153] The results show that direct preference alignment reduces the model's performance on industry chain-related tasks to some extent, but its performance is still higher than the baseline model. Therefore, a trade-off needs to be made between matching preferences and absolute performance.
[0154] For the retrieval enhancement and tool invocation experiments, this invention uses the Megatron-LM and ModelLink frameworks. On the large model base Qwen2-7B-iChainGPT-Step18000, which is continuously pre-trained in the industry chain, the constructed industry chain instruction set is used for instruction fine-tuning to obtain the dialogue model Qwen2-7B-iChainGPT-RAG with the ability to enhance the retrieval of the large industry chain model and the dialogue model Qwen2-7B-iChainGPT-TOOL with the ability to invoke tools in the large industry chain model. The hyperparameters used in training are shown in the table below.
[0155]
[0156] The main evaluation focused on performance in "Company and Talent Profiles," and the results are shown in the table below.
[0157]
[0158] The retrieval enhancement capabilities developed in this invention significantly improve enterprise and talent profiling abilities, greatly reducing the illusion of model performance on relevant tasks. This invention evaluated the retrieval process on the above evaluation set, and the results are shown in the table below.
[0159]
[0160] It is evident that the retrieval enhancement framework constructed in this invention can retrieve suitable documents to a certain extent and assist large models in completing corresponding knowledge-based tasks.
[0161] Regarding the ability to invoke tools, since the constructed tool library mainly includes knowledge of enterprise, industry and technology categories, this invention mainly evaluates the performance in "enterprise and talent profile" and "industry chain diagram cognition", and the results are shown in the table below.
[0162]
[0163] As the evaluation results show, the tool call constructed by this invention also has a significant improvement in enterprise and talent profile and industry chain map recognition tasks, supplementing the model's lacking knowledge and related capabilities, and helping the model to complete the relevant instructions put forward by the user better and with higher quality.
[0164] This invention performs a process evaluation of tool invocation, and the results are shown in the table below.
[0165]
[0166] It is evident that the tool invocation capability constructed by this invention demonstrates considerable accuracy in tool invocation.
[0167] The embodiments described above are merely some preferred implementations of the present invention and are not intended to limit the invention. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the invention. Therefore, all technical solutions obtained through equivalent substitution or transformation fall within the protection scope of the present invention.
Claims
1. A method for constructing a large-scale industry chain model based on domain knowledge enhancement, characterized in that, The steps are as follows: S1. Using a pre-trained large language model as the base model, construct the first dataset consisting of text corpora related to the industry chain domain. Use the first dataset to continuously pre-train the base model in the domain, and introduce industry chain domain-related knowledge into the existing base model to form the industry chain model. S2. Based on three tasks—document interpretation, enterprise and talent profiling, and industry chain diagram recognition—instruction-response question-and-answer pairs are generated respectively. A second dataset consisting of instruction-response question-and-answer pairs for each task is constructed using a general large model. The second dataset is used to fine-tune the industry chain large model. Then, the second dataset and the general instruction-response question-and-answer pair dataset are combined to form a third dataset. The third dataset is used to optimize the industry chain large model directly for industry chain domain preferences, so that the industry chain large model can answer questions related to the industry chain domain but not questions related to non-industry chain domains. S3. Based on the sub-datasets corresponding to the enterprise and talent profiling tasks in the second dataset, and combined with the search results of keywords in the instructions from the external knowledge base as contextual information, a fourth dataset is obtained and used to fine-tune the large-scale industrial chain model after preference optimization, thereby obtaining a large-scale industrial chain model with enhanced search capabilities.
2. The method for constructing a large-scale industry chain model based on domain knowledge enhancement as described in claim 1, characterized in that, In S1, the method for constructing the first dataset and training the base large model is as follows: First, a binary classifier is trained using pre-collected and screened industry chain-related text samples to determine whether a text is related to the industry chain. Then, the trained binary classifier is used to classify and label each text sample in the general corpus, and the set of text corpora related to the industry chain is selected as the first dataset. Then, based on the first dataset, the base model is continuously pre-trained in the domain using the next-token prediction task; During training, the initial learning rate is the lower limit of the pre-training stage of the base model. In the training process, the learning rate is first linearly increased from 0 to the initial learning rate using a warmup strategy at the beginning of training. Then, the learning rate is gradually decreased from the initial learning rate using a cosine descent method until the minimum learning rate is reached, thus completing the domain-specific continuous pre-training and obtaining the base model of the industry chain.
3. The method for constructing a large-scale industry chain model based on domain knowledge enhancement as described in claim 1, characterized in that, In S2, the method for constructing the second dataset is as follows: S21. For the document interpretation task, input the document sample and prompt words into the general model. The general model generates different questions for the document sample from both macro and micro levels. Then, the general model is asked to answer each of the generated questions, thereby constructing the instruction-response question-answer pair corresponding to the document interpretation task. S22. For the enterprise and talent profiling task, a given detailed text information of an enterprise or talent is input into the general model along with prompt words. The general model generates a relevant question for the input enterprise or talent. Then, the general model is asked to answer the generated question based on the provided information, thereby constructing an instruction-response question-answer pair corresponding to the enterprise and talent profiling task. S23. For the industry chain diagram recognition task, a given industry or technology is input into the general model along with prompt words. The general model generates a question under a fixed theme based on the input industry or technology. Then, the input industry or technology is used as the search keywords. Background knowledge is obtained by searching an external knowledge base. The general model is then asked to answer the generated question based on the obtained background knowledge, thereby constructing the instruction-response question-answer pair corresponding to the industry chain diagram recognition task. S24. Integrate the instruction-response question-answer pairs obtained in S21 to S23 to construct the second dataset.
4. The method for constructing a large-scale industry chain model based on domain knowledge enhancement as described in claim 3, characterized in that, In the document interpretation task, the macro-level problem is the overall theme of the currently input document sample, and the micro-level problem is the detailed interpretation of the currently input document sample; the types of document interpretation include research report interpretation, information interpretation, policy interpretation, patent interpretation, paper interpretation, and project interpretation. The enterprise and talent profiling task generates questions on topics including basic enterprise information, main business, key technologies, branches, equity relationships, senior management information, intellectual property rights, scientific and technological innovation evaluation, basic talent information, research fields, and research achievements. In the aforementioned industry chain diagram recognition task, the topics for generating questions include industry maps, industry technologies, industry investments, industry rankings, technology chain diagrams, technology trends, and technological achievements.
5. The method for constructing a large-scale industry chain model based on domain knowledge enhancement as described in claim 1, characterized in that, In S3, the method for constructing the fourth dataset is as follows: From the second dataset, extract instruction-response question-answer pairs corresponding to the enterprise and talent profiling tasks. Then, for each extracted instruction-response question-answer pair, extract keywords related to the enterprise or talent entity from the instruction. Retrieve relevant information from an external knowledge base using the extracted keywords. Input the retrieval results as context information along with the original instruction into a general large model. The general large model regenerates the response text. Construct instruction-response question-answer pair samples containing retrieval enhancement information from the original instruction, context information, and regenerated text, and add them to the fourth dataset.
6. The method for constructing a large-scale industry chain model based on domain knowledge enhancement as described in claim 1, characterized in that, For the large-scale industry chain model with enhanced retrieval capabilities obtained after preference optimization, it is necessary to further build a tool library for its application scenarios, and use the sub-datasets corresponding to the enterprise and talent profiling task and industry chain graph cognition task in the second dataset to fine-tune the tool calling capability of the large-scale industry chain model, so that the model can master the timing of tool calling and the ability to generate calling parameters.
7. A system for constructing a large-scale industry chain model based on domain knowledge enhancement, characterized in that, include: The domain pre-training module is used to construct a first dataset consisting of text corpora related to the industry chain domain, using a pre-trained large language model as the base model. The base model is then continuously pre-trained using the first dataset, and knowledge related to the industry chain domain is introduced into the existing base model to form an industry chain model. The instruction fine-tuning and preference optimization module generates instruction-response question-answer pairs for three tasks: document interpretation, enterprise and talent profiling, and industry chain diagram recognition. It then constructs a second dataset consisting of instruction-response question-answer pairs for each task using a general large model. This second dataset is used to fine-tune the industry chain large model. Finally, the second dataset and the general instruction-response question-answer pair dataset are combined to form a third dataset. This third dataset is used to directly optimize the industry chain large model for industry chain domain preferences, enabling the model to answer industry chain domain-related questions but not non-industry chain domain-related questions. The remaining capability building modules are used to obtain a fourth dataset based on the sub-datasets corresponding to the enterprise and talent profile tasks in the second dataset, combined with the search results of keywords in the instructions introduced from the external knowledge base as context information. This dataset is then used to fine-tune the large-scale industry chain model after preference optimization, thereby obtaining a large-scale industry chain model with enhanced search capabilities.
8. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instruction is executed by the processor, it can realize the method for constructing a large industry chain model based on domain knowledge enhancement as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the method for constructing a large industry chain model based on domain knowledge enhancement as described in any one of claims 1 to 6.
10. A computer electronic device, characterized in that, Including memory and processor; The memory is used to store computer programs; The processor is configured to implement the method for constructing a large industry chain model based on domain knowledge enhancement as described in any one of claims 1 to 6 when executing the computer program.
Citation Information
Patent Citations
Prompt optimization method based on knowledge enhancement
CN117931982A
Electric power customer service intelligent question-answering method based on large semantic model and related device
CN119441398A