Architecture: How should multi-tier knowledge be assembled for AI queries?
Documentation for Sessions
🏗️ Architecture: How should multi-tier knowledge be assembled for AI queries?
Date: 2026-02-06
Time: 00:56:53 UTC
Session: editor2-93.3
Agent: angular
Confidence: 92%
Status: ✅ Documented
📋 Decision Context
Question:
How should multi-tier knowledge be assembled for AI queries?
Task: Phase 4B: Knowledge distribution pipeline
🎯 Decision Made
Chosen:
KnowledgeDistributionService with 4-level weighted parallel assembly: Level 1 User Context (weight 4, TenantAI personalization) → Level 2 Space Patterns (weight 3, team visibility) → Level 3 Golden Decisions (weight 2, similar decisions) → Level 4 Core Rules (weight 1, always loaded). All 4 levels loaded via Promise.all() with T2 preference gates.
Options Considered:
- No alternatives documented
💭 Reasoning
Parallel loading maximizes performance. Weight system ensures user-specific knowledge dominates over generic platform knowledge. T2 gates (t3LearningEnabled controls Level 1, allowGoldenKnowledge controls Level 3) respect the B2B2C data ownership model. Token budget estimation enables future context window optimization. Replaced Vitto's manual 3-layer personalization with this unified service.
📁 Files Involved
apis/backend-ai-api/src/app/agents/services/knowledge-distribution.service.tsapis/backend-ai-api/src/app/vitto/vitto-orchestrator.service.ts
🔗 Related
- Decision ID:
dev_1770339413745_cf3ad98 - Session: 93
- Workspace: editor2
Auto-generated by MCP Smart Consolidation