The invention discloses a network user two-stage recommendation method and device based on large
language model optimization, and the method comprises the following steps: firstly, in a recall stage, a user accelerates the
feature extraction according to the browsing history of the user in combination with a recursive parallelization mode; then, through a double-layer MLP network, modeling is carried out according to interaction behaviors of users; then, 20 items with the highest scores are calculated through a prediction module and serve as a candidate set; secondly, in the sorting stage, the
open source large
language model and the closed source large
language model are combined; by means of a closed-source large language model, a prompt template is designed, information such as
interaction history and social relations of users is deeply analyzed, and user interest portraits are constructed. Meanwhile, by means of the reasoning ability of a large language model, text content is summarized, new description is generated, and
data information is effectively enhanced. And finally, in combination with the interest information of the user and the text information of the candidate set, all items in the candidate set are scored and sorted through an
open source large language model, and the item most interested by the user is predicted. And finally, an item which is most likely to be clicked by the user is determined in a highly accurate manner.