RetrievalResult interface

A single semantic search result returned by SemanticRetriever.retrieve().

Signature:

export declare interface RetrievalResult 

Properties

Property Type Description
content TaskPart[] Multimodal content parts of the matched record.
id string Unique identifier of the matched record.
metadata Record<string, string> | undefined Metadata associated with the matched record.
score number Cosine similarity score between the query and the matched record.

RetrievalResult.content

Multimodal content parts of the matched record.

Signature:

content: TaskPart[];

RetrievalResult.id

Unique identifier of the matched record.

Signature:

id: string;

RetrievalResult.metadata

Metadata associated with the matched record.

Signature:

metadata?: Record<string, string>;

RetrievalResult.score

Cosine similarity score between the query and the matched record.

Signature:

score: number;