A method for constructing a prompt word of a large model in a financial credit field based on a ReAct theory
By constructing a large-scale model prompt word based on ReAct theory in the field of financial credit, the problem of traditional prompt words being unable to identify implicit logic is solved, achieving more accurate decision support and risk control capabilities, and adapting to rapid response in complex financial scenarios.
Patent Information
- Application Number
- CN202510824944.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2045-06-19
AI Technical Summary
Traditional financial credit prompt generation methods cannot identify the implicit logic in business statements, leading to inaccurate decision-making, semantic misunderstanding, and an inability to meet the needs of complex semantic relationships.
We adopt a method for constructing prompt words for a large model in the financial credit field based on ReAct theory. By defining a dynamic prompt word generation model and binding it to a structured credit knowledge graph, we receive original business questions, scenario tags and real-time data to generate compound keywords. We then make implicit logic explicit by combining the credit knowledge graph to generate a reasoning chain. We also use tools to obtain real-time data and optimize the prompt word weight allocation strategy to form a closed-loop system.
It improves the accuracy of prompts, reduces manual intervention, enhances risk control capabilities, shortens pre-loan investigation time, improves the coverage of risk indicators and the accuracy of decision-making, reduces the non-performing loan rate, and supports the rapid iteration of new business scenarios.
Smart Images

Figure CN120874783B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of financial credit business processing interaction platforms, and in particular to a method for constructing prompt words for a large model in the financial credit field based on ReAct theory. Background Technology
[0002] In financial lending business processing interaction platforms, traditional prompt word technology, as a key medium for human-machine collaboration, undertakes the core function of transforming business needs into machine-executable instructions, and its core significance lies in establishing standardized operating paradigms. For example, when a loan officer inputs a business instruction such as "assess the credit risk of manufacturing enterprises," the system triggers data queries and rule matching operations through preset prompt words, reducing the complexity of manual operations. For instance, a bank's lending system uses dual-label prompt words of "customer type + business stage" (such as "micro and small enterprises - pre-loan approval") to automatically load basic data collection templates. However, such prompt words can only achieve shallow intent mapping and cannot resolve complex semantic relationships in business scenarios, such as the difference in legal effect between "joint and several liability guarantee" and "general guarantee" in contract terms, or the implicit transmission path of risks associated with the actual controller of an enterprise among group customers.
[0003] Currently, the generation methods for prompt words in related technologies mainly rely on manual rule configuration and template engine-driven approaches. A typical implementation path involves two levels: first, business experts compile a rule base based on historical experience (e.g., "IF Industry = Real Estate THEN prompt: Supplement Collateral Valuation Report"), and then a template engine replaces placeholders with real-time parameters. For example, a credit system uses the Velocity template language to build a prompt word framework. When a user selects the "Supply Chain Finance" scenario, it automatically fills in variables such as "{Core Enterprise Name}, {Payment Period Days}" to generate a complete prompt.
[0004] However, traditional keyword matching mechanisms struggle to identify implicit logic in business statements. For example, "customer revenue has continued to grow over the past three years" may only trigger financial data analysis in traditional prompts, but in reality, it is necessary to combine industry cycles to judge the sustainability of growth (e.g., revenue growth during a period of overcapacity in the photovoltaic industry may be accompanied by accounts receivable risk). This method's semantic understanding bias leads to inaccurate decision-making. Summary of the Invention
[0005] This application provides a method for constructing prompt words for a large model in the financial credit field based on ReAct theory, which can solve the technical problem of prompt word errors caused by semantic understanding bias in related technologies.
[0006] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:
[0007] Firstly, embodiments of this application provide a method for constructing prompt words for a large-scale model in the financial credit field based on ReAct theory. This method includes: defining the roles and capability boundaries of a dynamic prompt word generation model, and binding it to a structured credit knowledge graph; the credit knowledge graph includes industry risk indicators, risk control rules, regulatory policy entity nodes, and related relationships; receiving original business questions, scenario tags, and real-time data; the original business questions include enterprise credit rating assessment requests; scenario tags include combinations of business stages, enterprise types, and loan types; real-time data includes enterprise financial reports, credit reports, and industry risk indices; inputting the original business questions, scenario tags, and real-time data into the dynamic prompt word generation model to obtain at least one first keyword; and matching the first keyword with the relevant information in the credit knowledge graph. Entity nodes related to keywords generate keyword entity association results; based on scenario tags, a preset process template is invoked to generate an inference chain containing at least one inference layer node; judgment conditions are inserted into each inference layer node: judgment conditions are generated based on the category of real-time data and keyword entity association results; the judgment conditions are in the form of logical expressions; tool call instructions are bound to action layer nodes, and the tool call instructions are associated with external data interfaces or analysis modules; by executing the tool call instructions, external data is obtained and backfilled into the inference chain to obtain backfilled data; the inference chain is executed based on the backfilled data to output business results; based on the business results, the prompt word weight allocation strategy is optimized through reinforcement learning combined with credit expert labeled data to improve the priority weight of prompt words in key risk control links.
[0008] Based on the above description of the method for constructing prompt words for a large-scale financial credit model based on ReAct theory provided in this application embodiment, it can be seen that this method includes a dynamic prompt word generation model that receives original business questions, scenario tags (business stage / enterprise type / loan type), and real-time data (financial reports / credit reports / industry indices) to generate composite primary keywords, breaking through the isolation of traditional keywords. Combined with a credit knowledge graph (entity associations of industry risk indicators, risk control rules, and regulatory policies), the keywords are mapped to a structured semantic network, making implicit logic explicit (e.g., automatically associating "revenue growth" with the "industry cycle risk" node), eliminating contextual ambiguity in business statements. A scalable inference chain is generated based on a preset process template invoked by scene tags. A two-layer mechanism ensures decision adaptability: logical expressions based on real-time data categories and graph association results are inserted into the inference layer nodes (e.g., IF industry risk index > threshold THEN triggers risk control rules), enabling dynamic jumps in conditional branches; and external interface tools are bound to the action layer nodes to acquire and backfill multi-source data in real time (e.g., credit reporting interface verifies accounts receivable), giving the inference chain real-time evidence-driven capabilities. After outputting business results, reinforcement learning combined with expert-annotated data optimizes the prompt word weight allocation strategy, forming a self-iterative risk control model. The prompt word weights for key risk control links (e.g., industry risk verification) are dynamically increased, ensuring that subsequent similar requests trigger deep verification first. The entity associations in the knowledge graph are continuously corrected with decision feedback, enhancing coverage of emerging risk patterns (e.g., policy mutation transmission chains). This upgrades static rule matching to a closed-loop system of "semantic understanding - graph association - real-time inference - feedback optimization," solving decision biases caused by neglecting implicit logic (e.g., industry cycle constraints on financial indicators) in traditional methods and improving the accuracy of prompt words.
[0009] Furthermore, by automating the inference chain and utilizing tools, manual intervention is reduced while ensuring in-depth analysis of key risk control nodes. A weighted optimization mechanism based on business result feedback ensures the model continuously converges to the optimal decision path, forming a strong competitive advantage in risk control. Risk control efficiency is improved, with pre-loan investigation time shortened by 40% and risk indicator coverage increased from 65% to 92%. Decision accuracy is enhanced, with structured inference reducing human error, fraud detection rate improved by 35%, and non-performing loan rate decreased by 2.1 percentage points. Business adaptability is flexible, supporting rapid iteration of prompt word templates, shortening the launch cycle for new business scenarios (such as green finance loans) from 2 weeks to 48 hours.
[0010] In the feasible implementation of the first aspect, after executing the step of binding the tool call instruction to the action layer node and associating the tool call instruction with the external data interface or analysis module; before executing the step of obtaining external data by executing the tool call instruction and backfilling it into the inference chain to obtain the backfilled data; the method for constructing prompt words for a large model in the financial credit field based on ReAct theory also includes: the dynamic prompt word generation model determines whether a tool call is needed based on the current inference state; if no tool call is needed, the business result is directly output.
[0011] In the feasible implementation of the first aspect, when executing the step of calling a preset process template based on the scene label to generate an inference chain containing at least one inference layer node, the method for constructing prompt words for a large model in the financial credit field based on ReAct theory also includes: confirming the scene classification result based on the scene label; and calling the preset process template based on the scene classification result.
[0012] In the feasible implementation of the first aspect, when executing the step of calling a preset process template based on the scenario label to generate an inference chain containing at least one inference layer node, the method for constructing prompt words for a large model in the financial credit field based on ReAct theory also includes: guiding the dynamic prompt word generation model to gradually deduce conclusions based on the credit business logic to obtain the inference chain; the credit business logic includes four elements of risk assessment, namely borrower, purpose, source of repayment and guarantee.
[0013] In the feasible implementation of the first aspect, when performing the steps of defining the roles and capability boundaries of the dynamic prompt word generation model and binding the structured credit knowledge graph, the financial credit domain large model prompt word construction method based on ReAct theory also includes: defining the roles of the dynamic prompt word generation model by defining the large model role description text; initializing capability boundary parameters to define the capability boundaries of the dynamic prompt word generation model; the initialization capability boundary parameters include regulatory rule access permission identifiers and industry risk indicator database interface addresses.
[0014] In the feasible implementation of the first aspect, when executing the step of binding tool call instructions to action layer nodes, the method for constructing prompt words for large models in the financial credit field based on ReAct theory also includes: monitoring abnormal indicators of business results; if the abnormal indicators exceed a preset threshold, dynamically adjusting at least one adjustment indicator; the adjustment indicators include adding or deleting inference layer nodes in the inference chain, updating tool binding relationships in the action layer, or modifying capability boundary parameters.
[0015] In the feasible implementation of the first aspect, the method for constructing prompt words for a large model in the financial credit field based on ReAct theory also includes: configuring a tool call interface for the tool call instruction; the tool call interface includes an internal business system interface and an external data source interface; executing the tool call instruction and backfilling the response data into the inference chain in a structured manner.
[0016] In the feasible implementation of the first aspect, the method for constructing prompt words for a large model in the financial credit field based on ReAct theory also includes: loading a preset prompt chain template according to the business type and initializing a dynamic variable pool; the preset prompt chain template is an inference chain; when the prompt word contains a data interface call instruction for the tool call interface, accessing the target system through a pre-configured interface key and authentication protocol to obtain the tool response data; when the prompt word contains logical judgment conditions, extracting the corresponding parameters from the dynamic variable pool to perform condition calculations and obtaining the condition calculation results; writing the tool response data or condition calculation results into the dynamic variable pool; generating a structured report, which includes a report framework generated by matching the regulatory clause library, key data injected into the dynamic variable pool, and decision recommendations.
[0017] Secondly, embodiments of this application provide a large-scale model prompt word construction system for the financial credit field based on ReAct theory. The large-scale model prompt word construction system for the financial credit field based on ReAct theory includes: at least one processor; a memory communicatively connected to at least one processor; wherein the memory stores instructions executable by at least one processor, and the instructions are executed by at least one processor to enable at least one processor to execute the method provided in the first aspect.
[0018] This upgrades static rule matching to a closed-loop system of "semantic understanding - graph association - real-time reasoning - feedback optimization," addressing decision-making biases caused by traditional methods neglecting implicit logic (such as the constraints of industry cycles on financial indicators) and improving the accuracy of prompts. Furthermore, the automated execution of the reasoning chain and tool invocation reduce manual intervention while ensuring in-depth analysis of key risk control nodes. A weight optimization mechanism based on business result feedback ensures the model continuously converges to the optimal decision path, forming a strong competitive advantage in risk control.
[0019] Thirdly, embodiments of this application provide a computer-readable medium having computer program instructions stored thereon, which can be executed by a processor to implement the method provided in the first aspect.
[0020] This upgrades static rule matching to a closed-loop system of "semantic understanding - graph association - real-time reasoning - feedback optimization," addressing decision-making biases caused by traditional methods neglecting implicit logic (such as the constraints of industry cycles on financial indicators) and improving the accuracy of prompts. Furthermore, the automated execution of the reasoning chain and tool invocation reduce manual intervention while ensuring in-depth analysis of key risk control nodes. A weight optimization mechanism based on business result feedback ensures the model continuously converges to the optimal decision path, forming a strong competitive advantage in risk control. Attached Figure Description
[0021] Figure 1 A schematic diagram of the structure of a large model prompt word construction system in the financial credit field based on ReAct theory, provided for an embodiment of this application;
[0022] Figure 2 A flowchart illustrating a method for constructing prompt words for a large model in the financial credit field based on ReAct theory, provided for an embodiment of this application;
[0023] Figure 3 This is a flowchart illustrating the generation of a preset process template in a method for constructing prompt words for a large model in the financial credit field based on ReAct theory, as provided in an embodiment of this application. Detailed Implementation
[0024] The technical solutions of the embodiments of the present invention will be described below with reference to the accompanying drawings. In the description of the embodiments of the present invention, unless otherwise stated, "multiple" refers to two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of a single item or a plurality of items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0025] Furthermore, to facilitate a clear description of the technical solutions in the embodiments of the present invention, the terms "first" and "second" are used to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that "first" and "second" are not necessarily different. Meanwhile, in the embodiments of the present invention, the terms "exemplary" or "for example" are used to indicate that something is being used as an example, illustration, or description. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of the present invention should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner for ease of understanding.
[0026] The principles and features of this application are described below. The examples given are only for explaining this application and are not intended to limit the scope of this application.
[0027] In some scenarios, broken reasoning chains create data silos. Due to the lack of a structured reasoning framework, cross-system data cannot be dynamically linked. For example, in the pre-loan approval scenario, the "outstanding amount of external guarantees" indicator in the People's Bank of China credit report and the "credit default records of guaranteed enterprises" in the knowledge graph should jointly trigger risk warnings, but the existing prompts need to be manually extracted and integrated step by step for analysis.
[0028] In some scenarios, insufficient adaptation to the specific needs of the entire credit lifecycle has led to compliance risks. General prompt templates are not tailored to the diverse requirements of the entire lending process. For example, post-loan monitoring requires dynamic tracking of collateral value fluctuations, but traditional templates still rely on the static pre-loan assessment model. This resulted in a bank failing to issue timely warnings for a batch of risk events triggered by the depreciation of commercial real estate in 2023.
[0029] This application provides a method for constructing prompt words for large-scale models in the financial credit field based on ReAct theory, which is suitable for complex risk control scenarios requiring dynamic reasoning and real-time data verification. For example, corporate pre-loan approval.
[0030] This application provides a system for constructing prompt words for a large model in the financial credit field based on ReAct theory, which can execute the method for constructing prompt words for a large model in the financial credit field based on ReAct theory provided in this application. Figure 1 This is a schematic diagram of the structure of a large model prompt word construction system in the financial credit field based on ReAct theory, provided as an embodiment of this application.
[0031] like Figure 1 As shown, the financial credit domain large model prompt word construction system 001 based on ReAct theory includes at least one processor 011 and a memory 012 communicatively connected to the at least one processor; wherein, the memory 012 stores instructions that can be executed by the at least one processor 011, and the instructions are executed by the at least one processor 011 to enable the at least one processor 011 to execute the financial credit domain large model prompt word construction method based on ReAct theory provided in the embodiments of this application.
[0032] In some embodiments, the ReAct-based financial credit domain large model prompt word construction system 001 includes a hardware layer, a software layer, and a knowledge graph module.
[0033] At the hardware layer, a credit risk control server cluster equipped with a central processing unit (GPU) connects to the bank's core system, credit database, and external data interfaces.
[0034] The software layer includes a large model service module, a prompt word management platform, and a knowledge graph module. The large model service module is based on a credit-specific model fine-tuned from LLaMA-2 or ChatGLM-3. The prompt word management platform supports template editing, inference path visualization, and performance monitoring.
[0035] The knowledge graph module integrates knowledge from multiple sources, including credit policies, industry data, and corporate risk cases.
[0036] Figure 2 This is a flowchart illustrating a method for constructing prompt words for a large model in the financial credit field based on ReAct theory, provided as an embodiment of this application. Figure 2 As shown, in some embodiments, this method for constructing prompt words for a large model in the financial credit field based on ReAct theory includes the following steps:
[0037] S1 defines the role and capability boundaries of the dynamic prompt word generation model and binds it to the structured credit knowledge graph.
[0038] The dynamic prompt generation model can be the D-Prompt model.
[0039] The credit knowledge graph includes industry risk indicators, risk control rules, regulatory policy entities, nodes, and relationships.
[0040] In some embodiments, the method for constructing prompt words for a large model in the financial credit field based on ReAct theory in step S1 further includes:
[0041] S11 defines the role of the dynamic prompt word generation model by defining the large model role description text.
[0042] For example, the large model role description text could be "You are a credit risk control expert at XX Bank and have access to the knowledge base of regulatory rules of a certain association".
[0043] S12, Initialize capability boundary parameters, defining the capability boundaries of the dynamic prompt word generation model. Initialization of capability boundary parameters includes regulatory rule access permission identifiers and industry risk indicator database interface addresses.
[0044] S2 receives the original business problem, scene tags, and real-time data.
[0045] The original business question may include a request for a corporate credit rating assessment. An example is "Assess the credit rating of a manufacturing company".
[0046] Scenario tags include combinations of business stage, enterprise type, and loan type. For example, "Pre-loan approval - SMEs - Mortgage loans".
[0047] Real-time data includes corporate financial reports, credit reports, and industry risk indices. Examples include corporate financial report data, People's Bank of China credit reports, and industry risk indices.
[0048] S3 inputs the original business problem, scenario tags, and real-time data into the dynamic prompt word generation model to obtain at least one primary keyword.
[0049] For example, the first keyword in "assessing the credit rating of a manufacturing company" is "manufacturing company".
[0050] S4: Match entity nodes related to the first keyword in the credit knowledge graph to generate keyword entity association results.
[0051] For example, the first keyword is "manufacturing enterprises", which is associated with "manufacturing industry risk indicators" and "collateral ratio calculation rules".
[0052] S5: Based on the scene label, call the preset process template to generate an inference chain containing at least one inference layer node.
[0053] like Figure 3 As shown, in some embodiments, entities, attributes, relationships, and constraints are obtained from the knowledge graph as a supplement to the original question, and the large model is prompted to decompose the original question based on the supplementary content, design answer steps, and then answer the question step by step according to the steps.
[0054] Below are two implementation methods that can be applied to AI inference frameworks (such as ReAct) to solve complex problems through tool calls.
[0055] Example 1:
[0056] Answer the following questions as best you can.You have access to the following APIs:
[0057] {tool_descs}
[0058] Use the following format:
[0059] Question:the input question you must answer
[0060] Thought:you should always think about what to do
[0061] Action:the action to take,should be one of[{tool_names}]
[0062] Action Input: the input to the action
[0063] Observation: the result of the action
[0064] ...(this Thought / Action / Action Input / Observation can be repeated zeroor more times)
[0065] Thought:I now know the final answer
[0066] Final Answer:the final answer to the original input question
[0067] Begin!
[0068] Question: {query}
[0069] In practice, `{tool_descs}` and `{query}` will be replaced with specific tool descriptions and question content. The input question `{query}` will be parsed into structured data. The API toolset `{tool_descs}` will be stored, including tool names `{tool_names}` and function descriptions. A Thought-Action loop processor will be implemented. The API will be called and an Observation will be returned.
[0070] The decision-making process is executed in the following steps: Receive the question input {query}; The decision engine generates an initial thought and analyzes the tools to be called; Select Action: Select the target API from {tool_names}; Construct Action Input: Generate JSON parameters that conform to the API specification; The executor calls the API and captures the returned results as an observation; Execute in a loop until the termination condition is met; Generate the Final Answer and output it.
[0071] In some embodiments, a "hint-plan" is added, which supplements the original question with information such as entities, attributes, relationships, and constraints obtained from the knowledge graph. The large model is then prompted to break down the original question based on the supplementary information, design answer steps, and then answer the question step by step according to the steps.
[0072] Example 2:
[0073] Answer the following questions as best you can.You have access to the following APIs:
[0074] {tool_descs}
[0075] Use the following format:
[0076] Question:the input question you must answer
[0077] Knowledge Graph:the knowledge consists of as follows:
[0078] Entity:Relevant objects obtained from the knowledge graph
[0079] Attribute:Characteristics or properties possessed by entities
[0080] Relationship:Associations between entities
[0081] Constraint:Limiting conditions in the problem-solving process.
[0082] Plan: Please reinterpret the original question based on KnowledgeGraph and design the answering steps, and then gradually answer the question according to the steps in the follow-up.
[0083] Thought: You should always think about what to do.
[0084] Action: The action to take, should be one of [{tool_names}]
[0085] Action Input: The input to the action
[0086] Observation: The result of the action
[0087] ...(this Thought / Action / Action Input / Observation can be repeated zero or more times)
[0088] Thought: I now know the final answer
[0089] Final Answer: The final answer to the original input question
[0090] Begin!
[0091] Question: {query} <##
[0092] [[ID=3##0]]For example,
[0093] The query is: "Zhang San is 35 years old this year. He has had one credit card delinquency in the past 6 months, with the delinquency amount exceeding 1,000 yuan. Can he apply for our bank's consumer loan product?". The entity extraction results are: customer (Zhang San), consumer loan product, credit card delinquency, and delinquency amount. The knowledge graph retrieval results are relational and attribute results. Relational results include: customer → application → consumer loan, consumer loan → applicable eligibility rules → age, number of credit card delinquencies, and delinquency amount. Attribute results include: customer → age → 35 (small micro), credit card delinquency → number → 1 (small micro), delinquency amount → amount → exceeding 1,000. The constraint is that all application conditions must be met simultaneously. Plan: Based on the original question and knowledge graph prompts, the question belongs to the application stage. The product the customer is applying for is a consumer loan, and applying for a consumer loan requires meeting the eligibility rules. To solve this problem, it is necessary to compare the known customer information one by one to see if all eligibility rules are met. Thought: First, it is necessary to query the consumer loan eligibility rules regarding delinquency amounts. Action: Query the rules. Observation: The consumer loan applicant's credit card delinquency amount in the past 6 months does not exceed 1,000 yuan. Thought: Compare the rules to see if any conditions are not met. Action: Compare the rules. Observation: Through comparison, the overdue amount does not meet the conditions. Thought: A conclusion has been reached. Final Answer: Zhang San cannot apply for this bank's consumer loan product because the overdue amount on his credit card within the past 6 months cannot exceed 1,000 yuan.
[0094] For example,
[0095] The query is: "A small and micro enterprise has been established for 2 years with an annual turnover of 5 million yuan. It has two tax overdue records in the past year. Can it apply for this bank's corporate loan product?". The entity extraction results are: small and micro enterprise (the small and micro enterprise), small and micro enterprise loan product, tax overdue records, years of establishment, and annual turnover. The knowledge graph retrieval results are relational and attribute results. Relational results include: "Small and micro enterprise → Application → Small and micro enterprise loan", "Small and micro enterprise loan → Applicable access rules → Years of establishment, annual turnover, number of tax overdue records". Attribute results include: "Small and micro enterprise → Years of establishment → 2 years", "Small and micro enterprise → Annual turnover → 5 million yuan", "Tax overdue records → Number → 2 times". The constraint is that all application conditions must be met simultaneously. Plan: Based on the original question and knowledge graph prompts, the question belongs to the application stage. The product the small and micro enterprise is applying for is a small and micro enterprise loan, and applying for a small and micro enterprise loan requires meeting the access rules. To solve this problem, it is necessary to compare each known piece of information about the small and micro enterprise to see if it meets all the access rules. Thought: First, check the regulations regarding the length of time a company has been established in the SME loan eligibility rules. Action: Check the rules. Observation: The rule details show that applying for a SME loan from this bank requires the company to have been established for at least one year. Thought: Compare the rules to see if there are any unmet conditions. Action: Compare the rules. Observation: Through comparison, the SME has been established for 2 years, meeting the requirement of at least one year of establishment. Thought: Continue to check the regulations regarding annual turnover in the SME loan eligibility rules. Action: Check the rules. Observation: The rule details show that applying for a SME loan from this bank requires the company to have an annual turnover of at least 3 million yuan. Thought: Compare the rules to see if there are any unmet conditions. Action: Compare the rules. Observation: Through comparison, the SME has an annual turnover of 5 million yuan, meeting the requirement of at least 3 million yuan in annual turnover. Thought: Continue to check the regulations regarding tax overdue records in the SME loan eligibility rules. Action: Check the rules. Observation: The rule details show that applying for this bank's micro and small enterprise loan requires having no more than one tax delinquency record in the past year. Thought: Compare the rules to see if there are any unmet conditions. Action: Compare the rules. Observation: Through comparison, this micro and small enterprise has two tax delinquency records in the past year, failing to meet the condition of no more than one tax delinquency record in the past year. Thought: Conclusion reached. Final Answer: This micro and small enterprise cannot apply for this bank's consumer loan product because it has two tax delinquency records in the past year, failing to meet the condition of no more than one tax delinquency record in the past year.
[0096] The reasoning chain is framed using the ReAct reasoning framework. This application integrates a knowledge graph from the credit domain with the ReAct reasoning framework to address the problem of traditional prompts lacking logical coherence.
[0097] For example, a reasoning chain is generated (such as "verification of basic enterprise information → analysis of financial indicators → assessment of industry risks → judgment of the validity of the guarantee").
[0098] In some embodiments, when performing step S5, the method for constructing prompt words for a large model in the financial credit field based on ReAct theory further includes:
[0099] S511, Confirm the scene classification result based on the scene tags.
[0100] S512, based on the scene classification results, calls the preset process template.
[0101] In some embodiments, when performing step S5, the method for constructing prompt words for a large model in the financial credit field based on ReAct theory further includes:
[0102] S521, based on the credit business logic, guide the dynamic prompt word generation model to gradually deduce conclusions in order to obtain the reasoning chain.
[0103] The credit business logic includes four elements of risk assessment: borrower, purpose, source of repayment, and collateral.
[0104] S6, insert judgment conditions at each inference layer node.
[0105] The judgment criteria are generated based on the category and keyword entity association results of real-time data. The judgment criteria are in the form of logical expressions. In some embodiments, the judgment criteria are such as "IF debt-to-asset ratio > 70%, THEN trigger liquidity risk warning module". For example, "If the customer's credit report shows ≥ 3 overdue payments in the past 12 months, call the 'high-risk customer warning model'".
[0106] S7 binds tool call commands to action layer nodes, and the tool call commands are associated with external data interfaces or analysis modules.
[0107] For example, the tool call command is "Call the tax data interface to obtain the company's tax records for the past two years".
[0108] In some embodiments, after performing step S7 and before performing step S8, the method for constructing large model prompts in the financial credit domain based on ReAct theory further includes:
[0109] S711, the dynamic prompt word generation model determines whether a tool call is needed based on the current inference state.
[0110] S712, if no tool call is required, directly outputs the business results.
[0111] In some embodiments, when performing step S7, the method for constructing prompt words for a large model in the financial credit field based on ReAct theory further includes:
[0112] S721, an abnormal indicator for monitoring business results.
[0113] S722, If an abnormal indicator exceeds a preset threshold, at least one adjustment indicator will be dynamically adjusted.
[0114] Adjustments to metrics include adding or deleting inference layer nodes in the inference chain, updating tool binding relationships in the action layer, or modifying capability boundary parameters.
[0115] For example, adding a "industry policy risk" assessment node. Another example is replacing the tax data interface with an electricity data interface. Yet another example is expanding the version range of the regulatory rules knowledge base.
[0116] S8 obtains external data by executing tool call instructions and backfills it into the inference chain, thus obtaining the backfilled data.
[0117] In some embodiments, when performing step S8, the method for constructing prompt words for a large model in the financial credit field based on ReAct theory further includes:
[0118] S81 configures the tool invocation interface for tool invocation commands.
[0119] The tool's API calls include internal business system interfaces and external data source interfaces.
[0120] For example, linking specific business tools or data interfaces to achieve a "decision-execution" closed loop could be "after generating a pre-loan investigation report, automatically triggering the anti-fraud system API to conduct group association analysis."
[0121] S82 executes the tool call instruction and backfills the structured response data into the inference chain.
[0122] S9 executes the inference chain based on the backfilled data and outputs the business results.
[0123] S10: Based on business results, optimize the prompt word weight allocation strategy by combining reinforcement learning with credit expert labeled data to improve the priority weight of prompt words in key risk control links.
[0124] In some embodiments, reinforcement learning can be reinforcement learning from human feedback (RLHF).
[0125] For example, optimizing the weight of prompt words, such as increasing the priority of prompt words in the "repayment ability analysis" section.
[0126] In some embodiments, when performing step S10, the method for constructing prompt words for a large model in the financial credit field based on ReAct theory further includes:
[0127] S101, Load the preset prompt chain template according to the business type and initialize the dynamic variable pool.
[0128] The default hint chain template is a reasoning chain.
[0129] For example, when the prompt word contains a data interface call instruction (e.g., call the business data interface), the target system is accessed through a pre-configured API key and authentication protocol.
[0130] S102, if the prompt word contains a data interface call instruction for the tool call interface, access the target system through the pre-configured interface key and authentication protocol to obtain the tool response data.
[0131] S103, if the prompt word contains a logical judgment condition, extract the corresponding parameter from the dynamic variable pool to perform condition calculation and obtain the condition calculation result.
[0132] For example, when a prompt word contains a logical condition (e.g., if the company has been established for less than 2 years), the corresponding parameters in the dynamic variable pool are extracted for conditional calculation. For example, the prompt word parameters are dynamically optimized based on business results to form a learning loop. For instance, "If the 'industry policy risk' dimension is found to be missing in the prompt word during post-loan management, relevant inference nodes are automatically added."
[0133] S104: Write the tool response data or conditional operation results into the dynamic variable pool.
[0134] For example, the execution results can be backfilled in a structured manner, writing the tool response data (e.g., corporate equity structure) or the results of conditional calculations (e.g., establishment time = 3 years) into a dynamic variable pool.
[0135] S105, Generate a structured report. The structured report includes a report framework that matches the regulatory provisions library, key data injected into a dynamic variable pool, and decision recommendations.
[0136] In some embodiments, a reporting framework is generated by matching the regulatory clause library (e.g., based on Article XX of the "Guidelines for Credit Granting to Micro and Small Enterprises by Commercial Banks"). Key data from a dynamic variable pool is injected (e.g., debt-to-asset ratio of 65%, downstream customer overdue records). A structured report with decision-making recommendations is output (e.g., credit of RMB 2 million is available, with the requirement of accounts receivable pledging).
[0137] For example, the original business question is: "Please evaluate the credit loan application of XX Technology Co., Ltd., focusing on analyzing its repayment ability and related risks, and generate a compliance approval report."
[0138]
[0139] It is understandable that if no tool calls are required, the business results can be obtained by performing the aforementioned correlation analysis action.
[0140] In some embodiments, mixed input of text (contract terms), images (photos of company facilities), and tables (financial statements) is supported, and a unified prompt word representation is generated through a cross-modal encoder.
[0141] In some embodiments, association analysis is triggered based on the prompt word rule engine, and risk control threshold rules are applied to the backfilled data (e.g., triggering an alert if the current ratio is <1.2). Domain knowledge graphs are invoked for relationship reasoning (e.g., supply chain credit rating distribution analysis). Intermediate decision markers are generated (e.g., skipping the startup assessment module, marking as low risk).
[0142] As can be seen from the above embodiments, this application upgrades static rule matching to a closed-loop system of "semantic understanding - graph association - real-time reasoning - feedback optimization," solving the decision-making bias caused by neglecting implicit logic (such as the constraints of industry cycles on financial indicators) in traditional methods and improving the accuracy of prompt words. Furthermore, by automating the execution of the reasoning chain and calling tools, manual intervention is reduced while ensuring the depth of analysis at key risk control nodes. The weight optimization mechanism based on business result feedback enables the model to continuously converge to the optimal decision path, forming a moat of risk control capabilities.
[0143] For example, when a corporate credit assessment request is input (such as "customer's revenue has continued to grow over the past three years"), the model combines scenario tags (such as enterprise type = photovoltaic, loan type = long-term) and real-time data (industry risk index) to generate compound keywords such as "revenue growth + industry capacity risk". By linking industry risk indicator nodes (such as overcapacity rules) through a knowledge graph, it automatically identifies implicit logic—revenue growth in the photovoltaic industry requires verification of accounts receivable risk, eliminating more than 20% of the semantic bias inherent in traditional methods. Based on the scenario tags, it calls the pre-loan template to generate a reasoning chain at the financial analysis node. By inserting conditional statements (e.g., IF industry risk index > 0.7 THEN triggers accounts receivable checks), and using action-layer tools to call credit scoring interfaces to obtain backfilled data (e.g., accounts receivable turnover rate), the implicit rule that "industry cycles determine growth quality" becomes explicit. After outputting credit rating downgrade suggestions, the system uses reinforcement learning based on expert-annotated data to increase the weight of "industry risk" warning terms, enabling subsequent similar businesses to trigger multi-dimensional cross-validation first. This upgrades isolated financial analysis into a dynamic decision-making network of "financial indicators - industry cycles - risk transmission," significantly reducing the misjudgment rate in industries with overcapacity. In the photovoltaic enterprise case, the system accurately identifies implicit accounts receivable risks caused by aggressive sales, avoiding decision-making inaccuracies caused by ignoring industry context in traditional methods. Simultaneously, the automation of the reasoning chain improves analysis efficiency by over 30%. Risk control efficiency is improved, pre-loan investigation time is shortened by 40%, and risk indicator coverage increases from 65% to 92%. Decision accuracy is enhanced; structured reasoning reduces human error, fraud detection rate increases by 35%, and non-performing loan rate decreases by 2.1 percentage points. It is flexible in adapting to different business scenarios and supports rapid iteration of prompt word templates. The launch cycle for new business scenarios (such as green finance loans) has been shortened from 2 weeks to 48 hours.
[0144] Based on the same application concept, this application also provides a system for constructing prompt words for a large-scale financial credit model based on ReAct theory. The method corresponding to this system can be the same as the method for constructing prompt words for a large-scale financial credit model based on ReAct theory in the aforementioned embodiments, and the principle of solving the problem is similar to that method. The system for constructing prompt words for a large-scale financial credit model based on ReAct theory provided in this application includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the methods and / or technical solutions of the various embodiments of this application.
[0145] Another embodiment of this application provides a computer-readable storage medium having computer program instructions stored thereon, which can be executed by a processor to implement the methods and / or technical solutions of any one or more embodiments of this application described above.
[0146] Specifically, this embodiment may employ any combination of one or more computer-readable media. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.
[0147] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including—but not limited to—electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0148] The program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0149] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0150] The flowcharts or block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of devices, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-specific system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0151] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0152] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or page components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units through some interfaces, and may be electrical, mechanical, or other forms.
[0153] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0154] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.
[0155] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0156] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
[0157] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a device claim may also be implemented by a single unit or device through software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any specific order.
Claims
1. A method for constructing prompt words for a large-scale model in the financial credit field based on ReAct theory, characterized in that, include: Define the roles and capability boundaries of the dynamic prompt word generation model, and bind it to a structured credit knowledge graph; The credit knowledge graph includes industry risk indicators, risk control rules, regulatory policy entity nodes, and related relationships. The system receives original business questions, scenario tags, and real-time data. The original business questions include enterprise credit rating assessment requests. The scenario tags include combinations of business stage, enterprise type, and loan type. The real-time data includes enterprise financial reports, credit reports, and industry risk indices. The original business question, the scene tag, and the real-time data are input into the dynamic prompt word generation model to obtain at least one first keyword; In the credit knowledge graph, match entity nodes related to the first keyword to generate keyword entity association results; and call a preset process template according to the scenario tag to generate an inference chain containing at least one inference layer node. Insert a judgment condition at each inference layer node; The judgment condition is generated based on the category of real-time data and the keyword entity association result; the judgment condition is in the form of a logical expression. Bind tool call instructions to action layer nodes, and the tool call instructions are associated with external data interfaces or analysis modules; By executing the tool invocation command, external data is acquired and backfilled into the inference chain to obtain backfilled data; Based on the backfilled data, an inference chain is executed, and business results are output. Based on the business results, the suggestion word weight allocation strategy is optimized by combining reinforcement learning with credit expert labeled data, so as to improve the priority weight of suggestion words in key risk control links.
2. The method for constructing prompt words for a large-scale financial credit model based on ReAct theory according to claim 1, characterized in that, After executing the step of binding a tool call instruction to an action layer node, wherein the tool call instruction is associated with an external data interface or analysis module; and before executing the step of obtaining external data by executing the tool call instruction and backfilling it into the inference chain to obtain backfilled data; The method for constructing prompt words for large-scale financial credit models based on ReAct theory also includes: The dynamic prompt word generation model determines whether a tool needs to be invoked based on the current reasoning state; If no tool is needed, output the business results directly.
3. The method for constructing prompt words for a large model in the financial credit field based on ReAct theory according to claim 1 or 2, characterized in that, When performing the step of calling a preset process template based on the scene label to generate an inference chain containing at least one inference layer node, the method for constructing prompt words for a large model in the financial credit field based on ReAct theory further includes: The scene classification result is confirmed based on the scene tags; Based on the scenario classification results, the preset process template is invoked.
4. The method for constructing prompt words for a large model in the financial credit field based on ReAct theory according to claim 1 or 2, characterized in that, When performing the step of calling a preset process template based on the scenario label to generate an inference chain containing at least one inference layer node, the method for constructing prompt words for a large model in the financial credit field based on ReAct theory further includes: guiding the dynamic prompt word generation model to gradually deduce conclusions based on the credit business logic to obtain the inference chain; the credit business logic includes four elements of risk assessment, namely, borrower, purpose, source of repayment, and guarantee.
5. The method for constructing prompt words for a large model in the financial credit field based on ReAct theory according to claim 1 or 2, characterized in that, When performing the steps of defining the roles and capabilities boundaries of the dynamic prompt word generation model and binding it to the structured credit knowledge graph, the method for constructing prompt words for a large-scale financial credit model based on ReAct theory further includes: The role of the dynamic prompt word generation model is defined by defining the large model role description text; Initialize capability boundary parameters to define the capability boundary of the dynamic prompt word generation model; the initial capability boundary parameters include regulatory rule access permission identifier and industry risk indicator database interface address.
6. The method for constructing prompt words for a large model in the financial credit field based on ReAct theory according to claim 5, characterized in that, When executing the step of binding tool invocation instructions to action layer nodes, the method for constructing prompt words for a large financial credit model based on ReAct theory further includes: Monitor abnormal indicators of the business results; if the abnormal indicator exceeds a preset threshold, dynamically adjust at least one adjustment indicator; the adjustment indicator includes adding or deleting the inference layer node of the inference chain, updating the tool binding relationship of the action layer, or modifying the capability boundary parameter.
7. The method for constructing prompt words for a large model in the financial credit field based on ReAct theory according to claim 1 or 2, characterized in that, The method for constructing prompt words for large-scale financial credit models based on ReAct theory also includes: Configure a tool invocation interface for the tool invocation command; the tool invocation interface includes an internal business system interface and an external data source interface; Execute the tool invocation command and backfill the structured response data into the inference chain.
8. The method for constructing prompt words for a large model in the financial credit field based on ReAct theory according to claim 7, characterized in that, The method for constructing prompt words for large-scale financial credit models based on ReAct theory also includes: Load a preset prompt chain template according to the business type and initialize the dynamic variable pool; the preset prompt chain template is the inference chain. If the prompt contains a data interface call instruction for the tool's call interface, the target system is accessed through a pre-configured interface key and authentication protocol to obtain the tool's response data; If the prompt word contains a logical judgment condition, the corresponding parameter in the dynamic variable pool is extracted for conditional operation to obtain the conditional operation result; Write the tool response data or the conditional operation result into the dynamic variable pool; Generate a structured report, which includes a report framework that matches the regulatory provisions library, key data injected into the dynamic variable pool, and decision recommendations.
9. A system for constructing prompt words for a large-scale model in the field of financial credit based on ReAct theory, characterized in that, include: At least one processor; A memory that is communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 8.
10. A computer-readable medium having computer program instructions stored thereon, characterized in that, The computer program instructions can be executed by a processor to implement the method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Contract risk identification method and device, equipment, storage medium and program product
CN119205338A
Financial question and answer method, system and equipment based on multi-agent interaction and medium
CN119539095A