RetrievalResult
A single result from a retrieval operation.
Properties
Section titled “Properties”embedding?
Section titled “embedding?”optional embedding?: readonly number[];The embedding vector for this result’s text content.
Populated when the retriever requests includeVectors: true from the
vector store. Used by RetrievalCache to index results by document
embedding without a separate embed() call.
id: string;Identifier of the retrieved chunk or document.
metadata?
Section titled “metadata?”optional metadata?: Record<string, unknown>;Metadata associated with the retrieved item.
reason?
Section titled “reason?”optional reason?: string;Human-readable reason for selection.
relevanceScore?
Section titled “relevanceScore?”optional relevanceScore?: number;Mirrors score for runtimes that consume citation relevance explicitly.
score?
Section titled “score?”optional score?: number;Relevance score. Higher is more relevant.
snippet?
Section titled “snippet?”optional snippet?: string;Short preview used by citation cards.
sourceId
Section titled “sourceId”sourceId: string;Stable source identifier for citation tracking.
text: string;The retrieved text content.