The invention provides a red-blue confrontation-based
large model agent autonomous iterative optimization method and
system, and the method comprises the steps: building a customer agent as a blue party based on a large
language model, obtaining user data from a plurality of channels, generating diversified customer portrait data, generating a dialogue
test set containing diversified customer consultation
test data, and carrying out the calculation of the dialogue
test set. Taking the data as adversarial data for iterative optimization of the model; the method comprises the following steps: constructing a sales agent as a red party by using a preset first version prompt word, starting the red party and a blue party to carry out dialogue based on adversarial data, limiting a maximum dialogue round or taking a transaction conclusion as an exit condition, and carrying out quality inspection scoring and prompt word optimization direction prompting on the sales agent through a plurality of evaluation dimensions; inputting the first version cue word and the cue word optimization direction to a sales agent to obtain an optimized sales agent cue word; and repeating until the quality inspection
score converges, and completing the iterative optimization process of the sales agent. According to the method, the sales conversion rate is remarkably improved, and the manual optimization cost is greatly reduced.