The invention discloses a hierarchical semantic-driven retrieval enhancement generation method and
system, a natural hierarchical relationship and a semantic boundary of a document are effectively reserved by constructing a tree hierarchical
structure based on a document chapter title, and a recursive semantic boundary splitting strategy is adopted to refine overlong text nodes, so that the
semantic integrity is ensured, and the retrieval enhancement generation efficiency is improved. And the model input length limitation is met, and the
semantic information is prevented from being lost. Meanwhile, node knowledge point extraction and abstract generation are achieved through a large
language model, top-down multi-level title path transmission and bottom-up content aggregation are combined, the structural
perception and semantic expression ability of nodes is enhanced, and in the retrieval stage, based on similarity distribution of query and node semantic expression, an adaptive retrieval threshold value is dynamically calculated, and the retrieval efficiency is improved. A fixed top-k retrieval strategy is replaced, intelligent screening of different query and hierarchical nodes is achieved,
information coverage and redundancy suppression are balanced, and retrieval efficiency and accuracy are remarkably improved.