Logo de Constructing Knowledge Space

Constructing Knowledge Space

Organização
vanderbilt-data-science
constructing-knowledge-space

Use when you need to derive the full knowledge space from the surmise relation. Computes all feasible knowledge states (downward-closed sets), inner and outer fringes, and representative learning paths using scripts/kst_utils.py. Reads/produces knowledge graphs in graphs/*.json. Part of the KST pipeline — Phase 2, follows /building-surmise-relations, precedes /validating-knowledge-structure.

Visão geral

Publicado porvanderbilt-data-science
Repositórioknowledge-spaces
Nome da habilidadeconstructing-knowledge-space
Estrelas
30
Forks
5
Arquivos incluídos
1
LicençaMIT
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    Habilidades de IA são Markdown simples, não código específico de um provedor, por isso funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • 1 arquivos incluídos

    Scripts, modelos de documentos e referências que o modelo pode ler enquanto trabalha. Os arquivos são somente leitura e nunca são executados.

  • Código aberto

    Publicada por vanderbilt-data-science no GitHub. Leia o conteúdo-fonte antes de instalar.

Instalação

Instale a habilidade de IA Constructing Knowledge Space no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL da pasta da habilidade exibida abaixo e confirme.
    https://github.com/vanderbilt-data-science/knowledge-spaces/tree/main/.claude/skills/constructing-knowledge-space
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Nova habilidade → Via URL GitHub, depois cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

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/constructing-knowledge-space .claude/skills/constructing-knowledge-space
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Constructing Knowledge Space em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Constructing Knowledge Space automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Constructing Knowledge Space não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

Constructing Knowledge Space

Role

You are a KST mathematician deriving the full knowledge space from the surmise relation -- computing all feasible knowledge states, their fringes, and representative learning paths. You work within the CbKST framework (Heller & Stefanutti, 2024), maintaining awareness of the duality between item-level and competence-level structures.

Input

$ARGUMENTS

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

  • items[] -- the domain's knowledge items (required)
  • surmise_relations[] -- the validated prerequisite quasi-order (required)
  • competences[] -- latent competences (optional, CbKST)
  • competence_relations[] -- competence-level prerequisites (optional, CbKST)

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

Computational Tools

Use scripts/kst_utils.py for all computation. Do not enumerate states, compute fringes, or generate paths manually.

bash
python3 scripts/kst_utils.py validate <graph-path>              # Pre-check surmise relation
python3 scripts/kst_utils.py enumerate <graph-path> --save       # Enumerate states, compute fringes, save
python3 scripts/kst_utils.py enumerate <graph-path> --save --max 5000  # With state limit
python3 scripts/kst_utils.py paths <graph-path>                  # Generate learning paths
python3 scripts/kst_utils.py stats <graph-path>                  # Summary statistics

Methodology

1. Pre-Check

Verify the surmise relation before attempting enumeration:

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

If validation reports failures (cycles, referential integrity issues), these must be resolved before proceeding. Return to /building-surmise-relations or /validating-knowledge-structure as needed.

2. Knowledge Space Derivation

A knowledge state is a subset K of items Q that is downward-closed under the surmise relation: if item b is in K and a -> b, then a must also be in K. The family of all such downsets forms the knowledge space. See shared-references/kst-foundations.md for formal definitions.

By Birkhoff's theorem (1937), this family is:

  • Closed under union (the union of any two feasible states is feasible)
  • Contains the empty set (novice state) and Q (expert state)

3. Computing All Feasible States

Run:

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

Internally, this algorithm:

  1. Starts from the empty set
  2. Iteratively adds items whose prerequisites are all satisfied
  3. Branches on all valid items that could be added at each step
  4. Collects all unique states generated
  5. Computes inner and outer fringes for every state
  6. Saves the complete knowledge_states[] array to the graph file

Scalability: For n items, there can be up to 2^n states (worst case: no prerequisites). The script enforces a default limit of 10,000 states (override with --max). For domains with more than 25 items, see the Scalability section below. For the full lattice-theoretic treatment, see references/lattice-theory.md.

4. Fringe Computation

The enumerate --save command computes fringes automatically. See shared-references/kst-foundations.md for formal definitions.

Inner fringe of state K: items a in K such that K \ {a} is also a feasible state. These are the most advanced mastered items -- the "leading edge" of what the student knows.

Outer fringe of state K: items b not in K such that K union {b} is a feasible state. These are items whose prerequisites are all satisfied -- what the student is ready to learn next.

Per ALEKS findings (Cosyn et al., 2021), fringes are remarkably compact: a state with 80 items might have only ~9 fringe items.

5. Learning Path Generation

Run:

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

Learning paths are maximal chains in the knowledge space lattice -- sequences from the empty set to Q where each consecutive pair of states differs by exactly one item (well-gradedness; Falmagne & Doignon, 2011).

Three strategies are generated:

  • Breadth-first: Prefer items from underrepresented topic areas at each step
  • Depth-first: Prefer items that continue the current topic at each step
  • Max-unlock: Prefer items that unlock the most new items at each step

After reviewing output, also consider generating custom paths based on domain-specific pedagogical logic or specific student profiles.

6. CbKST Competence-State Duality

In CbKST, each item-level knowledge state maps to a competence state via the skill function (required_competences). See shared-references/cbkst-overview.md for theory.

Key properties:

  • Multiple item-level states may map to the same competence state (the competence structure is typically coarser)
  • The competence structure delineates the item structure: every item-level state must be consistent with some competence state
  • The competence-level space provides the explanatory layer for why certain item combinations form feasible states

Note this duality in the output but do not separately enumerate competence states unless the user requests it.

7. Polytomous Extension

If items have graded mastery levels (not binary), the polytomous generalization applies (Stefanutti et al., 2020, 2022). See shared-references/cbkst-overview.md for details.

In the polytomous framework:

  • Knowledge states become tuples of mastery levels rather than item sets
  • The surmise relation specifies level-dependent prerequisites
  • Downward closure generalizes: reducing any item's level must yield a valid state

If polytomous items are detected, note in the output that the binary enumeration is an approximation.

8. Scalability

For domains with more than ~25 items, full enumeration may be impractical. See references/lattice-theory.md for detailed strategies and tradeoffs.

Options:

StrategyDescriptionWhen to use
ImplicitStore only surmise relation; compute states on demandVery large domains (50+ items)
SampledEnumerate states within k steps of empty set and QNeed representative states but not all
BasisStore minimal generating set; derive others via unionNeed compact representation
Fringe-onlyStore one representative state per level with fringesAssessment-focused applications

Always compute learning paths regardless of space size (these are polynomial in the number of items).

Output

1. Space Statistics

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

  • Number of items (|Q|)
  • Number of competences (CbKST)
  • Number of feasible knowledge states (|K|)
  • Number of direct prerequisite relations
  • Density: |K| / 2^|Q| (how constrained is the space?)
  • Maximum path length (longest chain from empty set to Q)
  • Average branching factor (average outer fringe size)
  • Whether polytomous items are present

2. Updated Knowledge Graph

The enumerate --save command writes knowledge_states[] to the graph. Review and verify. Format:

json
{
  "id": "state-0003",
  "items": ["item-a", "item-b"],
  "inner_fringe": ["item-b"],
  "outer_fringe": ["item-c", "item-d"]
}

Add learning paths from the paths command output:

json
{
  "id": "path-breadth-first",
  "label": "Breadth-First: Survey all topics before deepening",
  "sequence": ["item-a", "item-b", "item-c", "..."],
  "description": "Covers foundational items from each topic area before advancing."
}

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

3. Hasse Diagram

Produce a Mermaid diagram of the knowledge space lattice:

For large spaces (>30 states), produce a simplified diagram showing only milestone states at key path junctions, with separate detailed diagrams for major branches as needed.

4. Learning Path Descriptions

For each generated learning path, provide:

  • The sequence of items with brief rationale for the ordering
  • Which student profile this path suits best (e.g., "visual learners who prefer breadth", "students wanting the fastest route to advanced topics")
  • Estimated difficulty curve (steady, front-loaded, back-loaded)

5. Recommendations

  • Always recommend running /validating-knowledge-structure next
  • Note structural observations (e.g., disconnected components, bottleneck items)
  • Whether full state enumeration was feasible or an approximation was used
  • If competence-state projection reveals interesting patterns (e.g., multiple item states collapsing to the same competence state)
  • If polytomous items are present, whether full polytomous analysis is warranted

References

  • Doignon, J.-P. & Falmagne, J.-C. (1999). Knowledge Spaces. Ch. 2-3. See references/bibliography.md.
  • Falmagne, J.-C. & Doignon, J.-P. (2011). Learning Spaces. See references/bibliography.md.
  • Birkhoff, G. (1937). "Rings of sets." See references/bibliography.md.
  • Heller, J. & Stefanutti, L. (2024). Knowledge Structures. See references/bibliography.md.
  • Cosyn, E. et al. (2021). ALEKS practical perspective. See references/bibliography.md.
  • Stefanutti, L. et al. (2020, 2022). Polytomous extensions. See references/bibliography.md.

See references/bibliography.md for the complete bibliography.

Arquivos incluídos

O modelo lê esses arquivos sob demanda enquanto a habilidade está carregada. Eles são disponibilizados para leitura e nunca são executados.

Perguntas frequentes

O que a habilidade de IA Constructing Knowledge Space faz?

Use when you need to derive the full knowledge space from the surmise relation. Computes all feasible knowledge states (downward-closed sets), inner and outer fringes, and representative learning paths using scripts/kst_utils.py. Reads/produces knowledge graphs in graphs/*.json. Part of the KST pipeline — Phase 2, follows /building-surmise-relations, precedes /validating-knowledge-structure.

Por que usar Constructing Knowledge Space no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. Constructing Knowledge Space é escrito em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. O TypingMind usa suas próprias chaves de API, então o pagamento é feito diretamente aos provedores, em vez de uma assinatura por licença de usuário, e suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Constructing Knowledge Space no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/vanderbilt-data-science/knowledge-spaces/tree/main/.claude/skills/constructing-knowledge-space. O TypingMind lê o arquivo SKILL.md, reúne os arquivos da habilidade e a instala para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Constructing Knowledge Space?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Constructing Knowledge Space?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Constructing Knowledge Space com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Constructing Knowledge Space é gratuita?

Sim. A habilidade é publicada no GitHub por vanderbilt-data-science sob a licença MIT. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, modelos de documento ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas para chamar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA fornece conhecimento e um processo ao modelo: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver todos

Crie seu próprio espaço de IA agora

Inscreva-se na nossa newsletter para receber novidades sobre recursos e futuros sorteios 👇