This folder includes the notebooks to demonstrate vector search capabilities of Azure Cosmos DB for MongoDB vCore for text, documents and images.
Follow the steps to run the code locally.
-
The samples uses venv to manage virtual environments. Create a venv environment using the provided
requirements.txt
file to include all necessary python dependencies. -
Create a .env file from the .env-template and populate it with all necessary keys.
-
Finally, follow the instructions mentioned here to run the code locally using VS Code - Run the Code Locally
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.