AI Agent safety evaluation: hands-on test of 300 prompt injections, breaking down false positives in open-source safelabs-eval
「AI Agent安全评测」:300条提示词注入实测,开源safelabs-eval误报拆解
The author personally tested the open-source Agent red-team evaluation framework safelabs-eval, which uses 300 prompts across 10 categories and 5 regex detectors to judge each response as VULNERABLE, FAIL, UNCERTAIN or PASS. The article breaks down the scoring logic: the score is derived by weighting instruction coverage, compliance and refusal phrasing, and the confidence in the report is the number of pieces of matching evidence rather than a statistical probability. The echo discount, which is enabled by default, removes matches where the Agent copies the attack text verbatim from the evidence, to reduce false positives. The author also points out that the 10 categories correspond to only 5 detectors, and that ASI02, ASI04, ASI05 and ASI07 fall back on the same set of prompt injection rules. The article records the integrity rule added after two data incidents in the project, requiring the raw response to be written to disk before scoring, and states that the tool is suitable as a CI regression gate for English single-turn scenarios and does not cover multi-turn, RAG poisoning or multimodal.