The invention discloses a
large model security test method and device and a
computer program product, and the method comprises the steps: firstly, screening out a target starting node with the highest
semantic similarity with a target malicious query text from a pre-constructed
state diagram database, and then when the value of the highest similarity is higher than a preset threshold value, starting the target malicious query text; a path
multiplexing mode is adopted, a complete
test path corresponding to the target starting node is directly multiplexed to test the target
large model, and when the value of the highest similarity is not higher than a preset threshold value, a path exploration mode is adopted to search the target
large model; and a new
test path is generated by using a
test strategy library, a guide large model, an
attack large model and the like for testing (and is stored for subsequent direct
multiplexing), so that effective accumulation and intelligent
multiplexing of historical experience are realized, and repeated exploration is avoided. Compared with existing testing methods such as a static template, the testing efficiency is continuously improved along with experience accumulation, a complete
closed loop of self-evolution is formed, and an ideal testing effect is achieved.