Skip to content

Latest commit

 

History

History
84 lines (70 loc) · 3.87 KB

File metadata and controls

84 lines (70 loc) · 3.87 KB

Model Status (2025-11-22)

Current Model: Gemini 2.5 Pro (1M context window) Waitlist Status: ⏳ On waitlist for Gemini 3 access Access Method: OAuth via Google AI Pro subscription ($0/month)

MCP Server Connection

Start the soulfield-kg MCP server:

node /home/michael/soulfield/backend/services/knowledge-graph/mcp-server.cjs

Connect via stdio (standard MCP protocol):

{
  "mcpServers": {
    "soulfield-kg": {
      "command": "node",
      "args": ["/home/michael/soulfield/backend/services/knowledge-graph/mcp-server.cjs"]
    }
  }
}

Recent Additions (2025-11-18)

Phase 4 Graph Visualization Complete:

  • Graph export service with GEXF/Sigma JSON/Cypher formats
  • Sigma.js WebGL visualization (http://localhost:8791/graph)
  • Historical tracking dashboard with SQLite snapshots
  • Evolution stage prediction with trend analysis
  • Chart.js trend visualizations (6 charts)
  • InfraNodus parity: 99% complete

Files Added:

  • backend/services/graph-export.cjs
  • backend/services/graph-history.cjs (2025-11-18)
  • backend/services/graph-predictor.cjs (2025-11-18)
  • frontend/graph-viewer.html
  • frontend/graph-history.html (2025-11-18)
  • backend/tests/graph-history.test.cjs (10/10 tests passing)

Phase 5: Knowledge Graph & Pipeline Architecture (2025-11-19)

Core Architecture:

  • SQLite-First Knowledge Graph: A local, zero-dependency graph store (kg-sqlite.cjs) replacing complex external vector DBs.
  • Composable Pipeline: Refactored ingestion into a KnowledgePipeline (pipeline/core.cjs) with modular tasks (Ingest, Chunk, Embed, Extract, Summary).
  • MCP Integration: Full soulfield-kg MCP server (mcp-server.cjs) exposing 8 tools:
Tool Purpose Use Case
search Graph-completion queries with 16+ search options Main entry point for KG queries
getStats KG health metrics (docs, entities, relationships) Dashboard, monitoring
getPerformance Query timing, cache hit rates, memory Performance tuning
multiHopPath Multi-step relationship traversal Connect distant concepts (RAG Solution 1)
causalChain IF/THEN logic chain building Risk assessment, dependency analysis (RAG Solution 2)
disambiguateEntity Type-based entity filtering Distinguish "builder" (agent vs pattern) (RAG Solution 3)
temporalConflict Timestamp-based resolution "Current owner?" when data changes (RAG Solution 4)
explicitRelationships Verified-only graph edges Zero-hallucination queries (RAG Solution 5)

Search Options (16+):

  • includeGraph, useGraphScoring, useTFIDF, useFTS5
  • findGaps, scoreGaps, trackEvolution, detectCognitiveState
  • includeCommunities, includeQuestions, simulateCouncil
  • traverseDepth, includeRelationships, includeAllPaths
  • agent (filter), path (filter), limit

Key Features Implemented:

  • Vector Embeddings: Local 384-dim embeddings via Xenova/all-MiniLM-L6-v2 (lazy-loaded).
  • Hierarchical Summaries: 3-level summaries (Abstract, Paragraph, Detailed) generated via Claude.
  • LLM Entity Extraction: Structured JSON extraction of entities (Concepts, Agents, Files) with regex fallback.
  • Hybrid Search: Combines FTS5 (text), Vector (semantic), and Graph (relational) scoring.

Current Status:

  • Cognee Parity: 85% (up from 70%).
  • Critical Gaps Solved: Embeddings, Summaries, and Extraction are now active.
  • Next Focus: Advanced Relationship Detection (Semantic Edge Typing) and Pipeline Tasks for RAG failure prevention.

Codebase Map:

  • backend/services/knowledge-graph/kg-sqlite.cjs: Core Graph Logic & Pipeline Entry
  • backend/services/knowledge-graph/pipeline/: Pipeline Infrastructure & Tasks
  • backend/services/knowledge-graph/mcp-server.cjs: MCP Server Implementation
  • backend/services/knowledge-graph/graph-search.cjs: Unified Search Logic