This invention discloses a multi-round iterative optimization control method for large language models based on a self-reflection mechanism, belonging to the field of large
language model technology. The method includes: encoding user task constraints into structured memory; driving the model to generate initial text; automatically evaluating the generated text from multiple dimensions (logic, constraints, and facts) through an independent review module to generate a quantitative review report; automatically compiling correction instructions based on the review report; simultaneously, employing a hierarchical compression mechanism to manage historical dialogue context to stabilize computational overhead; and finally, achieving intelligent convergence of iterations by calculating the semantic differences and
quality score change rate between adjacent iteration versions. This invention constructs a complete automated "generation-reflection-correction"
closed loop, transferring over 80% of routine optimization work from manual to
machine, greatly liberating productivity and significantly improving the generation quality and optimization efficiency of long texts and highly complex tasks.