The invention discloses an
engineering document generation method and
system based on a
logic structure tree and LLM and a medium. The method comprises the steps that
original data are analyzed to form an initial text segment set X; calling LLM to generate an initial technical draft based on X, extracting a
logic structure, and constructing an initial
logic structure tree T; maintaining a search
queue, for leaf nodes in the
queue, acquiring context information related to
semantics from X through a retrieval enhancement mechanism, after same-level brother node deduplication and global deduplication judgment, calling LLM to expand the nodes to generate child nodes, optimizing text description, and recursively enriching a
tree structure; and finally, based on the X and the optimized tree, calling LLM to generate a title, an abstract and a background, generating content, details and key point chapters through traversal, and combining into a complete
engineering document. The
system comprises a
document analysis module, a
knowledge base module, a retrieval enhancement module, a logic structure tree maintenance module and a document generation module. The method is high in
automation degree, and the generated document is clear in structure, complete in content and high in
specialty.