首页龙虾技能列表 › Semantic Circuit Breaker — 语义熔断器

Semantic Circuit Breaker — 语义熔断器

v1.0.0

保护下游服务免受语义内容质量下降的影响,通过监测语义漂移、不一致、事实错误或有害内容触发熔断,利用语义距离指标(嵌入比较、方差、事实性)替代传统错误率,实现三态模型(关闭、开启、半开启)保护LLM API和类似服务。

0· 58·0 当前·0 累计
by @kingofzhao (KingOfZhao)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/4/2
安全扫描
VirusTotal
无害
查看报告
OpenClaw
可疑
medium confidence
该技能的描述和算法与其声明的目的相符,但运行时指令对嵌入/验证服务和数据源的选择过于模糊,授予代理过宽的权限,可能导致意外访问或数据泄漏。
评估建议
该技能概念上符合其名称,但运行时指令故意模糊地描述了如何获取嵌入、哪个LLM或知识库(KB)使用以及应用的阈值。启用前:1)要求作者指定将调用哪些嵌入/LLM/KB端点和所需的凭据;2)仅授予访问已审查的提供商或本地嵌入服务的权限,而非平台广泛的凭据;3)审查和锁定任何KB或外部端点以避免意外数据泄漏;4)要求具体的默认值(N、阈值、基线源)或自己实施这些策略;5)先在受限环境中测试。如果作者提供具体的集成目标和声明的环境变量,请重新评估——当前的模糊性是标记它为可疑的原因。...
详细分析 ▾
用途与能力
Name/description (semantic circuit breaker) align with the SKILL.md: it describes semantic-distance triggers and a three-state breaker. However, the instructions rely on functions like embed() and verify_against_kb() without specifying where embeddings, the LLM, or the knowledge base come from—operational dependencies that are necessary to implement the described capability are not declared.
指令范围
The SKILL.md is high-level and leaves implementation choices (which embedding provider, which KB, how to fetch/verify facts, thresholds, how many responses N, where baseline comes from) up to the agent. Vague, open-ended guidance can cause the agent to access arbitrary external services or data sources or to request credentials at runtime.
安装机制
Instruction-only skill with no install spec or code files — minimal surface area and nothing is written to disk by the skill itself.
凭证需求
The skill declares no required environment variables or credentials, but its examples require embedding, LLM calls, and KB verification. In practice these will need API keys/credentials; because they are not declared, the agent might attempt to use whatever credentials it already has access to or reach out to external endpoints — an under-specified credential model.
持久化与权限
No always:true, no install-time persistence, and no modification of other skills or system-wide config is indicated. The skill runs only when invoked (user-invocable) and does not request elevated persistence.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.02026/4/2

Semantic Circuit Breaker 1.0.0 - 首次发布,引入基于语义的熔断器用于服务保护。- 检测和响应诸如幻觉、语义漂移、事实错误和有毒内容等问题。- 使用“语义距离”指标(嵌入比较、方差、事实性)而非传统错误率。- 实现了一个由语义质量(而非仅HTTP状态码)驱动的扩展三态模型(关闭、开启、半开启)。- 设计为LLM API和类似服务的质量保障层。

● 无害

安装命令 点击复制

官方npx clawhub@latest install semantic-circuit-breaker
镜像加速npx clawhub@latest install semantic-circuit-breaker --registry https://cn.clawhub-mirror.com

技能文档

# 语义熔断器 > 基于内容语义而非错误率的服务保护机制。 ## 何时使用 - API返回"正确格式但错误语义"的响应(如AI幻觉) - 需要保护下游服务免受语义漂移影响 - LLM API的质量保障层 ## 核心认知 ### 1. 传统熔断看状态码,语义熔断看内容 传统Circuit Breaker基于HTTP状态码和超时率。但当LLM API返回200但内容是幻觉、偏见、或语义偏移时,传统熔断完全无效。 语义熔断触发条件: - 语义漂移:连续N个响应的语义embedding偏离历史基线超过阈值 - 一致性断裂:对同一问题的多次回答语义差异过大 - 事实性崩塌:响应中可验证事实的错误率超过阈值 - 毒性飙升:响应中的有害内容评分突增 ### 2. 三态模型(扩展传统熔断) - Closed(正常):语义质量在基线范围内,请求正常通过 - Open(熔断):语义质量严重偏离,请求被拦截并返回降级响应 - Half-Open(探测):定期发送探测请求,评估语义质量是否恢复 区别:转换条件不是"错误率"而是"语义距离"。 ### 3. 语义距离计算 ``python # 保留原代码,不翻译 ` ## 碰撞来源 - circuit-breaker-pattern × semantic-diff-engine × llm-output-validator - semantic-cache-layer(语义计算)× adaptive-circuit-breaker`(自适应熔断)

数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务