Class for performing document retrieval from a VectorStore. Can perform similarity search or maximal marginal relevance search.

Type Parameters

Hierarchy

Constructors

Properties

k: number = 4
kIncrement: number = 10
maxK: number = 100
minSimilarityScore: number
searchType: string = "similarity"
vectorStore: V
filter?: V["FilterType"]

Methods

  • Parameters

    • documents: Document<Record<string, any>>[]
    • Optional options: AddDocumentOptions

    Returns Promise<void | string[]>

  • Parameters

    • query: string

    Returns Promise<Document<Record<string, any>>[]>

Generated using TypeDoc