Skip to main content

Class: VectorIndexRetriever

Extends

Constructors

new VectorIndexRetriever()

new VectorIndexRetriever(options): VectorIndexRetriever

Parameters

options: VectorIndexRetrieverOptions

Returns

VectorIndexRetriever

Overrides

BaseRetriever.constructor

Defined in

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

Properties

filters?

optional filters: MetadataFilters

Defined in

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


index

index: VectorStoreIndex

Defined in

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


objectMap

objectMap: Map<string, unknown>

Inherited from

BaseRetriever.objectMap

Defined in

packages/core/retriever/dist/index.d.ts:20


serviceContext?

optional serviceContext: ServiceContext

Defined in

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


topK

topK: TopKMap

Defined in

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

Accessors

similarityTopK

set similarityTopK(similarityTopK): void

@deprecated, pass similarityTopK or topK in constructor instead or directly modify topK

Parameters

similarityTopK: number

Defined in

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

Methods

_getPromptModules()

protected _getPromptModules(): object

Return a dictionary of sub-modules within the current module that also implement PromptMixin (so that their prompts can also be get/set).

Can be blank if no sub-modules.

Returns

object

Inherited from

BaseRetriever._getPromptModules

Defined in

packages/core/retriever/dist/index.d.ts:23


_getPrompts()

protected _getPrompts(): object

Returns

object

Inherited from

BaseRetriever._getPrompts

Defined in

packages/core/retriever/dist/index.d.ts:22


_handleRecursiveRetrieval()

_handleRecursiveRetrieval(params, nodes): Promise<NodeWithScore<Metadata>[]>

Parameters

params: QueryBundle

nodes: NodeWithScore<Metadata>[]

Returns

Promise<NodeWithScore<Metadata>[]>

Inherited from

BaseRetriever._handleRecursiveRetrieval

Defined in

packages/core/retriever/dist/index.d.ts:27


_retrieve()

_retrieve(params): Promise<NodeWithScore<Metadata>[]>

Parameters

params: QueryBundle

Returns

Promise<NodeWithScore<Metadata>[]>

Overrides

BaseRetriever._retrieve

Defined in

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


_retrieveFromObject()

_retrieveFromObject(object, queryBundle, score): NodeWithScore<Metadata>[]

Parameters

object: unknown

queryBundle: QueryBundle

score: number

Returns

NodeWithScore<Metadata>[]

Inherited from

BaseRetriever._retrieveFromObject

Defined in

packages/core/retriever/dist/index.d.ts:28


_updatePrompts()

protected _updatePrompts(): void

Returns

void

Inherited from

BaseRetriever._updatePrompts

Defined in

packages/core/retriever/dist/index.d.ts:21


buildNodeListFromQueryResult()

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

Parameters

result: VectorStoreQueryResult

Returns

NodeWithScore<Metadata>[]

Defined in

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


getPrompts()

getPrompts(): PromptsRecord

Returns

PromptsRecord

Inherited from

BaseRetriever.getPrompts

Defined in

packages/core/prompts/dist/index.d.ts:58


retrieve()

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

Parameters

params: QueryType

Returns

Promise<NodeWithScore<Metadata>[]>

Inherited from

BaseRetriever.retrieve

Defined in

packages/core/retriever/dist/index.d.ts:25


retrieveQuery()

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

Parameters

query: MessageContent

type: ModalityType

vectorStore: BaseVectorStore

filters?: MetadataFilters

Returns

Promise<NodeWithScore<Metadata>[]>

Defined in

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


updatePrompts()

updatePrompts(prompts): void

Parameters

prompts: PromptsRecord

Returns

void

Inherited from

BaseRetriever.updatePrompts

Defined in

packages/core/prompts/dist/index.d.ts:59


validatePrompts()

validatePrompts(promptsDict, moduleDict): void

Parameters

promptsDict: PromptsRecord

moduleDict: ModuleRecord

Returns

void

Inherited from

BaseRetriever.validatePrompts

Defined in

packages/core/prompts/dist/index.d.ts:57