Interface UnifiedRetrievalResult

Result returned by the UnifiedRetriever after executing a RetrievalPlan.

Contains the merged, reranked chunks from all queried sources along with diagnostics about which sources contributed and how long each took.

See

UnifiedRetriever.retrieve

interface UnifiedRetrievalResult {
    chunks: RetrievedChunk[];
    researchSynthesis?: string;
    plan: RetrievalPlan;
    sourceDiagnostics: SourceDiagnostics;
    durationMs: number;
    memoryCacheHit: boolean;
}

Properties

chunks: RetrievedChunk[]

Merged and reranked content chunks, sorted by relevance (highest first).

researchSynthesis?: string

Research synthesis narrative when deep research was performed. Present only when the plan's deepResearch flag was true and a deep research callback was available.

The plan that was executed to produce this result.

sourceDiagnostics: SourceDiagnostics

Per-source diagnostics showing contributions and timing.

durationMs: number

Total wall-clock duration of the retrieval in milliseconds.

memoryCacheHit: boolean

Whether a memory cache hit was used (episodic memory shortcut).