首页 > AI前沿 > Risk-certified prompt optimization for LLM-as-a-judge guardrails

Risk-certified prompt optimization for LLM-as-a-judge guardrails

arXiv自然语言 2026-11-16 01:45 20 阅读 查看原文
用户需要我作为专业的新闻排版工程师,将给定的纯文本新闻正文排版成语义化的HTML片段。 规则: 1. 只输出HTML片段本身,不要Markdown围栏、不要解释 2. 每个自然段落用`

`包裹,长文用`

`/`

`划分小节 3. 列表内容用`
  • `,引用用`
    `,代码用`
    `,重要句子可用``
    4. 保留原文所有信息,不得增删改内容
    5. 不要输出``/``/``等文档级标签
    
    正文内容是一段关于LLM-as-a-judge guardrails的研究论文摘要/介绍。让我分析一下内容结构:
    
    正文:
    "LLM-as-a-judge guardrails are often controlled primarily through system prompts, yet standard prompt optimization methods target average performance rather than explicit safety constraints. This paper studies system-prompt selection as a constrained optimization problem: maximize benign pass rate while keeping the missed-attack rate below a user-specified level α with finite-sample statistical control. The framework combines LLM-based judging, automatic prompt generation, and distribution-free risk certification. This work instantiates it in two procedures: CPS and CRISP. CPS generates a fixed pool of prompts from training data, then certifies candidates on a held-out evaluation set using simultaneous upper confidence bounds and selects the certified prompt with the highest benign utility. CRISP instead integrates risk feedback into an adaptive search, using hard example-guided rewriting and a reusable-holdout interface to steer generation toward the feasible utility frontier. Experiments on four datasets covering prompt injection, system-prompt leakage, and sensitive-information disclosure show that risk-certified selection consistently respects the target missed-attack level on heldout tests, while utility improves as the permitted risk is relaxed. CRISP is especially useful when fixed-pool search fails to produce certifiable high-utility candidates."
    
    这是一个连续的段落,没有明显的列表或引用。我需要把它排版成语义化的HTML片段。
    
    规则2说"长文用`

    `/`

    `划分小节",这段文本虽然不算很长,但可以划分为几个小节: 1. 背景与问题 2. 框架与两种方法 3. 实验结果 但规则4说"不得增删改内容",所以添加小标题是否算"增"?这里我需要谨慎。`

    `/`

    `是划分小节的标签,如果添加小标题文字就属于增删内容。但规则2明确说"长文用`

    `/`

    `划分小节",这暗示可以添加小节标题。不过为了严格遵守"不得增删改内容",更安全的做法是只使用`

    `包裹每个自然段落,不添加额外的标题文字。 原文看起来是一个自然段落。我可以考虑将每个句子或句子组作为段落,但原文是一个连贯的段落。 让我重新审视:原文是一整段连续文本。规则说"每个自然段落用`

    `包裹",所以整个原文作为一个`

    `即可。但为了更语义化,我可以用``标记重要句子。 重要句子可以标记: - "This paper studies system-prompt selection as a constrained optimization problem: maximize benign pass rate while keeping the missed-attack rate below a user-specified level α with finite-sample statistical control." - "Experiments on four datasets covering prompt injection, system-prompt leakage, and sensitive-information disclosure show that risk-certified selection consistently respects the target missed-attack level on heldout tests, while utility improves as the permitted risk is relaxed." 但原文中没有列表、引用、代码,所以不需要这些标签。 我决定将原文保持为一个`

    `,并适当使用``标记关键句子。但要注意不要增删内容,只改变标签。 实际上,原文是一个自然段落,用`

    `包裹即可。为了更语义化,我可以考虑用``标记核心发现和论文核心主张。 让我构建HTML: ```html

    LLM-as-a-judge guardrails are often controlled primarily through system prompts, yet standard prompt optimization methods target average performance rather than explicit safety constraints. This paper studies system-prompt selection as a constrained optimization problem: maximize benign pass rate while keeping the missed-attack rate below a user-specified level α with finite-sample statistical control. The framework combines LLM-based judging, automatic prompt generation, and distribution-free risk certification. This work instantiates it in two procedures: CPS and CRISP. CPS generates a fixed pool of prompts from training data, then certifies candidates on a held-out evaluation set using simultaneous upper confidence bounds and selects the certified prompt with the highest benign utility. CRISP instead integrates risk feedback into an adaptive search, using hard example-guided rewriting and a reusable-holdout interface to steer generation toward the feasible utility frontier. Experiments on four datasets covering prompt injection, system-prompt leakage, and sensitive-information disclosure show that risk-certified selection consistently respects the target missed-attack level on heldout tests, while utility improves as the permitted risk is relaxed. CRISP is especially useful when fixed-pool search fails to produce certifiable high-utility candidates.

    ``` 这应该满足要求。但我再想想,是否应该划分小节?规则2说"长文用`

    `/`

    `划分小节",这段文字不算很长,而且添加小节标题会需要新增文字,违反规则4。所以只用`

    `是合适的。 不过,我可以考虑将原文按逻辑划分为几个`

    `段落,这样更语义化。原文实际上是一个连续段落,但可以分为几个语义段落: 1. 背景+问题+方法框架 2. 两种方法(CPS和CRISP) 3. 实验结果+结论 但这样分割是否算"增删改内容"?只是分段,没有改变文字,应该可以。原文中句号分隔,分成几个段落是排版操作,不改变内容。 让我合理分段: 段落1:背景与问题 "LLM-as-a-judge guardrails are often controlled primarily through system prompts, yet standard prompt optimization methods target average performance rather than explicit safety constraints. This paper studies system-prompt selection as a constrained optimization problem: maximize benign pass rate while keeping the missed-attack rate below a user-specified level α with finite-sample statistical control. The framework combines LLM-based judging, automatic prompt generation, and distribution-free risk certification." 段落2:两种方法 "This work instantiates it in two procedures: CPS and CRISP. CPS generates a fixed pool of prompts from training data, then certifies candidates on a held-out evaluation set using simultaneous upper confidence bounds and selects the certified prompt with the highest benign utility. CRISP instead integrates risk feedback into an adaptive search, using hard example-guided rewriting and a reusable-holdout interface to steer generation toward the feasible utility frontier." 段落3:实验结果 "Experiments on four datasets covering prompt injection, system-prompt leakage, and sensitive-information disclosure show that risk-certified selection consistently respects the target missed-attack level on heldout tests, while utility improves as the permitted risk is relaxed. CRISP is especially useful when fixed-pool search fails to produce certifiable high-utility candidates." 这样分成三个`

    `更符合排版规范。 关于``,我可以标记关键句子,但要小心不要过度。用户说"重要句子可用``",这是可选的。我会标记论文核心主张和实验结论。 最终输出: ```html

    LLM-as-a-judge guardrails are often controlled primarily through system prompts, yet standard prompt optimization methods target average performance rather than explicit safety constraints. This paper studies system-prompt selection as a constrained optimization problem: maximize benign pass rate while keeping the missed-attack rate below a user-specified level α with finite-sample statistical control. The framework combines LLM-based judging, automatic prompt generation, and distribution-free risk certification.

    This work instantiates it in two procedures: CPS and CRISP. CPS generates a fixed pool of prompts from training data, then certifies candidates on a held-out evaluation set using simultaneous upper confidence bounds and selects the certified prompt with the highest benign utility. CRISP instead integrates risk feedback into an adaptive search, using hard example-guided rewriting and a reusable-holdout interface to