Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add SuperChason/ontology-driven-ai-data-management-skills --skill ontology-constraint-and-knowledge-injectiongit clone --depth 1 https://github.com/SuperChason/ontology-driven-ai-data-management-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/superchason/ontology-driven-ai-data-management-skills/ontology-constraint-and-knowledge-injection)<a href="https://agentmods.dev/skills/superchason/ontology-driven-ai-data-management-skills/ontology-constraint-and-knowledge-injection"><img src="https://agentmods.dev/badge/skills/superchason/ontology-driven-ai-data-management-skills/ontology-constraint-and-knowledge-injection/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/superchason/ontology-driven-ai-data-management-skills/ontology-constraint-and-knowledge-injection"><img src="https://agentmods.dev/badge/skills/superchason/ontology-driven-ai-data-management-skills/ontology-constraint-and-knowledge-injection.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00100 | $0.01579 |
| Opus 5 | $0.00050 | $0.00790 |
| Sonnet 5 | $0.00020 | $0.00316 |
| Haiku 4.5 | $0.00010 | $0.00158 |
Grade A, and why
ontology-constraint-and-knowledge-injection scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.
本体约束与知识注入策略选择
方法骨架
- 根据风险、问题清晰度、知识稳定性和运行成本选择本体约束与注入路径。
- 少量高风险规则优先显式注入,让模型看到明确结构、阈值和限制。
- 大量文档和模糊表达采用向量召回,再用图查询校验关系与规则。
- 高频、稳定、规模足够的任务可评估指令微调或本体生成合成数据。
- 只有Prompt无法满足一致性、延迟或成本目标时才升级训练路径。
- 任何路径都要绑定真实事实、版本和外部验证,防止错误本体放大偏差。
触发场景
用户会在什么情境下需要这个 Skill
- 要决定本体知识写进Prompt、走RAG还是微调
- 规则型任务需要提高可解释性和一致性
- 图检索、向量检索和训练方案之间需要权衡
语言信号
- “Prompt RAG 微调怎么选”
- “本体怎么注入大模型”
- “图检索和向量检索各用在哪”
- 英文信号:knowledge injection, prompt vs RAG vs fine-tuning, ontology constraint
与相邻 Skill 的区分
- 与
intent-driven-minimal-ontology-loading:最小加载先决定知识范围;本 skill 决定知识进入模型的技术路径和约束强度。 - 与
fact-reason-goal-explainable-decision:本 skill 提供模型所需知识;事实事理目标负责组织具体决策。
执行步骤
按当前任务选择必要步骤;已有可靠成果直接复用:
-
刻画任务
- 动作:评估风险、问题清晰度、知识规模、稳定性、时效、频次、延迟和可解释要求。
- 完成标准:每个维度有证据和等级。
-
确定约束强度
- 动作:低容错、规则明确任务采用强显式约束;探索任务采用候选检索与软约束。
- 完成标准:约束强度与业务风险一致。
-
选择注入路径
- 动作:默认Prompt/上下文;文档规模大时图向量混合RAG;稳定高频且Prompt不足时评估微调;数据稀缺时谨慎使用合成数据。
- 完成标准:选择理由、成本和升级条件明确。
-
绑定事实与版本
- 动作:所有规则和知识关联来源、版本、适用范围和实时事实。
- 完成标准:过期或无来源知识不会进入确定性输出。
-
设计对比验证
- 动作:用同一测试集比较准确性、一致性、可解释性、延迟、成本和风险。
- 完成标准:只有新增路径达到门槛且无关键退化时升级。
固定输出
- 任务特征卡:风险、问题清晰度、知识规模、稳定性、时效、频次、延迟、成本和可解释要求
- 待注入知识清单:知识编号、类型、来源、版本、适用范围、时效、敏感级别和确认状态
- 约束强度判定表:任务风险、容错、强显式约束、软约束或候选检索结论及理由
- 注入路径比较表:Prompt、图检索、向量检索、混合 RAG、微调和合成数据的效果、成本、延迟、版本更新和风险
- 知识注入契约:选定路径、资源、加载范围、约束强度、事实绑定、版本、失效与回退条件
- 对比验证矩阵:基线与候选路径的准确、一致、可解释、延迟、成本和风险
- 选型结论、升级条件、退回条件与未决项
选型结论必须引用本地任务特征和对比数据,未验证路径保持候选状态,不写成生产方案。
使用边界
不要在以下情况使用
- 还没有定义要加载的最小知识范围
- 把微调当作实时事实更新机制
- 错误或未经验证的本体用于批量生成训练数据
常见失败模式
- 用通用逻辑直接驱动自主决策:概率推理替代了企业决策逻辑,执行工具又把语言偏差转化成了现实状态变更。
- 在低容错场景接受概率性幻觉:概率生成与业务正确性目标不一致,且下游系统把文本结果当作可信决策依据。
- 把文档检索等同于可执行知识:向量相似性提供相关片段,却不能保证业务关系、方向、约束和动作条件完整呈现。
- 纯人工符号建模或纯神经生成走向单边极端:单一技术范式无法同时覆盖语义抽象效率、业务约束、泛化能力和可解释性。
- 一次性加载全量本体和超长上下文:有限上下文被低相关知识占据,关键规则的有效权重下降,冲突信息增加概率性选择空间。
使用折扣与复核要求
- 当前公开证据缺少不同注入路径的大规模对照实验,实际选型必须用本地数据和成本测试。
- 大模型生成形式结构无法直接证明业务语义正确,生产使用需保留专家确认、工具校验、真实用例和审计记录。
相关 Skills
depends-on→intent-driven-minimal-ontology-loading;最小加载先决定知识范围;本 skill 决定知识进入模型的技术路径和约束强度。
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago Changed · +9 tokens per session 00c8746eacd6
- 8d ago Changed · +7 lines acd142bc94f7
- 12d ago First seen · 100 lines · 91 tokens per session scan A 0ccdf900c038
ontology-constraint-and-knowledge-injection is a skill published in the GitHub repository SuperChason/ontology-driven-ai-data-management-skills (10 stars, last pushed 5d ago), licensed MIT. It adds 100 tokens to every session and 1,579 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
llm-patterns
Patterns for building production-grade LLM features — prompt engineering, retrieval-augmented generation (RAG), evaluation harnesses, guardrails, cost control, hallucination mitigation, structured output, agentic loops. Stack-agnostic; recipes target Anthropic Claude (Opus 4.7 / Sonnet 4.6 / Haiku 4.5) and OpenAI as…
dspy
DSPy: declarative LM programs, auto-optimize prompts, RAG.
ai-engineering-toolkit
6 production-ready AI engineering workflows: prompt evaluation (8-dimension scoring), context budget planning, RAG pipeline design, agent security audit (65-point checklist), eval harness building, and product sense coaching.
llm-app-patterns
Production-ready patterns for building LLM applications. Covers RAG pipelines, agent architectures, prompt IDEs, and LLMOps monitoring. Use when designing AI applications, implementing RAG, building agents, or setting up LLM observability.
graphify
Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community…
llm-security
Use for authorized security assessment of LLM applications and AI agents, including prompt injection, tool abuse, RAG exposure, memory poisoning, and model supply-chain risks.