The application provides a self-adaptive
large model prompt
attack and security evaluation method based on feedback learning, and belongs to the technical field of
artificial intelligence security. The method comprises the following steps: constructing an
attack library containing multiple text transformation
attack strategies, and obtaining performance data of the attack strategies on a target model; then, the success rate, average
score, R value and Q value of the attack strategies are calculated, and the optimal
attack strategy is selected in descending order of the Q value; the strategy is applied to generate an adversarial input from an original malicious prompt, and the attack is judged to be successful or not by a pre-
training evaluation model
score after the adversarial input is submitted to the target model; if the attack is not successful, the strategy is reselected; if the attack is successful, the statistical data are updated and the
score is recalculated; the strategy is iteratively tried according to the Q value until a preset condition is met; finally, the test process is recorded and a report is generated. The method realizes the security evaluation of the
large model, improves the success rate and efficiency of the attack test, provides empirical evidence for the design of the
large model defense mechanism, and guarantees the application safety of the large model.