A credit risk calibration method, system and medium
By constructing a hard constraint rule base for credit risk and performing consistency verification, structured calibration instructions are generated, which solves the problem of nondeterministic output in credit risk assessment by large language models and realizes the reliability and compliance of credit risk regulatory indicators.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CLIENT SERVICE INT INC
- Filing Date
- 2026-04-07
- Publication Date
- 2026-07-10
AI Technical Summary
Large language models have uncertain outputs in credit risk assessment, making it difficult to meet the regulatory requirements for certainty and auditability, and they lack effective strategy correction mechanisms.
A hard constraint rule base for credit risk is constructed. Through rule consistency verification and deterministic hard constraint verification, structured calibration instructions are generated to drive the large language model to correct the strategy.
It improves the reliability and compliance of credit risk regulatory indicator calculations, enables deterministic correction of large language model inference strategies, and meets regulatory requirements.
Smart Images

Figure CN122367604A_ABST
Abstract
Description
Technical Field
[0001] This invention pertains to the application of artificial intelligence in the field of financial technology, and in particular relates to a method, system, and medium for deterministic verification and calibration of credit risk indicators and their reasoning processes output by large language models during corporate credit risk assessment. Background Technology
[0002] Credit risk is a key type of risk in credit approval, post-loan management, and credit impairment measurement. With the application and promotion of big data modeling technology, credit risk assessment can be carried out by integrating corporate operating information using big data models. However, in credit risk regulatory assessment scenarios with strong supervision, high accuracy requirements, and auditability, there is still a gap between the probability-based output mechanism of big data models and the certainty, reasonableness, and auditability required by credit risk regulatory rules.
[0003] Specifically, on the one hand, the calculation and classification of key credit risk regulatory indicators such as risk-weighted assets and expected credit losses by large language models are uncertain, which can easily lead to deviations in asset classification or risk weight selection, resulting in inconsistent calculation formulas or triggering regulatory threshold violations, making it difficult to meet the requirements for calculation traceability.
[0004] On the other hand, existing feedback methods are mostly free text prompts, lacking unified and executable operational semantics, making it difficult to drive the model to make predictable policy corrections; at the same time, due to data security constraints, financial institutions are usually unable to use internal sensitive data to perform reinforcement learning or fine-tuning of the model, resulting in inefficient and unreusable compliance correction mechanisms. Summary of the Invention
[0005] In view of this, the present invention aims to provide a credit risk calibration method and system to at least solve one of the problems in the background art.
[0006] To achieve the above objectives, the technical solution of the present invention is implemented as follows: Firstly, this scheme discloses a credit risk calibration method, including: A hard constraint rule base for credit risk is constructed, which contains several hard constraint rule entries; wherein each hard constraint rule entry includes at least: rule identifier, applicable conditions, constraint type, constraint expression, and definition of correction action; the constraint expression is at least one of the following: calculation formula, threshold condition, or classification boundary condition; Before enabling the rule base, a rule consistency check is performed on the hard constraint rule entries. The rule consistency check includes at least the following: when the applicable conditions of any two hard constraint rule entries overlap, it is determined whether their correction action definition belongs to a preset set of conflicting action pairs; if so, the rule base is prevented from being enabled or the conflicting rules are marked. The system receives a structured reasoning and argumentation data block output by a large language model. The structured reasoning and argumentation data block includes at least: the calculation result of the credit risk index, the input data fields used for calculation, the calculation process information, and the rule identifiers referenced. The rule validator performs deterministic hard constraint validation on the structured reasoning and argumentation data block based on the rule base. The hard constraint validation includes at least the consistency validation of the calculation formula and the compliance validation of the threshold or classification boundary. When the validation fails, a discretized error signal is output. The discretized error signal includes at least the following: violation rule identifier, violation type, and the located target data field. The structured feedback instruction generator converts the discretized error signal into a structured calibration instruction based on a preset error-to-action mapping relationship. The structured calibration instruction includes at least a correction action type and a target data field. The structured calibration instruction is used as the contextual prompt information input for the next round of reasoning of the large language model, so that the large language model corrects the target data field and / or calculation process information according to the correction action type and re-outputs a new structured reasoning argument data block; Repeat the above steps until the deterministic hard constraint verification passes, thereby achieving non-weighted update-based deterministic correction of the inference strategy of the large language model.
[0007] Furthermore, the structured reasoning argument data block further includes at least one intermediate variable and its value, and the calculation process information includes at least the source field or calculation path of the intermediate variable, which is used to support the step-by-step location of the consistency verification of the calculation formula.
[0008] Furthermore, the applicable conditions of the hard constraint rule entries consist of factual variables, logical relationships, and thresholds; the definition of the correction action includes at least the action type and action parameters, wherein the action parameters include at least the target data field identifier and the basis for correction.
[0009] Furthermore, the rule consistency verification further includes: for two hard constraint rule entries with overlapping applicable conditions, if their constraint expressions give mutually exclusive compliance intervals or mutually exclusive classification conclusions for the same target data field, then they are determined to be rule conflicts and a conflict flag is output.
[0010] Furthermore, the consistency verification of the calculation formula includes: performing deterministic recalculation on the input data field based on the constraint expression corresponding to the referenced rule identifier in the rule base to obtain the recalculation result; comparing the recalculation result with the calculation result of the credit risk indicator, and outputting the violation type of the inconsistent calculation formula when the difference exceeds the preset tolerance.
[0011] Furthermore, the threshold or classification boundary compliance verification includes: determining whether the credit risk indicator calculation result falls within the compliance range or meets the classification boundary based on the threshold condition or classification boundary condition corresponding to the referenced rule identifier in the rule base; when it does not meet the requirement, outputting the violation type of the threshold violation or classification boundary violation type.
[0012] Furthermore, the error-to-action mapping relationship satisfies a one-to-one deterministic constraint, ensuring that any combination of violation rule identifier and violation type corresponds to only a unique combination of correction action type and target data field, thereby guaranteeing the determinism of calibration instruction generation.
[0013] Furthermore, the structured calibration instructions are represented using key-value pairs of structured data, including at least: Instruction identifier; The violation information field includes at least the violation rule identifier, violation type, and error location feature; The correction action field includes at least the correction action type, the target data field, and the basis for correction. A contextual hint flag field is used to indicate the priority or mandatory nature of the structured calibration instruction in the next round of inference; The status and time fields are used to record the generation time and execution status of the structured calibration instructions; The corrective action type is limited to a preset action set, which includes at least: focusing on a specified field, ignoring a specified field, reclassifying, verifying against rules, and recalculating.
[0014] Secondly, this solution discloses a credit risk calibration system, including: The hard constraint rule library module is used to build and store hard constraint rule entries and trigger rule consistency checks before activation; The rule validator is used to receive the structured reasoning argument data blocks output by the large language model, and perform consistency verification of the calculation formula and compliance verification of the threshold or classification boundary based on the hard constraint rule base. When the verification fails, it outputs a discretized error signal. The structured feedback instruction generator is used to deterministically convert discretized error signals into structured calibration instructions based on a preset error-to-action mapping relationship. The context hint injection module is used to input structured calibration instructions as context hints for the next round of inference into the large language model, so as to drive the large language model to perform non-weight update-style policy correction.
[0015] Thirdly, this solution discloses a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the method described thereon.
[0016] Compared with existing technologies, the credit risk calibration method and system described in this invention have the following advantages: (1) By performing consistency verification on the hard constraint rule base and combining it with a deterministic formal verification process, this invention can improve the reliability and compliance of the output of the large language model in the calculation and classification of key credit risk regulatory indicators such as risk-weighted assets, expected credit losses, and credit stages or asset classifications. (2) By introducing a rule consistency verification mechanism, this invention can eliminate rule conflicts and contradictions in advance during the rule loading stage, ensuring the logical integrity of the rule system from the source and reducing the risk of generating conflicting calibration instructions; (3) This invention converts discrete error signals into structured calibration instructions by using a one-to-one mapping relationship based on deterministic state transitions, and uses them as mandatory context inputs for the next round of reasoning, thereby enabling deterministic, non-fuzzy control and rapid iterative correction of reasoning strategies for large language models; (4) In this invention, the rule data source can be limited to the publicly available rule text and form a set of deployable rule entries, thereby improving the feasibility of data collection and engineering implementation, and completing the strategy correction without updating the model weights. Attached Figure Description
[0017] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a schematic diagram of the method described in an embodiment of the present invention; Figure 2 This is a schematic diagram of the system framework for the automatic generation of structured calibration instructions and iterative context strategy correction method described in an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the definition of the structure specification of the Credit Risk Rule Knowledge Base (CRKB) as described in an embodiment of the present invention; Figure 4 This is a schematic diagram of the key-value pair structure specification of the structured calibration instruction D4 described in an embodiment of the present invention. Detailed Implementation
[0018] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.
[0019] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.
[0020] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art will understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0021] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0022] like Figure 1 As shown, a credit risk calibration method is disclosed, which mainly includes the following steps: A hard constraint rule base for credit risk is constructed, which contains several hard constraint rule entries; wherein each hard constraint rule entry includes at least: rule identifier, applicable conditions, constraint type, constraint expression, and definition of correction action; the constraint expression is at least one of the following: calculation formula, threshold condition, or classification boundary condition; Before enabling the rule base, a rule consistency check is performed on the hard constraint rule entries. The rule consistency check includes at least the following: when the applicable conditions of any two hard constraint rule entries overlap, it is determined whether their correction action definition belongs to a preset set of conflicting action pairs; if so, the rule base is prevented from being enabled or the conflicting rules are marked. The system receives a structured reasoning and argumentation data block output by a large language model. The structured reasoning and argumentation data block includes at least: the calculation result of the credit risk index, the input data fields used for calculation, the calculation process information, and the rule identifiers referenced. The rule validator performs deterministic hard constraint validation on the structured reasoning and argumentation data block based on the rule base. The hard constraint validation includes at least the consistency validation of the calculation formula and the compliance validation of the threshold or classification boundary. When the validation fails, a discretized error signal is output. The discretized error signal includes at least the following: violation rule identifier, violation type, and the located target data field. The structured feedback instruction generator converts the discretized error signal into a structured calibration instruction based on a preset error-to-action mapping relationship. The structured calibration instruction includes at least a correction action type and a target data field. The structured calibration instruction is used as the contextual prompt information input for the next round of reasoning of the large language model, so that the large language model corrects the target data field and / or calculation process information according to the correction action type and re-outputs a new structured reasoning argument data block; Repeat the above steps until the deterministic hard constraint verification passes.
[0023] Regarding the overall system architecture and data flow of this solution, such as Figure 2 As shown, the credit risk calibration system of the present invention includes at least a hard constraint rule base module, a rule validator, a structured feedback instruction generator, and a context hint injection module, and interacts with a large language model to complete the deterministic verification and calibration of credit risk indicators and their reasoning and argumentation processes.
[0024] For ease of description, this embodiment defines the data blocks flowing through the system as D1 to D4, where: D1 is the original input data block, which serves as the starting point for credit risk assessment. It includes enterprise operating information, financial data, business contracts and credit elements, asset or transaction elements, and externally disclosed information required to comply with regulatory rules.
[0025] D2 is a structured reasoning and argumentation data block, output by the large language model, which includes at least the credit risk indicator calculation results, input data fields used for calculation, calculation process information, and referenced rule identifiers.
[0026] D3 is a discretization error signal, output by the rule validator when hard constraint validation fails. It includes at least the violation rule identifier, violation type, and the located target data field.
[0027] D4 is a structured calibration instruction, generated by the structured feedback instruction generator and input into the contextual hints of the large language model for the next round of inference by the context hint injection module. It is used to drive the large language model to complete policy correction without updating model weights and output a new D2.
[0028] The construction and rule consistency verification of the Credit Risk Hard Constraint Rule Base (CRKB) for this scheme are as follows: (a) Data source restrictions and rule entry structure of CRKB In this implementation, the Hard Constraint Rule Base (CRKB) is used to construct and store hard constraint rule entries. The data source for the CRKB is strictly limited to publicly available, authoritative financial regulations or regulatory guidelines. These publicly available, authoritative financial regulations refer to regulations, standards, regulatory reporting standards, and official guidelines issued and effective by international or national-level official regulatory agencies, which have a hard binding force on financial institutions' risk management and financial reporting. Preferably, the final version with legal or regulatory effect is used. This limitation ensures the authority and auditability of the rule source and avoids relying on non-public, sensitive internal data for reinforcement learning-based fine-tuning of the model.
[0029] Each hard constraint rule entry must include at least a rule identifier, applicable conditions, constraint type, constraint expression, and definition of corrective action.
[0030] In one embodiment, the CRKB may include classification rule entries for debt category identification. For ease of illustration, an exemplary rule entry table of retail risk exposure classification rules is given below. This rule entry table is only used to illustrate the correspondence between rule identifiers, rule sources, applicable conditions, and binding actions in the CRKB, and does not constitute a limitation on the scope of rules applicable to this invention.
[0031] Table 1. Examples of Retail Risk Exposure Classification Rule Entries In this example, the rule validator Me can retrieve the corresponding rule entry based on the rule identifier referenced in D2 and perform deterministic classification verification on the asset class conclusion given by the large language model; when the classification result is inconsistent with the constraint action, it can output a discretized error signal D3 containing the violation rule identifier, violation type and target data field.
[0032] In one embodiment, to facilitate rule retrieval, rule referencing, version management, and audit trail recording, the rule identifier adopts a resolvable segmented encoding method. The segmented encoding method includes at least a rule source identifier, a business object identifier, and a sequence identifier; wherein, the rule source identifier is used to characterize the regulatory rule source or rule category to which the rule belongs, the business object identifier is used to characterize the credit risk indicator, asset category, or classification item corresponding to the rule, and the sequence identifier is used to distinguish different rule entries under the same rule source and the same business object. For example, for rule entries classified by expected credit loss stage, a rule identifier such as "IFRS9_STAGE_001" can be used; for rule entries calculating risk-weighted assets or determining risk weights, a rule identifier such as "BASEL_RWA_001" or "R_RW_001" can be used. When the large language model outputs the structured reasoning argument data block D2, it can carry the corresponding rule identifier in the calculation process information or reference information, so that the rule validator Me can retrieve the corresponding constraint expression according to the rule identifier and perform deterministic verification.
[0033] The applicable conditions consist of factual variables, logical relationships, and thresholds, describing the factual premises that trigger the rule. The constraint type distinguishes whether the rule belongs to a calculation formula constraint, threshold constraint, or classification boundary constraint. The constraint expression must be at least one of a calculation formula, threshold condition, or classification boundary condition. The corrective action definition must include at least the action type and action parameters. The action parameters must include at least the target data field identifier and the basis for correction, indicating which field should be corrected and on what basis when a violation occurs.
[0034] (II) Rule Consistency Verification and Conflict Resolution Before enabling CRKB, perform rule consistency checks on hard constraint rule entries. Rule consistency checks should include at least the following:
[0035] First, when the applicable conditions of any two hard constraint rule entries overlap, determine whether their correction action definition belongs to the preset set of conflicting action pairs; if so, prevent the rule base from being enabled, or mark the conflicting rules for subsequent rule governance.
[0036] Second, for two hard constraint rule entries with overlapping applicable conditions, if their constraint expressions give mutually exclusive compliance intervals for the same target data field, or give mutually exclusive classification conclusions, then they are determined to be rule conflicts, and a conflict flag is output.
[0037] In one implementation, when multiple hard constraint rule entries with overlapping applicable conditions originate from different regulatory documents, guidelines, or rule versions, the priority hard constraint rule entry can be further determined based on the rule source's validity level, publication time, effective status, or preset priority. The remaining rule entries not prioritized are marked as conflicting rules, rules awaiting review, or historical rules. The validity level can be determined based on the issuing agency level, document validity level, or rule version status. This approach ensures that only a unique verification basis and subsequent correction basis are generated under the same factual conditions, even when applicable conditions overlap but rule sources differ, thus avoiding ambiguity in calibration instructions due to coexisting rules.
[0038] In some implementations, rule consistency verification may further include non-contradiction verification and completeness checks to improve the usability of the rule set under complex and overlapping regulatory provisions; however, regardless of the consistency verification method used, the prerequisite requirement of passing verification before activation or completing conflict marking processing should be met.
[0039] Generation and field requirements of data block D2 in structured reasoning argumentation (a) The minimum set of fields in D2 When the large language model outputs the structured reasoning argument data block D2, it should contain at least the following information: First, the calculation results of credit risk indicators are used to provide numerical or classification conclusions for the target indicators.
[0040] Second, the input data fields used for calculation are the D1 field or derived fields used to identify the indicators involved in the calculation and classification.
[0041] Third, the calculation process information describes the step-by-step path of indicator calculation and classification judgment, and forms a corresponding relationship with the referenced rule identifiers.
[0042] Fourth, the referenced rule identifiers are used to indicate the hard constraint rule entries that the large language model relies on during computation or classification.
[0043] (ii) Intermediate variables and stepwise positioning information In one implementation, D2 further includes at least one intermediate variable and its value, and the calculation process information includes at least the source field or calculation path of the intermediate variable, to support the step-by-step location of the consistency verification of the calculation formula. With this design, when subsequent inconsistencies in the calculation formula occur, the rule validator can locate the input field, risk weight selection, and formula substitution steps leading to the deviation along the intermediate variable path, thereby outputting a target data field that can be directly used for correction.
[0044] The deterministic hard constraint verification content for the rule validator Me in this scheme is as follows: (I) Verification Types and General Principles The rule validator Me receives the D2 output from the large language model and performs deterministic hard constraint verification based on CRKB. The hard constraint verification includes at least consistency verification of the calculation formula and compliance verification of thresholds or classification boundaries. Me can be implemented using a combination of formal verification and symbolic computation to ensure that the verification process yields repeatable deterministic results for the same input and meets the traceability requirements of regulatory indicator calculations.
[0045] (ii) Consistency verification of calculation formula The consistency verification of the calculation formula includes the following process.
[0046] First, based on the rule identifier referenced in D2, retrieve the corresponding constraint expression in CRKB and determine the set of input fields corresponding to the constraint expression.
[0047] Second, based on the input data field in D2, extract the corresponding value from D1, or generate derived values according to the calculation path, and perform deterministic recalculation on the constraint expression to obtain the recalculation result.
[0048] Third, the recalculated result is compared with the credit risk indicator calculation result in D2; when the difference exceeds the preset tolerance, it is determined that the calculation formula is inconsistent and the verification fails. The preset tolerance is used to cover the machine's precision tolerance error and the slight deviation caused by the data rounding rules, thereby avoiding unnecessary false alarms.
[0049] (iii) Compliance verification of thresholds or classification boundaries The compliance verification of thresholds or classification boundaries includes the following process.
[0050] First, based on the rule identifiers referenced in D2, retrieve the corresponding threshold conditions or classification boundary conditions in CRKB.
[0051] Second, determine whether the calculated credit risk indicators of D2 fall within the compliance range or meet the classification boundaries.
[0052] Third, if the conditions are not met, it is determined to be a threshold violation or a classification boundary violation, and a verification failure is triggered.
[0053] In some implementations, Me can also perform deterministic checks on the consistency of legal citations and logical contradictions in the reasoning chain to improve the stability of the reasoning and argumentation process, but without affecting the aforementioned mandatory verification items.
[0054] Generation and field composition of discretized error signal D3 When the deterministic hard constraint verification of Me fails, a discretization error signal D3 is output. D3 includes at least the violation rule identifier, the violation type, and the located target data field.
[0055] The violation rule identifier uniquely indicates the hard constraint rule entry that has been violated. The violation type distinguishes between inconsistencies in calculation formulas, threshold violations, classification boundary violations, etc. The target data field indicates the field from which subsequent corrective actions should be taken.
[0056] The target data fields can be determined as follows: based on the D2 input field list, calculation path, and intermediate variable links, locate the fields most likely to cause violations, such as risk weight fields, asset classification fields, stage classification fields, indicator calculation result fields, and key derived variable fields, thereby ensuring the executability and auditability of subsequent calibration instructions.
[0057] The one-to-one mapping between the structured feedback instruction generator Msr and the error-to-action in this scheme is as follows: (a) Deterministic constraints on mapping relations The structured feedback instruction generator Msr is used to deterministically convert discretized error signals into structured calibration instructions based on a preset error-to-action mapping relationship. The error-to-action mapping relationship satisfies a one-to-one deterministic constraint, ensuring that any combination of violation rule identifier and violation type corresponds to only one unique combination of correction action type and target data field. This avoids semantic ambiguity caused by free text feedback and makes the calibration process reusable and predictable.
[0058] (ii) Mapping implementation based on deterministic state transition In one implementation, Msr employs a mapping function based on the principle of deterministic finite state automata to achieve the aforementioned one-to-one mapping. Its input state consists of a violation rule identifier and a violation type, and its output is a correction action type and a target data field. Since the deterministic state transition produces only a unique output for any given input state, it ensures that the transition from D3 to D4 does not introduce an uncertain interpretation space.
[0059] In one embodiment, the error-to-action mapping relationship can be implemented through a preset state transition table. The state transition table takes at least a combination of violation rule identifier and violation type as input, and a combination of correction action type, target data field, and correction basis as its unique output; wherein, the violation type includes at least inconsistent calculation formulas, threshold violations, and classification boundary violations. For inconsistent calculation formula types, the state transition table can map them to recalculation or rule verification actions; for threshold violations or classification boundary violations, the state transition table can map them to reclassification or focusing on specified fields actions. Through the preset state transition table, the discretized error signal D3 can be stably converted into structured calibration instructions D4 without relying on free text interpretation, thereby improving the repeatability and executability of the calibration process.
[0060] (III) Set of Corrective Action Types The corrective action type is limited to a preset action set, which includes at least focusing on a specified field, ignoring a specified field, reclassifying, verifying against rules, and recalculating.
[0061] Focusing on a specified field instructs the large language model to prioritize examining that specific field and its source link in the next round of inference. Ignoring a specified field requires excluding incorrectly referenced or inapplicable fields. Reclassifying requires reclassifying the data according to the classification boundaries. Verifying against rules requires checking the calculation or classification basis item by item according to the rule entries. Recalculating requires recalculating the indicators according to the constraint expressions of the rules and replacing inconsistent results.
[0062] The structure and context hints for injecting the structured calibration instruction D4 in this scheme are as follows: (a) Field composition of D4 The structured calibration instruction D4 is represented using key-value pairs of structured data. D4 includes at least the following fields.
[0063] First, the instruction identifier, which is used to uniquely identify this calibration instruction.
[0064] Second, the violation information field includes at least the violation rule identifier, violation type, and error location feature; the error location feature is used to describe the target data field that is located and its position in the calculation path.
[0065] Third, the correction action field should include at least the correction action type, target data field, and correction basis; the correction basis is used to describe the rule entries, constraint expressions, or threshold conditions that should be used.
[0066] Fourth, the contextual hint flag field is used to indicate the priority or mandatory nature of the calibration instruction in the next round of inference, so that the large language model prioritizes meeting the calibration constraints during the generation process.
[0067] Fifth, the status and time fields are used to record the generation time and execution status of the calibration instruction, which facilitates the formation of a calibration audit chain.
[0068] (ii) Contextual hint injection and non-weight update strategy correction The contextual cue injection module is used to input D4 as contextual cue information for the next round of inference in the large language model, thereby driving the large language model to perform non-weight update-based policy correction. Specifically, after D4 enters the model input as a mandatory contextual cue, it can constrain the inference path during the next generation process through the model's contextual learning ability and attention mechanism, without having to update the model weights through backpropagation, thus meeting the requirements of data security and model controllability in financial scenarios.
[0069] The iterative calibration process for this scheme is as follows: Based on the above modules and data flow, the method flow of the present invention can be implemented according to the following steps.
[0070] Step 1: Construct a Credit Risk Hard Constraint Rule Base (CRKB). The rule base contains several hard constraint rule entries, and the rule entries are stored in a structured manner.
[0071] Step 2: Before enabling the rule base, perform rule consistency checks on hard constraint rule entries; if there are conflicting action pairs, mutually exclusive compliance ranges, or mutually exclusive classification conclusions, prevent enabling, or output conflict flags and perform governance.
[0072] Step 3: Receive the structured reasoning argument data block D2 output by the large language model; D2 includes at least the credit risk indicator calculation result, input data fields, calculation process information, and referenced rule identifiers; in one embodiment, D2 further includes intermediate variables and their source fields or calculation paths.
[0073] Step four: The rule validator Me performs deterministic hard constraint verification on D2 based on the rule base. The hard constraint verification includes at least the consistency verification of the calculation formula and the compliance verification of the threshold or classification boundary.
[0074] Step 5: When the verification fails, Me outputs a discretized error signal D3; D3 includes at least the violation rule identifier, violation type, and the located target data field.
[0075] Step six: The structured feedback instruction generator Msr converts D3 into structured calibration instruction D4 based on the preset error-to-action mapping relationship; D4 includes at least the correction action type and target data field, and satisfies one-to-one deterministic constraints.
[0076] Step 7: Use D4 as the contextual cue for the next round of reasoning in the large language model, so that the large language model can correct the target data field and its calculation process information according to the type of correction action, and output a new D2.
[0077] Step 8: Repeat steps 4 through 7 until the deterministic hard constraint verification passes.
[0078] In one embodiment, to control the number of iterations and meet the timeliness requirements of business processing, a preset iteration limit can be set for the repeated execution of steps four to seven. When the deterministic hard constraint verification is still not passed even after reaching the preset iteration limit, the system outputs a failed status and retains the most recent structured reasoning argument data block D2, discretization error signal D3, and structured calibration instruction D4 for manual review, abnormal data investigation, or subsequent rule maintenance. By setting a preset iteration limit and retaining calibration process data, invalid repeated iterations under abnormal input conditions can be avoided, and a complete review and traceability chain can be formed.
[0079] In addition, this solution proposes the following specific embodiments: (I) Example 1: Consistency calibration of the calculation formula for risk-weighted asset RWA In this embodiment, CRKB contains hard constraint rule entries related to the calculation of risk-weighted assets. Each rule entry includes at least a rule identifier, applicable conditions, constraint type, constraint expression in the form of a calculation formula, and a definition of corrective actions. The large language model outputs D2 based on D1, providing the risk-weighted asset calculation result, input fields, calculation process, and referencing the corresponding rule identifier in D2.
[0080] The rule validator Me retrieves the corresponding calculation formula constraint expression from CRKB based on the referenced rule identifier, performs deterministic recalculation on the input field of D2, obtains the recalculation result, and compares the recalculation result with the calculation result of D2.
[0081] Table 2 Risk Weight Mapping Table In one implementation, for scenarios where risk weights are not calculated directly by a single formula but need to be determined based on a preset interval mapping relationship, the CRKB may also include risk weight mapping rule entries. The following provides an example of a set of risk weight mapping rule entries based on the loan-to-value ratio. The rule validator Me can perform deterministic verification or recalculation of the risk weight field based on the mapping relationship.
[0082] When the value of the judgment parameter given in D2 falls into a certain preset range, but the risk weight field does not output the risk weight value corresponding to that range, the rule validator Me can determine that the calculation formula is inconsistent or the rule application is inconsistent based on the corresponding rule entry, and output the corresponding discretization error signal D3; the structured feedback instruction generator Msr further generates a structured calibration instruction D4 for recalculation or rule verification.
[0083] When the difference exceeds the preset tolerance, Me determines that the calculation formula is inconsistent and outputs D3; D3 includes the violation rule identifier, the violation type of the inconsistent calculation formula, and the located target data field. The target data field may include the risk weight field, the asset classification field, and the risk-weighted asset result field.
[0084] After receiving D3, the structured feedback instruction generator Msr determines the output D4 based on the preset one-to-one mapping relationship. The correction action type of D4 is recalculation or rule verification, the target data field is the located field, and the correction basis is the calculation formula and risk weight selection constraint of the corresponding rule in CRKB.
[0085] For example, in a mortgage loan risk exposure scenario, the CRKB can pre-store mapping rule entries between loan-to-value ratio ranges and risk weights. When D2 shows a high loan-to-value ratio but the corresponding risk weight still uses a low value, the rule validator Me can perform deterministic verification of the risk weight field based on the rule entry corresponding to the current loan-to-value ratio range. If the verification result shows that the current risk weight field is inconsistent with the mapping rule entry, then D3 records the corresponding violation rule identifier, the type of violation (inconsistent calculation formula or rule application), and the located risk weight field. Msr then generates a recalculation or rule verification instruction for the risk weight field to drive the large language model to correct the risk weight selection and related calculation process in the next round of inference.
[0086] The mapping relationship between the loan value ratio and the risk weight can be given by a preset lookup table, where different loan value ratio ranges in the preset lookup table correspond to different risk weight values. In specific implementation, the mapping relationship can be written into the constraint expression of the rule entry, or stored in the CRKB as a lookup table entry corresponding to the rule number.
[0087] The context hint injection module injects D4 into the next round of inference context of the large language model. Based on this, the large language model corrects the risk weight selection or calculation process and re-outputs D2. The system repeats the verification until it passes, thereby achieving deterministic calibration of errors in the calculation of risk-weighted assets.
[0088] (II) Example 2: Threshold or Classification Boundary Calibration of Expected Credit Loss (ECL) In this embodiment, CRKB includes hard constraint rule entries related to the expected credit loss stage classification. These rule entries use threshold conditions or classification boundary conditions as constraint expressions, and the correction action definition specifies actions such as reclassification or focusing on designated fields. The large language model outputs D2 based on D1, providing the stage classification conclusion and its basis, and referencing the corresponding rule identifiers.
[0089] The rule validator Me retrieves the corresponding threshold conditions or classification boundary conditions in CRKB based on the referenced rule identifier, and makes a deterministic compliance determination on the stage classification conclusion of D2.
[0090] To facilitate the explanation of the threshold conditions or classification boundary conditions related to the expected credit loss stage classification, a set of stage transition rule entries are provided below. These rule entry examples illustrate the correspondence between rule identifiers, decision dimensions, classification boundary conditions, and enforcement objectives. The rule validator Me can use these rule entries to make a deterministic compliance determination on the stage classification conclusion in D2.
[0091] Table 3 Examples of Expected Credit Loss Phase Transfer Rule Entries When the overdue days number field or default status field in D2 meets the above classification boundary conditions, but the stage classification field does not output the corresponding target stage, the rule validator Me determines that the classification boundary is violated, and the structured feedback instruction generator Msr generates a structured calibration instruction D4 for reclassifying the stage classification field or focusing on the specified field.
[0092] When the threshold condition or classification boundary condition is not met, Me outputs D3; D3 must at least contain the violation rule identifier, the violation type (threshold violation or classification boundary violation), and the located target data field. The target data field may include the stage classification field, the number of overdue days field, and the key field that triggers the judgment of a significant increase in credit risk.
[0093] Msr generates D4 based on a one-to-one mapping relationship; the correction action type of D4 is reclassification or focusing on a specified field, the target data field is the stage classification field and its key basis field, and the correction basis is the threshold condition or classification boundary condition of the corresponding rule in CRKB.
[0094] For example, when the overdue days number field recorded in D2 indicates that the target asset has exceeded the preset stage classification threshold, but the stage classification conclusion remains in the low-risk stage, the rule validator Me can perform a deterministic compliance judgment on the stage classification field based on the stage classification rule entries in CRKB corresponding to the overdue days. If the judgment result shows that the stage classification conclusion is inconsistent with the classification boundary conditions, the corresponding violation rule identifier, the violation type of the classification boundary violation, and the target data fields such as the stage classification field and the overdue days number field are recorded in D3. Msr generates a structured calibration instruction to reclassify or focus on the specified field, so that the large language model can recheck the correspondence between the overdue days number field and the stage classification in the next round of inference and output the updated stage classification conclusion and its reasoning and argumentation process.
[0095] In one embodiment, the stage classification rule entry can be further defined as follows: when the overdue days number field meets the preset stage conversion condition, a re-determination of the stage classification field is triggered accordingly; wherein, the preset stage conversion condition can be represented by a threshold condition, an interval boundary condition, or a rule entry reference method.
[0096] The contextual hint injection module uses D4 as mandatory contextual input. Based on this, the large language model re-verifies the threshold conditions and adjusts the stage classification conclusions and reasoning processes, outputting a new D2. The system repeats the verification until it passes, thereby achieving deterministic calibration of the expected credit loss classification boundary violation.
[0097] System implementation method and computer-readable storage medium implementation method (I) System Implementation A credit risk calibration system includes a hard constraint rule base module, a rule validator, a structured feedback instruction generator, and a contextual hint injection module. The hard constraint rule base module constructs and stores hard constraint rule entries and triggers rule consistency checks before activation. The rule validator receives structured reasoning argument data blocks output by a large language model and performs consistency checks on calculation formulas and compliance checks on thresholds or classification boundaries based on the hard constraint rule base, outputting a discretized error signal when checks fail. The structured feedback instruction generator deterministically converts the discretized error signal into structured calibration instructions based on a preset error-to-action mapping relationship. The contextual hint injection module inputs the structured calibration instructions as contextual hints for the next round of reasoning into the large language model, driving the model to perform non-weighted update-based policy correction.
[0098] (II) Implementation Method of Computer-Readable Storage Medium A computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the above-described credit risk calibration method, including rule base construction and consistency verification, receiving structured reasoning argument data blocks, deterministic hard constraint verification, outputting discretized error signals, generating structured calibration instructions, injecting contextual hints, and iterating until the verification passes.
[0099] Example 3: Automatic Generation and Calibration of Credit Risk Indicators for Regulatory Reporting and Internal Risk Control Review In a practical application scenario, financial institutions' risk management systems need to periodically generate regulatory reports and internal risk control review materials related to credit risk, such as risk-weighted assets, expected credit losses, stage classification conclusions, and their supporting explanations. Due to the diverse sources of original business data, inconsistent field definitions, and the rigid constraints imposed by regulatory standards on calculation formulas, threshold boundaries, and classification rules, relying solely on manual review or the free generation of large language models can easily lead to problems such as incorrect substitution of calculation formulas, incorrect application of threshold trigger conditions, inconsistent classification boundaries, and inconsistencies between the reasoning process and the results. This results in high review costs, poor traceability, and may trigger inconsistencies in the reports.
[0100] In this embodiment, the risk management system first structures and organizes the credit ledger, contract elements, repayment and overdue records, collateral and guarantee elements, financial and operational data, and externally disclosed information required for compliance with regulatory rules within the period, forming the original input data block D1. D1 is then provided to the large language model to output the structured reasoning and argumentation data block D2. D2 at least includes the credit risk indicator calculation results, input data fields used for calculation, calculation process information, and referenced rule identifiers. In one embodiment, D2 further includes intermediate variables and their source fields or calculation paths to enable step-by-step location during subsequent verification.
[0101] Subsequently, the rule validator Me performs deterministic hard constraint verification on D2 based on the Credit Risk Hard Constraint Rule Base (CRKB). This verification includes at least two types: first, a calculation formula consistency verification, where Me retrieves the calculation formula constraint expression from the CRKB based on the rule identifier referenced by D2, and performs deterministic recalculation on the input fields in D2. The recalculation result is compared with the indicator result in D2; if the difference exceeds a preset tolerance, it is determined that the calculation formula is inconsistent. Second, a threshold or classification boundary compliance verification, where Me performs deterministic judgment on the indicator result and classification conclusion of D2 based on the threshold conditions or classification boundary conditions in the CRKB; if these conditions are not met, it is determined that the threshold violation or classification boundary violation occurs.
[0102] When the above verification fails, Me outputs a discretized error signal D3. D3 includes at least the violation rule identifier, violation type, and the located target data field. The structured feedback instruction generator Msr receives D3 and generates a structured calibration instruction D4 based on a preset one-to-one error-to-action mapping. D4 includes at least the correction action type and the target data field, where the correction action type is limited to focusing on a specified field, ignoring a specified field, reclassifying, verifying against rules, and recalculating. The context hint injection module inputs D4 as a mandatory context hint for the next round of inference into the large language model, causing the large language model to correct the target data field and its calculation process information according to the correction action, and outputs a new D2. The system repeatedly executes deterministic hard constraint verification and calibration instruction injection until the verification passes. Afterward, the finally verified D2 is written to the report generation module or the review and auditing module to form verifiable and traceable indicator results and supporting materials.
[0103] In one embodiment, the report generation module or the review and record module can also associate and save the correspondence between the rule identifiers used in this calibration process, the triggered violation types, the generated structured calibration instructions, and the final verified indicator results, to form a calibration record for report review, internal inspection, or subsequent rule maintenance. The calibration record can be used to trace the complete processing path of a credit risk indicator from the initial structured reasoning and argumentation data block D2, the discretized error signal D3, the structured calibration instruction D4 to the final verified result, thereby further improving the traceability and auditing convenience of the system output.
[0104] In one embodiment, the calibration record may further include rule version information, calibration time information, execution status information, and review conclusion information, so as to perform difference comparison and historical tracking under different reporting cycles, different rule versions, or different business standards.
[0105] As can be seen from the above scenario-based implementation, this invention addresses technical problems such as inconsistencies in calculations, non-compliance of thresholds and classification boundaries, and untraceable reasoning and argumentation in the credit risk indicator generation process. It adopts a technical approach where CRKB provides machine-readable hard constraints, Me performs deterministic recalculation and compliance judgment, and Msr generates one-to-one structured calibration instructions and injects them through contextual hints to achieve iterative calibration. This ensures that the output results meet hard constraint rules, the verification process is repeatable, errors are locatable, and calibration is auditable, thereby significantly reducing the intensity of manual review and improving the consistency and reliability of reports and review materials.
[0106] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A credit risk calibration method, characterized in that, include: A hard constraint rule base for credit risk is constructed, which contains several hard constraint rule entries; wherein each hard constraint rule entry includes at least: rule identifier, applicable conditions, constraint type, constraint expression, and definition of correction action; the constraint expression is at least one of the following: calculation formula, threshold condition, or classification boundary condition; Before enabling the rule base, a rule consistency check is performed on the hard constraint rule entries. The rule consistency check includes at least the following: when the applicable conditions of any two hard constraint rule entries overlap, it is determined whether their correction action definition belongs to a preset set of conflicting action pairs; if so, the rule base is prevented from being enabled or the conflicting rules are marked. The system receives a structured reasoning and argumentation data block output by a large language model. The structured reasoning and argumentation data block includes at least: the calculation result of the credit risk index, the input data fields used for calculation, the calculation process information, and the rule identifiers referenced. The rule validator performs deterministic hard constraint validation on the structured reasoning and argumentation data block based on the rule base. The hard constraint validation includes at least the consistency validation of the calculation formula and the compliance validation of the threshold or classification boundary. When the validation fails, a discretized error signal is output. The discretized error signal includes at least the following: violation rule identifier, violation type, and the located target data field. The structured feedback instruction generator converts the discretized error signal into a structured calibration instruction based on a preset error-to-action mapping relationship. The structured calibration instruction includes at least a correction action type and a target data field. The structured calibration instruction is used as the contextual prompt information input for the next round of reasoning of the large language model, so that the large language model corrects the target data field and / or calculation process information according to the correction action type and re-outputs a new structured reasoning argument data block; Repeat the above steps until the deterministic hard constraint verification passes.
2. The credit risk calibration method according to claim 1, characterized in that, The structured reasoning argument data block includes at least one intermediate variable and its value, and the calculation process information includes at least the source field or calculation path of the intermediate variable, which is used to support the step-by-step location of the consistency verification of the calculation formula.
3. The credit risk calibration method according to claim 1, characterized in that, The applicable conditions of the hard constraint rule entries consist of factual variables, logical relationships, and thresholds; the definition of the correction action includes at least the action type and action parameters, wherein the action parameters include at least the target data field identifier and the basis for correction.
4. The credit risk calibration method according to claim 1, characterized in that, The rule consistency verification further includes: for two hard constraint rule entries with overlapping applicable conditions, if their constraint expressions give mutually exclusive compliance intervals or mutually exclusive classification conclusions for the same target data field, then they are determined to be rule conflicts and a conflict flag is output.
5. The credit risk calibration method according to claim 1, characterized in that, The consistency verification of the calculation formula includes: performing deterministic recalculation on the input data field based on the constraint expression corresponding to the referenced rule identifier in the rule base to obtain the recalculation result; comparing the recalculation result with the calculation result of the credit risk indicator; and outputting the violation type of the inconsistent calculation formula when the difference exceeds the preset tolerance.
6. The credit risk calibration method according to claim 1, characterized in that, The threshold or classification boundary compliance verification includes: determining whether the credit risk indicator calculation result falls within the compliance range or meets the classification boundary based on the threshold condition or classification boundary condition corresponding to the referenced rule identifier in the rule base; when it does not meet the requirement, outputting the violation type of the threshold violation or classification boundary violation type.
7. The credit risk calibration method according to claim 1, characterized in that, The error-to-action mapping relationship satisfies a one-to-one deterministic constraint, such that any combination of violation rule identifier and violation type corresponds to only a unique combination of correction action type and target data field.
8. The credit risk calibration method according to claim 1, characterized in that, The structured calibration instructions are represented using key-value pairs of structured data, and include at least: Instruction identifier; The violation information field includes at least the violation rule identifier, violation type, and error location feature; The correction action field includes at least the correction action type, the target data field, and the basis for correction. A contextual hint flag field is used to indicate the priority or mandatory nature of the structured calibration instruction in the next round of inference; The status and time fields are used to record the generation time and execution status of the structured calibration instructions; The corrective action type is limited to a preset action set, which includes at least: focusing on a specified field, ignoring a specified field, reclassifying, verifying against rules, and recalculating.
9. A credit risk calibration system, characterized in that, include: The hard constraint rule library module is used to build and store hard constraint rule entries and trigger rule consistency checks before activation; The rule validator is used to receive the structured reasoning argument data blocks output by the large language model, and perform consistency verification of the calculation formula and compliance verification of the threshold or classification boundary based on the hard constraint rule base. When the verification fails, it outputs a discretized error signal. The structured feedback instruction generator is used to deterministically convert discretized error signals into structured calibration instructions based on a preset error-to-action mapping relationship. The context hint injection module is used to input structured calibration instructions as context hints for the next round of inference into the large language model, so as to drive the large language model to perform non-weight update-style policy correction.
10. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method of any one of claims 1 to 8.