Skip to content

Azure AI Search

This is not a LLM provider, but a content search provider. However since it is configured similarly to the other Azure services, it is included here. It allows you to do vector search of your documents using Azure AI Search.

const index = await retrieval.index("animals", {
type: "azure_ai_search",
});
await index.insertOrUpdate(env.files);
const docs = await index.search("cat dog");

The service is configured through the AZURE_AI_SEARCH_ENDPOINT environment variable and the configuration of the managed identity.

AZURE_AI_SEARCH_ENDPOINT=https://{{service-name}}.search.windows.net/
  1. Open your Azure AI Search resource in the Azure Portal, click on Overview and click on Properties.

  2. Click on API Access control and enable Role-based access control or Both.

  3. Open the Access Control (IAM) tab and make sure your user or service principal has the Search Service Contributor role.

The service is configured through the AZURE_AI_SEARCH_ENDPOINT and AZURE_AI_SEARCH_API_KEY environment variables.

AZURE_AI_SEARCH_ENDPOINT=https://{{service-name}}.search.windows.net/
AZURE_AI_SEARCH_API_KEY=...