Method and device for optimizing cue words of large language model

By building a multi-strategy defense template to analyze jailbreak attack instructions and generate a defense prompt vocabulary, the problem of untimely and inaccurate update of prompt words in large language model is solved, and the model's resistance and security is improved.

CN120256557APending Publication Date: 2025-07-04CHINA ACADEMY OF INFORMATION & COMM
0 Cites 9 Cited by

Patent Information

Application Number
CN202510201385.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-24
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The existing technology cannot effectively update prompt words of large language models in a timely and accurate manner against jailbreak attack instructions, resulting in poor resistance and security of large language models.

Method used

By building a multi-strategy defense template, analyzing the types of jailbreak attack instructions, and converting defense policies into defense prompt words and inputting them into a large language model, generating a new defense prompt vocabulary to improve the timeliness and accuracy of prompt word updates.

Benefits of technology

It improves the resistance and security of the large language model to jailbreak attacks, and enhances the timeliness and accuracy of prompt word updates.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The invention discloses a cue word optimization method and device for a large language model, and the method comprises the steps: inputting a jailbreak attack instruction set into a to-be-tested large language model for loop attack, and obtaining a response result of the large language model; calculating an evaluation index according to a response result of the large language model, and when the evaluation index exceeds a preset threshold value, updating cue words in the large language model; the method comprises the following steps: constructing a multi-strategy defense template, analyzing the type of each jail break attack instruction by using the multi-strategy defense template, determining the type of each jail break attack instruction, matching a defense strategy of a corresponding type in the multi-strategy defense template according to the type of the jail break attack instruction, converting the defense strategy into a corresponding defense cue word, and sending the defense cue word to the jail break attack instruction. And inputting the defense prompt words into the large language model to optimize and update the defense prompt words of the large language model. The prompt word updating timeliness and accuracy can be improved, and the resistance and safety of a large language model are improved.
Need to check novelty before this filing date? Find Prior Art