Complex industrial contract information extraction system and method based on large language model
Through an intelligent extraction system based on large language models, combined with cluster analysis, layered sampling and template information extraction methods, the problems of inefficiency and reliance on high-quality annotation data in complex industrial contract information processing are solved, and efficient and accurate contract information extraction and automated management are achieved.
Patent Information
- Application Number
- CN202411704051.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-11
AI Technical Summary
The prior art faces the problems of inefficient computing efficiency and strong dependence on high-quality labeled data when processing complex industrial contract information, resulting in inefficiency and inaccuracy of information processing.
By building an intelligent extraction system based on large language models, cluster analysis and hierarchical sampling methods are used to process industrial contract texts, combining large language models and manual annotation methods to improve the quality of labeled data, and automatic batch information extraction of unlabeled contract texts is realized through the information extraction method of the template.
It realizes efficient and accurate contract information extraction, improves the automation level of contract management and the efficiency of information processing, reduces the workload of manual participation, significantly improves processing efficiency, and ensures the accuracy and consistency of contract information.
Smart Images

Figure CN119599009A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular, to a complex industrial contract information extraction system and method based on a large language model, and more particularly, to a complex industrial contract information extraction system and method based on a large language model capable of extracting structured text. Background Art
[0002] In the current business ecosystem, contracts, as the core element and cornerstone of business transactions, play a vital role in safeguarding the interests of all parties and ensuring the smooth execution of transactions. Contracts are common in various business scenarios, such as procurement contracts between suppliers and manufacturers, bidding contracts signed between government departments and bidding companies, and service contracts between consumers and merchants. Especially in the industrial field, product contracts often involve complex performance requirements, delivery locations, settlement information, material information, and additional terms, which puts higher requirements on contract information processing.
[0003] At present, contract information processing faces a series of severe challenges, which not only involve the technical level, but also the overall process and efficiency of contract management. First, contract documents often exist in the form of long texts, with complex content and covering multiple aspects. A contract may contain dozens or even hundreds of pages of text, from the basic terms of the contract, the rights and interests of both parties, the way of performance, to the specific legal constraints and liability for breach of contract, each item needs to be handled in detail. This complexity and tediousness makes the processing of contract information extremely difficult and requires a lot of manpower and time. Secondly, despite the continuous advancement of modern technology, most of the processing of contract information still relies heavily on manual review and understanding. This manual processing method is not only inefficient, but also prone to errors and omissions due to human factors. In addition, with the continuous increase in the number of contracts, the pressure of manual processing is also increasing, which is difficult to meet the efficiency and accuracy requirements of modern contract management. Furthermore, the current degree of digitization of contract management is still low, and there is a lack of effective digital management tools. This leads to great restrictions on the storage, retrieval and use of contract information, making it difficult to achieve rapid sharing and efficient use of contract information. At the same time, the lack of digital management also makes it difficult to update and maintain contract information, and it is difficult to ensure the accuracy and consistency of information. Finally, contract information is often scattered among different departments of the enterprise, forming information islands. This makes it extremely difficult to uniformly manage and analyze contract information, and it is difficult to grasp the overall situation and risks of the contract. At the same time, information asymmetry between different departments can easily lead to decision-making errors and communication barriers, affecting the normal operation and development of the enterprise.
[0004] After searching the prior art, Chalkidis et al. [Chalkidis, I., Androutsopoulos, I., Michos, A.: Extracting contract elements. In: Proceedings of the 16th edition of the International Conference on Articial Intelligence and Law. pp. 19-28 (2017)] proposed a contract element extraction method based on the BERT model. This method improves the model's ability to understand contract terminology by pre-training BERT for domain adaptability, thereby enabling more accurate identification of key elements in contracts. Huang et al. [Huang, TL, Wang, W., Dai, K., et al.: An integrated framework for fine-grained contract element extraction. In: Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. pp. 4044-4054 (2021)] designed an end-to-end contract information extraction framework that combines named entity recognition, relationship extraction and other technologies to achieve joint extraction of multiple types of contract elements. This method can simultaneously identify and extract multiple elements in a contract, improving the comprehensiveness of information extraction. However, these traditional methods based on natural language processing and machine learning still face the problem of low computational efficiency when processing long text contracts, and are highly dependent on a large amount of high-quality annotated data.
[0005] Patent document CN117725905A (application number: 202410059446.5) discloses a method and system for intelligent generation of construction contracts, including system collection, user input, template selection, historical recommendation, large model generation and contract output. The system collects and summarizes construction contract data, and classifies and archives them; in the user input stage, the user uploads the bidding documents, and the system background automatically parses the documents; the template selection selects the appropriate contract template based on the uploaded file type or the relevant basic information entered; the historical recommendation system compares the key information extracted by the large language model or the basic information entered by the user, calculates the similarity and recommends relevant terms and content based on these key information and historical information; after the template is selected, the system uses the large model generation technology to start filling in the text content, and automatically generates detailed information related to the construction project based on the user input; the generated contract will be output in the template format selected by the user.
[0006] The present invention intends to overcome the above difficulties and achieve efficient and accurate contract information extraction by constructing an intelligent extraction system based on a large language model and utilizing the model's powerful semantic understanding ability and small-sample learning ability. Summary of the invention
[0007] In view of the defects in the prior art, the object of the present invention is to provide a method and system for extracting complex industrial contract information based on a large language model.
[0008] According to the present invention, a complex industrial contract information extraction method based on a large language model includes:
[0009] Step S1: Perform cluster analysis on the different industrial contract texts obtained to determine the cluster to which each contract text belongs;
[0010] Step S2: Perform stratified sampling from each cluster to obtain representative samples;
[0011] Step S3: extracting key content that meets preset requirements from representative samples corresponding to each cluster; and obtaining corresponding structured text based on the extracted key content that meets preset requirements;
[0012] Step S4: annotating the structured text to obtain annotated data;
[0013] Step S5: Obtain the labeled data of all clusters to generate a labeled data set, and use the labeled data set to fine-tune the large language model to obtain a fine-tuned large language model;
[0014] Step S6: deploy the fine-tuned large language model to the production environment to extract key information that meets the preset requirements from the unlabeled contract text.
[0015] Preferably, the step S1 adopts:
[0016] Step S1.1: Obtain different industrial contract texts, wherein the industrial contract texts include at least one of a bidding contract, a procurement contract, a sales contract, a transportation contract, and a service-type contract; the contract content of the industrial contract texts includes a qualification text and a requirement text;
[0017] Step S1.2: cluster analysis is performed on the different industrial contract texts obtained by using a cluster analysis method; wherein the cluster analysis method includes: K-means method, hierarchical analysis method or labeled classification method.
[0018] Preferably, the step S2 adopts: performing stratified sampling from each cluster by a stratified extraction method;
[0019] Wherein, the stratified sampling method includes equal number allocation sampling, proportional allocation sampling or Nayman sampling;
[0020] The sampling by equal distribution includes:
[0021] n i =n / k
[0022] Among them, n i represents the number of samples drawn from the i-th category; n represents the total number of samples drawn; k represents the number of categories; the proportional allocation sampling includes:
[0023] n i =nN i / N
[0024] Among them, n i represents the number of samples drawn from the i-th category; n represents the total number of samples drawn; N i represents the total number of sampling units of the ith category; N represents the total number of sampling units;
[0025] The Neyman sampling includes:
[0026]
[0027] Among them, n i represents the number of samples drawn from the i-th category; n represents the total number of samples drawn; N i represents the total number of sampling units in the ith category; S i represents the standard deviation of the ith category.
[0028] Preferably, the structured text includes:
[0029] z i =f(x i )
[0030] Among them, z i is the structured text corresponding to each sample output by GPT4, x i is the contract text input into GPT4, and f is the character set to character set mapping implemented by GPT4.
[0031] Preferably, the fine-tuning of the large language model using the annotated data set includes: at least one of LoRA fine-tuning, full parameter adjustment, and QLoRA parameter fine-tuning.
[0032] According to the present invention, a complex industrial contract information extraction system based on a large language model is provided, comprising:
[0033] Module M1: Perform cluster analysis on the different industrial contract texts obtained to determine the cluster to which each contract text belongs;
[0034] Module M2: Stratified sampling is performed from each cluster to obtain representative samples;
[0035] Module M3: extracting key content that meets preset requirements from representative samples corresponding to each cluster; obtaining corresponding structured text based on the extracted key content that meets preset requirements;
[0036] Module M4: annotate the structured text to obtain annotated data;
[0037] Module M5: Obtain the labeled data of all clusters to generate a labeled dataset, and use the labeled dataset to fine-tune the large language model to obtain the fine-tuned large language model;
[0038] Module M6: Deploy the fine-tuned large language model to the production environment to extract key information from unlabeled contract texts that meets preset requirements.
[0039] Preferably, the module M1 adopts:
[0040] Module M1.1: Acquire different industrial contract texts, wherein the industrial contract texts include at least one of a bidding contract, a procurement contract, a sales contract, a transportation contract, and a service-type contract; the contract contents of the industrial contract texts include a qualification text and a requirement text;
[0041] Step M1.2: Perform cluster analysis on the different industrial contract texts obtained by cluster analysis method; wherein the cluster analysis method includes: K-means method, hierarchical analysis method or labeled classification method.
[0042] Preferably, the module M2 adopts: stratified sampling from each cluster by a stratified extraction method;
[0043] Wherein, the stratified sampling method includes equal number allocation sampling, proportional allocation sampling or Nayman sampling;
[0044] The sampling by equal distribution includes:
[0045] n i =n / k
[0046] Among them, n i represents the number of samples drawn from the i-th category; n represents the total number of samples drawn; k represents the number of categories;
[0047] The proportional allocation sampling includes:
[0048] n i =nN i / N
[0049] Among them, n i represents the number of samples drawn from the i-th category; n represents the total number of samples drawn; N i represents the total number of sampling units of the ith category; N represents the total number of sampling units;
[0050] The Neyman sampling includes:
[0051]
[0052] Among them, n i represents the number of samples drawn from the i-th category; n represents the total number of samples drawn; N i represents the total number of sampling units in the ith category; S i represents the standard deviation of the ith category.
[0053] Preferably, the structured text includes:
[0054] z i =f(x i )
[0055] Among them, z i is the structured text corresponding to each sample output by GPT4, x i is the contract text input into GPT4, and f is the character set to character set mapping implemented by GPT4.
[0056] Preferably, the fine-tuning of the large language model using the annotated data set includes: at least one of LoRA fine-tuning, full parameter adjustment, and QLoRA parameter fine-tuning.
[0057] Compared with the prior art, the present invention has the following beneficial effects:
[0058] 1. The present invention processes complex industrial contract texts through cluster analysis technology and stratified sampling methods, and realizes data balance. Specifically, the contract texts are first clustered and divided into subsets of different categories, and then a representative sample is extracted from each cluster using a stratified sampling method. This method ensures the balanced distribution of various types of contract information in the data set, reduces data deviation, and effectively improves the generalization ability of the model, so that high accuracy and stability can be maintained when processing different types of contract texts.
[0059] 2. The present invention adopts a combination of a large language model and manual annotation, which significantly improves the quality of the annotated data. In the data annotation process, the large language model is used for automatic annotation, combined with manual correction and prompt word generation to ensure the accuracy of the annotated data. This collaborative annotation method not only effectively reduces the workload of manual annotation, but also improves the system's ability to understand complex contract information, especially when dealing with diversified contract terms.
[0060] 3. The present invention realizes the automated batch information extraction of unlabeled contract texts through a template-based information extraction method. The information extraction template generated by the system, combined with the large language model, performs batch processing on the unlabeled contract texts. This method effectively improves the automation level of contract information processing, reduces the workload of manual participation, and significantly improves processing efficiency. It can quickly and accurately extract key information from complex contract texts, bringing great convenience to the contract management of enterprises.
[0061] 4. The output results of the present invention are presented in the form of structured text, including key information such as performance requirements, delivery location, settlement information, material information and additional terms. Through the structured output method, the storage, retrieval and analysis of contract terms become more efficient and convenient, greatly improving the utilization and readability of contract information; this method provides strong technical support for enterprises in contract management, information sharing and risk control, and ensures the accuracy and consistency of contract information. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0063] Figure 1 Flowchart of the complex industrial contract information extraction method based on a large language model. DETAILED DESCRIPTION
[0064] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0065] Example 1
[0066] According to the present invention, a complex industrial contract information extraction method based on a large language model includes:
[0067] Step S1: Perform cluster analysis on the different industrial contract texts obtained to determine the cluster to which each contract text belongs;
[0068] Step S2: Perform stratified sampling from each cluster to obtain representative samples;
[0069] Step S3: extracting key content that meets preset requirements from representative samples corresponding to each cluster; acquiring corresponding structured text based on the extracted key content that meets preset requirements;
[0070] Step S4: annotating the structured text to obtain annotated data;
[0071] Step S5: Obtain the labeled data of all clusters to generate a labeled data set, and use the labeled data set to fine-tune the large language model to obtain a fine-tuned large language model;
[0072] Step S6: deploy the fine-tuned large language model to the production environment to extract key information that meets the preset requirements from the unlabeled contract text.
[0073] Specifically, the step S1 adopts:
[0074] Step S1.1: Obtain different industrial contract texts, wherein the industrial contract texts include at least one of a bidding contract, a procurement contract, a sales contract, a transportation contract, and a service-type contract; the contract content of the industrial contract texts includes a qualification text and a requirement text;
[0075] Step S1.2: cluster analysis is performed on the different industrial contract texts obtained by using a cluster analysis method; wherein the cluster analysis method includes: K-means method, hierarchical analysis method or labeled classification method.
[0076] Specifically, the step S2 adopts: performing stratified sampling from each cluster by a stratified extraction method;
[0077] Wherein, the stratified sampling method includes equal number allocation sampling, proportional allocation sampling or Nayman sampling;
[0078] The sampling by equal distribution includes:
[0079] n i =n / k
[0080] Among them, n i represents the number of samples drawn from the i-th category; n represents the total number of samples drawn; k represents the number of categories;
[0081] The proportional allocation sampling includes:
[0082] n i =nN i / N
[0083] Among them, n i represents the number of samples drawn from the i-th category; n represents the total number of samples drawn; N i represents the total number of sampling units of the ith category; N represents the total number of sampling units;
[0084] The Neyman sampling includes:
[0085]
[0086] Among them, n i represents the number of samples drawn from the i-th category; n represents the total number of samples drawn; N i represents the total number of sampling units in the ith category; S i represents the standard deviation of the ith category.
[0087] Specifically, the structured text includes:
[0088] z i =f(x i )
[0089] Among them, z i is the structured text corresponding to each sample output by GPT4, x i is the contract text input into GPT4, and f is the character set to character set mapping implemented by GPT4.
[0090] Specifically, the fine-tuning of the large language model using the labeled data set includes: at least one of LoRA fine-tuning, full parameter adjustment, and QLoRA parameter fine-tuning.
[0091] The present invention also provides a complex industrial contract information extraction system based on a large language model. The complex industrial contract information extraction system based on a large language model can be implemented by executing the process steps of the complex industrial contract information extraction method based on a large language model, that is, technical personnel in this field can understand the complex industrial contract information extraction method based on a large language model as a preferred implementation of the complex industrial contract information extraction system based on a large language model.
[0092] Example 2
[0093] Embodiment 2 is a preferred embodiment of Embodiment 1
[0094] In order to solve the problems of insufficient accuracy and low efficiency in information extraction in the prior art, the present invention provides a complex industrial contract information extraction method and system based on a large language model, which can process contract texts with complex contents and automatically and efficiently extract structured information.
[0095] The complex industrial contract information extraction method based on the large language model is as follows: Figure 1 As shown, including:
[0096] Step 1: Collect industrial contract texts as the basic data set for system analysis.
[0097] Step 2: Perform cluster analysis on the data set collected in step 1 and calculate the cluster center c of each cluster i , determine the cluster C where each contract text is located i .
[0098] Step 3: From each cluster C i Stratified sampling was performed to extract representative samples.
[0099] Step 4: Use GPT4 to perform the computation on each cluster C in step 3. i The key content of representative samples is extracted from the contract, and different prompt words are set to make GPT4 output the structured text corresponding to each sample. The output result is manually modified to make the structured text more accurate. Among them, the key content is the specific provisions in the contract. By prompting GPT4, GPT4 is allowed to extract and organize the structured specific information from the unstructured contract text. The purpose of obtaining the key content is to filter out the descriptive and colloquial texts such as "should" and "if" in the original contract text, and directly organize the unstructured contract text into structured information.
[0100] Step 5: Based on the structured text extracted in step 4, for each cluster C i Generate different information extraction templates p iThe template is in text form, and its content includes structured text and instruction prompt words corresponding to the sample text. In this embodiment, the form of the template is, for example, "The following is an example of a contract text extraction task: {structured text}, please extract information from the input contract text based on this example." Different templates can be set for different categories.
[0101] Step 6: Create the template p generated in step 5 i and the corresponding cluster C in step 2 i The internal samples are used as input and GPT3.5 is used to generate labeled data Y in batches i . The labeled data Y of all clusters i In summary, a high-quality annotated dataset is constructed for model training. In this embodiment, using GPT3.5 is less expensive.
[0102] Step 7: Select a large language model as the base model, use the labeled data set in step 6 as the training set, and fine-tune the large language model. By fine-tuning the model parameters, the large language model can output correct and reasonable structured text.
[0103] Step 8: Deploy the fine-tuned large language model to the production environment to extract key information from unlabeled contract texts.
[0104] Through the above steps, the present invention can effectively extract key information from a large number of complex industrial contracts, improve the automation level of contract management and the efficiency of information processing. In addition, the system design of the present invention allows for the flexible addition of new contract types, and quickly adapts to new contract texts by re-clustering and fine-tuning the model.
[0105] Specifically, the industrial contract text in step one includes contracts of bidding, procurement, sales, transportation, and service types, and the contract content includes two parts: a qualification text and a requirement text.
[0106] The cluster analysis method in step 2 is the K-means method. Optionally, there is also a hierarchical analysis method and a labeled classification method. The indicator for determining the number of cluster centers is the sum of squares of the distances from the samples to the cluster centers. The mathematical expression of the K-means clustering algorithm is to minimize Among them, k is the number of cluster centers, C i is the i-th cluster, c i is the cluster center of the ith cluster, and x is the sample value.
[0107] The stratified sampling method in step 3 is to extract an equal number of samples for each layer. Optionally, there are also proportional allocation of sampling units and Nayman sampling unit allocation. The expression for allocating sampling units in equal numbers is n i =n / k, where n is the total number of samples drawn, ni is the number of samples drawn from the ith category, and k is the number of categories. The mathematical expression for allocating sampling units proportionally is n i =nN i / N, where N is the total number of sampling units, N i is the total number of sampling units in the ith category. The mathematical expression of the Neyman sampling unit allocation is Where S i is the standard deviation of the ith category.
[0108] The mathematical expression representing the sample annotation in step 4 is the expression of the structured text:
[0109] z i =f(x i );
[0110] Among them, z i is the structured text output by GPT4, x i is the contract text input into GPT4, and f is the character set to character set mapping implemented by GPT4.
[0111] Step 5 Template p i The constructed mathematical expression is:
[0112] p i =(z i ,q i );
[0113] Among them, z i The structured text annotated in step 4, q i is the prompt word for the i-th category used to guide the large language model, such as “Please extract structured text from unstructured text”.
[0114] The mathematical expression of batch labeling in step 6 is:
[0115] Y i =g(p i , x i );
[0116] Among them, p i is the template of the i-th category constructed in step 5, x i For the contract text, Y i is the labeled data of the i-th category, and g is the character set to character set mapping implemented by GPT3.5;
[0117] The step six is used to integrate all the labeled data sets as training sets. The mathematical expression is:
[0118] In this embodiment, GPT4 can be used to generate data for data enhancement, construct a new contract text and its corresponding annotation to supplement the training set. The mathematical expression is: where Y gen To generate a new contract text dataset.
[0119] The large language model in step 7 is Qianwen 1.5-14B-Chat, and optionally all open source large language models. The mathematical expression predicted by the large language model is in, is the prediction result output by the model, x is the input contract text, is the character set, and h is the character set to character set mapping implemented by the selected large language model. The parameter fine-tuning method is LoRA fine-tuning, and optionally there are full parameter adjustment and QLoRA parameter fine-tuning.
[0120] The mathematical expression for extracting the key information of the unmarked contract text in step eight is: h is the character set to character set mapping implemented by the large language model after fine-tuning in step 7.
[0121] The complex industrial contract information extraction system based on the large language model includes: a data balancing module, a data annotation module, a large language model analysis module and an information extraction module;
[0122] The data balancing module is used to perform cluster analysis on the input complex industrial contract text as a whole, extract samples from each category in a stratified manner to construct a data subset, and achieve a balanced data set; this embodiment controls the stratified sampling ratio to make the distribution of various types of contract information in the data set more balanced, thereby improving the generalization ability of the model;
[0123] The data annotation module is used to annotate the preprocessed contract text, and build a high-quality industrial contract text dataset through manual and large language model collaborative annotation and data generation;
[0124] The large language model analysis module is connected to the output end of the data annotation module, and is used to perform deep learning and analysis on the annotated and generated data sets, and to improve the accuracy of model extraction information by adjusting the large language model parameters;
[0125] The information extraction module is used to extract information from unlabeled contract texts and output the extraction results of the large language model in the format of structured text.
[0126] Those skilled in the art know that, in addition to realizing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code, it is entirely possible to realize the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be regarded as structures within the hardware component; the devices, modules, and units for realizing various functions can also be regarded as both software modules for realizing the method and structures within the hardware component.
[0127] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.
Claims
1. A complex industrial contract information extraction method based on a large language model, characterized in that: include: Step S1: Perform cluster analysis on the different industrial contract texts obtained to determine the cluster to which each contract text belongs; Step S2: Perform stratified sampling from each cluster to obtain representative samples; Step S3: extracting key content that meets preset requirements from representative samples corresponding to each cluster; and obtaining corresponding structured text based on the extracted key content that meets preset requirements; Step S4: annotating the structured text to obtain annotated data; Step S5: Obtain the labeled data of all clusters to generate a labeled data set, and use the labeled data set to fine-tune the large language model to obtain a fine-tuned large language model; Step S6: deploy the fine-tuned large language model to the production environment to extract key information that meets the preset requirements from the unlabeled contract text.
2. The complex industrial contract information extraction method based on a large language model according to claim 1 is characterized in that: The step S1 adopts: Step S1.1: Obtain different industrial contract texts, wherein the industrial contract texts include at least one of a bidding contract, a procurement contract, a sales contract, a transportation contract, and a service-type contract; the contract content of the industrial contract texts includes a qualification text and a requirement text; Step S1.2: cluster analysis is performed on the different industrial contract texts obtained by using a cluster analysis method; wherein the cluster analysis method includes: K-means method, hierarchical analysis method or labeled classification method.
3. The complex industrial contract information extraction method based on a large language model according to claim 1 is characterized in that: The step S2 adopts: performing stratified sampling from each cluster by a stratified extraction method; Wherein, the stratified sampling method includes equal number allocation sampling, proportional allocation sampling or Nayman sampling; The sampling by equal distribution includes: n i =n / k Among them, n i represents the number of samples drawn from the i-th category; n represents the total number of samples drawn; k represents the number of categories; The proportional allocation sampling includes: n i =nN i / N Among them, n i represents the number of samples drawn from the i-th category; n represents the total number of samples drawn; N i represents the total number of sampling units of the ith category; N represents the total number of sampling units; The Neyman sampling includes: Among them, n i represents the number of samples drawn from the i-th category; n represents the total number of samples drawn; N i represents the total number of sampling units in the ith category; S i represents the standard deviation of the ith category.
4. The complex industrial contract information extraction method based on a large language model according to claim 1 is characterized in that: The structured text includes: z i =f(x i ) Among them, z i is the structured text corresponding to each sample output by GPT4, x i is the contract text input into GPT4, and f is the character set to character set mapping implemented by GPT4.
5. The complex industrial contract information extraction method based on a large language model according to claim 1 is characterized in that: The fine-tuning of the large language model using the labeled data set includes: at least one of LoRA fine-tuning, full parameter adjustment, and QLoRA parameter fine-tuning.
6. A complex industrial contract information extraction system based on a large language model, characterized in that: include: Module M1: Perform cluster analysis on the different industrial contract texts obtained to determine the cluster to which each contract text belongs; Module M2: Stratified sampling is performed from each cluster to obtain representative samples; Module M3: extracting key content that meets preset requirements from representative samples corresponding to each cluster; obtaining corresponding structured text based on the extracted key content that meets preset requirements; Module M4: annotate the structured text to obtain annotated data; Module M5: Obtain the labeled data of all clusters to generate a labeled dataset, and use the labeled dataset to fine-tune the large language model to obtain the fine-tuned large language model; Module M6: Deploy the fine-tuned large language model to the production environment to extract key information from unlabeled contract texts that meets preset requirements.
7. The complex industrial contract information extraction system based on large language model according to claim 6 is characterized in that: The module M1 adopts: Module M1.1: Acquire different industrial contract texts, wherein the industrial contract texts include at least one of a bidding contract, a procurement contract, a sales contract, a transportation contract, and a service-type contract; the contract contents of the industrial contract texts include a qualification text and a requirement text; Step M1.2: Perform cluster analysis on the different industrial contract texts obtained by cluster analysis method; wherein the cluster analysis method includes: K-means method, hierarchical analysis method or labeled classification method.
8. The complex industrial contract information extraction system based on a large language model according to claim 6 is characterized in that: The module M2 adopts: stratified sampling from each cluster by stratified extraction method; Wherein, the stratified sampling method includes equal number allocation sampling, proportional allocation sampling or Nayman sampling; The sampling by equal distribution includes: n i =n / k Among them, n i represents the number of samples drawn from the i-th category; n represents the total number of samples drawn; k represents the number of categories; The proportional allocation sampling includes: n i =nN i / N Among them, n i represents the number of samples drawn from the i-th category; n represents the total number of samples drawn; N i represents the total number of sampling units of the ith category; N represents the total number of sampling units; The Neyman sampling includes: Among them, n i represents the number of samples drawn from the i-th category; n represents the total number of samples drawn; N i represents the total number of sampling units in the ith category; S i represents the standard deviation of the ith category.
9. The complex industrial contract information extraction system based on a large language model according to claim 6 is characterized in that: The structured text includes: z i =f(x i ) Among them, z i is the structured text corresponding to each sample output by GPT4, x i is the contract text input into GPT4, and f is the character set to character set mapping implemented by GPT4.
10. The complex industrial contract information extraction system based on large language model according to claim 6 is characterized in that: The fine-tuning of the large language model using the labeled data set includes: at least one of LoRA fine-tuning, full parameter adjustment, and QLoRA parameter fine-tuning.
Citation Information
Patent Citations
Intelligent generation method and system for construction contract of construction project
CN117725905A
Cited By
Contract element extraction method and related device
CN121542444A