nemo-guardrails

仓库创建 2025年11月3日最近提交 1 个月前SkillHot 收录 20 天前
▸ 精选理由

提供可编程 Colang 规则与多种安全检测组件,适合生产级守护链路。

▸ 风险提示

依赖 NVIDIA GPU 与外部模型下载,运行环境要求较高。

这个 Skill 做什么

NVIDIA 的可编程运行时安全框架,提供输入输出校验与监控规则。

为 LLM 应用加上运行时的可编程安全护栏,能做 jailbreak 检测、输入/输出校验、事实核验、幻觉与 PII 过滤等。适合把模型放到生产环境、需要实时拦截危险或不准确信息的场景。用 Colang 2.0 DSL 写规则,支持监控与扩展,能在常见 GPU(比如 T4)上运行。

▸ 展开 SKILL.md 英文原文

NVIDIA's runtime safety framework for LLM applications. Features jailbreak detection, input/output validation, fact-checking, hallucination detection, PII filtering, toxicity detection. Uses Colang 2.0 DSL for programmable rails. Production-ready, runs on T4 GPU.

自动化集成运行时安全可编程规则PII 过滤通用
1.1w
Stars
817
Forks
40
仓库内 Skill
+704
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/Orchestra-Research/AI-Research-SKILLs/main/07-safety-alignment/nemo-guardrails/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/Orchestra-Research/AI-Research-SKILLs/main/07-safety-alignment/nemo-guardrails/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# NeMo Guardrails - Programmable Safety for LLMs

## Quick start

NeMo Guardrails adds programmable safety rails to LLM applications at runtime.

**Installation**:
```bash
pip install nemoguardrails
```

**Basic example** (input validation):
```python
from nemoguardrails import RailsConfig, LLMRails

# Define configuration
config = RailsConfig.from_content("""
define user ask about illegal activity
  "How do I hack"
  "How to break into"
  "illegal ways to"

define bot refuse illegal request
  "I cannot help with illegal activities."

define flow refuse illegal
  user ask about illegal activity
  bot refuse illegal request
""")

# Create rails
rails = LLMRails(config)

# Wrap your LLM
respon
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有