Spaces:
Sleeping
Sleeping
Commit History
-
feat: Wire LlamaIndex RAG into Simple Mode (Tiered Embedding) (#83)
Unverified signature* feat: wire LlamaIndex RAG service into embedding infrastructure This PR implements tiered embedding service selection per NEXT_TASK.md: ## Changes - Add EmbeddingServiceProtocol (embedding_protocol.py) for unified interface - Add async wrappers to LlamaIndexRAGService (add_evidence, search_similar, deduplicate) - Update service_loader.py with get_embedding_service() factory method - Update ResearchMemory to use service_loader instead of direct EmbeddingService - Update orchestrators to use EmbeddingServiceProtocol type hints ## Design Patterns Applied - Strategy Pattern: Tiered service selection (LlamaIndex or local) - Factory Method: get_embedding_service() creates appropriate service - Protocol Pattern: Structural typing for service interface - Dependency Injection: ResearchMemory accepts any protocol-compatible service ## Tiered Selection - Premium tier (OPENAI_API_KEY present): LlamaIndexRAGService with: - OpenAI embeddings (text-embedding-3-small) - Persistent ChromaDB s…7baf8ba
-
feat: add service loader + SPEC_06 + P0 bug report
Service Loader: - Create src/utils/service_loader.py for centralized lazy loading - All orchestrators now use centralized service loading - Enforces OrchestratorProtocol on Advanced and Hierarchical SPEC_06 (Simple Mode Synthesis - not yet implemented): - Research-backed spec for fixing Simple mode never synthesizing - Identifies 6 root causes with November 2025 LLM-as-Judge research - Separates scoring from decision-making (debiased architecture) P0 Bug Report: - Documents Simple mode producing only citations (no synthesis) - Confidence dropping to 0% in late iterations (context overflow) - Judge never recommending "synthesize" even with 455 sources CodeRabbit concerns from PR #70 addressed.9639483