Class: VectorIndexRetriever
Retrievers retrieve the nodes that most closely match our query in similarity.
Implements
Constructors
constructor
• new VectorIndexRetriever(«destructured»
): VectorIndexRetriever
Parameters
Name | Type |
---|---|
«destructured» | VectorIndexRetrieverOptions |
Returns
Defined in
packages/core/src/indices/vectorStore/index.ts:393
Properties
imageSimilarityTopK
• imageSimilarityTopK: number
Defined in
packages/core/src/indices/vectorStore/index.ts:389
index
• index: VectorStoreIndex
Defined in
packages/core/src/indices/vectorStore/index.ts:387
serviceContext
• Optional
serviceContext: ServiceContext
Implementation of
Defined in
packages/core/src/indices/vectorStore/index.ts:391
similarityTopK
• similarityTopK: number
Defined in
packages/core/src/indices/vectorStore/index.ts:388
Methods
buildNodeListFromQueryResult
▸ buildNodeListFromQueryResult(result
): NodeWithScore
<Metadata
>[]
Parameters
Name | Type |
---|---|
result | VectorStoreQueryResult |
Returns
Defined in
packages/core/src/indices/vectorStore/index.ts:477
buildVectorStoreQuery
▸ buildVectorStoreQuery(embedModel
, query
, similarityTopK
, preFilters?
): Promise
<VectorStoreQuery
>
Parameters
Name | Type |
---|---|
embedModel | BaseEmbedding |
query | string |
similarityTopK | number |
preFilters? | MetadataFilters |
Returns
Promise
<VectorStoreQuery
>
Defined in
packages/core/src/indices/vectorStore/index.ts:461
retrieve
▸ retrieve(«destructured»
): Promise
<NodeWithScore
<Metadata
>[]>
Parameters
Name | Type |
---|---|
«destructured» | RetrieveParams <MetadataFilters > |
Returns
Promise
<NodeWithScore
<Metadata
>[]>
Implementation of
Defined in
packages/core/src/indices/vectorStore/index.ts:404
sendEvent
▸ sendEvent(query
, nodesWithScores
): void
Parameters
Name | Type |
---|---|
query | string |
nodesWithScores | NodeWithScore <Metadata >[] |
Returns
void
Defined in
packages/core/src/indices/vectorStore/index.ts:451
textRetrieve
▸ textRetrieve(query
, preFilters?
): Promise
<NodeWithScore
<Metadata
>[]>
Parameters
Name | Type |
---|---|
query | string |
preFilters? | MetadataFilters |
Returns
Promise
<NodeWithScore
<Metadata
>[]>
Defined in
packages/core/src/indices/vectorStore/index.ts:417
textToImageRetrieve
▸ textToImageRetrieve(query
, preFilters?
): Promise
<NodeWithScore
<Metadata
>[]>
Parameters
Name | Type |
---|---|
query | string |
preFilters? | MetadataFilters |
Returns
Promise
<NodeWithScore
<Metadata
>[]>