Logo von Building Surmise Relations

Building Surmise Relations

Organisation
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.

Übersicht

Herausgebervanderbilt-data-science
Repositoryknowledge-spaces
Skill-Namebuilding-surmise-relations
Sterne
30
Forks
5
Mitgelieferte Dateien
1
LizenzMIT
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • Mitgelieferte Dateien: 1

    Skripte, Vorlagen und Referenzmaterial, die das Modell bei der Arbeit lesen kann. Die Dateien sind schreibgeschützt und werden niemals ausgeführt.

  • Open Source

    Von vanderbilt-data-science auf GitHub veröffentlicht. Prüfen Sie vor der Installation die Quelldateien.

Installation

Installieren Sie den KI-Skill Building Surmise Relations in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner. Dabei liest die App SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/vanderbilt-data-science/knowledge-spaces/tree/main/.claude/skills/building-surmise-relations
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill hinzufügen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format unterstützt, kann diesen Skill nutzen. Kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

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
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Building Surmise Relations in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Building Surmise Relations automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Building Surmise Relations nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Schlüsseln.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

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.

Mitgelieferte Dateien

Das Modell liest diese Dateien bei Bedarf, während der Skill geladen ist. Sie werden als lesbare Dateien bereitgestellt und niemals ausgeführt.

Häufig gestellte Fragen

Was macht der KI-Skill 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.

Warum Building Surmise Relations in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Building Surmise Relations besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Building Surmise Relations in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/vanderbilt-data-science/knowledge-spaces/tree/main/.claude/skills/building-surmise-relations ein. TypingMind liest die Datei SKILL.md, bündelt die zugehörigen Dateien und installiert alles als Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Building Surmise Relations nutzen?

Jedes Modell, das Sie mit TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Building Surmise Relations verwenden?

So viele Sie möchten. In TypingMind können Sie Building Surmise Relations mit jedem Modell verwenden, das Skills unterstützt, etwa mit GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama. Dabei nutzen Sie Ihre eigenen API-Schlüssel.

Ist der KI-Skill Building Surmise Relations kostenlos?

Ja. Der Skill wird von vanderbilt-data-science auf GitHub unter der Lizenz MIT veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: Die Datei SKILL.md enthält den Namen und die Beschreibung des Skills. Hinzu kommen bei Bedarf Skripte, Vorlagen oder Referenzdateien für das Modell. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und kommen daher ohne Server, API-Schlüssel und Laufzeitumgebung aus. Sie funktionieren mit jedem Modell.

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇