Zum Hauptinhalt springen

Class: VectorIndexRetriever

Retrievers retrieve the nodes that most closely match our query in similarity.

Implements

Constructors

new VectorIndexRetriever()

new VectorIndexRetriever(__namedParameters): VectorIndexRetriever

Parameters

__namedParameters: VectorIndexRetrieverOptions

Returns

VectorIndexRetriever

Source

packages/llamaindex/src/indices/vectorStore/index.ts:395

Properties

index

index: VectorStoreIndex

Source

packages/llamaindex/src/indices/vectorStore/index.ts:390


serviceContext?

optional serviceContext: ServiceContext

Implementation of

BaseRetriever . serviceContext

Source

packages/llamaindex/src/indices/vectorStore/index.ts:393


topK

topK: TopKMap

Source

packages/llamaindex/src/indices/vectorStore/index.ts:391

Accessors

similarityTopK

set similarityTopK(similarityTopK): void

@deprecated, pass topK in constructor instead

Parameters

similarityTopK: number

Source

packages/llamaindex/src/indices/vectorStore/index.ts:407

Methods

buildNodeListFromQueryResult()

protected buildNodeListFromQueryResult(result): NodeWithScore <Metadata>[]

Parameters

result: VectorStoreQueryResult

Returns

NodeWithScore <Metadata>[]

Source

packages/llamaindex/src/indices/vectorStore/index.ts:478


retrieve()

retrieve(__namedParameters): Promise <NodeWithScore <Metadata>[]>

Parameters

__namedParameters: RetrieveParams

Returns

Promise <NodeWithScore <Metadata>[]>

Implementation of

BaseRetriever . retrieve

Source

packages/llamaindex/src/indices/vectorStore/index.ts:412


retrieveQuery()

protected retrieveQuery(query, type, vectorStore, preFilters?): Promise <NodeWithScore <Metadata>[]>

Parameters

query: MessageContent

type: ModalityType

vectorStore: VectorStore

preFilters?: MetadataFilters

Returns

Promise <NodeWithScore <Metadata>[]>

Source

packages/llamaindex/src/indices/vectorStore/index.ts:449