knowledge-tab.md · 7.6 KB

Knowledge Tab: Semantic Knowledge Graph

Overview

The Knowledge Tab visualizes the mindX knowledge graph, showing semantic relationships between beliefs, goals, strategic evolution, and learned patterns.

Status: ✅ DEPLOYED & OPERATIONAL Features: Interactive knowledge graph, belief system visualization, evolution tracking Backend: pgvectorscale semantic memory with vector similarity search


🎯 Dashboard Sections

1. Knowledge Graph Visualization

Location: Center canvas Features:

2. Belief System Panel

Location: Left sidebar Components:

3. Goal Hierarchy

Location: Right sidebar Components:

4. Knowledge Insights

Location: Bottom panel Metrics:

🧠 Knowledge Graph Structure

Node Types

Belief Nodes (Blue)

┌─────────────────────────────────┐
│ 💭 BELIEF: Self-Improvement     │
│ Confidence: 94.7%               │
│ Source: EXPERIENCE              │
│ Created: 2026-01-15             │
│ Evidence: 127 memories          │
└─────────────────────────────────┘

Goal Nodes (Green)

┌─────────────────────────────────┐
│ 🎯 GOAL: Optimize Performance   │
│ Priority: HIGH                  │
│ Status: IN_PROGRESS             │
│ Progress: 67%                   │
│ Deadline: 2026-02-01            │
└─────────────────────────────────┘

Strategy Nodes (Purple)

┌─────────────────────────────────┐
│ 📋 STRATEGY: Memory-Driven      │
│ Type: IMPROVEMENT               │
│ Phase: IMPLEMENTATION           │
│ Success Rate: 89%               │
└─────────────────────────────────┘

Pattern Nodes (Orange)

┌─────────────────────────────────┐
│ 🔄 PATTERN: High-Load Handling  │
│ Occurrences: 23                 │
│ Confidence: 87.3%               │
│ Last Seen: 2 hours ago          │
└─────────────────────────────────┘

Edge Types


📊 Belief System Integration

Confidence Scoring

Confidence = Base_Evidence × Source_Weight × Temporal_Decay × Reinforcement_Factor

Where:

  • Base_Evidence: Number of supporting memories
  • Source_Weight: Credibility of evidence source
  • Temporal_Decay: Recency factor
  • Reinforcement_Factor: Repeated confirmation bonus

Belief Sources

Belief Evolution

1. Initial Formation
   ↓ Evidence accumulation
  1. Confidence Growth
↓ Pattern recognition
  1. Belief Refinement
↓ Contradiction resolution
  1. Stable Belief
↓ Periodic validation
  1. Belief Update/Deprecation

🔧 Technical Implementation

Frontend Architecture

class KnowledgeTab extends TabComponent {
    constructor(config) {
        super({
            id: 'knowledge',
            label: 'Knowledge',
            refreshInterval: 30000,
            autoRefresh: true
        });
    }

renderKnowledgeGraph(data) { // Initialize D3.js force-directed graph const simulation = d3.forceSimulation(data.nodes) .force('link', d3.forceLink(data.edges).id(d => d.id)) .force('charge', d3.forceManyBody().strength(-300)) .force('center', d3.forceCenter(width / 2, height / 2));

// Render nodes and edges this.renderNodes(data.nodes); this.renderEdges(data.edges); } }

Backend Endpoints

GET /knowledge/graph
Response: {
    "nodes": [
        {
            "id": "belief_001",
            "type": "belief",
            "label": "Self-Improvement Capability",
            "confidence": 0.947,
            "evidence_count": 127
        }
    ],
    "edges": [
        {
            "source": "belief_001",
            "target": "goal_003",
            "relationship": "supports",
            "strength": 0.85
        }
    ]
}

GET /knowledge/beliefs Response: { "beliefs": [ { "belief_id": "belief_001", "content": "System can improve through memory-driven feedback", "confidence": 0.947, "source": "EXPERIENCE", "evidence": ["mem_001", "mem_002", ...] } ] }

GET /knowledge/goals Response: { "goals": [ { "goal_id": "goal_003", "description": "Optimize query response time", "priority": "HIGH", "status": "IN_PROGRESS", "progress": 0.67 } ] }


🔍 Semantic Search Integration

pgvectorscale Queries

-- Find related beliefs by semantic similarity
SELECT b.belief_id, b.content, 1 - (e.embedding <=> query_embedding) as similarity
FROM beliefs b
JOIN belief_embeddings e ON b.belief_id = e.belief_id
WHERE 1 - (e.embedding <=> query_embedding) > 0.7
ORDER BY similarity DESC
LIMIT 10;

Knowledge Discovery

# Discover new patterns from memory
async def discover_patterns(memories: List[Memory]) -> List[Pattern]:
    # Generate embeddings for recent memories
    embeddings = [model.encode(m.content) for m in memories]
    
    # Cluster similar memories
    clusters = cluster_embeddings(embeddings, min_cluster_size=5)
    
    # Extract patterns from clusters
    patterns = []
    for cluster in clusters:
        pattern = extract_pattern(cluster)
        if pattern.confidence > 0.7:
            patterns.append(pattern)
    
    return patterns

📚 Related Documentation


The Knowledge Tab provides visibility into the mindX cognitive architecture, enabling understanding and optimization of the system's belief structures and learning processes.


Referenced in this document
belief_systempgvectorscale_memory_integration

All DocumentsDocument IndexThe Book of mindXImprovement JournalAPI Reference