brainy/docs/architecture
David Snelling da7d2ed29d feat: migrate embeddings to Candle WASM + remove semantic type inference
Major architectural changes:

1. EMBEDDINGS ENGINE (ONNX → Candle WASM):
   - Replace ONNX Runtime with Rust Candle compiled to WASM
   - Embedded model in WASM binary (no external downloads)
   - Quantized Q8 precision with <50MB memory footprint
   - Zero-download, offline-first operation
   - Same embedding quality (all-MiniLM-L6-v2)

2. REMOVE SEMANTIC TYPE INFERENCE:
   - Delete embeddedKeywordEmbeddings.ts (14MB of pre-computed embeddings)
   - Remove typeAwareQueryPlanner.ts and semanticTypeInference.ts
   - Remove VerbExactMatchSignal (uses keyword embeddings)
   - Update SmartRelationshipExtractor to 3 signals (55%/30%/15% weights)

API CHANGES (requires v7.0.0):
- Removed: inferTypes(), inferNouns(), inferVerbs(), inferIntent()
- Removed: getSemanticTypeInference(), SemanticTypeInference class
- Removed: TypeInference, SemanticTypeInferenceOptions types

Users can still use natural language queries in find() - they just
need to specify type explicitly for type-optimized searches.

PACKAGE SIZE IMPACT:
- Compressed: 90.1 MB → 86.2 MB (-4.3%)
- Uncompressed: 114.4 MB → 100.3 MB (-12%)
- ~448K lines of code removed

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 12:52:34 -08:00
..
API_SURFACE_DESIGN.md fix: update all imports and references from BrainyData to Brainy 2025-09-30 17:09:15 -07:00
augmentation-system-audit.md fix: update all imports and references from BrainyData to Brainy 2025-09-30 17:09:15 -07:00
augmentations-actual.md feat: migrate embeddings to Candle WASM + remove semantic type inference 2026-01-06 12:52:34 -08:00
augmentations.md fix: update all imports and references from BrainyData to Brainy 2025-09-30 17:09:15 -07:00
CLUSTERING_ALGORITHMS_ANALYSIS.md docs: add deprecation warnings for addNoun and addVerb methods 2025-09-17 10:48:41 -07:00
data-storage-architecture.md feat: ID-first storage architecture + remove memory-unsafe APIs (v6.0.0) 2025-11-19 16:46:11 -08:00
distributed-storage.md docs: add comprehensive scaling and storage architecture documentation 2025-09-08 14:49:25 -07:00
finite-type-system.md feat: migrate embeddings to Candle WASM + remove semantic type inference 2026-01-06 12:52:34 -08:00
index-architecture.md docs: update index architecture documentation for v5.7.7 lazy loading 2025-11-13 10:10:39 -08:00
initialization-and-rebuild.md docs: update index architecture documentation for v5.7.7 lazy loading 2025-11-13 10:10:39 -08:00
METADATA_ARCHITECTURE.md feat: Brainy 3.0 - Production-ready Triple Intelligence database 2025-09-11 16:23:32 -07:00
noun-verb-taxonomy.md fix: update all Stage 2 references to Stage 3 CANONICAL type counts 2025-11-06 09:40:33 -08:00
overview.md docs: add comprehensive index architecture documentation 2025-10-13 13:42:04 -07:00
PERFORMANCE_ANALYSIS.md feat: Brainy 3.0 - Production-ready Triple Intelligence database 2025-09-11 16:23:32 -07:00
storage-architecture.md chore(release): 4.0.0 2025-10-17 14:48:34 -07:00
triple-intelligence.md 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
zero-config.md fix: update all imports and references from BrainyData to Brainy 2025-09-30 17:09:15 -07:00