Two-stage hierarchical retriever.
const retriever = new SessionRetriever({ summaryStore, memoryStore, embeddingManager, rerankerService, defaultTopSessions: 5, defaultChunksPerSession: 3,});const result = await retriever.retrieve( 'What did the user say about their rescue dog?', { valence: 0, arousal: 0, dominance: 0 }, { scope: 'user', scopeId: 'u42' }, { recallTopK: 10 },); Copy
const retriever = new SessionRetriever({ summaryStore, memoryStore, embeddingManager, rerankerService, defaultTopSessions: 5, defaultChunksPerSession: 3,});const result = await retriever.retrieve( 'What did the user say about their rescue dog?', { valence: 0, arousal: 0, dominance: 0 }, { scope: 'user', scopeId: 'u42' }, { recallTopK: 10 },);
Two-stage retrieve. Returns a CognitiveRetrievalResult compatible with the existing CognitiveMemoryManager.retrieve shape.
CognitiveRetrievalResult
CognitiveMemoryManager.retrieve
Diagnostics are best-effort: timings reflect wall-clock of each stage, not the cognitive-scorer internal accounting.
Two-stage hierarchical retriever.
Example