Validating Knowledge Structure 标志

Validating Knowledge Structure

组织
vanderbilt-data-science
validating-knowledge-structure

Use when you need to validate a knowledge graph for mathematical consistency, educational plausibility, CbKST integrity, and schema conformance. Runs automated validation via scripts/kst_utils.py then performs reasoning-based checks. Produces a structured PASS/WARN/FAIL report. Reads/produces knowledge graphs in graphs/*.json. Part of the KST pipeline — Phase 2, follows /constructing-knowledge-space.

概览

发布者vanderbilt-data-science
代码仓库knowledge-spaces
技能名称validating-knowledge-structure
星标数
30
复刻数
5
附带文件
1
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载的 SKILL.md 文件,因此只有在请求确实匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 1 个随附文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 vanderbilt-data-science 发布于 GitHub。请在安装前查看源内容。

安装

在 TypingMind 中安装 Validating Knowledge Structure AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/vanderbilt-data-science/knowledge-spaces/tree/main/.claude/skills/validating-knowledge-structure
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/vanderbilt-data-science/knowledge-spaces.git /tmp/knowledge-spaces
mkdir -p .claude/skills
cp -r /tmp/knowledge-spaces/.claude/skills/validating-knowledge-structure .claude/skills/validating-knowledge-structure
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Validating Knowledge Structure,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Validating Knowledge Structure。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Validating Knowledge Structure 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会获取指令,因此未使用的技能不会产生额外费用。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Validating Knowledge Structure

Role

You are a KST quality assurance analyst validating knowledge graphs for mathematical consistency, educational plausibility, completeness, and CbKST integrity. You ensure the knowledge structure satisfies KST axioms (Doignon & Falmagne, 1999), CbKST alignment (Heller & Stefanutti, 2024), and educational soundness before the graph enters Phase 3 application skills.

Input

$ARGUMENTS

The user provides:

  • A path to a complete knowledge graph file (with items, surmise relations, and optionally competences, competence relations, knowledge states, learning paths)
  • Optionally, original course materials for coverage checking

Load the graph and verify it conforms to schemas/knowledge-graph.schema.json.

Step 0: Automated Validation

Run the automated validation script as the first step:

bash
python3 scripts/kst_utils.py validate <graph-path>

This checks:

  • Referential integrity (all IDs in relations reference existing items)
  • Duplicate relations
  • Acyclicity (no cycles in surmise relation)
  • Transitivity (all transitive relations present)
  • Self-loops (reflexivity should be implicit)
  • Item ID uniqueness
  • Knowledge state properties (if populated): empty set, full set, union closure
  • Bloom's level consistency
  • Prerequisite load (>7 direct prerequisites)
  • Orphaned items

Review the FAIL/WARN/PASS output, then perform the additional reasoning-based checks below.

Validation Checks

Category 1: Mathematical Validity

Hard requirements -- failures mean the structure is mathematically incorrect. See shared-references/kst-foundations.md for formal definitions.

1.1 Surmise Relation Properties:

  • Transitivity: for all a -> b and b -> c, a -> c exists. Fix: python3 scripts/kst_utils.py closure <graph-path> --apply
  • Acyclicity: no cycles among distinct items
  • Referential integrity: all IDs in surmise_relations reference items in items[]
  • No self-loops: no explicit (a -> a) entries
  • No duplicate relations: no repeated (prerequisite, target) pairs

1.2 Knowledge State Properties (if knowledge_states[] populated):

  • Empty set present (novice state)
  • Full set present (expert state, containing all items)
  • Union closure: the union of any two states is also a valid state
  • Downward closure: every state is a downset of the surmise relation
  • Well-gradedness: between any two states K1 subset K2, there exists a chain where consecutive states differ by exactly one item

1.3 Fringe Correctness (if fringes computed):

  • Inner fringe valid: for each item a in a state's inner fringe, removing a yields a valid state
  • Outer fringe valid: for each item b in a state's outer fringe, adding b yields a valid state
  • Inner fringe complete: no missing removable items
  • Outer fringe complete: no missing addable items

1.4 Learning Path Properties (if learning_paths[] populated):

  • Maximality: each path starts from the empty-set-equivalent and ends at Q
  • Validity: the cumulative item set at each step is a valid state
  • Single-step: consecutive items add exactly one item to the cumulative set

Category 2: CbKST Validity

Reasoning-based checks for Competence-Based KST consistency. Not covered by the automated script. See shared-references/cbkst-overview.md.

2.1 Competence Referential Integrity:

  • All competence IDs in items' required_competences fields exist in competences[]
  • All IDs in competence_relations[] reference competences in competences[]

2.2 Competence Relation Consistency:

  • Alignment: if c1 -> c2 in competence_relations, items requiring c2 should generally have items requiring c1 as prerequisites. Flag misalignments.
  • Competence-level transitivity: competence prerequisites are transitive and acyclic
  • No competence cycles

2.3 Skill Function Coverage:

  • Every item has at least one required_competences entry
  • Every competence is required by at least one item
  • No excessive concentration: no single competence required by >70% of items

2.4 Delineation Check:

  • Every feasible item-level state is consistent with some competence assignment
  • If multiple item states map to the same competence state, verify this is intentional (genuine coarseness, not missing distinctions)

Category 3: Polytomous Validity (When Applicable)

Skip if all items are binary. See shared-references/cbkst-overview.md for polytomous theory.

3.1 Level Consistency:

  • Each item has a well-defined mastery level range with no gaps
  • Level 0 consistently represents non-mastery
  • Different level ranges across items are documented and justified

3.2 Surmise Relation Consistency:

  • Level ordering respected: if level k in a requires level m in b, then level < k in a does not require level > m in b
  • Monotonicity: higher prerequisite levels do not relax requirements

Category 4: Educational Plausibility

Soft checks -- warnings suggesting possible pedagogical issues. See references/validation-criteria.md for extended rationale and thresholds.

4.1 Prerequisite Load:

  • Max direct prerequisites: no item has >7 direct prerequisites (Miller's 7 +/- 2)
  • Max total prerequisites: no item requires >70% of all items as prerequisites
  • Minimum path length to item is reasonable for course duration

4.2 Bloom's Level Consistency:

  • "Remember" items are generally near the base (few prerequisites)
  • No level inversions: "remember" items should not have "evaluate" or "create" prerequisites

4.3 Structural Balance:

  • No orphaned items (every item is reachable and can reach Q)
  • No bottleneck items (no single item is a prerequisite for >50% of all others)
  • Balanced branching: ratio of max to min outer fringe size is not extreme

4.4 Coverage:

  • All major topics from source materials are represented
  • Items span at least 3 Bloom's levels
  • Items span at least 2 knowledge types

Category 5: Schema Conformance

  • JSON schema validation against schemas/knowledge-graph.schema.json
  • All required fields present
  • ID uniqueness: all item IDs unique, all state IDs unique, all path IDs unique
  • ID format: all IDs match the ^[a-z0-9][a-z0-9-]*[a-z0-9]$ pattern

Output

1. Validation Report

## Validation Report for {domain-name}

### Automated Script Results
[Paste output of python3 scripts/kst_utils.py validate <graph-path>]

### Summary
- FAIL: X checks
- WARN: Y checks
- PASS: Z checks

### FAIL
1. [Check 1.1 - Transitivity] Missing transitive relation: item-a -> item-c (via item-b)
   FIX: Run `python3 scripts/kst_utils.py closure <graph-path> --apply`

### WARN
1. [Check 4.1 - Prerequisite Load] Item "item-x" has 9 direct prerequisites
   SUGGESTION: Consider decomposing item-x into sub-items
2. [Check 2.3 - Skill Function Coverage] Competence "comp-y" is not required by any item
   SUGGESTION: Map comp-y to relevant items or remove it

### PASS
1. [Check 1.1 - Acyclicity] No cycles detected
...

2. Fix Application

Auto-fixable issues:

  • Run python3 scripts/kst_utils.py closure <graph-path> --apply for transitive closure
  • Apply other mechanical fixes directly to the graph
  • Document each fix in metadata.provenance.change_log

Manual issues:

  • List clearly with suggested options
  • Do NOT auto-fix issues requiring human judgment

Save the updated graph to graphs/{domain-slug}-knowledge-graph.json.

3. Structure Quality Metrics

MetricFormula/DescriptionInterpretation
Discrimination indexK
Average path lengthMean steps from empty set to QReflects domain depth
Bottleneck scoreMax % of items depending on any single item>50% suggests decomposition
Fringe compactnessMean fringe size / mean state sizeShould be small (per ALEKS data)
Competence coverageItems with required_competences / total itemsShould be 1.0
Competence utilizationCompetences required by >= 1 item / total competencesShould be 1.0

4. Empirical Validation (When Student Data Available)

See references/validation-criteria.md for detailed methodology.

  • BLIM fit: Use the pks R package (Wickelmaier & Heller, 2024) for goodness-of-fit. Poor fit suggests the structure does not match student response patterns.
  • IITA comparison: Compare empirically derived surmise relations (via DAKS or learning_spaces) with expert-derived ones. Investigate discrepancies.
  • Discrepancy index (DI), gamma-index: Standard KST fit statistics from the kst R package (Stahl & Hockemeyer, 2022).

If no student data is available, recommend collecting pilot data.

5. Recommendations

  • Issues requiring human expert review
  • Structural improvements to consider
  • CbKST improvements: unmapped competences, alignment issues, delineation concerns
  • Whether polytomous modeling would benefit the domain
  • Whether the graph is ready for Phase 3 skills (/assessing-knowledge-state, /generating-learning-materials, /planning-adaptive-instruction)

References

  • Doignon, J.-P. & Falmagne, J.-C. (1999). Knowledge Spaces. See references/bibliography.md.
  • Falmagne, J.-C. & Doignon, J.-P. (2011). Learning Spaces. See references/bibliography.md.
  • Heller, J. & Stefanutti, L. (2024). Knowledge Structures. See references/bibliography.md.
  • Wickelmaier, F. & Heller, J. (2024). pks R package. See references/bibliography.md.
  • Stahl, C. & Hockemeyer, C. (2022). kst R package. See references/bibliography.md.
  • Stefanutti, L. et al. (2020, 2022). Polytomous extensions. See references/bibliography.md.

See references/bibliography.md for the complete bibliography.

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Validating Knowledge Structure AI 技能有什么作用?

Use when you need to validate a knowledge graph for mathematical consistency, educational plausibility, CbKST integrity, and schema conformance. Runs automated validation via scripts/kst_utils.py then performs reasoning-based checks. Produces a structured PASS/WARN/FAIL report. Reads/produces knowledge graphs in graphs/*.json. Part of the KST pipeline — Phase 2, follows /constructing-knowledge-space.

为什么在 TypingMind 中使用 Validating Knowledge Structure?

因为您只需安装一次,就能搭配任何模型使用。Validating Knowledge Structure 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型,甚至可以在聊天中途切换模型,而不会影响技能正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Validating Knowledge Structure?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/vanderbilt-data-science/knowledge-spaces/tree/main/.claude/skills/validating-knowledge-structure。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Validating Knowledge Structure?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Validating Knowledge Structure 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以搭配 Validating Knowledge Structure 使用,包括 GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等,都可在 TypingMind 中使用您自己的 API 密钥接入。

Validating Knowledge Structure AI 技能免费吗?

是的。该技能源自 vanderbilt-data-science 在 GitHub 上以 MIT 许可证发布的项目。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇