Azure AI Search vector store. To use this, you should have:

  • the @azure/search-documents NPM package installed
  • an endpoint and key to the Azure AI Search instance

If you directly provide a SearchClient instance, you need to ensure that an index has been created. When using and endpoint and key, the index will be created automatically if it does not exist.

Hierarchy

Constructors

Properties

Methods

  • Performs a hybrid search using query text.

    Parameters

    • query: string

      Query text for the similarity search.

    • Optional queryVector: number[]

      Query vector for the similarity search. If not provided, the query text will be embedded.

    • k: number = 4
    • filter: undefined | AzureAISearchFilterType = undefined

      Optional filter options for the documents.

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

    Promise that resolves to a list of documents and their corresponding similarity scores.

  • Performs a hybrid search with semantic reranker using query text.

    Parameters

    • query: string

      Query text for the similarity search.

    • Optional queryVector: number[]

      Query vector for the similarity search. If not provided, the query text will be embedded.

    • k: number = 4
    • filter: undefined | AzureAISearchFilterType = undefined

      Optional filter options for the documents.

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

    Promise that resolves to a list of documents and their corresponding similarity scores.

  • Performs a similarity search using query type specified in configuration.

    Parameters

    • query: string

      Query text for the similarity search.

    • k: number = 4
    • filter: undefined | AzureAISearchFilterType = undefined

      Optional filter options for the documents.

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

    Promise that resolves to a list of documents and their corresponding similarity scores.

  • Performs a similarity search using query type specified in configuration.

    Parameters

    • query: string

      Query text for the similarity search.

    • k: number = 4
    • filter: undefined | AzureAISearchFilterType = undefined

      Optional filter options for the documents.

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

    Promise that resolves to a list of documents and their corresponding similarity scores.

  • Protected

    Ensures that an index exists on the AzureAISearchVectorStore.

    Parameters

    • indexClient: SearchIndexClient

      The Azure AI Search index client.

    Returns Promise<void>

    A promise that resolves when the AzureAISearchVectorStore index has been initialized.

Generated using TypeDoc