The present disclosure provides an agent-based
query rewriting model training method and a search method, and relates to the technical field of
artificial intelligence such as
deep learning, agents, intelligent search, and intent understanding. The agent-based
query rewriting model training process comprises:
processing sample scene labels by using a first scene understanding layer of a teacher
rewriting model to generate sample intent information and sample parameter constraint information;
processing sample initial query words, sample intent information, and sample parameter constraint information by using a first query word
rewriting layer of the teacher
rewriting model to generate sample rewriting results of the sample initial query words; training a second scene understanding layer of a student rewriting model, which is smaller in size than the first scene understanding layer, by using sample scene labels, sample intent information, and sample parameter constraint information; and training a second query word rewriting layer of the student rewriting model, which is smaller in size than the first query word rewriting layer, by using sample initial query words, sample intent information, sample parameter constraint information, and sample rewriting results to obtain a target rewriting model.