Interface CognitiveRetrievalOptions

interface CognitiveRetrievalOptions {
    topK?: number;
    types?: MemoryType[];
    scopes?: {
        scope: MemoryScope;
        scopeId: string;
    }[];
    tags?: string[];
    entities?: string[];
    minConfidence?: number;
    timeRange?: {
        after?: number;
        before?: number;
    };
    neutralMood?: boolean;
    hyde?: boolean;
}

Properties

topK?: number
types?: MemoryType[]
scopes?: {
    scope: MemoryScope;
    scopeId: string;
}[]

Type declaration

tags?: string[]
entities?: string[]
minConfidence?: number
timeRange?: {
    after?: number;
    before?: number;
}

Type declaration

  • Optional after?: number
  • Optional before?: number
neutralMood?: boolean

If true, skip emotional congruence bias (useful for factual lookups).

hyde?: boolean

Enable HyDE (Hypothetical Document Embedding) for memory retrieval.

When true and a HyDE retriever is configured on the memory manager, the system generates a hypothetical memory trace matching the query before embedding. This produces embeddings that are closer to actual stored memories, improving recall — especially for vague or abstract recall prompts (e.g. "that thing we discussed about deployment").

Adds one LLM call per retrieval. Use for important lookups where recall quality matters more than latency.

Default

false