prompt-governance
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePrompt Governance
提示词治理
Category: Engineering Domain: AI Governance
分类: 工程 领域: AI治理
Overview
概述
The Prompt Governance skill provides tools for auditing prompts for security vulnerabilities, bias, and safety issues, plus managing a versioned catalog of approved prompts. Essential for organizations deploying LLM-based applications at scale.
提示词治理技能提供工具用于审核提示词的安全漏洞、偏见和安全问题,同时管理经过批准的提示词的版本化目录。对于大规模部署基于LLM的应用的组织来说至关重要。
Quick Start
快速开始
bash
undefinedbash
undefinedAudit a prompt for security and safety issues
Audit a prompt for security and safety issues
python scripts/prompt_auditor.py --file system_prompt.txt
python scripts/prompt_auditor.py --file system_prompt.txt
Audit with specific focus
Audit with specific focus
python scripts/prompt_auditor.py --text "You are a helpful assistant..." --checks injection,bias,safety
python scripts/prompt_auditor.py --text "You are a helpful assistant..." --checks injection,bias,safety
Initialize a prompt catalog
Initialize a prompt catalog
python scripts/prompt_catalog_manager.py --init --catalog-dir ./prompts
python scripts/prompt_catalog_manager.py --init --catalog-dir ./prompts
Add a prompt to the catalog
Add a prompt to the catalog
python scripts/prompt_catalog_manager.py --add --name "customer-support-v1" --file prompt.txt --catalog-dir ./prompts
python scripts/prompt_catalog_manager.py --add --name "customer-support-v1" --file prompt.txt --catalog-dir ./prompts
List all prompts in catalog
List all prompts in catalog
python scripts/prompt_catalog_manager.py --list --catalog-dir ./prompts
undefinedpython scripts/prompt_catalog_manager.py --list --catalog-dir ./prompts
undefinedTools Overview
工具概述
| Tool | Purpose | Key Flags |
|---|---|---|
| Audit prompts for injection, bias, and safety | |
| Manage versioned prompt catalog | |
| 工具 | 用途 | 关键参数 |
|---|---|---|
| 审核提示词的注入漏洞、偏见和安全问题 | |
| 管理版本化提示词目录 | |
Workflows
工作流程
Prompt Review Process
提示词审核流程
- Author writes or modifies a prompt
- Run for automated checks
prompt_auditor.py - Review findings and address critical issues
- Add approved prompt to catalog with
prompt_catalog_manager.py - Deploy from catalog (never from ad-hoc sources)
- 编写或修改提示词
- 运行进行自动化检查
prompt_auditor.py - 查看检查结果并解决关键问题
- 使用将通过审核的提示词添加到目录中
prompt_catalog_manager.py - 从目录部署提示词(绝不使用临时来源)
Prompt Versioning
提示词版本控制
- Store all prompts in catalog with semantic versioning
- Use to compare versions before promotion
--diff - Maintain audit trail of all prompt changes
- Roll back to previous versions when issues detected
- 将所有提示词以语义化版本存储在目录中
- 在升级版本前使用比较版本差异
--diff - 维护所有提示词变更的审核追踪记录
- 发现问题时回滚到之前的版本
Reference Documentation
参考文档
- Prompt Governance Framework - Policies, review processes, and compliance requirements
- 提示词治理框架 - 政策、审核流程和合规要求
Common Patterns
常见模式
Prompt Lifecycle
提示词生命周期
Draft -> Audit -> Review -> Approve -> Deploy -> Monitor -> Retire
草稿 -> 审核 -> 评审 -> 批准 -> 部署 -> 监控 -> 淘汰
Governance Checklist
治理检查清单
- No injection vulnerabilities
- No harmful content generation potential
- Appropriate bias mitigation
- Clear scope boundaries
- Output format constraints
- Error handling instructions
- 无注入漏洞
- 无生成有害内容的可能性
- 适当的偏见缓解措施
- 清晰的范围边界
- 输出格式约束
- 错误处理说明