Embedded software document generation agent construction method based on large model
By constructing an intelligent agent for generating embedded software documentation based on a large model, the quality and consistency issues in embedded software documentation writing were solved, achieving efficient and standardized documentation generation and improving software development efficiency and product quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUBEI SANJIANG AEROSPACE HONGFENG CONTROL
- Filing Date
- 2025-12-17
- Publication Date
- 2026-05-12
AI Technical Summary
Embedded software documentation suffers from issues such as unstable document quality, omission of implicit requirements, inconsistent formats, and inconsistent terminology, which limit R&D efficiency and product quality.
An embedded software documentation generation intelligent agent based on a large model is adopted. Through intelligent guidance, content generation and quality inspection, an intelligent agent framework based on the "General Requirements for Software Development Documentation" is constructed, which includes knowledge structuring, prompt word design, intelligent interactive guidance, dynamic context management and multi-dimensional verification mechanism.
It significantly improves the efficiency, accuracy, and standardization of software designers' documentation, reduces the risk of rework, enhances the professionalism and readability of documentation, and strengthens requirements analysis capabilities.
Smart Images

Figure CN122018965A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of embedded document generation technology, and in particular to a method for constructing an intelligent agent for embedded software document generation based on a large model. Background Technology
[0002] As embedded software plays an increasingly crucial role in modern infrastructure development, its quality, reliability, and maintainability have become paramount. Embedded software documentation, serving as the "blueprint" and "instruction manual" of the software development process, is the core basis for ensuring software quality and facilitating subsequent testing, maintenance, and upgrades. Currently, the industry strictly adheres to the "General Requirements for Software Development Documentation" standard when compiling various software documents. However, in practice, the following serious challenges arise: software designers' understanding of the standard varies significantly from their experience in document writing, leading to inconsistent document quality; when writing documents such as the "Software Requirements Specification," implicit requirements, boundary conditions, or exception handling are easily overlooked, creating potential problems for later development; during the document writing process, numerous avoidable errors exist, such as inconsistent formatting, inconsistent terminology, missing chapters, and ambiguous descriptions, greatly reducing the professionalism and readability of the documents; insufficient understanding of the purpose, depth, and interrelationships of the various documents in the standard often results in documents becoming merely formalities, failing to truly realize their engineering value. These problems severely restrict the improvement of embedded software development efficiency and the assurance of product quality. Summary of the Invention
[0003] To address the aforementioned technical problems, this invention proposes a method for constructing an embedded software document generation intelligent agent based on a large model. This document generation intelligent agent construction method significantly improves the efficiency, accuracy, and standardization of software designers in writing software documents in accordance with the "General Requirements for Software Development Documentation" standard through intelligent guidance, content generation, and quality checks, and also enhances requirements analysis capabilities.
[0004] A method for constructing an intelligent agent for embedded software document generation based on a large model, the specific process of which is as follows:
[0005] S1, Knowledge Structuring and Prompt Design: Decompose the "General Requirements for Software Development Documentation" into a set of rules that can be understood and guided by machines, and design prompt templates;
[0006] S2, the intelligent agent framework is built around task planning and execution to construct a document generation process;
[0007] S3. Integrate all modules of the intelligent agent framework built in step S2 and perform closed-loop verification.
[0008] As a preferred embodiment of the above technical solution, the specific process of step S1 is as follows:
[0009] S11, a deep deconstruction of the standard, transforms standard clauses into specific, actionable rules and a list of issues;
[0010] S12, Build a prompt word template library and design basic prompt word templates for different scenarios, including document generation, question and answer and quality inspection;
[0011] S13 features carefully selected sample samples, compiling and writing high-quality document snippets as examples in the sample prompts.
[0012] As a preferred embodiment of the above technical solution, the specific process of step S2 is as follows:
[0013] S21, Framework Selection and Design: An intelligent agent framework is adopted, and a task planner, toolset, and memory module are designed based on the selected intelligent agent framework.
[0014] S22, Construct an intelligent interactive guidance module to realize multi-turn dialogue logic, dynamically determine the next question to ask or the action to be performed based on the user's current input and historical context;
[0015] S23, construct a content generation and completion module, integrate the prompt word template constructed in step S1 into the intelligent agent, and realize the functions of "one-click chapter generation" and "one-click initial quality check";
[0016] S24, Construct a quality inspection and consistency verification module. Through sample classification and text comparison prompting technology, the large model can perform compliance judgment, terminology correction and logical consistency check on existing text based on the checklist.
[0017] S25, build a dynamic context management module to store and manage project context, and achieve consistency of information across chapters.
[0018] As a preferred embodiment of the above technical solution, in step 321, the intelligent agent framework is selected from either LangChain or LlamaIndex.
[0019] As a preferred embodiment of the above technical solution, in step 321, the toolset includes a prompt word template executor and a vector database retrieval device.
[0020] As a preferred embodiment of the above technical solution, the specific process of step S3 is as follows:
[0021] S31 develops user interfaces to provide a simple human-computer interaction interface, making it convenient for users to interact with intelligent agents;
[0022] S32, end-to-end testing and verification, selects typical past projects, uses intelligent agents to generate a complete set of documents from scratch, and compares them with manually written documents;
[0023] S33, Iterative optimization of prompt words: Based on test and verification results, continuously adjust and optimize the prompt word template.
[0024] The beneficial effects of this invention are as follows:
[0025] This invention constructs a document generation solution that combines standardization and intelligence by systematically integrating standardized rules and large-scale model technology. First, the abstract clauses of the "General Requirements for Software Development Documentation" are deconstructed into an executable rule base and hierarchical prompt word templates, forming a standardized knowledge framework covering document structure, terminology standardization, and quality checks. This transforms document writing from relying on personal experience to a rule-based, systematic process. Building upon this, it innovatively integrates intelligent interactive guidance, dynamic context management, and multi-dimensional verification mechanisms. By simulating a multi-turn dialogue mode that mimics expert thought processes, it accurately captures boundary conditions and exception handling scenarios in requirement specifications, effectively reducing the risk of rework due to missing or ambiguous requirements. Simultaneously, the context management system based on a vector database enables real-time association and version control of cross-chapter information. Combined with sample classification and text comparison technologies, it ensures a high degree of consistency in document terminology and logic. More importantly, the solution's built-in "practice-feedback-optimization" closed-loop mechanism continuously improves the system's adaptability to standard updates and domain knowledge through end-to-end testing and iterative optimization of prompt words. Furthermore, the application of a carefully selected case library and automated text comparison technology significantly improves the reusability of documents for similar projects. This innovative design, which deeply integrates standardized requirements, intelligent tools, and engineering practice experience, provides full lifecycle support for embedded software development, from requirements analysis to document delivery, significantly enhancing the engineering value and reliability of technical documentation. Attached Figure Description
[0026] Figure 1 This is a flowchart illustrating the construction of the intelligent agent framework of this invention. Detailed Implementation
[0027] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0028] A method for constructing an intelligent agent for embedded software document generation based on a large model, the specific process of which is as follows:
[0029] S1, Knowledge Structuring and Prompt Design: Decompose the "General Requirements for Software Development Documentation" into a set of rules that can be understood and guided by machines, and design prompt templates;
[0030] S2, the intelligent agent framework is built around task planning and execution to construct a document generation process;
[0031] S3. Integrate all modules of the intelligent agent framework built in step S2 and perform closed-loop verification.
[0032] As a preferred embodiment of the above technical solution, the specific process of step S1 is as follows:
[0033] S11, a deep deconstruction of the standard, transforms standard clauses into specific, actionable rules and a list of issues;
[0034] S12, Build a prompt word template library and design basic prompt word templates for different scenarios, including document generation, question and answer and quality inspection;
[0035] S13 features carefully selected sample samples, compiling and writing high-quality document snippets as examples in the sample prompts.
[0036] In this embodiment, the specific process of step S2 is as follows:
[0037] S21, Framework Selection and Design: An intelligent agent framework is adopted, and a task planner, toolset, and memory module are designed based on the selected intelligent agent framework.
[0038] S22, Construct an intelligent interactive guidance module to realize multi-turn dialogue logic, dynamically determine the next question to ask or the action to be performed based on the user's current input and historical context;
[0039] S23, construct a content generation and completion module, integrate the prompt word template constructed in step S1 into the intelligent agent, and realize the functions of "one-click chapter generation" and "one-click initial quality check";
[0040] S24, Construct a quality inspection and consistency verification module. Through sample classification and text comparison prompting technology, the large model can perform compliance judgment, terminology correction and logical consistency check on existing text based on the checklist.
[0041] S25, Construct a dynamic context management module to store and manage project context, ensuring consistency of information across chapters, such as... Figure 1 As shown.
[0042] In this embodiment, in step 321, the intelligent agent framework is selected from either LangChain or LlamaIndex.
[0043] In this embodiment, in step 321, the toolset includes a prompt word template executor and a vector database retrieval tool.
[0044] In this embodiment, the specific process of step S3 is as follows:
[0045] S31 develops user interfaces to provide a simple human-computer interaction interface, making it convenient for users to interact with intelligent agents;
[0046] S32, end-to-end testing and verification, selects typical past projects, uses intelligent agents to generate a complete set of documents from scratch, and compares them with manually written documents;
[0047] S33, Iterative optimization of prompt words: Based on test and verification results, continuously adjust and optimize the prompt word template.
[0048] Specifically:
[0049] This invention constructs an embedded software documentation generation intelligent system based on a large model. Through intelligent guidance, content generation, and quality checking, it significantly improves the efficiency, accuracy, and standardization of software designers in writing software documentation according to the "General Requirements for Software Development Documentation" standard, and enhances requirements analysis capabilities. The method includes:
[0050] (1) The standard knowledge of "General Requirements for Software Development Documents" is structured and a prompt word template library is constructed. The standard is decomposed into a set of rules that can be understood and guided by machines, including the structure of document types, the writing requirements of each chapter, essential terms, quality checklists, etc., which are transformed into structured data. At the same time, precise and efficient hierarchical prompt word templates are designed for different document types and writing stages.
[0051] (2) The document generation process based on the intelligent agent framework is constructed with task planning and execution as the core. The intelligent agent decomposes the macro task of "writing a software requirements specification" into a series of atomic tasks that can be executed sequentially or in parallel. At the same time, the intelligent agent dynamically selects and calls different prompt word templates and external tools according to the context.
[0052] (3) Implementation method of key functional modules based on prompt word engineering
[0053] a. Intelligent Interaction Guidance Module: Through thought chain and multi-turn dialogue prompting technology, it simulates the expert consultation process, gradually guiding users to clarify their needs and supplement information, ensuring the comprehensiveness of the input information; b. Content Generation and Completion Module: Through context learning and expert role-playing technology, the large model "plays" a senior standard expert, generating standardized and complete article paragraphs based on the fragmented information provided by the user; c. Quality Check and Consistency Verification Module: Through few-sample classification and text comparison prompting technology, the large model performs compliance judgment, terminology correction, and logical consistency checks on existing text based on a checklist; d. Dynamic Context Management Module: Since no fine-tuning of the large model is performed, all the model's "knowledge" comes from the dialogue context. A database is used to efficiently manage long dialogue contexts, ensuring that the agent can accurately "remember" and reference content defined in previous chapters (such as requirement numbers, interface definitions, etc.) when generating subsequent chapters.
[0054] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for constructing an intelligent agent for embedded software document generation based on a large model, characterized in that: The specific process is as follows: S1, Knowledge Structuring and Prompt Design: Decompose the "General Requirements for Software Development Documentation" into a set of rules that can be understood and guided by machines, and design prompt templates; S2, the intelligent agent framework is built around task planning and execution to construct a document generation process; S3. Integrate all modules of the intelligent agent framework built in step S2 and perform closed-loop verification.
2. The method for constructing an intelligent agent for embedded software document generation based on a large model according to claim 1, characterized in that: The specific process of step S1 is as follows: S11, a deep deconstruction of the standard, transforms standard clauses into specific, actionable rules and a list of issues; S12, Build a prompt word template library and design basic prompt word templates for different scenarios, including document generation, question and answer and quality inspection; S13, a selection of sample examples, collects and writes high-quality document snippets as examples in the sample prompts.
3. The method for constructing an intelligent agent for embedded software document generation based on a large model according to claim 1, characterized in that: The specific process of step S2 is as follows: S21, Framework Selection and Design: An intelligent agent framework is adopted, and a task planner, toolset, and memory module are designed based on the selected intelligent agent framework. S22, Construct an intelligent interactive guidance module to realize multi-turn dialogue logic, dynamically determine the next question to ask or the action to be performed based on the user's current input and historical context; S23, construct a content generation and completion module, integrate the prompt word template constructed in step S1 into the intelligent agent, and realize the functions of "one-click chapter generation" and "one-click initial quality check"; S24, Construct a quality inspection and consistency verification module. Through sample classification and text comparison prompting technology, the large model can perform compliance judgment, terminology correction and logical consistency check on existing text based on the checklist. S25, build a dynamic context management module to store and manage project context, and achieve consistency of information across chapters.
4. The method for constructing an intelligent agent for embedded software document generation based on a large model according to claim 3, characterized in that: In step 321, the intelligent agent framework is selected from either LangChain or LlamaIndex.
5. A method for constructing an intelligent agent for embedded software document generation based on a large model, as described in claim 3, characterized in that: In step 321, the toolset includes a prompt word template executor and a vector database retrieval tool.
6. The method for constructing an intelligent agent for embedded software document generation based on a large model according to claim 1, characterized in that: The specific process of step S3 is as follows: S31 develops user interfaces to provide a simple human-computer interaction interface, making it convenient for users to interact with intelligent agents; S32, end-to-end testing and verification, selects typical past projects, uses intelligent agents to generate a complete set of documents from scratch, and compares them with manually written documents; S33, Iterative optimization of prompt words: Based on test and verification results, the prompt word template is continuously adjusted and optimized.