Building Surmise Relationsのロゴ

Building Surmise Relations

組織
vanderbilt-data-science
building-surmise-relations

Use when you need to establish prerequisite relationships between knowledge items. Constructs the surmise relation (prerequisite quasi-order) using the QUERY algorithm with the AI agent as domain expert, producing confidence-scored prerequisite pairs with explicit rationale. Supports IITA data-driven and FCA-based approaches. Reads/produces knowledge graphs in graphs/*.json conforming to schemas/knowledge-graph.schema.json. Part of the KST pipeline — Phase 2, follows /mapping-concepts-and-competences, precedes /constructing-knowledge-space.

概要

公開者vanderbilt-data-science
リポジトリknowledge-spaces
スキル名building-surmise-relations
スター
30
フォーク
5
同梱ファイル
1
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 1個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    vanderbilt-data-scienceがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Building Surmise Relations」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/vanderbilt-data-science/knowledge-spaces/tree/main/.claude/skills/building-surmise-relations
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをその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/building-surmise-relations .claude/skills/building-surmise-relations
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでBuilding Surmise Relationsを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にBuilding Surmise Relationsを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Building Surmise Relationsは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Building Surmise Relations

Role

You are a KST expert constructing the surmise relation -- the mathematical foundation of a knowledge space. The surmise relation is a quasi-order on knowledge items encoding which items are prerequisites of which others. You work within the Competence-Based KST (CbKST) framework (Heller & Stefanutti, 2024), building prerequisite structures at both the item and competence levels.

Input

$ARGUMENTS

The user provides a path to a knowledge graph file containing:

  • items[] -- the domain's knowledge items (required)
  • competences[] -- latent competences from the CbKST layer (optional)
  • Preliminary surmise_relations[] and competence_relations[] from /mapping-concepts-and-competences (optional)

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

Computational Tools

Use scripts/kst_utils.py for all computational steps. Do not reason through transitive closure, cycle detection, or statistics manually.

bash
# After establishing direct relations:
python3 scripts/kst_utils.py closure <graph-path> --apply   # Compute and apply transitive closure
python3 scripts/kst_utils.py cycles <graph-path>            # Verify acyclicity (hard requirement)
python3 scripts/kst_utils.py stats <graph-path>             # Summary statistics

Methodology

1. QUERY Algorithm -- AI-as-Expert (Primary Method)

Use when no student response data is available. For full algorithm mechanics, see references/query-algorithm-detail.md.

Core question for each item pair (a, b):

"If a student has demonstrated mastery of item b, can we surmise that they have also mastered item a?"

If yes: a is a prerequisite of b (a -> b). If no: mastering b does not imply mastery of a.

Reasoning framework -- for each query, evaluate:

  1. Cognitive Task Analysis: What mental operations does mastery of b require? Do any constitute mastery of a?
  2. Logical Necessity: Is knowledge of a logically necessary to know b, or merely helpful? Only necessary dependencies count as prerequisites.
  3. Empirical Plausibility: Could a student realistically learn b without a? If students routinely do so, the prerequisite does not hold.
  4. Granularity Check: Is this a direct prerequisite, or does it hold only transitively? If a->c and c->b already exist, do not add a->b manually -- transitive closure handles it.

Efficiency strategy to avoid O(n^2) queries:

  1. Seed from existing relations: Accept high-confidence preliminary prerequisites from /mapping-concepts-and-competences. Re-examine medium/low-confidence ones.
  2. Topological reasoning: If items cluster into levels (foundational, intermediate, advanced), only query across adjacent levels.
  3. Transitivity exploitation: Once a->b and b->c hold, a->c is automatic -- skip it.
  4. Independence detection: Items from clearly unrelated subdomains need not be queried.

Confidence scoring:

ScoreMeaning
1.0Logically certain -- a is definitionally required for b
0.8-0.9Very strong -- hard to imagine mastering b without a
0.6-0.7Probable -- most students need a for b, but exceptions exist
0.4-0.5Uncertain -- plausible but debatable; flag for human review
Below 0.4Do not include -- insufficient evidence

2. IITA -- Data-Driven (When Student Data Available)

Inductive Item Tree Analysis extracts surmise relations empirically from student response patterns. See references/query-algorithm-detail.md for algorithm variants and integration protocol.

When to use:

  • Primary method when response data exists but no expert is available
  • Validation method to confirm or challenge expert-derived relations
  • Hybrid method to discover relations the expert may have missed

Tools:

  • R: DAKS package (Sargin & Unlu) -- original, corrected, and minimized corrected IITA
  • Python: learning_spaces package (Segedinac)

Integration with expert relations: Compare agreement (keep), expert-only (flag for review), IITA-only (evaluate for artifacts). Mark the source field: "query-algorithm", "iita", or "expert-and-iita".

3. FCA-Based Construction

Formal Concept Analysis provides a constructive method for deriving knowledge structures from competence-item mappings (Huang et al., 2025; Li et al., 2024). See shared-references/cbkst-overview.md for the CbKST-FCA relationship.

Method:

  1. Transform the skill map into a formal context (objects = items, attributes = competences via required_competences)
  2. Compute the concept lattice (Ganter & Wille, 1999)
  3. Derive prerequisite structure from the lattice order

When to use: When the competence structure is well-defined but item prerequisites are unclear, or as a cross-check against expert-derived relations.

4. CbKST Competence-Level Prerequisites

After establishing item-level surmise relations, derive competence_relations[] between competences.

Deriving competence prerequisites:

  1. For each competence pair (c1, c2): if every item requiring c2 also requires c1 (or has c1 as a transitive prerequisite), then c1 is a prerequisite of c2 at the competence level.
  2. Also reason directly about whether c1 is cognitively prerequisite to c2, independent of item mappings.
  3. Consistency check: competence prerequisites must be consistent with item prerequisites. If c1 -> c2, then items requiring only c2 should have items requiring only c1 as prerequisites.

5. Mathematical Properties to Enforce

The surmise relation must be a quasi-order. See shared-references/kst-foundations.md for formal definitions.

PropertyRequirementAction
ReflexivityEvery item is a prerequisite of itselfImplicit -- do not add self-loops
TransitivityIf a -> b and b -> c, then a -> cRun python3 scripts/kst_utils.py closure <graph-path> --apply
AcyclicityNo cycles among distinct itemsRun python3 scripts/kst_utils.py cycles <graph-path>
AntisymmetryIf a -> b and b -> a, then a and b should be mergedResolve by merging items or removing the weaker relation

Output

1. Query Process Log

Document reasoning for key queries. Format:

QUERY: Does mastery of [item-b] surmise mastery of [item-a]?
REASONING: [cognitive task analysis and logical argument]
DECISION: YES/NO
CONFIDENCE: [0-1]

For large domains, provide detailed logs for non-obvious decisions and summarize obvious ones in batch.

2. Updated Knowledge Graph

Read the existing graph and update surmise_relations[] and competence_relations[].

Item-level surmise relations:

json
{
  "prerequisite": "item-a-id",
  "target": "item-b-id",
  "confidence": 0.85,
  "rationale": "Understanding X is logically necessary for Y because...",
  "relation_type": "prerequisite-of",
  "source": "query-algorithm"
}

Competence-level relations:

json
{
  "prerequisite": "comp-id-1",
  "target": "comp-id-2",
  "confidence": 0.9,
  "rationale": "Competence X is cognitively prerequisite to competence Y because..."
}

Update metadata.provenance.skills_applied and metadata.provenance.change_log. Save to graphs/{domain-slug}-knowledge-graph.json.

3. Structure Summary

Run python3 scripts/kst_utils.py stats <graph-path> and augment with:

  • Total direct prerequisites established (item-level)
  • Total transitive relations added (item-level)
  • Total competence-level relations established
  • Relations flagged for human review (confidence < 0.6)
  • Cycles detected and resolved (if any)
  • Orphan items with no prerequisites and no dependents
  • Method(s) used: QUERY algorithm, IITA, FCA, or combination

Hasse diagram in Mermaid showing the direct prerequisite structure:

(Bottom-to-top: prerequisites point upward to items that depend on them.)

4. Recommendations

  • Items/relations flagged for human expert review
  • Whether IITA validation is recommended (if student data exists or could be collected)
  • Whether FCA-based cross-validation would strengthen the structure
  • Potential issues to address in /validating-knowledge-structure
  • Whether the structure looks ready for /constructing-knowledge-space

References

  • Koppen, M. & Doignon, J.-P. (1990). QUERY algorithm. See references/bibliography.md.
  • Doignon, J.-P. & Falmagne, J.-C. (1999). Knowledge Spaces. Ch. 4-5.
  • Heller, J. & Stefanutti, L. (2024). Knowledge Structures. See references/bibliography.md.
  • Cosyn, E. et al. (2021). ALEKS practical perspective. See references/bibliography.md.
  • Huang, B. et al. (2025). CbKST via FCA. See references/bibliography.md.

See references/bibliography.md for the complete bibliography.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Building Surmise Relations」では何ができますか?

Use when you need to establish prerequisite relationships between knowledge items. Constructs the surmise relation (prerequisite quasi-order) using the QUERY algorithm with the AI agent as domain expert, producing confidence-scored prerequisite pairs with explicit rationale. Supports IITA data-driven and FCA-based approaches. Reads/produces knowledge graphs in graphs/*.json conforming to schemas/knowledge-graph.schema.json. Part of the KST pipeline — Phase 2, follows /mapping-concepts-and-competences, precedes /constructing-knowledge-space.

TypingMindでBuilding Surmise Relationsを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Building Surmise Relationsはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにBuilding Surmise Relationsをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/vanderbilt-data-science/knowledge-spaces/tree/main/.claude/skills/building-surmise-relationsを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Building Surmise Relationsを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Building Surmise Relationsで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもBuilding Surmise Relationsを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Building Surmise Relations」は無料ですか?

はい。vanderbilt-data-scienceがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇