Skip to content

Latest commit

 

History

History
46 lines (25 loc) · 2.93 KB

File metadata and controls

46 lines (25 loc) · 2.93 KB

Azure Cosmos DB for MongoDB vCore Samples

This folder includes the notebooks to demonstrate vector search capabilities of Azure Cosmos DB for MongoDB vCore for text, documents and images.

Run the Code Locally

Follow the steps to run the code locally.

  1. The samples uses venv to manage virtual environments. Create a venv environment using the provided requirements.txt file to include all necessary python dependencies.

  2. Create a .env file from the .env-template and populate it with all necessary keys.

  3. Finally, follow the instructions mentioned here to run the code locally using VS Code - Run the Code Locally

Resources Deployment

The code requires two Azure services - Azure AI Search and Azure OpenAI.

  • Azure AI Search

    • Deploy from Portal

    Azure Cognitive Search can be deployed using the Azure Portal or bicep/arm/terraform templates. From network security perspective, you can use private endpoint and shared private link to secure inbound and outbound connectivity.

    • IAC Deployment

    For IAC deployment, infrastructure folder has a bicep script to deploy the Azure Cognitive Search Service. In the bicep script, fill out the parameters values in params section according to your environment, and run the following command.

    az deployment group create --resource-group resource_group_name --template-file cognitive_search.bicep

  • Azure OpenAI

    Azure OpenAI Service resource can be deployed using Azure Portal, Azure CLI or Azure PowerShell. Again, private endpoints can be used for Azure AI services resources to allow clients on a virtual network to securely access data over Azure Private Link.

Datasets

  • text - for text search sample
  • docs - for document search sample
  • images - for image search sample

Sample Notebooks

Using REST Endpoint