The application provides an
industrial material hierarchical classification method fusing retrieval enhancement and explicit hierarchical constraint, belongs to the field of
industrial material classification, and comprises the following steps: vectorizing and coding historical
industrial material data to obtain a
standard material vector
knowledge base; according to a to-be-classified industrial material,
standard material samples are retrieved in the
standard material vector
knowledge base based on similarity, and a composite input text is obtained by splicing; historical industrial
material classification samples are acquired, a fine-tuning dataset is constructed based on random undersampling of head categories and generative enhancement of
tail categories, a large
language model is fine-tuned and trained, and an industrial
material classification model is obtained; according to an enterprise standard classification
system, a legal word element classification prefix tree is constructed, the industrial
material classification model is constrained to sample only from legal word elements, and an industrial material
classification result conforming to the enterprise standard classification
system is obtained. The application solves the problem of inaccurate industrial material classification caused by a large
label space and significant long-
tail distribution in industrial material classification.