A Smart ESG Report Generation Method Based on Human-Machine Collaboration and Knowledge Base Iteration

By employing human-computer collaboration and knowledge base iteration, we have solved problems such as illusion and weak iteration capabilities in ESG report generation, achieving high-quality report generation, ensuring consistency and traceability of content and structure, and reducing expert review costs.

CN123070069APending Publication Date: 2026-11-10SHANGHAI URBAN DEV RES INST CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611570611.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-12
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Existing technologies for generating ESG reports suffer from serious illusion problems, lack of in-depth understanding, weak iteration capabilities, and a disconnect between structure and content, making it impossible to generate high-quality reports.

Method used

By adopting a human-computer collaboration and knowledge base iteration approach, a micro-knowledge base is built for each report through data parsing, interactive outline construction, micro-requirement generation, dual-source hierarchical retrieval, manual verification, and knowledge accumulation, achieving closed-loop iteration and self-evolution.

Benefits of technology

To ensure the authenticity and verifiability of report content, achieve knowledge accumulation and iteration, improve report quality, reduce expert review costs, and enhance the traceability and compliance of reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123070069A_ABST
    Figure CN123070069A_ABST
Patent Text Reader

Abstract

This invention discloses an intelligent ESG report generation method based on human-computer collaboration and knowledge base iteration. The method includes: converting multi-source heterogeneous data into Markdown format and storing it in a basic index library; generating an initial report outline and configuring writing guidelines for outline nodes through human-computer interaction; for each node, calling a large language model to reverse-engineer and generate a micro-level writing requirements specification; performing a dual-source hierarchical search based on this specification, prioritizing the search of the micro-knowledge base; receiving user acceptance or rejection actions for candidate materials through human-computer interaction, binding effective supporting information to nodes and storing it in the micro-knowledge base; and the large language model prioritizing the reading of verified data from the micro-knowledge base to generate report chapters. This invention reduces the illusion rate of the large model through a requirements-pre-positioning strategy and closed-loop iteration of the micro-knowledge base, achieving knowledge accumulation and cross-report reuse.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of artificial intelligence and natural language processing technology, specifically relating to an intelligent ESG report generation method and system based on human-computer collaboration and knowledge base iteration. It utilizes large language model (LLM), retrieval-enhanced generation (RAG) technology, AI agent technology, and human-computer collaboration mechanism to generate high-quality corporate environmental, social, and governance (ESG) reports. Background Technology

[0002] ESG reports are an important vehicle for companies to disclose non-financial information, covering three dimensions: environmental, social, and governance. They have the following characteristics: diverse data sources (such as PDF, Word, Excel, and image formats), rigorous report structure, high compliance requirements, and strong industry characteristics.

[0003] Existing technologies typically generate data directly using a general large language model (LLM) or through simple document retrieval question-and-answer generation using retrieval augmentation (RAG) techniques. However, these existing technologies suffer from the following significant drawbacks: 1. The problem of illusion is serious: large language models are prone to data fabrication, making it difficult to meet the authenticity requirements of ESG reports; 2. Lack of in-depth understanding: General models cannot understand the "writing style" and "implicit requirements" of a specific company; 3. Weak iteration capability: After the generated errors are manually corrected, they cannot be retained in the system, causing the same errors to be repeated in the next generation; 4. Disconnect between structure and content: The inability to first establish a rigorous table of contents and then fill in the content accordingly leads to a chaotic logic throughout the report.

[0004] In recent years, some patents have attempted to address the issue of automatically generating ESG reports. A search revealed the following two prior art papers that are most relevant to this application: Patent CN121436933A (publication date: January 30, 2026, applicant: Shanghai TEGO Information Technology Co., Ltd.) discloses a method and system for assisting in the generation of ESG reports based on large model technology. This technical solution includes structured storage of multi-source ESG data, intelligent report layout, placeholder adaptation driven by a large model, comprehensive compliance checks, and a one-click repair function. It is equipped with static resources such as an ESG specification knowledge graph, an enterprise visual specification library, an ESG standard indicator database, and an ESG report template library. The core technical approach of this solution is "template-driven + static knowledge base + one-time repair," meaning that it relies on pre-built templates and knowledge graphs to generate reports by filling in placeholders, and users can correct errors in one go using the "one-click repair" function.

[0005] Patent CN121390013A (publication date: January 23, 2026, applicant: Wuhan Sanzang Technology Co., Ltd.) discloses an ESG report generation and encryption method, apparatus, device, and computer medium. The technical solution includes decomposing the ESG report template into a three-level metadata structure, matching the ESG standard dataset with the report processing request, filling in unmatched indicators, constructing an initial ESG report, revising the report, and encrypting and storing the ESG report. The core innovation of this solution lies in the encryption processing of the ESG report; the report generation process uses a traditional template filling method.

[0006] However, the aforementioned existing technologies still share the following common drawbacks: First, neither of them achieved a closed-loop iteration of human feedback. Whether it is the "one-click repair" in CN121436933A or the "report revision" in CN121390013A, the data corrected by humans cannot be stored and reused by the system, causing the same error to reappear in the next report generation.

[0007] Secondly, both adopt a "template-driven" rather than "knowledge-driven" technical approach. Both rely on pre-built static templates and knowledge graphs, making it impossible to dynamically adapt to changes in user needs, and template maintenance costs are high.

[0008] Third, both lack a "demand-oriented" mechanism. Neither explicitly models the writing needs for each chapter, resulting in imprecise retrieval and generation targets that easily lead to a disconnect between content and chapters.

[0009] Fourth, neither achieves fine-grained control at the chapter level. Both generate reports at the level of the entire report or template placeholders, making it impossible to customize differentiated search strategies and generation requirements for each independent chapter.

[0010] Therefore, there is an urgent need for an ESG report generation method and system that can integrate expert experience, support data traceability, and continuously evolve through human feedback. Summary of the Invention

[0011] Purpose of the Invention: To address the aforementioned problems, this invention provides an intelligent ESG report generation method and system based on human-machine collaboration and knowledge base iteration. Adopting a "document-driven development" approach, it decouples the report generation process into five stages: data parsing, outline construction, on-demand retrieval, manual verification, and content generation. By constructing a dedicated "mini-knowledge base" for this report, valid materials confirmed by manual review are retained, forming a closed-loop iteration that continuously improves report quality.

[0012] Technical solution: On the one hand, this invention discloses an intelligent ESG report generation method based on human-machine collaboration and knowledge base iteration, including the following steps: S1. Data Preparation: Acquire heterogeneous data from multiple sources, convert them into Markdown format that retains the heading hierarchy and table structure, perform semantic parsing on the converted document fragments to generate metadata tags, and store them in the basic index library; S2. Interactive Outline Construction: An initial report outline is generated using a large language model combined with industry standards in the ESG field. The initial report outline can be dragged, added, deleted, and its hierarchy adjusted through a visual interactive interface. Writing guidelines are also configured for the adjusted outline nodes. S3. Micro-requirements generation: For each outline node, input its node context and the writing guidelines into the large language model, and require the model to reverse-engineer the data dimensions and writing focus that the chapter should include, and generate a structured micro-writing requirements specification. S4. Dual-source hierarchical retrieval: Using the micro-writing requirements specification as the retrieval query condition, a hierarchical retrieval strategy is executed. The first priority is to retrieve the micro knowledge base that has been manually verified historically. The second priority is to retrieve the basic index library when there is no relevant content in the micro knowledge base. S5. Manual Verification and Knowledge Accumulation: Display the retrieved candidate supporting information, receive user acceptance or rejection actions through the human-computer interaction interface, strongly associate and bind the valid supporting information confirmed by the user with the corresponding outline node, and store it in a dedicated micro knowledge base. S6. Constraint Content Generation: Under the constraints of the outline nodes, the large language model prioritizes reading the valid supporting information already bound in the micro knowledge base, and combines it with the micro writing requirements specification to generate report chapters corresponding to the major outline nodes.

[0013] Furthermore, in S1. Data preparation, the generated metadata tag dimensions during semantic parsing of the converted Markdown document fragments include at least year, topic category, and data entity; the basic index library is a basic vector database used to support semantic similarity retrieval.

[0014] Furthermore, in the S2. Interactive outline construction, the system first combines industry standards in the ESG field with the company's historical reports and uses a large language model to generate an initial report directory tree; the system assembles information such as the company's industry, report year, and historical report structure into prompt words, and calls the large language model to generate a directory tree structure containing first-level, second-level, and third-level chapters; Then, the system introduces an expert interaction mechanism, providing a visual table of contents editor built on the Streamlit framework; users can adjust the order of outline nodes by dragging and dropping, add or delete nodes by using buttons, and adjust the hierarchical relationship of nodes by using indentation; in addition, the system allows users to input specific "writing guidelines" and "emphasis" for each outline node.

[0015] Furthermore, in S4. Dual-source hierarchical retrieval, the system uses the micro-level writing requirements specification generated in S3 as the retrieval query condition and performs the following hierarchical retrieval: First priority: Retrieve the micro knowledge base to obtain high-confidence, valid supporting information that has been manually verified historically. The data entries stored in the micro knowledge base have been confirmed through the historical verification process and are bound with corresponding node paths, confidence scores, and data year information. Second priority: If there is no relevant content or the confidence level is insufficient in the micro knowledge base, the system will automatically downgrade to searching the basic document library, that is, to conduct a broad semantic search in the full Markdown vector library.

[0016] Furthermore, in S5. Manual verification and knowledge accumulation, the iterative mechanism of the micro-knowledge base includes: When generating the next version report or the next annual report, the system prioritizes retrieving the bound materials in the micro knowledge base; If the timestamps of materials in the micro knowledge base expire, the system will automatically prompt the user to perform incremental updates, thereby increasing the quality of the report with the number of uses.

[0017] Furthermore, in S6. Constraint content generation, accurate chapter content is generated using verified data. Under the semantic constraints of the outline nodes, the large language model prioritizes reading the valid supporting information already bound in the micro knowledge base, and combines it with the micro writing requirements specification to perform constrained paragraph writing.

[0018] On the other hand, this invention discloses an intelligent ESG report generation system based on human-machine collaboration and micro-knowledge base iteration, used to implement the above-mentioned method. The system is logically divided into: The front-end interaction layer serves as the entry point for user interaction with the system, including modules for outline configuration and modules for content generation and verification. The business logic layer, as the core processing center of the system, includes a service module for managing the report lifecycle, a service module for encapsulating the interactive logic of the content generation model, and a service module for processing document templates and exporting. The data storage layer is responsible for data persistence and temporary state management, including a database management unit for storing structured business data and a file storage unit for storing unstructured files.

[0019] Furthermore, the front-end interaction layer is built based on the Streamlit framework and includes: The report management module is used for user login, creating new reports, viewing historical report lists, and managing basic report metadata; The framework configuration module provides a visual table of contents editor and allows users to adjust the generated initial report outline and enter writing guidelines for specific outline nodes. The content generation module, as the core interface for human-computer collaboration, is used to display the retrieved candidate support information. The content generation module is equipped with interactive buttons for users to accept or reject, and can trigger the large language model generation task in the background. The editing and review module provides a WYSIWYG editor and allows users to modify, annotate, and compare versions of the generated report content. The report output module is used to assemble the generated report chapters into a complete report document.

[0020] Furthermore, the business logic layer is implemented using a microservice architecture, with each service module working collaboratively through interfaces, specifically including: The report service module integrates multiple report management functions, and is responsible for handling the creation, switching and lifecycle status transition of reports, supporting the parallel development of multiple reports; The intelligent generation service module integrates the content generation function of the large language model, encapsulates the interaction logic with the inference engine, and is responsible for generating outlines, paragraphs and polishing suggestions based on the context. The document processing service module integrates template and export functions, and is responsible for loading standard document templates and rendering the generated structured data into the final deliverable file; The framework parsing module integrates multi-level parsing algorithms to parse complex directory tree structures, ensuring the hierarchical logic of the report outline is correct. The configuration service module integrates an auto-loading function, which is responsible for automatically pre-reading environment variables and global configuration parameters when the system starts up or the page loads. The file service module integrates upload management functions, and is responsible for processing file upload requests from front-end users, performing format verification, and extracting metadata.

[0021] Furthermore, the data storage layer also includes a session state unit for storing temporary interaction data of the user on the browser side, ensuring the continuity of user operations.

[0022] Beneficial Effects: This invention adopts the concept of "document-driven development," decoupling the report generation process into four stages: data parsing, interactive outline construction, knowledge accumulation, and content generation. It fully utilizes Large Language Modeling (LLM), Retrieval Enhanced Generation (RAG) technology, AI agent technology, and human-machine collaboration mechanisms to automatically generate high-quality corporate environmental, social, and governance (ESG) reports. Furthermore, by constructing a dedicated "micro-knowledge base" for this report, valid materials confirmed by human review are accumulated, forming a closed-loop iteration that continuously evolves and improves report quality.

[0023] Compared with the prior art, the specific advantages of the present invention are as follows: I. Eliminate hallucinations and ensure factual accuracy This invention constructs a report-specific micro-knowledge base, strongly linking manually verified supporting information with corresponding outline nodes. During content generation, verified data from this micro-knowledge base is prioritized. The large language model no longer relies on its internal parametric knowledge but is strictly based on manually verified factual materials. Simultaneously, a system prompt stating "Do not fabricate data" is set during the binding content generation stage, eliminating the possibility of data fabrication by the model at the source. Compared to existing technologies that directly generate data using general large language models or simple RAG retrieval, this invention significantly reduces the illusion problem in ESG reports, ensuring the authenticity and verifiability of the report content.

[0024] II. Achieving Knowledge Accumulation and Closed-Loop Iteration In existing technologies, after manual correction of errors in reports, the corrections cannot be recorded and reused by the system, causing the same errors to reappear in subsequent reports. This invention introduces a "human feedback as training" mechanism. When a user selects "accept" for a search result on the front end, the system automatically binds the material to the corresponding outline node and stores it in a mini-knowledge base, marking it as verified. When the next annual report is generated, the system automatically loads historical mini-knowledge base data as the first priority search source, achieving knowledge reuse across reporting cycles. If the timestamp of the material in the mini-knowledge base expires, the system automatically prompts the user to perform an incremental update. Through this mechanism, each manual verification is an accumulation of knowledge, and each report generation is a quality improvement, achieving the technical effect of allowing the system to self-evolve without fine-tuning the model.

[0025] Third, the content and structure are strongly coupled to avoid logical disconnect. In existing technologies, report outline and content generation are often separate steps, which can easily lead to problems such as mismatched content filling and logical inconsistencies between chapters after the outline is finalized. This invention adopts a "demand-priority" strategy, generating a structured micro-level writing requirements specification before retrieval, clearly defining the data indicators, source hints, writing style, and degradation strategies required for each chapter. Retrieval and generation are both conducted under the guidance of this requirements specification, ensuring that the generation goals of each chapter are highly consistent with the outline requirements. Simultaneously, through the object-oriented design of outline nodes, each chapter independently manages its writing requirements and verified materials, without relying on the context window of the entire document, achieving fine-grained control at the chapter level.

[0026] IV. Reduce expert review costs and improve generation efficiency This invention significantly reduces the workload of experts manually writing and organizing materials through automated retrieval and constraint-based generation. Experts only need to make a "reject" or "accept" decision on the candidate materials interface, and supplement a small amount of missing data if necessary, to complete the knowledge entry into the database. Compared to the weeks required for purely manual ESG report writing, this invention can shorten the report generation cycle to a few days. Compared to the existing method of directly generating large models that requires 4-6 rounds of revisions, this invention can reduce the number of review and revision rounds to 1-2 rounds, significantly reducing the time and manpower costs of expert review.

[0027] V. Enhance the traceability and compliance of reports This invention preserves the semantic hierarchy and source information of the original document during the data preparation stage, and attaches a source tag to each data reference during the content generation stage, allowing users to locate the specific position in the original document. This mechanism ensures that every piece of data in the report can be traced back to its original source, meeting the compliance requirements for data verifiability in ESG reporting. Simultaneously, the system combines industry standards in the ESG field such as GRI and ISSB to generate outlines and writing requirements, ensuring that the report content complies with mainstream disclosure frameworks.

[0028] In summary, this invention effectively solves the defects of existing ESG report generation technologies, such as severe illusion problems, weak iteration capabilities, and disconnect between structure and content, through a series of technical means, including "demand pre-positioning," "dual-source hierarchical retrieval," "closed-loop iteration of micro-knowledge base," and "constraint content generation." It has significant technological progress and industrial practical value. Attached Figure Description

[0029] Figure 1 A flowchart of the intelligent ESG report generation method provided in this embodiment of the invention; Figure 2 This is a schematic diagram of the human-machine collaboration and micro knowledge base iteration logic provided in an embodiment of the present invention; Figure 3 A flowchart of retrieval and generation based on outline nodes provided for embodiments of the present invention; Figure 4 The overall architecture diagram of the intelligent ESG report generation system provided in this embodiment of the invention is shown. Detailed Implementation

[0030] To address the shortcomings of existing ESG report production methods, such as severe illusion problems, lack of in-depth understanding, weak iterative capabilities, and a disconnect between structure and content, which prevent the generation of high-quality ESG reports, this invention provides an intelligent ESG report generation method and system based on human-machine collaboration and knowledge base iteration. This system not only automatically generates high-quality ESG reports but also retains valid materials confirmed by manual review during the review process, forming a closed-loop iteration and achieving self-evolution to improve report quality. The following detailed description, in conjunction with accompanying drawings, further illustrates this intelligent ESG report generation method and system based on human-machine collaboration and knowledge base iteration. Those skilled in the art can easily understand other advantages and effects of this invention from the content disclosed in this specification. This invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of this invention. It should be noted that, unless otherwise specified, the following embodiments and features can be combined with each other. It should also be understood that the terminology used in the embodiments of this invention is for describing specific implementation schemes and not for limiting the scope of protection of this invention.

[0031] like Figure 1 As shown, this embodiment provides an intelligent ESG report generation method based on human-machine collaboration and knowledge base iteration. This method decouples the report generation process into six stages: data preparation, interactive outline construction, micro-requirement generation, dual-source hierarchical retrieval, manual verification and knowledge accumulation, and constraint content generation.

[0032] S1. Data Preparation: Acquire heterogeneous data from multiple sources, convert it into a unified Markdown format that retains heading hierarchy and table structure, perform semantic parsing on the converted document fragments to generate metadata tags, and store them in the basic index library. Specifically: This stage is responsible for acquiring and processing multi-source heterogeneous data files within the enterprise, including formats such as PDF, Docx, HTML, Excel, and Image. The system first uses a parsing engine to convert unstructured documents from the multi-source heterogeneous data into a standard format. In this embodiment, the standard format is Markdown, which retains heading hierarchy and table structure. This Markdown conversion can be achieved through the `convert_all_to_markdown` module. Specifically, the system iterates through all files in the source directory using `iter_candidate_files`. For PDF files, it calls a dedicated OCR parsing service or PDF Parse API; for Office files, it uses the Docling conversion engine to cleanse all unstructured data into structured Markdown, thereby preserving the document's semantic hierarchy (headings H1 / H2, tables, etc.) and solving the problem of large language models (LLMs) having difficulty understanding complex formats. The core code of the above conversion process is as follows: # [Format Converter Module] # Traverse the directory, supporting multiple formats including PDF, Docx, Excel, and HTML. def convert_all_to_markdown(source_dir: Path): converter = DocumentConverter() # Initialize the document conversion engine for file_path in iter_candidate_files(source_dir): # For PDFs, use a dedicated OCR parsing service; for Office documents, use docling. if file_path.suffix.lower() == ".pdf": markdown_content = call_pdf_parse_api(file_path) else: # Core principle: Preserve the document's semantic structure (headings, tables) rather than plain text. result = converter.convert(file_path) markdown_content = result.document.export_to_markdown() # Local storage: A Markdown file with the same name, serving as the source for vector retrieval. save_markdown(file_path.with_suffix(".md"), markdown_content) After format conversion, the system performs semantic parsing on the Markdown document fragments, generating searchable metadata tags (Timeline, Domain, Entity). Tag dimensions include year (Timeline), topic category (Domain, with values ​​E / S / G), and data entity (Entity). The processed data units are stored in a basic index database, which is a basic vector database supporting subsequent semantic similarity retrieval.

[0033] S2. Interactive Outline Construction Phase: Utilizing a large language model combined with ESG industry standards, an initial report outline is generated. This outline is then visualized and interactively managed through a user interface, allowing users to drag, add, delete, and adjust its hierarchy. Writing guidelines are configured for each node in the adjusted outline. Specifically: This phase begins by combining industry standards in the ESG field (such as GRI and ISSB) with the company's historical reports, and using a large language model to generate an initial report outline tree. The system assembles information such as the company's industry, report year, and historical report structure into prompt words, and calls the large language model to generate an outline tree structure containing first-level, second-level, and third-level chapters.

[0034] Then, the system introduces an expert interaction mechanism, providing a visual table of contents editor built on the Streamlit framework. Users can adjust the order of outline nodes by dragging and dropping, add or delete nodes using buttons, and adjust the hierarchical relationship of nodes using indentation. In addition, the system allows users to input specific "Writing Guide" and "Focus" for each outline node.

[0035] To achieve fine-grained control at the chapter level, this invention instantiates each outline node as an independent object, rather than storing it as a single text structure. Each outline node object includes attributes such as node identifier, node path, node title, node-level writing requirements, verified supporting materials, and the final generated content. Specifically, the system uses a relational database to store outline node objects, and its table structure is defined as follows: # [Database Schema Definition] class ESGOutlineNodes: "Outline Node Object Model: Each chapter is an independently managed entity." schema = """ CREATE TABLE esg_outline_nodes ( id INT PRIMARY KEY AUTO_INCREMENT, report_id INT, `node_path VARCHAR(255)` -- A unique path identifier, such as "Environment / Water Resources Management / Water Intake Quotas". node_title VARCHAR(100), -- Node title -- Node-level writing requirements (generated by LLM + manually corrected) writing_requirements TEXT, -- For example: "Please include municipal water withdrawals in 2024 and year-on-year data..." -- Verified supporting materials (JSON format) -- Stores high-quality slice data that has been manually verified and is strongly correlated with this node. verified_supporting_material JSON, generated_content TEXT -- The final generated paragraph ); """ Through the table structure described above, the system strongly associates and binds the writing requirements (writing_requirements, corresponding to the aforementioned "writing guidelines") and verified supporting materials (verified_supporting_material) of each chapter with their corresponding node paths. This allows each chapter to perform RAG retrieval and content generation independently, without relying on the context window of the entire document, thus achieving fine-grained control at the chapter level.

[0036] like Figure 3 As shown, the technical details of ensuring the accuracy of each chapter are explained in detail, demonstrating the detailed processing flow of content generation for individual outline nodes in this system. This flow solves the problem of empty content in traditional generation methods through the strategies of "demand pre-positioning" and "knowledge base priority." Specifically: S3. Micro-requirements generation stage: For each outline node, its node context and writing guidelines are input into the large language model. The model is required to reverse-engineer the data dimensions and writing focus that the chapter should include, generating a structured micro-writing requirements specification. Specifically: The core innovation of this phase lies in the "demand pre-positioning" mechanism. The system traverses every node in the outline directory tree. For each node, its metadata (including node title, node path, and parent node scope) and manually entered writing guidelines are input into the large language model. The model is then required to "reverse deduce" the specific data dimensions and writing focus that the chapter should include under ESG reporting standards (such as GRI / ISSB), generating a structured "micro-level writing guidelines." For example, for the "water resources management" node, the generated writing requirements might include: "cite the total water withdrawal data for 2024," "list water recycling measures," and "compare the year-on-year decline rate."

[0037] In this embodiment, the micro-writing requirements specification adopts a JSON structured format and includes at least the following fields: the required_metrics field, which lists the required data indicators and units, such as "total water intake: cubic meters" and "circulating water utilization rate: percentage"; the data_sources_hint field, which specifies the document type or location to be retrieved first, such as "prioritize extraction from EHS data reports"; the writing_style field, which specifies the order of quantitative and qualitative descriptions and comparison requirements, such as "quantitative first, then qualitative, compared with industry benchmarks"; and the fallback_strategy field, which specifies the handling method when data is missing, such as "if there is no data for 2024, use data from 2023 and mark it as an estimate".

[0038] S4. Dual-Source Hierarchical Retrieval Stage: Using the micro-level writing requirements specification as the search query condition, a hierarchical retrieval strategy is executed. The first priority is to retrieve the micro-knowledge base, which has been manually verified historically. The second priority is to retrieve the basic index base if no relevant content is found in the micro-knowledge base. Specifically: The characteristic of this stage is the execution of a hierarchical retrieval strategy. The system uses the micro-level writing requirements specification generated by S3 as the search query condition and executes the following hierarchical retrieval: First priority: Retrieve the Micro-Knowledge Base to obtain high-confidence, valid supporting information that has undergone manual historical verification. The data entries stored in the Micro-Knowledge Base have been confirmed through a historical verification process and are bound with corresponding node paths, confidence scores, data years, and other metadata.

[0039] Second priority: If there is no relevant content in the micro knowledge base or the confidence level is insufficient (e.g., the data year is more than one year earlier than the current report year), the system will automatically downgrade to searching the basic document library, that is, to conduct a broad semantic search in the full Markdown vector library.

[0040] During the retrieval process, the system also implemented the following edge case handling: when the number of records returned by the micro knowledge base is less than a preset threshold (e.g., 3 records), the system automatically triggers a search of the basic index to supplement it; when the data year in the micro knowledge base is more than one year earlier than the current report year, the system marks the data as expired and prompts the user to confirm whether to continue using it; when neither the micro knowledge base nor the basic index retrieves any candidate supporting information, the system dynamically generates a data entry form based on the required_metrics field in the micro writing requirements specification, inviting the user to manually supplement the missing data.

[0041] S5. Manual Verification and Knowledge Accumulation Stage: Display the retrieved candidate supporting information, receive user acceptance or rejection actions through a human-computer interaction interface, and strongly associate the valid supporting information confirmed by the user with the corresponding outline nodes, storing it in a dedicated mini-knowledge base. Specifically: This phase introduces a human-machine collaborative closed-loop mechanism. The system displays the candidate supporting information recalled in the dual-source hierarchical retrieval phase on the user interface. Each candidate material is labeled with its source (mini knowledge base / basic document library) and confidence level. The interface provides "Accept" and "Reject" buttons, allowing users to independently judge each material. The system also provides an input interface for supplementing missing data.

[0042] When a user performs an adoption action, the system triggers the knowledge entry process. The core code of this process is as follows: # [Micro-Knowledge Base Construction] def bulk_insert_supporting_materials(report_id: int, selected_materials: List[Dict]): """ Materials that pass manual verification are stored in a mini knowledge base. Knowledge accumulation is achieved through data association without the need for model fine-tuning. """ for material in selected_materials: # Get the path of the currently edited chapter (Topic) node_path = material.get('node_path') # Encapsulating knowledge slices: including original content and sources raw_json = json.dumps({ 'content': material.get('content'), 'source': material.get('source'), 'score': material.get('score') }) # Core logic: Marking a statement as valid (is_valid=1) and strongly associating it with a specific node means that for this Topic, this statement represents expert judgment. cursor.execute(""" INSERT INTO esg_supporting_materials ( esg_outline_nodes_id, node_path, raw_supporting_material, is_valid VALUES (%s, %s, %s, 1) -- is_valid=1 indicates manual verification. """, (outline_id, node_path, raw_json)) logger.info(f"The mini knowledge base has added {len(selected_materials)} verified knowledge entries") Through the above code, the system strongly associates the current candidate support information with the node_path of the corresponding outline node, stores it in the esg_supporting_materials table, marks is_valid as 1, and records the verification time and verifier.

[0043] When a user performs a rejection operation, the system records the candidate support information in the negative sample log, which is used to optimize the ranking weight of the retrieval algorithm in the future.

[0044] When a user fills in missing data, the system encapsulates the user-entered data into a standard format, stores it in the micro knowledge base, and marks the source as "human input".

[0045] The system achieves the core concept of "human feedback as training" through the above mechanism, allowing the system to remember expert feedback without fine-tuning the model. When the next annual report is generated, the system automatically loads historical micro-knowledge base data as the first priority retrieval source, realizing knowledge reuse and quality iteration across reporting cycles.

[0046] This stage of the system includes a closed-loop iterative structure, such as Figure 2 As shown: (1) The system first extracts candidate data from the original document library through the retrieval function; (2) The candidate data is presented to business experts through the human-computer interaction interface; (3) The high-quality data after manual verification flows to the knowledge entry module and is persistently stored in the micro knowledge base; (4) In the final generation stage, the generation engine prioritizes reading the data in the micro knowledge base, thereby ensuring the accuracy of the report content and realizing the self-evolution of quality.

[0047] Specifically, the iteration mechanism of the micro knowledge base is as follows: When generating the next version report or the next annual report, the system prioritizes searching the bound materials in the micro knowledge base to ensure that high-quality data that has been manually verified can be reused first.

[0048] If the timestamps of materials in the micro knowledge base expire (e.g., the data year is more than one year earlier than the current report year), the system will automatically prompt the user to perform an incremental update, requiring the user to confirm whether to continue using the expired data or provide updated data.

[0049] Through the above mechanism, the system has achieved the ability to self-evolve and improve report quality with the number of times it is used. Each manual verification is an accumulation of knowledge, and each report generation is an improvement in quality.

[0050] S6. Constraint-Based Content Generation Stage: Under the constraints of the outline nodes, the large language model prioritizes reading the valid supporting information already bound in the micro-knowledge base, and combines it with the micro-writing requirements specification to generate report chapters corresponding to each outline node. Specifically: The core of this stage lies in generating accurate chapter content using validated data. Under the semantic constraints of the outline nodes, the large language model prioritizes reading the valid supporting information already bound in the micro-knowledge base, and combines it with the micro-writing requirements specification to perform constrained paragraph writing.

[0051] In this embodiment, specific parameter configurations are used when calling the large language model at this stage to prevent illusions: the temperature parameter is set between 0.1 and 0.3, the top_p parameter is set between 0.8 and 0.85, the frequency penalty parameter is set to 0.5, and the existence penalty parameter is set to 0.0. System prompts include constraints such as "You must answer strictly based on the provided material and must not fabricate any factual information." The system will label materials from the micro-knowledge base with "Verified" to indicate that the model should prioritize their use, and label materials from the base library with "Reference" to indicate that they should be used with caution.

[0052] Ultimately, the system-generated report includes data traceability information, allowing users to locate the original document using traceability tags, ensuring that the report content is verifiable and traceable.

[0053] like Figure 4 As shown, this embodiment also provides an intelligent ESG report generation system based on human-machine collaboration and micro knowledge base iteration to implement the method described above. The system is logically divided into three layers from top to bottom: front-end layer, business logic layer, and data storage layer.

[0054] I. Front-end Interaction Layer The Frontend Layer is the sole entry point for users to interact with the system. Built on the Streamlit framework, it contains the following five core functional modules: The Report Management module (HomePage / Report Management) is used for users to log in, create new reports, view historical report lists, and manage basic report metadata (such as company name, report year, disclosure criteria, etc.).

[0055] Framework Configuration Module (ConfigPage / Framework Config): Provides a visual directory tree editor, allowing users to drag, add, delete, and adjust the hierarchy of the initial outline generated by AI, and enter writing guidelines for specific nodes.

[0056] Content Generation Module (GenPage / Content Generation): This is the core interface for human-computer collaboration. It displays the retrieved candidate support information, provides interactive buttons for users to "accept / reject", and triggers the large language model generation task in the background.

[0057] The EditPage / Polish Review module provides a WYSIWYG editor, allowing experts to make secondary modifications, annotations, and version comparisons on AI-generated text.

[0058] The report output module (OutputPage / Draft Export) is responsible for assembling the reviewed content into a final Word or PDF document.

[0059] II. Business Logic Layer The Business Logic Layer is the core processing center of the system, implemented through a microservice architecture. Each service module collaborates through interfaces, and specifically includes the following six independent microservice components (or functional modules): ReportService module: Integrates multi-report management functionality, responsible for handling report creation, switching, and lifecycle status transitions, and supports the parallel development of multiple reports.

[0060] The Intelligent Generation Service (AIService) module integrates the Large Language Model Content Generation (LLM ContentGeneration) function, encapsulates the interaction logic with the inference engine, and is responsible for generating outlines, paragraphs, and polishing suggestions based on context.

[0061] Document Processing Service Module (DocumentService): Integrates template and export functions, responsible for loading standard document templates and rendering the generated structured data into the final deliverable file.

[0062] FrameworkParser module: Integrates a multi-level hierarchy algorithm, specifically designed to parse complex directory tree structures, ensuring the hierarchical logic of the report outline is correct.

[0063] Configuration Service Module (ConfigService): Integrates the auto-loading function, which is responsible for automatically pre-reading environment variables and global configuration parameters when the system starts up or the page loads, to ensure the stability of the system's operating environment.

[0064] FileService module: Integrates upload management function, responsible for handling file upload requests from front-end users, performing format verification and metadata extraction.

[0065] III. Data Storage Layer The data storage layer, located at the bottom layer of the system, is responsible for data persistence and temporary state management, and contains three core storage units: SessionState: Used to store temporary interactive data of the user on the browser side (such as the currently selected chapter, unsaved edits), ensuring the continuity of user operations.

[0066] The Database Management Unit (DatabaseMgr) is built on a relational database and is responsible for storing structured business data, including report metadata, outline node relationships, and micro-knowledge base entries. The core data table of the micro-knowledge base, esg_supporting_materials, contains fields such as id, report_id, node_id, node_path, verified_content, data_year, confidence_score, is_valid, version, verified_by, and verified_at, supporting data traceability, version management, and timeliness assessment.

[0067] File Storage Unit: Responsible for the physical storage of unstructured binary files (such as original PDF materials) and intermediate format files (such as Markdown files).

[0068] This embodiment further illustrates the version management mechanism of the micro knowledge base. The system implements optimistic locking control through the `version` field. When multiple users edit the same node simultaneously, the system verifies the version number during the update operation. If the version number does not match, the update is rejected and the user is prompted to refresh. Simultaneously, the system implements a timestamp decay mechanism: based on the comparison between the data's `data_year` and the current report year, the data status is marked as `fresh` (current year data), `stale` (previous year data), or `expired` (data older than one year), and differentiated processing strategies are adopted during retrieval and use.

[0069] When the next year's report is generated, the system automatically executes the knowledge base inheritance process: It locates the micro-knowledge base corresponding to the previous year, iterates through the records where is_valid is 1 and is_stale is 0, copies each record as a new record, and updates the report ID and version information. For records whose data_year is more than one year earlier than the current report year, the system automatically marks them as expired and triggers a manual review prompt.

[0070] This embodiment further illustrates the system's processing logic in various edge scenarios, specifically including: (1) Concurrent editing scenario: The system adopts an optimistic locking mechanism to handle the situation where multiple users edit the same report at the same time. It detects conflicts by version number and prompts users to refresh and retry.

[0071] (2) Network interruption scenario: When calling the LLM API, the system implements an exponential backoff retry mechanism. After the first failure, it waits 1 second to retry, after the second failure, it waits 2 seconds to retry, and after the third failure, it waits 4 seconds to retry, with a maximum of 3 retries. If all retries fail, the system persists the complete context of the failed task to the task queue and provides a manual retry button on the interface.

[0072] (3) Document parsing failure scenario: The system wraps an exception capture block for each file. The failure of parsing a single file does not affect the entire batch processing process. All failed files are summarized in the error log. After the conversion is completed, a document parsing report is generated for users to view.

[0073] This invention adopts the concept of "document-driven development," decoupling the report generation process into four stages: data parsing, interactive outline construction, knowledge accumulation, and content generation. It fully utilizes Large Language Modeling (LLM), Retrieval Enhanced Generation (RAG) technology, AI agent technology, and human-machine collaboration mechanisms to automatically generate high-quality corporate Environmental, Social, and Governance (ESG) reports. Furthermore, by constructing a dedicated "micro-knowledge base" for this report, valid materials confirmed by human review are accumulated, forming a closed-loop iteration that continuously evolves and improves report quality.

[0074] The present invention has been described in detail above with reference to the accompanying drawings and embodiments. Those skilled in the art can make various modifications to the present invention based on the above description. Therefore, certain details in the embodiments should not be construed as limiting the present invention, and the scope of protection of the present invention shall be defined by the appended claims.

Claims

1. A method for generating intelligent ESG reports based on human-machine collaboration and knowledge base iteration, characterized in that: Includes the following steps: S1. Data Preparation: Acquire heterogeneous data from multiple sources, convert them into Markdown format that retains the heading hierarchy and table structure, perform semantic parsing on the converted document fragments to generate metadata tags, and store them in the basic index library; S2. Interactive Outline Construction: An initial report outline is generated using a large language model combined with industry standards in the ESG field. The initial report outline can be dragged, added, deleted, and its hierarchy adjusted through a visual interactive interface. Writing guidelines are also configured for the adjusted outline nodes. S3. Micro-requirements generation: For each outline node, input its node context and the writing guidelines into the large language model, and require the model to reverse-engineer the data dimensions and writing focus that the chapter should include, and generate a structured micro-writing requirements specification. S4. Dual-source hierarchical retrieval: Using the micro-writing requirements specification as the retrieval query condition, a hierarchical retrieval strategy is executed. The first priority is to retrieve the micro knowledge base that has been manually verified historically. The second priority is to retrieve the basic index library when there is no relevant content in the micro knowledge base. S5. Manual Verification and Knowledge Accumulation: Display the retrieved candidate supporting information, receive user acceptance or rejection actions through the human-computer interaction interface, strongly associate and bind the valid supporting information confirmed by the user with the corresponding outline node, and store it in a dedicated micro knowledge base. S6. Constraint Content Generation: Under the constraints of the outline nodes, the large language model prioritizes reading the valid supporting information already bound in the micro knowledge base, and combines it with the micro writing requirements specification to generate report chapters corresponding to the major outline nodes.

2. The intelligent ESG report generation method based on human-machine collaboration and knowledge base iteration according to claim 1, characterized in that: The S1. data preparation also includes: when performing semantic parsing on the converted Markdown document fragments, the generated metadata tag dimensions include at least year, topic category, and data entity; the basic index library is a basic vector database used to support semantic similarity retrieval.

3. The intelligent ESG report generation method based on human-machine collaboration and knowledge base iteration according to claim 1, characterized in that: In the S2. Interactive outline construction, the system first combines industry standards in the ESG field with the company's historical reports and uses a large language model to generate an initial report directory tree. The system then assembles information about the company's industry, report year, and historical report structure into prompt words and calls the large language model to generate a directory tree structure containing first-level, second-level, and third-level chapters. Then, the system introduces an expert interaction mechanism, providing a visual table of contents editor built on the Streamlit framework; users can adjust the order of outline nodes by dragging and dropping, add or delete nodes by buttons, and adjust the hierarchical relationship of nodes by indentation; in addition, the system allows users to input specific "writing guidelines" and "emphasis" for each outline node.

4. The intelligent ESG report generation method based on human-machine collaboration and knowledge base iteration according to claim 1, characterized in that: In the S4. Dual-Source Hierarchical Retrieval, the system uses the micro-level writing requirements specification generated in S3 as the retrieval query condition and performs the following hierarchical retrieval: First priority: Retrieve the micro knowledge base to obtain high-confidence, valid supporting information that has been manually verified historically. The data entries stored in the micro knowledge base have been confirmed through the historical verification process and are bound with corresponding node paths, confidence scores, and data year information. Second priority: If there is no relevant content or the confidence level is insufficient in the micro knowledge base, the system will automatically downgrade to searching the basic document library, that is, to conduct a broad semantic search in the full Markdown vector library.

5. The intelligent ESG report generation method based on human-machine collaboration and knowledge base iteration according to claim 1, characterized in that: In S5. Manual verification and knowledge accumulation, the iterative mechanism of the micro-knowledge base includes: When generating the next version report or the next annual report, the system prioritizes retrieving the bound materials in the micro knowledge base; If the timestamps of materials in the micro knowledge base expire, the system will automatically prompt the user to perform incremental updates, thereby increasing the quality of the report with the number of uses.

6. The intelligent ESG report generation method based on human-machine collaboration and knowledge base iteration according to claim 1, characterized in that: In the S6. Constraint Content Generation process, accurate chapter content is generated using verified data. Under the semantic constraints of the outline nodes, the large language model prioritizes reading the valid supporting information already bound in the micro knowledge base and, in conjunction with the micro writing requirements specification, performs constrained paragraph writing.

7. An intelligent ESG report generation system based on human-machine collaboration and micro-knowledge base iteration, used to implement the method as described in any one of claims 1-6, characterized in that: The system is logically divided into: The front-end interaction layer serves as the entry point for user interaction with the system, including modules for outline configuration and modules for content generation and verification. The business logic layer, as the core processing center of the system, includes a service module for managing the report lifecycle, a service module for encapsulating the interactive logic of the content generation model, and a service module for processing document templates and exporting. The data storage layer is responsible for data persistence and temporary state management, including a database management unit for storing structured business data and a file storage unit for storing unstructured files.

8. The intelligent ESG report generation system based on human-machine collaboration and micro-knowledge base iteration as described in claim 7, characterized in that: The front-end interaction layer is built on the Streamlit framework and includes: The report management module is used for user login, creating new reports, viewing historical report lists, and managing basic report metadata; The framework configuration module provides a visual table of contents editor and allows users to adjust the generated initial report outline and enter writing guidelines for specific outline nodes. The content generation module, as the core interface for human-computer collaboration, is used to display the retrieved candidate support information. The content generation module is equipped with interactive buttons for users to accept or reject, and can trigger the large language model generation task in the background. The editing and review module provides a WYSIWYG editor and allows users to modify, annotate, and compare versions of the generated report content. The report output module is used to assemble the generated report chapters into a complete report document.

9. The intelligent ESG report generation system based on human-machine collaboration and micro-knowledge base iteration as described in claim 7, characterized in that: The business logic layer is implemented using a microservice architecture, with each service module working collaboratively through interfaces, specifically including: The report service module integrates multiple report management functions, and is responsible for handling the creation, switching and lifecycle status transition of reports, supporting the parallel development of multiple reports; The intelligent generation service module integrates the content generation function of the large language model, encapsulates the interaction logic with the inference engine, and is responsible for generating outlines, paragraphs and polishing suggestions based on the context. The document processing service module integrates template and export functions, and is responsible for loading standard document templates and rendering the generated structured data into the final deliverable file; The framework parsing module integrates multi-level parsing algorithms to parse complex directory tree structures, ensuring the hierarchical logic of the report outline is correct. The configuration service module integrates an auto-loading function, which is responsible for automatically pre-reading environment variables and global configuration parameters when the system starts up or the page loads. The file service module integrates upload management functions, and is responsible for processing file upload requests from front-end users, performing format verification, and extracting metadata.

10. The intelligent ESG report generation system based on human-machine collaboration and micro-knowledge base iteration as described in claim 7, characterized in that: The data storage layer also includes a session state unit, which stores temporary interaction data of the user on the browser side to ensure the continuity of user operations.

Citation Information

Patent Citations

  • ESG report generation and encryption method and device, equipment and computer medium

    CN121390013A

  • ESG report auxiliary generation method and system based on large model technology

    CN121436933A