INNER CODE UNIT · Python

build_with_skill_prompt

wgpsec/AboutSecurity · scripts/bench-skill.py:142

def build_with_skill_prompt(eval_prompt: str, skill_body: str, skill_name: str) -> str:
    """Build prompt with skill content injected."""
    return f"""你是一个 AI 安全测试 Agent。你有以下安全测试方法论可以参考:

<skill name="{skill_name}">
{skill_body}
</skill>

请根据以上方法论回答以下问题。你的回答应该体现系统化的方法论,而不是随机尝试。

{eval_prompt}"""


def build_without_skill_prompt(eval_prompt: str) -> str:
    """Build baseline prompt without skill content."""
    return f"""你是一个 AI 安全测试 Agent。

请回答以下问题。你的回答应该体现系统化的方法论。

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…