The embodiment of the invention provides a retrieval optimization method based on a hierarchical expert
routing model and CoT reasoning, which belongs to the technical field of
data processing and specifically comprises the following steps: creating a hierarchical
knowledge base; extracting and clustering each fragment abstract in each layer in the hierarchical
knowledge base, and creating a hierarchical semantic
library; constructing a hierarchical index
database by using each central abstract in the hierarchical semantic
database, and forming a hierarchical expert
routing model in combination with an intelligent routing mechanism; determining a target hierarchical index matched with the question in a hierarchical index
database by utilizing a hierarchical expert
routing model; performing similarity calculation on the vectorized problem and a target hierarchical index; returning the fragment of the original document in the hierarchical semantic
library with the highest similarity; and driving hierarchy switching by using CoT reasoning, finally merging fragments and returning the fragments to the
large model, and generating answers corresponding to the questions. By means of the scheme, the response speed and accuracy of user query are improved, self-adaptive adjustment of the retrieval path is achieved, and the retrieval efficiency and adaptability of complex query are improved.