Credit rating report generation method and device
By using large language models and cross-mutation algorithms in the generation of credit evaluation reports, we optimize the prompt words and generate credit rating reports, which solves the problem of inefficient generation of credit evaluation reports, achieving more efficient report generation, and ensuring the quality of report.
Patent Information
- Application Number
- CN202411466512.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-10-21
AI Technical Summary
In the prior art, the generation efficiency of credit evaluation reports is inefficient, mainly due to manual information transmission, data updates are not timely.
By obtaining the basic information and industry evaluation information of the object to be rated and inputting it into a large language model, the evaluation level is obtained. Then, the cross-mutation algorithm is used to optimize the initial prompt words, generate cross-mutation prompt words, and generate a credit rating report based on the scoring prompt words and evaluation levels.
It improves the efficiency of generating credit evaluation reports, avoids the problem of untimely data updates caused by manual information transmission, and ensures the quality of reports.
Smart Images

Figure CN119417592A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of financial technology, and in particular to a method and device for generating a credit rating report. Background Art
[0002] The corporate credit business of commercial banks mainly includes three stages: pre-loan, loan and post-loan, involving multiple business scenarios such as credit rating and credit approval. The credit rating work carried out for large and medium-sized corporate customers is the basic work for commercial banks to manage and control customer credit risks.
[0003] At present, the loan approval is generally assessed through the credit application materials submitted by each enterprise. The credit application materials usually describe the company's financial status in different forms such as financial statements and due diligence reports to show that it has the ability to repay the loan within a specified time or under specific requirements. However, the above materials are still mainly input and transmitted manually offline. Manual transmission of information may lead to untimely updates of key data, affect the speed of decision-making, and thus lead to low efficiency in generating credit evaluation reports.
[0004] Therefore, how to improve the efficiency of generating credit evaluation reports has become an urgent problem to be solved in this field. Summary of the invention
[0005] The present application provides a method and device for generating a credit rating report, the purpose of which is to improve the efficiency of generating credit evaluation reports.
[0006] In order to achieve the above objectives, this application provides the following technical solutions:
[0007] A method for generating a credit rating report, comprising:
[0008] Obtain basic information of the object to be rated and industry evaluation information of the object to be rated;
[0009] Inputting the basic information and the industry evaluation information into a large language model to obtain an evaluation grade of the object to be evaluated;
[0010] Acquire an initial prompt word set corresponding to the object to be evaluated; the initial prompt word set includes multiple initial prompt words;
[0011] Optimizing the multiple initial prompt words using a crossover mutation algorithm to obtain multiple crossover mutation prompt words;
[0012] Input each of the cross-variation prompt words, the scoring prompt words and the evaluation level of the object to be evaluated into a large language model to obtain a scoring result for each of the cross-variation prompt words; the scoring prompt words are obtained by correcting the initial scoring prompt words;
[0013] A credit rating report of the object to be rated is generated based on the rating grade of the object to be rated and the scoring result of each cross-variation prompt word.
[0014] Optionally, the step of inputting the basic information and the industry evaluation information into a large language model to obtain an evaluation grade of the object to be evaluated includes:
[0015] Splitting the industry evaluation information to obtain multiple preset evaluation levels;
[0016] For each of the preset evaluation levels, split the preset evaluation level to obtain multiple evaluation criteria;
[0017] Filter out the highest preset evaluation level from all preset evaluation levels and determine it as the target preset evaluation level;
[0018] Inputting a plurality of evaluation criteria corresponding to the target preset evaluation level and the basic information into the large language model to obtain an evaluation result; the evaluation result indicates the amount of the basic information that meets the evaluation criteria;
[0019] Calculate the ratio between the number of basic information that meets the evaluation criteria and the total number of evaluation criteria, and determine it as the standard ratio;
[0020] Determining whether the standard ratio is greater than a preset ratio;
[0021] If the standard ratio is greater than the preset ratio, the target preset evaluation level is determined as the evaluation level of the object to be evaluated;
[0022] If the standard ratio is not greater than the preset ratio, the highest preset evaluation level except the target preset evaluation level is screened out from all the preset evaluation levels, and after being determined as the target preset evaluation level, the step of returning to execute the step of inputting the multiple evaluation criteria corresponding to the target preset evaluation level and the basic information into the large language model to obtain the evaluation result is performed.
[0023] Optionally, the crossover mutation algorithm is used to perform crossover mutation on the multiple initial prompt words to obtain multiple crossover mutation prompt words, including:
[0024] Converting multiple initial prompt words to obtain multiple initial prompt word vectors; the multiple initial prompt word vectors include the current initial prompt word vector;
[0025] Select any two initial prompt word vectors from the plurality of initial prompt word vectors and mark them as a first vector and a second vector;
[0026] Processing the difference between the first vector and the second vector using a transformation function to obtain a new vector;
[0027] Adding the current initial prompt word vector to the new vector to obtain a new prompt word vector;
[0028] For each of the initial prompt word vectors, cross-mutate the new prompt word vector and the initial prompt word vector to obtain a cross-mutated prompt word vector;
[0029] The cross-variation prompt word vector is transformed to obtain multiple cross-variation prompt words.
[0030] Optionally, the process of correcting the initial scoring prompt word to obtain the scoring prompt word includes:
[0031] Acquire a prompt word set; the prompt word set includes multiple prompt words;
[0032] For each of the prompt words, input the prompt word into a large language model to obtain an initial credit rating report;
[0033] Inputting the initial credit rating report and the initial rating prompt words into a large language model to obtain a rating result;
[0034] Determining whether the scoring result is consistent with a preset scoring result;
[0035] If the scoring result is consistent with the preset scoring result, the initial scoring prompt word is determined as the scoring prompt word;
[0036] If the scoring result is inconsistent with the preset scoring result, the initial scoring prompt word is corrected based on the initial credit rating report and the scoring result, and after the corrected scoring prompt word is determined as the scoring prompt word, the process returns to the step of inputting the initial credit rating report and the initial scoring prompt word into the large language model to obtain the scoring result.
[0037] Optionally, obtaining a prompt word set includes:
[0038] Acquire real data and extended prompt words; wherein the real data indicates the basic information of the real object to be evaluated, and the extended prompt words indicate prompt words that expand the basic information according to the format of the basic information;
[0039] Inputting the real data and the expanded prompt word into the large language model to obtain synthetic data, wherein the format of the synthetic data is consistent with that of the real data;
[0040] A set of prompt words corresponding to the synthetic data is generated by using a preset evaluation function.
[0041] Optionally, generating a credit rating report for the object to be rated based on the rating grade of the object to be rated and the scoring result of each cross-variation prompt word includes:
[0042] Screening out the scoring result with the highest score from all the scoring results, and determining the crossover mutation prompt word corresponding to the scoring result with the highest score as the best prompt word;
[0043] Generating evaluation reasons based on the evaluation level of the object to be evaluated and the optimal prompt word;
[0044] A credit rating report of the object to be rated is generated based on the rating level of the object to be rated and the rating reasons.
[0045] A credit rating report generating device, comprising:
[0046] A first acquisition unit is used to acquire basic information of the object to be rated and industry evaluation information of the object to be rated;
[0047] A first input unit, used to input the basic information and the industry evaluation information into a large language model to obtain an evaluation grade of the object to be evaluated;
[0048] A second acquisition unit is used to acquire an initial prompt word set corresponding to the object to be evaluated; the initial prompt word set includes multiple initial prompt words;
[0049] An optimization unit, used for optimizing the plurality of initial prompt words by using a crossover mutation algorithm to obtain a plurality of crossover mutation prompt words;
[0050] The second input unit is used to input each of the cross-variation prompt words, the scoring prompt words and the evaluation level of the object to be evaluated into the large language model to obtain the scoring result of each of the cross-variation prompt words; the scoring prompt words are obtained by correcting the initial scoring prompt words;
[0051] A generating unit is used to generate a credit rating report of the object to be rated based on the evaluation grade of the object to be rated and the scoring result of each cross-variation prompt word.
[0052] Optionally, the first input unit is specifically used for:
[0053] Splitting the industry evaluation information to obtain multiple preset evaluation levels;
[0054] For each of the preset evaluation levels, split the preset evaluation level to obtain multiple evaluation criteria;
[0055] Filter out the highest preset evaluation level from all preset evaluation levels and determine it as the target preset evaluation level;
[0056] Inputting a plurality of evaluation criteria corresponding to the target preset evaluation level and the basic information into the large language model to obtain an evaluation result; the evaluation result indicates the amount of the basic information that meets the evaluation criteria;
[0057] Calculate the ratio between the number of basic information that meets the evaluation criteria and the total number of evaluation criteria, and determine it as the standard ratio;
[0058] Determining whether the standard ratio is greater than a preset ratio;
[0059] If the standard ratio is greater than the preset ratio, the target preset evaluation level is determined as the evaluation level of the object to be evaluated;
[0060] If the standard ratio is not greater than the preset ratio, the highest preset evaluation level except the target preset evaluation level is screened out from all the preset evaluation levels, and after being determined as the target preset evaluation level, the step of returning to execute the step of inputting the multiple evaluation criteria corresponding to the target preset evaluation level and the basic information into the large language model to obtain the evaluation result is performed.
[0061] Optionally, the optimization unit is specifically used for:
[0062] Converting multiple initial prompt words to obtain multiple initial prompt word vectors; the multiple initial prompt word vectors include the current initial prompt word vector;
[0063] Select any two initial prompt word vectors from the plurality of initial prompt word vectors and mark them as a first vector and a second vector;
[0064] Processing the difference between the first vector and the second vector using a transformation function to obtain a new vector;
[0065] Adding the current initial prompt word vector to the new vector to obtain a new prompt word vector;
[0066] For each of the initial prompt word vectors, cross-mutate the new prompt word vector and the initial prompt word vector to obtain a cross-mutated prompt word vector;
[0067] The cross-variation prompt word vector is transformed to obtain multiple cross-variation prompt words.
[0068] Optionally, the second input unit is specifically used for:
[0069] Acquire a prompt word set; the prompt word set includes multiple prompt words;
[0070] For each of the prompt words, input the prompt word into a large language model to obtain an initial credit rating report;
[0071] Inputting the initial credit rating report and the initial rating prompt words into a large language model to obtain a rating result;
[0072] Determining whether the scoring result is consistent with a preset scoring result;
[0073] If the scoring result is consistent with the preset scoring result, the initial scoring prompt word is determined as the scoring prompt word;
[0074] If the scoring result is inconsistent with the preset scoring result, the initial scoring prompt word is corrected based on the initial credit rating report and the scoring result, and after the corrected scoring prompt word is determined as the scoring prompt word, the process returns to the step of inputting the initial credit rating report and the initial scoring prompt word into the large language model to obtain the scoring result.
[0075] The technical solution provided by the present application obtains the basic information of the object to be rated and the industry evaluation information of the object to be rated; inputs the basic information and the industry evaluation information into the large language model to obtain the evaluation grade of the object to be rated; obtains the initial prompt word set corresponding to the object to be rated; optimizes multiple initial prompt words using the cross-mutation algorithm to obtain multiple cross-mutation prompt words; inputs each cross-mutation prompt word, the scoring prompt word and the evaluation grade of the object to be rated into the large language model to obtain the scoring result of each cross-mutation prompt word; based on the evaluation grade of the object to be rated and the scoring result of each cross-mutation prompt word, a credit rating report of the object to be rated is generated. In the present application, the best prompt word is screened out according to the scoring result of the cross-mutation prompt word, so as to generate a credit evaluation report based on the best prompt word and the evaluation grade. This method avoids the problem of untimely data update caused by manual information transmission. At the same time, the cross-mutation prompt word is optimized, so that the generation efficiency can be improved under the premise of ensuring the quality of the credit evaluation report. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0077] Figure 1 A flowchart of a method for generating a credit rating report provided in an embodiment of the present application;
[0078] Figure 2 A flowchart of a method for determining an evaluation level provided in an embodiment of the present application;
[0079] Figure 3 A flowchart of a method for obtaining a cross-variation prompt word provided in an embodiment of the present application;
[0080] Figure 4 A flowchart of a method for correcting an initial scoring prompt word provided in an embodiment of the present application;
[0081] Figure 5 A flowchart of obtaining a prompt word set provided in an embodiment of the present application;
[0082] Figure 6 A schematic diagram of synthetic data provided in an embodiment of the present application;
[0083] Figure 7 A schematic diagram of correcting an initial scoring prompt word provided in an embodiment of the present application;
[0084] Figure 8 A flowchart of generating a credit rating report provided in an embodiment of the present application;
[0085] Fig. 9 A schematic diagram of an optimized prompt word provided in an embodiment of the present application;
[0086] Fig.10 A flowchart of a method for generating a qualitative analysis of a credit rating report provided in an embodiment of the present application;
[0087] Fig.11 A schematic diagram of the architecture of a credit rating report generating device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0088] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0089] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0090] like Figure 1 As shown, it is a flowchart of a credit rating report generation method provided in an embodiment of the present application, comprising the following steps:
[0091] S101: Obtain basic information of the object to be rated and industry evaluation information of the object to be rated.
[0092] The objects to be evaluated include but are not limited to: enterprises, and the basic information of the objects to be rated includes but is not limited to: corporate charter, audit report, and information queried by specific software.
[0093] Optionally, the industry evaluation information of the object to be evaluated indicates information for evaluating the object to be rated according to the evaluation standards of different industry indicators. For example, each enterprise corresponds to a certain industry, such as service enterprises, newly established service enterprises, and new energy enterprises, and the object to be rated is evaluated according to the industry to which the enterprise belongs.
[0094] It is understandable that since the basic information of the object to be rated is stored in the vector database, the basic information of the object to be rated is obtained from the vector database by retrieval and recall, and semantic tags are added to the basic information of the object to be rated and converted into a string format.
[0095] In addition, the information on the evaluation of the rated object according to the evaluation standards of different industry indicators (i.e., the industry evaluation information of the rated object) will be stored in a json file. That is to say, when rating a certain enterprise, the json file of the industry to which the company belongs will be read, and the industry evaluation information of the rated object will be organized into a string format through semantic tags.
[0096] S102: Input the basic information and industry evaluation information into the large language model to obtain the evaluation level of the object to be evaluated.
[0097] Among them, the evaluation level of the object to be rated indicates the evaluation level of one of the qualitative analysis items in the credit rating report.
[0098] Optionally, the LangChain architecture is used to convert the basic information of the object to be rated and the industry evaluation information of the object to be rated to obtain input text, that is, the basic information of the object to be rated and the industry evaluation information of the object to be rated in text format, so as to be subsequently input into the large language model in text format.
[0099] It should be noted that the large language model is a pre-trained model, which is based on the pre-acquired sample basic information and sample industry evaluation information of the object to be rated as input, and the evaluation levels manually annotated for the sample basic information and sample industry evaluation information as training targets.
[0100] Optionally, in another embodiment of the present application, the specific implementation of step S102 is as follows: Figure 2 As shown, the following steps are included:
[0101] S201: Split the industry evaluation information to obtain multiple preset evaluation levels.
[0102] It is understandable that the industry evaluation information is split. Specifically, a scoring standard is first set; the industry evaluation information is split according to the scoring standard to obtain multiple preset evaluation levels.
[0103] S202: For each preset evaluation level, split the preset evaluation level to obtain multiple evaluation criteria.
[0104] It should be noted that since the large language model has a weak ability to comprehensively analyze the preset evaluation levels, it is necessary to divide the preset evaluation levels into multiple scoring criteria one by one, and then analyze them using multiple evaluation criteria.
[0105] S203: Filter out the highest preset evaluation level from all preset evaluation levels and determine it as the target preset evaluation level.
[0106] It is understandable that whether the basic information meets the preset evaluation level is judged in descending order of the evaluation level. Therefore, the highest preset evaluation level is firstly selected from all preset evaluation levels and determined as the target preset evaluation level.
[0107] S204: Input multiple evaluation criteria and basic information corresponding to the target preset evaluation level into the large language model to obtain an evaluation result.
[0108] The evaluation result indicates the amount of basic information that meets the evaluation criteria.
[0109] Optionally, after converting multiple evaluation criteria and basic information corresponding to the preset evaluation level of the target using the LangChain architecture, the multiple evaluation criteria and basic information corresponding to the preset evaluation level of the target can be converted to obtain the input text, and then the input text is input into the large language model.
[0110] S205: Calculate the ratio between the number of basic information that meets the evaluation criteria and the total number of evaluation criteria, and determine it as the standard ratio.
[0111] The specific form of calculating the ratio between the number of basic information that meets the evaluation criteria and the total number of evaluation criteria is: standard ratio = number of basic information that meets the evaluation criteria / total number of evaluation criteria.
[0112] For example, the number of basic information that meets the evaluation criteria is 5, and the total number of evaluation criteria is 8. The ratio between the number of basic information that meets the evaluation criteria and the total number of evaluation criteria is: 0.625.
[0113] S206: Determine whether the standard ratio is greater than the preset ratio.
[0114] If the standard ratio is greater than the preset ratio, step S207 is executed; if the standard ratio is not greater than the preset ratio, step S208 is executed.
[0115] Specifically, assuming that the standard ratio is 0.625 and the preset ratio is 0.5, it is determined whether the standard ratio is greater than the preset ratio. Obviously, the standard ratio is greater than the preset ratio, so step S207 is continued.
[0116] Specifically, assuming that the standard ratio is 0.4 and the preset ratio is 0.5, it is determined whether the standard ratio is greater than the preset ratio. Obviously, the standard ratio is greater than the preset ratio, so step S208 is continued.
[0117] S207: Determine the target preset evaluation level as the evaluation level of the object to be evaluated.
[0118] It can be understood that when the standard ratio is greater than the preset ratio, it means that the object to be rated has met the target preset evaluation standard, and the target preset evaluation level is determined as the evaluation level of the object to be rated.
[0119] S208: After selecting the highest preset evaluation level other than the target preset evaluation level from all preset evaluation levels and determining it as the target preset evaluation level, the process returns to step S204.
[0120] It can be understood that the highest preset evaluation level except the target preset evaluation level is screened out from all preset evaluation levels, that is, the second highest preset evaluation level among all preset evaluation levels, that is, the preset evaluation level is reduced to one level lower than the target preset evaluation level.
[0121] For example, there are three preset evaluation levels, namely the first preset evaluation level, the second preset evaluation level and the third preset evaluation level, the first preset evaluation level>the second preset evaluation level>the third preset evaluation level, and the first preset evaluation level is the target preset evaluation level, and the highest preset evaluation level except the target preset evaluation level is screened out from all the preset evaluation levels as the second preset evaluation level.
[0122] S103: Obtaining an initial prompt word set corresponding to the object to be evaluated.
[0123] The initial prompt word set includes multiple initial prompt words (including manually designed artificial prompt words and machine-generated prompt words).
[0124] For example, if the subject to be rated is a technology-based enterprise "XYZ Technology Co., Ltd.", the initial prompt word set obtained for XYZ Technology Co., Ltd. includes but is not limited to: Industry risk assessment: According to the methodology of S&P Credit Ratings (China), the risk of the industry in which the enterprise is located must be assessed first. For example, if XYZ Company belongs to the technology hardware and semiconductor industry, its industry risk assessment may be marked as "high". Basic information of the enterprise: including the company's registered capital, establishment time, major shareholders and equity structure, etc. Operating status: involving the company's main business, market positioning, competitive position, management team experience, R&D capabilities, etc. Financial status: including key financial indicators such as debt-to-asset ratio, interest repayment ratio, maturity credit repayment ratio, cash flow, etc. Credit record: the company's historical credit performance, including whether there is a record of overdue repayments, legal proceedings, etc.
[0125] S104: Optimizing the multiple initial prompt words using a crossover mutation algorithm to obtain multiple crossover mutation prompt words.
[0126] It can be understood that since randomness can be introduced through the crossover mutation algorithm, multiple potential solutions can be explored simultaneously in the entire solution space, which helps to find the global optimal solution rather than being limited to the local optimal solution. In other words, the crossover mutation algorithm can extract useful information from existing, well-performing prompt words and combine it with other prompt words to generate more effective new prompt words, namely, crossover mutation prompt words.
[0127] Optionally, in another embodiment of the present application, the specific implementation of step S104 is as follows: Figure 3 As shown, the following steps are included:
[0128] S301: Convert multiple initial prompt words to obtain multiple initial prompt word vectors.
[0129] Among them, the multiple initial prompt word vectors include the current initial prompt word vector.
[0130] It can be understood that by converting multiple initial prompt words into vectors, a distance metric (such as cosine similarity) can be used to evaluate the similarity between different prompt words, which helps to select and generate more relevant combinations.
[0131] S302: Select any two initial prompt word vectors from the multiple initial prompt word vectors and mark them as a first vector and a second vector.
[0132] It is understandable that in the crossover mutation algorithm, selecting two vectors is the basis for generating new prompt words. These two vectors generate new vectors through some crossover method (such as linear combination, feature exchange, etc.), thereby generating new prompt words.
[0133] S303: Using a transformation function to process the difference between the first vector and the second vector to obtain a new vector.
[0134] The specific expression of using the transformation function to process the difference between the first vector and the second vector is: F(bc), where F is the transformation function, b is the first vector, and c is the second vector.
[0135] S304: Add the current initial prompt word vector to the new vector to obtain a new prompt word vector.
[0136] The specific form of adding the current initial prompt word vector to the new vector is shown in formula (1).
[0137] y=a+F(bc)(1)
[0138] In formula (1), a is the current initial prompt word vector, and y is the new prompt word vector.
[0139] S305: For each initial prompt word vector, cross-mutate the new prompt word vector and the initial prompt word vector to obtain a cross-mutated prompt word vector.
[0140] Specifically, the intersection point between the new prompt word vector and the initial prompt word vector is determined, and one intersection point or multiple intersection points are selected to cross-operate the new prompt word vector with the initial prompt word vector (for example, the first half of the new prompt word vector and the second half of the initial prompt word vector are combined) to obtain a cross-mutated prompt word.
[0141] S306: Convert the cross-variation prompt word vector to obtain multiple cross-variation prompt words.
[0142] It can be understood that converting the cross-variation cue word vectors into cross-variation cue words, by converting the vectors into specific cue words, can enable the model to better understand and apply these cues, thereby improving the quality of generated or processed text.
[0143] S105: Input each cross-variation prompt word, the scoring prompt word and the evaluation level of the object to be evaluated into the large language model to obtain the scoring result of each cross-variation prompt word.
[0144] The scoring prompt words are obtained by correcting the initial scoring prompt words.
[0145] It should be noted that the large language model is a pre-trained model, which is based on pre-acquired sample cross-variant words, sample scoring prompt words and sample evaluation levels as input, and uses the manually labeled scoring results of sample cross-variant words, sample scoring prompt words and sample evaluation levels as training targets.
[0146] Optionally, in another embodiment of the present application, the initial scoring prompt word is corrected to obtain a specific implementation method of the scoring prompt word, such as Figure 4 As shown, the following steps are included:
[0147] S401: Obtain a prompt word set.
[0148] The prompt word set includes multiple prompt words.
[0149] Optionally, in another embodiment of the present application, the specific implementation of step S401 is as follows: Figure 5 As shown, the following steps are included:
[0150] S501: Acquire real data and expand prompt words.
[0151] The real data indicates the basic information of the real object to be evaluated, and the expanded prompt word indicates the prompt word for expanding the basic information according to the format of the basic information.
[0152] For example, the basic information of the rating object is as follows: Basic information of listed company A: (1) Company annual report (2) Company audit report (3) Company shareholder personal information (4) Other relevant information...
[0153] For example, the expanded prompt is: You are a large language model assistant, and you need to generate challenging samples for each task according to the provided task_description and instruction. Generate {num_samples) challenging samples for the following tasks. The generated samples should be challenging and diverse.
[0154] [task_description}
[0155] {instruction)
[0156] Answer in the following format:
[0157] Sample 1:
[0158] <text>
[0159] Sample 2:
[0160] <text>
[0161] …
[0162] .
[0163] S502: Input the real data and the expanded prompt words into the large language model to obtain synthetic data.
[0164] The format of the synthetic data is consistent with that of the real data.
[0165] Understandably, since customer credit rating reports are mainly for large companies, the amount of data available in the data set is usually small, and there is also a lack of large-scale standardized public data sets on the Internet. An important function of Agent is data expansion and enhancement, which paves the way for subsequent prompt word optimization. The data expansion function is implemented by using a large language model specifically used for data synthesis, based on a well-designed expansion prompt word, adding a small amount of real data, and using the LangChain architecture, large language model and data expansion and enhancement functions to dynamically generate a batch of machine-generated synthetic data similar to real data.
[0166] For example, see Figure 6 By inputting the basic information and expanded prompt words of the object to be rated into the large language model LLM, the synthetic data obtained includes: basic information of listed company B, basic information of listed company C, basic information of listed company D, basic information of listed company E, basic information of listed company F, basic information of listed company G, basic information of listed company II, basic information of listed company I, etc.
[0167] S503: Generate a prompt word set corresponding to the synthetic data using a preset evaluation function.
[0168] The preset evaluation function includes but is not limited to: generating an evaluation function for the prompt word activated by the Agent.
[0169] S402: For each prompt word, input the prompt word into a large language model to obtain an initial credit rating report.
[0170] Among them, the initial credit rating report includes the reasons for the evaluation.
[0171] It should be noted that the large language model is a pre-trained model, which is pre-trained based on pre-acquired sample prompt words as input and uses the initial credit rating report manually annotated with the sample prompt words as the training target.
[0172] S403: Input the initial credit rating report and the initial rating prompt words into the large language model to obtain a rating result.
[0173] Among them, the initial scoring prompt words are instructions used to guide the model to evaluate and score specific content.
[0174] It is understandable that the scoring results are divided into five levels based on the quality of the initial credit rating report, from 1 to 5, with higher scores representing higher quality of the generated results.
[0175] It should be noted that the large language model is a pre-trained model, which is based on pre-acquired sample credit rating reports and initial rating prompt words as input, and uses the manually annotated rating results of the sample credit rating reports and initial rating prompt words as training targets.
[0176] In addition, all the large language models mentioned above may be the same or different large language models, and different results may be obtained according to different inputs.
[0177] S404: Determine whether the scoring result is consistent with a preset scoring result.
[0178] If the scoring result is consistent with the preset scoring result, step S405 is executed; if the scoring result is inconsistent with the preset scoring result, step S406 is executed.
[0179] Optionally, the preset scoring result may be a result of manual scoring of the initial credit rating report. Manual scoring may be performed on the front-end page through Argilla (an open source data management and annotation tool), i.e., the preset scoring result.
[0180] S405: Determine the initial scoring prompt word as the scoring prompt word.
[0181] It is understandable that if the scoring result is consistent with the preset scoring result, it means that the initial scoring prompt word at this time is a scoring word that meets human needs, and then the initial scoring prompt word is determined as the scoring prompt word.
[0182] S406: Correct the initial scoring prompt word based on the initial credit rating report and the scoring result, and determine the corrected scoring prompt word as the scoring prompt word, then return to step S403.
[0183] It is understandable that if the scoring result is inconsistent with the preset scoring result, it means that the initial scoring prompt word at this time is a scoring word that meets human needs, and it is necessary to correct the initial scoring prompt word based on the initial credit rating report and the scoring result, and after the corrected scoring prompt word is determined as the scoring prompt word, return to execute step S403.
[0184] For example, if the score result of the initial credit rating report is 3 points and the preset score result is 5 points, then the initial score prompt word needs to be corrected based on the initial credit rating report and the score result so that the score result is adjusted to 5 points.
[0185] To better explain Figure 4 The following content is explained in conjunction with specific application scenarios. Figure 7 , the prompt word set indicates the initial scoring prompt words, and the data sample set indicates the initial credit rating report. By inputting the prompt word set and the data sample set into the large language model LLM, the scoring result can be obtained, and the initial scoring prompt words are corrected according to the scoring result.
[0186] S106: Generate a credit rating report for the object to be rated based on the rating level of the object to be rated and the scoring result of each cross-variation prompt word.
[0187] Among them, based on the evaluation grade of the object to be evaluated and the scoring results of each cross-variation prompt word, a credit rating report of the object to be rated is generated. Specifically, the rating reasons are determined based on the evaluation grade of the object to be evaluated and the scoring results of each cross-variation prompt word, and the credit rating report of the object to be rated is generated based on the evaluation reasons.
[0188] Optionally, in another embodiment of the present application, the specific implementation of step S106 is as follows: Figure 8 As shown, the following steps are included:
[0189] S801: Filter out the scoring result with the highest score from all the scoring results, and determine the crossover mutation prompt word corresponding to the scoring result with the highest score as the best prompt word.
[0190] The best cue word indicates the best cue word for each sub-item in the qualitative analysis.
[0191] For example, there are three cross-variation prompt words, namely the first cross-variation prompt word, the second cross-variation prompt word and the third cross-variation prompt word. The scoring result of the first cross-variation prompt word is 2 points, the scoring result of the second cross-variation prompt word is 4 points, and the scoring result of the third cross-variation prompt word is 3 points. The scoring result with the highest score is screened out from all the scoring results as the scoring result of the second cross-variation prompt word, and the third cross-variation prompt word is determined as the best prompt word.
[0192] It should be noted that all enterprises in the industry can use the best prompt word as the standard, and there is no need to optimize the prompt word again. If it is a different industry, it is necessary to re-optimize the prompt word (i.e. Figure 4 Figure 5 content shown).
[0193] S802: Generate evaluation reasons based on the evaluation level of the object to be evaluated and the best prompt word.
[0194] Optionally, the Langchain framework and the large language model can be used to process the evaluation level and the best prompt words of the evaluation object to obtain the rating reasons for each sub-item.
[0195] S803: Generate a credit rating report for the object to be rated based on the rating level and evaluation reasons of the object to be rated.
[0196] It can be understood that a tree-like json structure is first generated based on the evaluation level and evaluation reasons of the object to be evaluated, and then the json2doc algorithm is used to generate a doc document (ie, the credit rating report of the object to be rated).
[0197] For a better explanation of all of the above, see Fig. 9 The schematic diagram of the optimization prompt words shown is shown. First, manually created extended prompt words (i.e., Prompt) are obtained, and real data is added, synthetic data is generated based on the extended prompt words and real data, a prompt word set is determined according to the synthetic data, and a scoring prompt word is determined according to the prompt word set and the initial scoring prompt word (i.e., a large language model that conforms to human preferences is obtained); an initial prompt word set corresponding to the object to be evaluated is obtained; a plurality of initial prompt words are optimized using a crossover mutation algorithm to obtain a plurality of crossover mutation prompt words; each crossover mutation prompt word, scoring prompt word, and the evaluation grade of the object to be evaluated are input into the large language model to obtain a scoring result of each crossover mutation prompt word, the scoring result with the highest score is screened out from all the scoring results, and the crossover mutation prompt word corresponding to the scoring result with the highest score is determined as the best prompt word.
[0198] In addition, in order to Figure 1 For a brief description of the contents shown, see Fig.10 The flowchart of the method for generating qualitative analysis of a credit rating report shown mainly includes two stages. In the first stage, the basic information of the enterprise and the industry evaluation information are input into the large language model to obtain the evaluation grade. In the second stage, the prompt words are first optimized to obtain the best prompt words, and then a credit rating report (i.e., a complete qualitative analysis) is generated based on the best prompt words and the evaluation grade.
[0199] In summary, the best prompt words are selected according to the scoring results of the cross-variation prompt words, and the credit evaluation report is generated according to the best prompt words and the evaluation level. This method avoids the problem of untimely data updates caused by manual information transmission. At the same time, the cross-variation prompt words are optimized, so the generation efficiency can be improved while ensuring the quality of the credit evaluation report.
[0200] like Fig.11 As shown, it is a schematic diagram of the architecture of a credit rating report generating device provided in an embodiment of the present application, and the generating device includes: a first acquisition unit 100, a first input unit 200, a second acquisition unit 300, an optimization unit 400, a second input unit 500 and a generating unit 600.
[0201] The first acquisition unit 100 is used to acquire basic information of the object to be rated and industry evaluation information of the object to be rated.
[0202] The first input unit 200 is used to input basic information and industry evaluation information into the large language model to obtain the evaluation level of the object to be evaluated.
[0203] The first input unit 200 is specifically used to: split the industry evaluation information to obtain multiple preset evaluation levels; for each preset evaluation level, split the preset evaluation level to obtain multiple evaluation standards; screen out the preset evaluation level with the highest level from all preset evaluation levels, and determine it as the target preset evaluation level; input multiple evaluation standards and basic information corresponding to the target preset evaluation level into the large language model to obtain an evaluation result; the evaluation result indicates the number of basic information that meets the evaluation standards; calculate the ratio between the number of basic information that meets the evaluation standards and the total number of evaluation standards, and determine it as the standard ratio; determine whether the standard ratio is greater than the preset ratio; if the standard ratio is greater than the preset ratio, determine the target preset evaluation level as the evaluation level of the object to be evaluated; if the standard ratio is not greater than the preset ratio, screen out the highest preset evaluation level except the target preset evaluation level from all preset evaluation levels, and after determining it as the target preset evaluation level, return to execute the step of inputting multiple evaluation standards and basic information corresponding to the target preset evaluation level into the large language model to obtain the evaluation result.
[0204] The second acquisition unit 300 is used to acquire an initial prompt word set corresponding to the object to be evaluated; the initial prompt word set includes multiple initial prompt words.
[0205] The optimization unit 400 is used to optimize the multiple initial prompt words by using a crossover mutation algorithm to obtain multiple crossover mutation prompt words.
[0206] The optimization unit 400 is specifically used for: converting multiple initial prompt words to obtain multiple initial prompt word vectors; the multiple initial prompt word vectors include the current initial prompt word vector; selecting any two initial prompt word vectors from the multiple initial prompt word vectors, and marking them as the first vector and the second vector; using the transformation function to process the difference between the first vector and the second vector to obtain a new vector; adding the current initial prompt word vector to the new vector to obtain a new prompt word vector; for each initial prompt word vector, cross-mutating the new prompt word vector and the initial prompt word vector to obtain a cross-mutated prompt word vector; converting the cross-mutated prompt word vector to obtain multiple cross-mutated prompt words.
[0207] The second input unit 500 is used to input each cross-variation prompt word, the scoring prompt word and the evaluation level of the object to be evaluated into the large language model to obtain the scoring result of each cross-variation prompt word; the scoring prompt word is obtained by correcting the initial scoring prompt word.
[0208] The second input unit 500 is specifically used to: obtain a prompt word set; the prompt word set includes multiple prompt words; for each prompt word, input the prompt word into the large language model to obtain an initial credit rating report; input the initial credit rating report and the initial scoring prompt word into the large language model to obtain a scoring result; determine whether the scoring result is consistent with the preset scoring result; if the scoring result is consistent with the preset scoring result, determine the initial scoring prompt word as the scoring prompt word; if the scoring result is inconsistent with the preset scoring result, correct the initial scoring prompt word based on the initial credit rating report and the scoring result, and after determining the corrected scoring prompt word as the scoring prompt word, return to execute the step of inputting the initial credit rating report and the initial scoring prompt word into the large language model to obtain the scoring result.
[0209] The second input unit 500 is specifically used to: obtain real data and expanded prompt words; wherein the real data indicates the basic information of the real object to be evaluated, and the expanded prompt words indicate the prompt words that expand the basic information according to the format of the basic information; input the real data and the expanded prompt words into the large language model to obtain synthetic data, wherein the format of the synthetic data is consistent with that of the real data; and use the preset evaluation function to generate a prompt word set corresponding to the synthetic data.
[0210] The generating unit 600 is used to generate a credit rating report of the object to be rated based on the rating level of the object to be rated and the scoring result of each cross-variation prompt word.
[0211] The generation unit 600 is specifically used to: screen out the scoring result with the highest score from all the scoring results, and determine the cross-variation prompt word corresponding to the scoring result with the highest score as the best prompt word; generate evaluation reasons based on the evaluation level of the object to be evaluated and the best prompt word; generate a credit rating report of the object to be rated based on the evaluation level and the evaluation reasons of the object to be evaluated.
[0212] In summary, the best prompt words are selected according to the scoring results of the cross-variation prompt words, and the credit evaluation report is generated according to the best prompt words and the evaluation level. This method avoids the problem of untimely data updates caused by manual information transmission. At the same time, the cross-variation prompt words are optimized, so the generation efficiency can be improved while ensuring the quality of the credit evaluation report.
[0213] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.
[0214] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0215] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for generating a credit rating report, characterized in that: include: Obtain basic information of the object to be rated and industry evaluation information of the object to be rated; Inputting the basic information and the industry evaluation information into a large language model to obtain an evaluation grade of the object to be evaluated; Obtaining an initial prompt word set corresponding to the object to be evaluated; The initial prompt word set includes a plurality of initial prompt words; Optimizing the multiple initial prompt words using a crossover mutation algorithm to obtain multiple crossover mutation prompt words; Inputting each of the cross-variation prompt words, the scoring prompt words and the evaluation grade of the object to be evaluated into a large language model to obtain a scoring result for each of the cross-variation prompt words; The scoring prompt word is obtained by correcting the initial scoring prompt word; A credit rating report of the object to be rated is generated based on the rating grade of the object to be rated and the scoring result of each cross-variation prompt word.
2. The method according to claim 1, characterized in that The step of inputting the basic information and the industry evaluation information into a large language model to obtain the evaluation grade of the object to be evaluated includes: Splitting the industry evaluation information to obtain multiple preset evaluation levels; For each of the preset evaluation levels, split the preset evaluation level to obtain multiple evaluation criteria; Filter out the highest preset evaluation level from all preset evaluation levels and determine it as the target preset evaluation level; Inputting a plurality of evaluation criteria corresponding to the target preset evaluation level and the basic information into the large language model to obtain an evaluation result; the evaluation result indicates the amount of the basic information that meets the evaluation criteria; Calculate the ratio between the number of basic information that meets the evaluation criteria and the total number of evaluation criteria, and determine it as the standard ratio; Determining whether the standard ratio is greater than a preset ratio; If the standard ratio is greater than the preset ratio, the target preset evaluation level is determined as the evaluation level of the object to be evaluated; If the standard ratio is not greater than the preset ratio, the highest preset evaluation level except the target preset evaluation level is screened out from all the preset evaluation levels, and after being determined as the target preset evaluation level, the step of returning to execute the step of inputting the multiple evaluation criteria corresponding to the target preset evaluation level and the basic information into the large language model to obtain the evaluation result is performed.
3. The method according to claim 1, characterized in that The method of performing crossover mutation on the multiple initial prompt words by using a crossover mutation algorithm to obtain multiple crossover mutation prompt words includes: Converting multiple initial prompt words to obtain multiple initial prompt word vectors; the multiple initial prompt word vectors include the current initial prompt word vector; Select any two initial prompt word vectors from the plurality of initial prompt word vectors and mark them as a first vector and a second vector; Processing the difference between the first vector and the second vector using a transformation function to obtain a new vector; Adding the current initial prompt word vector to the new vector to obtain a new prompt word vector; For each of the initial prompt word vectors, cross-mutate the new prompt word vector and the initial prompt word vector to obtain a cross-mutated prompt word vector; The cross-variation prompt word vector is transformed to obtain multiple cross-variation prompt words.
4. The method according to claim 1, characterized in that: The process of correcting the initial scoring prompt word to obtain the scoring prompt word includes: Acquire a prompt word set; the prompt word set includes multiple prompt words; For each of the prompt words, input the prompt word into a large language model to obtain an initial credit rating report; Inputting the initial credit rating report and the initial rating prompt words into the large language model to obtain a rating result; Determining whether the scoring result is consistent with a preset scoring result; If the scoring result is consistent with the preset scoring result, the initial scoring prompt word is determined as the scoring prompt word; If the scoring result is inconsistent with the preset scoring result, the initial scoring prompt word is corrected based on the initial credit rating report and the scoring result, and after the corrected scoring prompt word is determined as the scoring prompt word, the process returns to the step of inputting the initial credit rating report and the initial scoring prompt word into the large language model to obtain the scoring result.
5. The method according to claim 4, characterized in that The step of obtaining a prompt word set includes: Acquire real data and extended prompt words; wherein the real data indicates the basic information of the real object to be evaluated, and the extended prompt words indicate prompt words that expand the basic information according to the format of the basic information; Inputting the real data and the expanded prompt word into the large language model to obtain synthetic data, wherein the format of the synthetic data is consistent with that of the real data; A set of prompt words corresponding to the synthetic data is generated by using a preset evaluation function.
6. The method according to claim 1, characterized in that The step of generating a credit rating report for the object to be rated based on the rating grade of the object to be rated and the scoring result of each cross-variation prompt word comprises: Screening out the scoring result with the highest score from all the scoring results, and determining the crossover mutation prompt word corresponding to the scoring result with the highest score as the best prompt word; Generating evaluation reasons based on the evaluation level of the object to be evaluated and the optimal prompt word; A credit rating report of the object to be rated is generated based on the rating level of the object to be rated and the rating reasons.
7. A credit rating report generating device, characterized in that: include: A first acquisition unit is used to acquire basic information of the object to be rated and industry evaluation information of the object to be rated; A first input unit, used to input the basic information and the industry evaluation information into a large language model to obtain an evaluation grade of the object to be evaluated; A second acquisition unit is used to acquire an initial prompt word set corresponding to the object to be evaluated; The initial prompt word set includes a plurality of initial prompt words; An optimization unit, used for optimizing the plurality of initial prompt words by using a crossover mutation algorithm to obtain a plurality of crossover mutation prompt words; A second input unit is used to input each of the cross-variation prompt words, the scoring prompt words and the evaluation level of the object to be evaluated into the large language model to obtain a scoring result for each of the cross-variation prompt words; The scoring prompt word is obtained by correcting the initial scoring prompt word; A generating unit is used to generate a credit rating report of the object to be rated based on the evaluation grade of the object to be rated and the scoring result of each cross-variation prompt word.
8. The device according to claim 7, characterized in that The first input unit is specifically used for: Splitting the industry evaluation information to obtain multiple preset evaluation levels; For each of the preset evaluation levels, split the preset evaluation level to obtain multiple evaluation criteria; Filter out the highest preset evaluation level from all preset evaluation levels and determine it as the target preset evaluation level; Inputting a plurality of evaluation criteria corresponding to the target preset evaluation level and the basic information into the large language model to obtain an evaluation result; the evaluation result indicates the amount of the basic information that meets the evaluation criteria; Calculate the ratio between the number of basic information that meets the evaluation criteria and the total number of evaluation criteria, and determine it as the standard ratio; Determining whether the standard ratio is greater than a preset ratio; If the standard ratio is greater than the preset ratio, the target preset evaluation level is determined as the evaluation level of the object to be evaluated; If the standard ratio is not greater than the preset ratio, the highest preset evaluation level except the target preset evaluation level is screened out from all the preset evaluation levels, and after being determined as the target preset evaluation level, the step of returning to execute the step of inputting the multiple evaluation criteria corresponding to the target preset evaluation level and the basic information into the large language model to obtain the evaluation result is performed.
9. The device according to claim 7, characterized in that The optimization unit is specifically used for: Converting multiple initial prompt words to obtain multiple initial prompt word vectors; the multiple initial prompt word vectors include the current initial prompt word vector; Select any two initial prompt word vectors from the plurality of initial prompt word vectors and mark them as a first vector and a second vector; Processing the difference between the first vector and the second vector using a transformation function to obtain a new vector; Adding the current initial prompt word vector to the new vector to obtain a new prompt word vector; For each of the initial prompt word vectors, cross-mutate the new prompt word vector and the initial prompt word vector to obtain a cross-mutated prompt word vector; The cross-variation prompt word vector is transformed to obtain multiple cross-variation prompt words.
10. The device according to claim 7, characterized in that The second input unit is specifically used for: Acquire a prompt word set; the prompt word set includes multiple prompt words; For each of the prompt words, input the prompt word into a large language model to obtain an initial credit rating report; Inputting the initial credit rating report and the initial rating prompt words into the large language model to obtain a rating result; Determining whether the scoring result is consistent with a preset scoring result; If the scoring result is consistent with the preset scoring result, the initial scoring prompt word is determined as the scoring prompt word; If the scoring result is inconsistent with the preset scoring result, the initial scoring prompt word is corrected based on the initial credit rating report and the scoring result, and after the corrected scoring prompt word is determined as the scoring prompt word, the process returns to the step of inputting the initial credit rating report and the initial scoring prompt word into the large language model to obtain the scoring result.
Citation Information
Patent Citations
Multi-level visual evaluation report generation method and device based on large language model
CN117194637A
Credit evaluation method and device, equipment and storage medium
CN117670445A
Data generation method and device
CN117851585A
Online question and answer cue word optimization generation method based on large language model
CN118093836A
Prompt word updating method, device and system based on multi-dimensional large language model
CN118132716A
Cited By
Small and micro credit approver expert system and method based on large language model
CN120088059A
Environmental protection management method and system for food industry based on large model
CN120996006A
An environmental protection management method and system for the food industry based on a large model
CN120996006B
Intelligent supplier credit evaluation system based on collection platform
CN122264816A