Logo Validating Knowledge Structure

Validating Knowledge Structure

Tổ chức
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.

Tổng quan

Nhà phát hànhvanderbilt-data-science
Kho mãknowledge-spaces
Tên kỹ năngvalidating-knowledge-structure
Sao
30
Bản fork
5
Tệp đi kèm
1
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 1 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được vanderbilt-data-science công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Validating Knowledge Structure trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/vanderbilt-data-science/knowledge-spaces/tree/main/.claude/skills/validating-knowledge-structure
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

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
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Validating Knowledge Structure trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Validating Knowledge Structure ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Validating Knowledge Structure không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

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.

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Validating Knowledge Structure làm được gì?

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.

Vì sao nên dùng Validating Knowledge Structure trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Validating Knowledge Structure là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Validating Knowledge Structure trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/vanderbilt-data-science/knowledge-spaces/tree/main/.claude/skills/validating-knowledge-structure. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Validating Knowledge Structure?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Validating Knowledge Structure với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Validating Knowledge Structure với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Validating Knowledge Structure có miễn phí không?

Có. Kỹ năng này được vanderbilt-data-science phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇