Generative financial report writing method based on role division
By constructing a set of semantic anchors and performing structured compression processing, the problem of context state failure in financial report writing was solved, achieving precise inheritance and closed-loop control of generated content, and improving the semantic consistency and reliability of the generated content.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA LIANHE CREDIT RATING CO LTD
- Filing Date
- 2026-01-30
- Publication Date
- 2026-05-08
AI Technical Summary
In financial report writing, as the number of roles increases, the context state becomes invalid during chained prompt transmission, leading to information truncation, misalignment, and semantic drift, which affects the structural coherence and content accuracy of the report.
By constructing a set of semantic anchors and performing structured compression, a structured semantic summary is generated as the sole context information for the next role. An anchor binding and semantic coverage verification mechanism is introduced to ensure the semantic consistency and logical coherence of the generated content.
It effectively prevents information misalignment and semantic drift, ensures the accuracy and contextual coherence of the generated content, and improves the semantic consistency and reliability of the automatic financial report generation process.
Smart Images

Figure CN121997900A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of report writing technology, and more specifically to a generative financial report writing method based on role division of labor. Background Technology
[0002] With the development of large language models and generative artificial intelligence technologies, a generative financial report writing method based on "role division of labor" has gradually emerged in the financial industry. This method breaks down tasks originally performed manually, such as data interpretation, trend analysis, investment advice, risk warnings, and language polishing, into several AI modules with specific responsibilities. Each module acts as a "virtual expert role," generating corresponding content, which is then integrated and output. This approach uses a prompt-chaining mechanism, injecting the content generated by the previous role as contextual input into the next role, forming a sequential semantic relay chain. This ensures both modular collaboration and contextual coherence and semantic consistency in content generation.
[0003] However, in actual deployment, a key technical problem has gradually emerged: as the report structure and the number of roles increase, significant contextual state failures occur in the chained Prompt delivery. Specifically, when compressing the content generated by the previous role and injecting it into the Prompt, key information is often truncated due to length limitations, misaligned due to order adjustments, or even loses its original logical focus due to semantic dilution. This leads to judgment errors, conflicting expressions, or semantic drift in the understanding and generation process for downstream roles, thus affecting the reliability and professionalism of the entire report in terms of structural coherence and content accuracy. Summary of the Invention
[0004] The purpose of this invention is to solve the problems mentioned in the background section and to propose a generative financial report writing method based on role division.
[0005] In terms of implementation, this invention provides a method for generating financial reports based on role division of labor, the method comprising: S1: Obtain the report text content generated by the previous role, perform semantic parsing on the text content, and extract the set of semantic anchors for contextual communication. S2: The semantic anchor set is structured and compressed to generate a structured semantic summary for context injection; S3: Inject the structured semantic summary as the only valid contextual information into the generation prompt of the next role, and the core semantic scope that must be referenced when generating content; S4: After the next role completes content generation, perform a consistency comparison between the generated content and the set of semantic anchors to determine whether the generated content completely covers the semantic anchors and maintains the original semantic direction. S5: If the consistency comparison passes, the generated content will be used as input for subsequent roles or as part of the financial report for output; if the consistency comparison fails, the generated content will be regenerated or supplemented and corrected based on the semantic anchor set.
[0006] Optionally, the step of extracting the set of semantic anchors for context passing is as follows: The report text content generated by the previous role is segmented into paragraphs to obtain multiple text segments. Based on the preset financial semantic recognition rules, semantic role labeling is performed on each text segment. The semantic roles include at least factual description statements, trend judgment statements, and conclusive inference statements. After completing the semantic role labeling, entity-attribute alignment processing is performed on the text segments labeled as factual description statements. Numerical information, time information, and indicator name information directly corresponding to financial objects are extracted from the text segments to form factual semantic points. For text segments marked as trend judgment statements, the direction words and magnitude limit words of change are identified based on syntactic dependency relations, and trend semantic points representing the change relationship are constructed by combining them with the corresponding factual semantic points. For text segments marked as conclusive inference statements, identify causal trigger words or logical connectors, and trace back the factual and trend semantic points they reference to generate conclusive semantic points with clear sources of reasoning. The factual semantic points, trend semantic points, and conclusion semantic points are sorted according to their order of appearance in the original report text, and the reference relationships between each semantic point are recorded during the sorting process, forming a set of semantic anchor points containing semantic content and logical connection information.
[0007] Optionally, the steps for structuring and compressing the semantic anchor set to generate a structured semantic summary for context injection are as follows: The semantic anchor set is grouped by type, and the semantic anchors are classified into the corresponding semantic levels according to factual semantic points, trend semantic points and conclusion semantic points, and the order of appearance of semantic anchors in the original report text is preserved in each semantic level. After completing the semantic hierarchy division, the factual semantic points are compressed into the smallest semantic units. The compression process includes deleting modifying adjectives and non-core qualifiers, and retaining only the names of financial entities, corresponding indicator names, numerical information and time information, thereby forming basic factual semantic fragments that cannot be further divided. Based on the basic fact semantic fragments, trend mapping compression processing is performed on the trend semantic points. The direction and magnitude of change involved in the trend semantic points are bound to the corresponding basic fact semantic fragments, and the logical position of the trend semantic points relative to the basic fact semantic fragments is recorded in the form of sequential identifiers. After completing the trend mapping compression, causal reference compression is performed on the conclusion-type semantic points. The natural language description used to express the inference results in the conclusion-type semantic points is replaced with the logical reference markers of the fact-type semantic points and trend-type semantic points they reference, so as to preserve the complete reasoning path without repeating the original content. The compressed factual semantic points, trend semantic points, and conclusion semantic points are rearranged in the order of facts before trends and trends before conclusions. The citation relationships between each semantic point are explicitly recorded during the rearrangement process, forming a structured semantic summary with hierarchical structure and logical dependencies. The structured semantic summary is encapsulated as an independent context injection unit, and the context injection unit is limited to containing only the structured semantic summary content.
[0008] Optionally, the structured semantic summary can be injected as the only valid contextual information into the generation prompt for the next role. The core semantic scope that must be referenced when generating content is as follows: Before the next role starts generating content, a generation prompt template corresponding to that role is constructed. In the generation prompt template, a dedicated semantic slot for context injection is pre-defined, and the semantic slot is restricted to receiving only structured semantic summaries. The structured semantic summary is injected into the semantic slot as a whole, and the original report text content or other unstructured text content is prohibited from being written into the semantic slot during the injection process; After the structured semantic summary injection is completed, role binding processing is performed on each semantic point in the structured semantic summary. Semantic points related to the responsibilities of the next role are marked as mandatory reference semantic points, and the remaining semantic points are marked as auxiliary reference semantic points. Based on the role binding processing results, the semantic reference constraint instruction is displayed in the generation prompt template, which restricts the next role to cover all mandatory reference semantic points when generating content, and prohibits the generation of content that conflicts with the semantic direction of the mandatory reference semantic points. During the next role's content generation process, the semantic relationship between the generated text and the structured semantic summary is monitored in real time. When the generated content is detected to deviate from the semantic range of the mandatory reference semantic points, the current generation process is automatically interrupted, and generation is retried based on the structured semantic summary. After generation, the generated content is subjected to a complete semantic alignment check with the structured semantic summary. Only when the check results show that the generated content conforms to the core semantic scope defined by the structured semantic summary will the generated content be used as a valid output result for cross-role transmission.
[0009] Optionally, after the next role completes content generation, the process of comparing the generated content with the set of semantic anchors to determine whether the generated content completely covers the semantic anchors and maintains consistency with the original semantic direction is as follows: After the next role completes content generation, semantic unit segmentation processing is performed on the generated content, which is divided into multiple independently identifiable semantic fragments. Each semantic fragment is labeled with its semantic function type, which includes factual statement fragments, trend judgment fragments, and conclusive statement fragments. Based on the set of semantic anchors, an anchor-semantic fragment mapping relationship table is established. Each semantic anchor is matched one by one with semantic fragments in the generated content that can express the same or similar semantic meanings, and the matching result is recorded as covered, partially covered or uncovered. After completing semantic coverage matching, semantic anchors that are determined to be covered or partially covered are further subjected to semantic direction consistency verification. The verification is completed by comparing whether the direction of change, causal orientation or conclusion tendency expressed by the corresponding semantic fragment in the generated content is consistent with the original semantic direction recorded in the semantic anchor. When a semantic fragment is detected in the generated content that is opposite to, weakens or negates the original semantic direction of any semantic anchor, the corresponding semantic anchor is marked as a direction conflict anchor and the specific position of the direction conflict anchor in the generated content is recorded. Based on the coverage status of semantic anchors and the semantic direction consistency verification results, a consistency comparison result is generated. When all semantic anchors are determined to be covered or partially covered and there are no anchors with conflicting directions, the generated content is determined to pass the consistency comparison. When the consistency comparison fails, the output includes verification result information containing uncovered semantic anchors and directional conflict anchors, and the verification result information is passed as a constraint to the subsequent content regeneration or supplementation and correction steps.
[0010] Optionally, if the consistency comparison passes, the generated content can be used as input for subsequent roles or as part of a financial report as the output step: When the consistency comparison result shows that the generated content passes the consistency comparison, the generated content is marked as qualified generated content. Depending on the current role's position in the overall reporting process, the qualified generated content is selectively used directly as the input content for the next role, or written into the preset financial report structure as the component content of the corresponding chapter for storage.
[0011] Optionally, if the consistency comparison fails, the step of regenerating or supplementing the generated content based on the semantic anchor set is as follows: When the consistency comparison result shows that the generated content fails the consistency comparison, the output verification result information is read. The verification result information includes at least the set of uncovered semantic anchors and the set of directional conflict anchors. Based on the set of uncovered semantic anchors and the set of directional conflict anchors, the target semantic anchors that need to be corrected are selected from the set of semantic anchors, and the target semantic anchors are used as the sole semantic basis for regeneration or supplementation correction. For the target semantic anchor, a restricted generation prompt is constructed, which explicitly restricts the content to be regenerated or supplemented to only be related to the target semantic anchor, and prohibits rewriting the content corresponding to the semantic anchor that has passed the consistency comparison. Based on the limited generation prompts, the content is regenerated or supplemented and corrected. After the generation is completed, only the newly generated content replaces the local fragments in the original generated content that correspond to the target semantic anchor point, while the rest of the content that has passed the consistency comparison remains unchanged. After the partial replacement is completed, the corrected generated content is sent back to step S4 for consistency comparison until the consistency comparison passes. Then, the output or transmission operation is performed according to S1.
[0012] The beneficial effects of this invention are: This invention proposes a generative financial report writing method based on role-based division of labor. By constructing a set of semantic anchors and performing structured compression, it can efficiently extract key semantic information for contextual transmission without relying on the lengthy content of the original text. This fundamentally avoids the information truncation problem caused by input length limitations in the traditional chained Prompt method. By using the structured semantic summary as the sole context source for the next role's generation and introducing anchor binding and semantic coverage verification mechanisms, it effectively prevents information misalignment, semantic drift, and loss of key points during context compression. Finally, anchor consistency comparison ensures that the subsequently generated content accurately restores the original logical chain, enabling precise semantic inheritance and closed-loop control among roles. This comprehensively solves the problem of gradual invalidation of context state during Prompt chain transmission as the number of roles increases and the report structure becomes more complex, significantly improving semantic consistency, contextual coherence, and generation reliability in the automatic generation of financial reports. Attached Figure Description
[0013] Figure 1 A flowchart illustrating a role-based generative financial report writing method provided in an embodiment of the present invention. Detailed Implementation
[0014] To further illustrate the technical means and effects adopted by the present invention in order to achieve the intended purpose, the following detailed description is provided in conjunction with the accompanying drawings and preferred embodiments, based on the specific implementation methods, structures, features and effects of the present invention.
[0015] This invention provides a method for generating financial reports based on role-based division of labor. See also... Figure 1 , Figure 1 A flowchart illustrating a role-based generative financial report writing method provided in this embodiment of the invention. The method includes the following steps: S1: Obtain the report text content generated by the previous role, and perform semantic analysis on the text content to extract key information points that can represent core facts, changing trends and reasoning conclusions, forming a set of semantic anchor points for contextual communication; S2: The semantic anchor set is structured and compressed. While preserving the original logical order and causal relationship between each semantic anchor, a structured semantic summary for context injection is generated. S3: Inject the structured semantic summary as the only valid context information into the generation prompt of the next role, and limit the core semantic range that the next role must refer to when generating content based on the structured semantic summary, thereby completing the cross-role context transfer; S4: After the next role completes content generation, perform a consistency comparison between the generated content and the set of semantic anchors to determine whether the generated content completely covers the semantic anchors and maintains the original semantic direction. S5: If the consistency comparison passes, the generated content will be used as input for subsequent roles or as part of the financial report for output; if the consistency comparison fails, the generated content will be regenerated or supplemented and corrected based on the semantic anchor set.
[0016] Based on the role-based generative financial report writing method provided in this invention, by constructing a set of semantic anchors and performing structured compression, key semantic information for contextual transmission can be efficiently extracted without relying on the lengthy content of the original text. This fundamentally avoids the information truncation problem caused by input length limitations in the traditional chained Prompt method. By using the structured semantic summary as the sole context source for the next role's generation and introducing anchor binding and semantic coverage verification mechanisms, information misalignment, semantic drift, and loss of key points during context compression are effectively prevented. Finally, anchor consistency comparison ensures that the subsequently generated content accurately restores the original logical chain, enabling precise semantic inheritance and closed-loop control between roles. This comprehensively solves the problem of gradual invalidation of context state during Prompt chain transmission as the number of roles increases and the report structure becomes more complex, significantly improving semantic consistency, contextual coherence, and generation reliability in the automatic generation of financial reports.
[0017] In one embodiment, S1: The step of obtaining the report text content generated by the previous role, performing semantic parsing on the text content, and extracting key information points that can represent core facts, trends, and inference conclusions to form a set of semantic anchor points for contextual communication is as follows: The report text content generated by the previous role is segmented into paragraphs to obtain multiple text segments. Based on the preset financial semantic recognition rules, semantic role labeling is performed on each text segment. The semantic roles include at least factual description statements, trend judgment statements, and conclusive inference statements. After completing the semantic role labeling, entity-attribute alignment processing is performed on the text segments labeled as factual description statements. Numerical information, time information, and indicator name information directly corresponding to financial objects are extracted from the text segments to form factual semantic points. For text segments marked as trend judgment statements, the direction words and magnitude limit words of change are identified based on syntactic dependency relations, and trend semantic points representing the change relationship are constructed by combining them with the corresponding factual semantic points. For text segments marked as conclusive inference statements, identify causal trigger words or logical connectors, and trace back the factual and trend semantic points they reference to generate conclusive semantic points with clear sources of reasoning. The factual semantic points, trend semantic points, and conclusion semantic points are sorted according to their order of appearance in the original report text, and the reference relationship between each semantic point is recorded during the sorting process to form a set of semantic anchor points containing semantic content and logical connection information. The set of semantic anchors is stored as a context-transfer unit independent of the original report text and serves as the sole input source for generating structured semantic summaries in subsequent steps.
[0018] It should be noted that in this step, the report text generated by the previous role is first segmented into paragraphs, that is, the complete text is divided into independent analysis units according to semantic boundaries. For example, a paragraph containing "the company's net profit decreased by 15% year-on-year this quarter" will be considered a text segment. Then, based on the preset financial semantic recognition rules, each text segment is labeled with a semantic role. For example, "revenue increased but profit decreased this quarter" will be labeled as a trend judgment statement, "gross profit margin declined due to rising raw material costs" will be labeled as a conclusive inference statement, and "net profit decreased by 15% year-on-year" will be a factual description statement. After completing the role classification, for the factual description statements, entity-attribute alignment processing is used to identify "net profit" as an entity, "year-on-year decrease" as an attribute direction, "15%" as numerical information, and "this quarter" as a time node, thus forming factual semantic points with quantitative attributes. Next, syntactic dependency analysis is performed on the trend judgment statements to extract words of change direction such as "growth," "decline," and "slowdown," as well as magnitude limiting words such as "15%," "significant," and "slight," and these are then matched with the corresponding factual points. The process involves binding and constructing trend-based semantic points, such as "net profit decreased by 15%" corresponding to "the trend is downward." Then, for conclusive inference statements, causal connectors such as "due to," "therefore," and "leading to" are identified, and factual points (such as "cost increases") and trend-based points (such as "gross profit margin decline") mentioned in the statement are traced back. Based on this, conclusive semantic points with causal chain structures are constructed, such as "rising raw material costs are the main reason for the profit decline." All generated factual, trend, and conclusive semantic points are sorted according to their natural order of appearance in the original text, and their referencing relationships and upstream / downstream dependencies are recorded during the sorting process. For example, the causal relationship between "profit decline" and "cost increase" is explicitly marked with logical tags. Finally, the completed set of semantic points is constructed into a set of semantic anchors. This set is stored independently of the original text content, containing only the extracted key information and structured relational information, and serves as the sole input source for generating structured semantic summaries in subsequent steps. This avoids information drift, omission, or distortion caused by textual redundancy or expression variations during cross-role transmission of contextual information.
[0019] In one embodiment, S2: The step of structuring and compressing the set of semantic anchors, and generating a structured semantic summary for context injection while preserving the original logical order and causal relationship between each semantic anchor, is as follows: The semantic anchor set obtained in step S1 is grouped by type. The semantic anchors are classified into the corresponding semantic levels according to factual semantic points, trend semantic points and conclusion semantic points. The order of appearance of the semantic anchors in the original report text is preserved in each semantic level. After completing the semantic hierarchy division, the factual semantic points are compressed into the smallest semantic units. The compression process includes deleting modifying adjectives and non-core qualifiers, and retaining only the names of financial entities, corresponding indicator names, numerical information and time information, thereby forming basic factual semantic fragments that cannot be further divided. Based on the basic fact semantic fragments, trend mapping compression processing is performed on the trend semantic points. The direction and magnitude of change involved in the trend semantic points are bound to the corresponding basic fact semantic fragments, and the logical position of the trend semantic points relative to the basic fact semantic fragments is recorded in the form of sequential identifiers. After completing the trend mapping compression, causal reference compression is performed on the conclusion-type semantic points. The natural language description used to express the inference results in the conclusion-type semantic points is replaced with the logical reference markers of the fact-type semantic points and trend-type semantic points they reference, so as to preserve the complete reasoning path without repeating the original content. The compressed factual semantic points, trend semantic points, and conclusion semantic points are rearranged in the order of facts before trends and trends before conclusions. The citation relationships between each semantic point are explicitly recorded during the rearrangement process, forming a structured semantic summary with hierarchical structure and logical dependencies. The structured semantic summary is encapsulated into an independent context injection unit, and this context injection unit is limited to containing only the structured semantic summary content, so as to serve as the only source of context information allowed to be injected in subsequent role generation prompts.
[0020] It should be noted that in this step, the semantic anchor set extracted in S1 is first grouped by type. All semantic anchors are divided into corresponding levels according to three semantic functions: factual, trend, and conclusion. For example, "net profit in Q4 2023 decreased by 12% year-on-year" is classified as factual, "gross profit margin declined for two consecutive quarters" as trend, and "rising raw material costs were the main reason for the profit decline" as conclusion. The order in which they appear in the original text is maintained within each level to facilitate the subsequent reconstruction of the logical chain. After completing the semantic hierarchy, the factual semantic points are compressed into the smallest semantic units. Specifically, this is done by using a financial entity thesaurus and an indicator dictionary to compress each semantic point. The structure is syntactically segmented, retaining only the names of financial objects (e.g., "net profit"), indicator names (e.g., "year-on-year change"), numerical values (e.g., "12%)", and time information (e.g., "2023Q4"). Redundant modifiers and non-restrictive descriptions are removed, simplifying it into indivisible structural fragments. Based on this, trend-type semantic points are compressed using trend mapping. Through syntactic dependency analysis, trend words such as "decline," "slowdown," and "acceleration," along with magnitude modifiers such as "significant" and "slight," are extracted. These are then bound to the factual fragments they reference to generate structured trend semantic items. The logical relationship between trend anchors and corresponding factual anchors is recorded using annotations such as "T1 associated with F3". The process involves several steps: First, determining the logical direction and arrangement of points. After trend mapping, causal citation compression is performed on conclusion-type semantic points. A set of causal trigger words (such as "because," "leading to," and "attributed to") is used to identify causal relationships within sentences, replacing the logical reasoning expressed therein with reference markers to previous factual and trend-type anchors. For example, "Net profit declined due to increased raw material costs" is reconstructed as "C1 references F2 and T1," thus significantly compressing the language volume while maintaining the integrity of the logical reasoning path. After compressing the above three types of semantic points, all points are reordered according to the semantic hierarchy of "fact → trend → conclusion." During the reordering process, an explicit reference list is constructed to describe each point. The order of calls and dependencies between semantic units ensures that the logical order and causal chain of the original semantic structure are preserved in the compressed structure. Finally, all the content formed by the above processing is encapsulated into a structured semantic summary unit. This summary unit is stored in a segmented block structure, where each block contains a semantic point and its reference path. The unit is restricted from containing any uncompressed original text content, so that it can be used as the only legitimate context source in the subsequent Prompt injection. This ensures that the upstream and downstream AI roles generate content based on consistent, concise and structurally stable semantic information, avoiding problems such as semantic drift, duplicate references or content breaks.
[0021] In one embodiment, S3: The steps of injecting the structured semantic summary as the only valid context information into the generation prompt of the next role, and limiting the core semantic scope that the next role must refer to when generating content based on the structured semantic summary, thereby completing the cross-role context transfer, are as follows: Before the next role starts generating content, a generation prompt template corresponding to that role is constructed. The generation prompt template pre-divides a dedicated semantic slot for context injection and restricts that the semantic slot can only receive the structured semantic summary generated in step S2. The structured semantic summary is injected into the semantic slot as a whole, and the original report text content or other unstructured text content is prohibited from being written into the semantic slot during the injection process, thereby ensuring that the context information that the next role can perceive when generating content comes only from the structured semantic summary; After the structured semantic summary injection is completed, role binding processing is performed on each semantic point in the structured semantic summary. Semantic points related to the responsibilities of the next role are marked as mandatory reference semantic points, and the remaining semantic points are marked as auxiliary reference semantic points. Based on the role binding processing results, the semantic reference constraint instruction is displayed in the generation prompt template, which restricts the next role to cover all mandatory reference semantic points when generating content, and prohibits the generation of content that conflicts with the semantic direction of the mandatory reference semantic points. During the next role's content generation process, the semantic relationship between the generated text and the structured semantic summary is monitored in real time. When the generated content is detected to deviate from the semantic range of the mandatory reference semantic points, the current generation process is automatically interrupted, and generation is retried based on the structured semantic summary. After generation, the generated content is subjected to a complete semantic alignment check with the structured semantic summary. Only when the check results show that the generated content conforms to the core semantic scope defined by the structured semantic summary will the generated content be used as a valid output result for cross-role transmission.
[0022] It should be noted that in this step, before generating content for the next role, a corresponding generation prompt template is constructed based on the task type of that role (such as trend analysis, investment advice, or risk warning). This template has a pre-defined "context injection slot," which is explicitly marked as only allowing the reception of semantic summary units formed after structured semantic compression in the previous step, prohibiting the inclusion of original report text or any other unstructured content. Subsequently, the entire structured semantic summary is injected into this slot. For example, the injected content might be: "Facts: Net profit decreased by 12% year-on-year; Trends: The profit decline trend continued for two quarters; Conclusion: Rising raw material costs are the main reason." After injection, the semantic points within the summary are bound to the role, that is, based on the current role's task focus, semantic points directly related to it are marked as "mandatory reference items." For example, the trend analysis role must mandatoryly refer to "trend points," while "conclusion points" are marked as auxiliary reference items. Next, in the prompt template... Semantic reference instructions are further inserted, such as prompts like "You must analyze based on the above trend points and must not output conclusions that conflict with the trend judgment," which will generate boundary display constraints. When the next role enters the generation stage, the semantic consistency between its output content and the above mandatory reference semantic points will be monitored in real time. If it is found that the generated content ignores, misunderstands, or violates the marked core points (such as "profits are expected to rebound" while the previous text clearly stated "continuous decline"), the generation process will be immediately stopped, and a new round of generation will be triggered based on the original structured semantic summary. After the role completes all generation, an alignment verification operation will be performed, that is, the generated content will be compared with the structured semantic summary to confirm whether it fully covers all mandatory reference items and does not have directional conflicts. Only if the consistency verification is passed will the content be used as a valid output result for subsequent roles or the final report; otherwise, it will not be adopted, thereby ensuring that the context transmission in the entire multi-role collaboration process is true, concise, and does not deviate from the core semantics.
[0023] In one embodiment, S4: After the next role completes content generation, the generated content is compared with the set of semantic anchors to determine whether the generated content completely covers the semantic anchors and maintains the original semantic direction. After the next role completes content generation, semantic unit segmentation processing is performed on the generated content, which is divided into multiple independently identifiable semantic fragments. Each semantic fragment is labeled with its semantic function type, which includes at least factual statement fragments, trend judgment fragments, and conclusive statement fragments. Based on the set of semantic anchors formed in step S1, an anchor-semantic fragment mapping relationship table is established. Each semantic anchor is matched one by one with semantic fragments in the generated content that can express the same or similar semantic meanings, and the matching result is recorded as covered, partially covered or uncovered. After completing semantic coverage matching, semantic anchors that are determined to be covered or partially covered are further subjected to semantic direction consistency verification. The verification is completed by comparing whether the direction of change, causal orientation or conclusion tendency expressed by the corresponding semantic fragment in the generated content is consistent with the original semantic direction recorded in the semantic anchor. When a semantic fragment is detected in the generated content that is opposite to, weakens or negates the original semantic direction of any semantic anchor, the corresponding semantic anchor is marked as a direction conflict anchor and the specific position of the direction conflict anchor in the generated content is recorded. Based on the coverage status of semantic anchors and the semantic direction consistency verification results, a consistency comparison result is generated. When all semantic anchors are determined to be covered or partially covered and there are no anchors with conflicting directions, the generated content is determined to pass the consistency comparison. When the consistency comparison fails, the output includes verification result information containing uncovered semantic anchors and directional conflict anchors, and the verification result information is passed as a constraint to subsequent content regeneration or supplementary correction steps.
[0024] It should be noted that, firstly, after the content generated for the next role is completed, semantic unit segmentation is performed on the generated text. Specifically, the entire content is divided into multiple independent semantic segments through syntactic structure analysis and semantic block recognition. Each segment corresponds to a sentence or a logical expression unit. Furthermore, each semantic segment is labeled with its semantic function type, which includes at least factual statements (e.g., "Operating revenue increased by 12% year-on-year"), trend judgments (e.g., "Growth rate has slowed down"), and conclusive statements (e.g., "Market share expansion is mainly due to channel optimization"). Subsequently, based on the set of semantic anchor points extracted and stored in step S1, each segment is further segmented into semantic units. An anchor point establishes a mapping relationship with semantic segments in the generated text. It determines whether there are semantic segments in the generated text that are consistent or similar to the anchor point in terms of core meaning, keywords, or indicator objects. After comparing each segment, an anchor point-segment mapping table is formed, and each anchor point is labeled as "covered," "partially covered," or "not covered." For example, if the anchor point "net profit decreased by 10%" is expressed as "profit decline" in the text, it is labeled as "partially covered." Next, for all semantic anchor points determined to be "covered" or "partially covered," semantic direction consistency verification is performed. Specifically, this involves extracting... The text analyzes the direction of change (e.g., rising, falling, stable), causal structure (e.g., "due to... leading to..."), or conclusion tendency (e.g., positive, negative, neutral) of the semantic segment, comparing it with the directional information recorded in the original structured semantic summary to determine whether they are consistent, similar, or opposite. For example, if the original anchor is stated as "gross profit margin continues to decline," but is rewritten as "gross profit margin stops declining and rebounds" in the generated content, it is determined to be a directional conflict. When a directional conflict is detected, the anchor is marked as a "directional conflict anchor," and the position of the segment in the generated content and the corresponding conflict point are recorded. The coverage status of all anchors and the direction of change are analyzed. After the consistency verification is completed, the judgment results are integrated to generate a consistency comparison report. If all anchor points are covered or partially covered, and there are no directional conflict anchor points, it is determined that "the generated content has passed the consistency comparison". If there are any uncovered anchor points or directional conflict anchor points, the comparison fails, and a complete verification report containing the uncovered anchor points and directional conflict anchor points is output. At the same time, the content of this report is passed as a constraint input to the content correction or regeneration module in the next stage to restrict subsequent generation behavior to make up for omissions or correct directional deviations, thereby ensuring that all core semantic anchor points in the final report output are correctly inherited and semantically consistent.
[0025] In one embodiment, S5: If the consistency comparison passes, the generated content is output as input for subsequent roles or as part of a financial report; if the consistency comparison fails, the step of regenerating or supplementing the generated content based on the semantic anchor set is as follows: When the consistency comparison result in step S4 shows that the generated content passes the consistency comparison, the generated content is marked as qualified generated content. Based on the current role's position in the overall reporting process, the qualified generated content is selectively used directly as the input content for the next role, or written into the preset financial report structure as the component content of the corresponding chapter for storage. If the consistency comparison result shows that the generated content fails the consistency comparison, read the verification result information output in step S4. The verification result information includes at least the set of uncovered semantic anchors and the set of directional conflict anchors. Based on the set of uncovered semantic anchors and the set of directional conflict anchors, the target semantic anchors that need to be corrected are selected from the set of semantic anchors formed in step S1, and the target semantic anchors are used as the sole semantic basis for regenerating or supplementing the correction. For the target semantic anchor, a restricted generation prompt is constructed, which explicitly restricts the content to be regenerated or supplemented to only be related to the target semantic anchor, and prohibits rewriting the content corresponding to the semantic anchor that has passed the consistency comparison. Based on the limited generation prompts, the content is regenerated or supplemented and corrected. After the generation is completed, only the newly generated content replaces the local fragments in the original generated content that correspond to the target semantic anchor point, while the rest of the content that has passed the consistency comparison remains unchanged. After the partial replacement is completed, the corrected generated content is sent back to step S4 for consistency comparison until the consistency comparison passes. Then, the output or transmission operation is performed according to step 1).
[0026] It should be noted that when the consistency comparison result of step S4 is detected as "passed," meaning that all semantic anchors have been covered or partially covered, and there are no directional conflict anchors, the currently generated content will be immediately marked as "qualified generated content." Based on the role's position in the multi-role generation process, a content distribution operation will be performed: if the current role is not the end role, the qualified generated content will be used as one of the Prompt inputs for the next role and encapsulated into a semantic injection package; if the current role is the end role, the content will be written into a predefined financial report structure and specified in a designated section (such as trends). The analysis section, investment advice section, or risk warning section are marked as "publishable content." Conversely, when the consistency comparison result output by S4 is "failed," the set of uncovered semantic anchors and the set of directional conflict anchors listed in the comparison report will be extracted and used as the "generation correction trigger source." Subsequently, target semantic anchors that match the above-mentioned uncovered or conflicting anchors will be selected from the original set of semantic anchors in step S1 and used as the sole semantic basis for regeneration. A set of "restricted generation prompts" will be constructed, which explicitly indicate that the generated content will only revolve around these target semantic anchors. The system constructs a structure that prohibits overwriting, modifying, or replacing segments related to other approved anchor points in the original generated content to prevent "fixing one segment and ruining the whole." For example, if the current generated content omits the trend anchor point "net profit has declined for three consecutive quarters," a prompt will be generated stating, "Please supplement the trend analysis of the continuous decline in net profit, requiring specific time and magnitude references." Based on this restrictive prompt, a regeneration or supplementary correction action is triggered. The generated content will be inserted into the corresponding segment position in the original content, such as replacing the misleading description "stable profit performance," while retaining other unaffected content segments. After insertion, the corrected overall text is returned to step S4 to re-execute the consistency comparison process. If it passes again, it is considered a qualified generated content, and the same storage or transmission operation as described above is performed. Otherwise, the local correction mechanism is triggered again. This process is repeated until the generated content meets the requirements of all anchor point coverage and semantic direction consistency. This ensures that the content finally written into the report or transmitted to the next role not only meets the consistency requirements of the context link but also minimizes unnecessary duplicate generation and structural damage, improving content stability and upstream and downstream collaboration efficiency.
[0027] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention should still fall within the scope of the claims of the present invention.
Claims
1. A generative financial report writing method based on role division of labor, characterized in that: Includes the following steps: S1: Obtain the report text content generated by the previous role, perform semantic parsing on the text content, and extract the set of semantic anchors for contextual communication. S2: The semantic anchor set is structured and compressed to generate a structured semantic summary for context injection; S3: Inject the structured semantic summary as the only valid contextual information into the generation prompt of the next role, and the core semantic scope that must be referenced when generating content; S4: After the next role completes content generation, perform a consistency comparison between the generated content and the set of semantic anchors to determine whether the generated content completely covers the semantic anchors and maintains the original semantic direction. S5: If the consistency comparison passes, the generated content will be used as input for subsequent roles or as part of the financial report for output; if the consistency comparison fails, the generated content will be regenerated or supplemented and corrected based on the semantic anchor set.
2. The generative financial report writing method based on role division of labor according to claim 1, characterized in that, The steps to extract the set of semantic anchors for context passing are as follows: The report text content generated by the previous role is segmented into paragraphs to obtain multiple text segments. Based on the preset financial semantic recognition rules, semantic role labeling is performed on each text segment. The semantic roles include at least factual description statements, trend judgment statements, and conclusive inference statements. After completing the semantic role labeling, entity-attribute alignment processing is performed on the text segments labeled as factual description statements. Numerical information, time information, and indicator name information directly corresponding to financial objects are extracted from the text segments to form factual semantic points. For text segments marked as trend judgment statements, the direction words and magnitude limit words of change are identified based on syntactic dependency relations, and trend semantic points representing the change relationship are constructed by combining them with the corresponding factual semantic points. For text segments marked as conclusive inference statements, identify causal trigger words or logical connectors, and trace back the factual and trend semantic points they reference to generate conclusive semantic points with clear sources of reasoning. The factual semantic points, trend semantic points, and conclusion semantic points are sorted according to their order of appearance in the original report text, and the reference relationships between each semantic point are recorded during the sorting process, forming a set of semantic anchor points containing semantic content and logical connection information.
3. The generative financial report writing method based on role division of labor according to claim 1, characterized in that, The steps for structuring and compressing the semantic anchor set to generate a structured semantic summary for context injection are as follows: The semantic anchor set is grouped by type, and the semantic anchors are classified into the corresponding semantic levels according to factual semantic points, trend semantic points and conclusion semantic points, and the order of appearance of semantic anchors in the original report text is preserved in each semantic level. After completing the semantic hierarchy division, the factual semantic points are compressed into the smallest semantic units. The compression process includes deleting modifying adjectives and non-core qualifiers, and retaining only the names of financial entities, corresponding indicator names, numerical information and time information, thereby forming basic factual semantic fragments that cannot be further divided. Based on the basic fact semantic fragments, trend mapping compression processing is performed on the trend semantic points. The direction and magnitude of change involved in the trend semantic points are bound to the corresponding basic fact semantic fragments, and the logical position of the trend semantic points relative to the basic fact semantic fragments is recorded in the form of sequential identifiers. After completing the trend mapping compression, causal reference compression is performed on the conclusion-type semantic points. The natural language description used to express the inference results in the conclusion-type semantic points is replaced with the logical reference markers of the fact-type semantic points and trend-type semantic points they reference, so as to preserve the complete reasoning path without repeating the original content. The compressed factual semantic points, trend semantic points, and conclusion semantic points are rearranged in the order of facts before trends and trends before conclusions. The citation relationships between each semantic point are explicitly recorded during the rearrangement process, forming a structured semantic summary with hierarchical structure and logical dependencies. The structured semantic summary is encapsulated as an independent context injection unit, and the context injection unit is limited to containing only the structured semantic summary content.
4. The generative financial report writing method based on role division of labor according to claim 1, characterized in that, The steps for injecting structured semantic summaries as the only valid contextual information into the generation prompts for the next role, and for referring to the core semantic scope when generating content, are as follows: Before the next role starts generating content, a generation prompt template corresponding to that role is constructed. In the generation prompt template, a dedicated semantic slot for context injection is pre-defined, and the semantic slot is restricted to receiving only structured semantic summaries. The structured semantic summary is injected into the semantic slot as a whole, and the original report text content or other unstructured text content is prohibited from being written into the semantic slot during the injection process; After the structured semantic summary injection is completed, role binding processing is performed on each semantic point in the structured semantic summary. Semantic points related to the responsibilities of the next role are marked as mandatory reference semantic points, and the remaining semantic points are marked as auxiliary reference semantic points. Based on the role binding processing results, the semantic reference constraint instruction is displayed in the generation prompt template, which restricts the next role to cover all mandatory reference semantic points when generating content, and prohibits the generation of content that conflicts with the semantic direction of the mandatory reference semantic points. During the next role's content generation process, the semantic relationship between the generated text and the structured semantic summary is monitored in real time. When the generated content is detected to deviate from the semantic range of the mandatory reference semantic points, the current generation process is automatically interrupted, and generation is retried based on the structured semantic summary. After generation, the generated content is subjected to a complete semantic alignment check with the structured semantic summary. Only when the check results show that the generated content conforms to the core semantic scope defined by the structured semantic summary will the generated content be used as a valid output result for cross-role transmission.
5. The generative financial report writing method based on role division of labor according to claim 1, characterized in that, After the next role completes content generation, the generated content is compared with the set of semantic anchors to determine whether the generated content completely covers the semantic anchors and maintains the original semantic direction. The steps are as follows: After the next role completes content generation, semantic unit segmentation processing is performed on the generated content, which is divided into multiple independently identifiable semantic fragments. Each semantic fragment is labeled with its semantic function type, which includes factual statement fragments, trend judgment fragments, and conclusive statement fragments. Based on the set of semantic anchors, an anchor-semantic fragment mapping relationship table is established. Each semantic anchor is matched one by one with semantic fragments in the generated content that can express the same or similar semantic meanings, and the matching result is recorded as covered, partially covered or uncovered. After completing semantic coverage matching, semantic anchors that are determined to be covered or partially covered are further subjected to semantic direction consistency verification. The verification is completed by comparing whether the direction of change, causal orientation or conclusion tendency expressed by the corresponding semantic fragment in the generated content is consistent with the original semantic direction recorded in the semantic anchor. When a semantic fragment is detected in the generated content that is opposite to, weakens or negates the original semantic direction of any semantic anchor, the corresponding semantic anchor is marked as a direction conflict anchor and the specific position of the direction conflict anchor in the generated content is recorded. Based on the coverage status of semantic anchors and the semantic direction consistency verification results, a consistency comparison result is generated. When all semantic anchors are determined to be covered or partially covered and there are no anchors with conflicting directions, the generated content is determined to pass the consistency comparison. When the consistency comparison fails, the output includes verification result information containing uncovered semantic anchors and directional conflict anchors, and the verification result information is passed as a constraint to the subsequent content regeneration or supplementation and correction steps.
6. The generative financial report writing method based on role division of labor according to claim 1, characterized in that, If the consistency comparison passes, the steps for outputting the generated content as input for subsequent roles or as part of a financial report are as follows: When the consistency comparison result shows that the generated content passes the consistency comparison, the generated content is marked as qualified generated content. Depending on the current role's position in the overall reporting process, the qualified generated content is selectively used directly as the input content for the next role, or written into the preset financial report structure as the component content of the corresponding chapter for storage.
7. The generative financial report writing method based on role division of labor according to claim 1, characterized in that, If the consistency comparison fails, the steps for regenerating or supplementing the generated content based on the semantic anchor set are as follows: When the consistency comparison result shows that the generated content fails the consistency comparison, the output verification result information is read. The verification result information includes at least the set of uncovered semantic anchors and the set of directional conflict anchors. Based on the set of uncovered semantic anchors and the set of directional conflict anchors, the target semantic anchors that need to be corrected are selected from the set of semantic anchors, and the target semantic anchors are used as the sole semantic basis for regeneration or supplementation correction. For the target semantic anchor, a restricted generation prompt is constructed, which explicitly restricts the content to be regenerated or supplemented to only be related to the target semantic anchor, and prohibits rewriting the content corresponding to the semantic anchor that has passed the consistency comparison. Based on the limited generation prompts, the content is regenerated or supplemented and corrected. After the generation is completed, only the newly generated content replaces the local fragments in the original generated content that correspond to the target semantic anchor point, while the rest of the content that has passed the consistency comparison remains unchanged. After the partial replacement is completed, the corrected generated content is sent back to step S4 for consistency comparison until the consistency comparison passes. Then, the output or transmission operation is performed according to S1.
Citation Information
Patent Citations
Software agent used to provide information to a user for a plurality of computer
CA1340592C
Method and system for website analysis
CA2505370A1
System and method for improving the efficiency, comfort, and / or reliability in operating systems, such as for example windows
CA2614795A1
Method and system for applying metadata to data sets of file objects
CA2668306A1
Method and device for intelligently analyzing and researching project and automatically generating feasibility research report
CN120031324A