diff --git a/README.md b/README.md index 1ea162471..4c2b1fd06 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ urlFragment: chat-with-your-data-solution-accelerator # Chat with your data - Solution accelerator - ##### Table of Contents + ##### Table of Contents * [User story](#user-story) + [About this repo](#about-this-repo) + [Getting Support](#getting-support) @@ -48,7 +48,7 @@ urlFragment: chat-with-your-data-solution-accelerator + [Resource links](#resource-links) + [Licensing](#licensing) * [Customer truth](#customer-truth) - * [Disclaimers](#disclaimers) + * [Disclaimers](#disclaimers) \ \ ![User Story](/media/userStory.png) @@ -134,6 +134,9 @@ Now that the financial advisor is more informed about Woodgrove’s Emerging Mar Note: Some of the sample data included with this accelerator was generated using AI and is for illustrative purposes only. +### Integrated Vectorization +The Chat with your data accelerator supports [Integrated Vectorization](https://learn.microsoft.com/en-us/azure/search/vector-search-integrated-vectorization), an Azure AI Search feature that pulls, processes and indexes data directly from Azure Storage. This greatly simplifies the code that needs to be maintained by developers deploying the accelerator since the chunking, vectorization and indexing of data is handled by Azure AI's built-in pull-indexers. Learn more about deploying with Integrated Vectorization [here](./docs/INTEGRATED_VECTORIZATION.md). + ### Speech-to-text functionality Many users are used to the convenience of speech-to-text functionality in their consumer products. With hybrid work increasing, speech-to-text supports a more flexible way for users to chat with their data, whether they’re at their computer or on the go with their mobile device. The speech-to-text capability is combined with NLP capabilities to extract intent and context from spoken language, allowing the chatbot to understand and respond to user requests more intelligently. diff --git a/docs/INTEGRATED_VECTORIZATION.md b/docs/INTEGRATED_VECTORIZATION.md new file mode 100644 index 000000000..fbd95a754 --- /dev/null +++ b/docs/INTEGRATED_VECTORIZATION.md @@ -0,0 +1,51 @@ +[Back to *Chat with your data* README](../README.md) + +# Integrated Vectorization +[**USER STORY**](#user-story) | [**DEPLOYMENT INSTRUCTIONS**](#local-deployment-instructions) +\ +\ +![User Story](/media/userStory.png) +## User Story +This feature allows chunking and vectorization of data during ingestion into Azure AI Search through built-in pull-indexers. It supports automatic processing of data directly from storage - meaning the user can just upload their data to Azure Blob Storage and the built-in pull-indexers will do the chunking, vectorization and indexing. This removes the need for Chat With Your Data to explicitly perform chunking, vectorization and pushing to the search index. Read [more](https://learn.microsoft.com/en-us/azure/search/vector-search-integrated-vectorization). + +**NOTE**: Every instance of Chat With Your Data will need to be configured whether or not to use Integrated Vectorization at **deployment time**. Once deployed, you will be unable to switch between enabling and disabling Integrated Vectorization when the application is running. In order to run a fresh deployment to switch to and from Integrated Vectorization, refer to the following sections in this document: + +* [To switch from Integrated Vectorization disabled to enabled](#local-deployment---if-you-already-have-a-previous-deployment) +* [To switch from Integrated Vectorization enabled to disabled](#local-deployment---if-you-want-to-switch-back-to-push-based-indexing-from-integrated-vectorization) + +## Using the Deploy to Azure button +When you click the "Deploy to Azure" button on the repo's main page, you will be taken to the Azure portal, where you can select "true" for the option "Azure Search Use Integrated Vectorization". +![Integrated Vectorization](/media/azure-search-use-iv.png) + + +## Local Deployment - If deploying for the first time +If you're deploying Chat With Your Data for the first time, run the following before running `azd up` to enable Integrated Vectorization: + +``` + azd env set AZURE_SEARCH_USE_INTEGRATED_VECTORIZATION true +``` + +## Local Deployment - If you already have a previous deployment +If you have previously deployed Chat With Your Data without Integrated Vectorization enabled, you probably have a search index already deployed to your Azure subscription. Integrated Vectorization will require a new, fresh index to function properly so please follow the below steps to enable Integrated Vectorization when you have a previous deployment: + +1. On your Azure portal, navigate to the resource group which has your Chat With Your Data deployment. +1. Delete the existing search index. +![Delete Search Index](/media/delete-search-index.png) +1. Run the command `azd env set AZURE_SEARCH_USE_INTEGRATED_VECTORIZATION true` +1. Run `azd up` + + +## Local Deployment - If you want to switch back to push-based indexing from Integrated Vectorization +If you have a deployment with Integrated Vectorization enabled, and you want to disable it, you will need to follow the below steps: + +1. On your Azure portal, navigate to the resource group which has your Chat With Your Data deployment. +1. Delete the existing search index. +![Delete Search Index](/media/delete-search-index.png) +1. Delete the existing indexer. +![Delete Search Index](/media/delete-search-indexer.png) +1. Delete the existing skillset. +![Delete Search Index](/media/delete-search-skillset.png) +1. Delete the existing datasource. +![Delete Search Index](/media/delete-search-datasource.png) +1. Run the command `azd env set AZURE_SEARCH_USE_INTEGRATED_VECTORIZATION false` +1. Run `azd up` diff --git a/docs/TEAMS_EXTENSION.md b/docs/TEAMS_EXTENSION.md index 78f48479c..91e38a76e 100644 --- a/docs/TEAMS_EXTENSION.md +++ b/docs/TEAMS_EXTENSION.md @@ -1,7 +1,7 @@ [Back to *Chat with your data* README](../README.md) # Teams extension -[**USER STORY**](#user-story) | [**TEAMS DEPLOY**](#teams-deploy) | [**SUPPORTING DOCUMENTATION**](#supporting-documentation) +[**USER STORY**](#user-story) | [**TEAMS DEPLOY**](#deployment-to-teams) | [**SUPPORTING DOCUMENTATION**](#supporting-documentation) \ \ ![User Story](/media/userStory.png) @@ -11,24 +11,24 @@ This extension enables users to experience Chat with your data within Teams, wit ## Deployment to Teams **IMPORTANT**: Before you proceed, installation and configuration of the [Chat with your data with speech-to-text deployment](../README.md) is required. -### Pre-requisites +### Pre-requisites - [Visual Studio Code](https://code.visualstudio.com/) - Extensions - [Teams Toolkit](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension) (optional: Teams extension only) - Install [Node.js](https://nodejs.org/en) - Install the LTS version (Recommended for Most Users) - [Enable custom Teams apps and turn on custom app uploading](https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/build-and-test/prepare-your-o365-tenant#enable-custom-teams-apps-and-turn-on-custom-app-uploading) (optional: Teams extension only) -- In order to publish the App to the Teams Store, the Teams Administrator role is required. +- In order to publish the App to the Teams Store, the Teams Administrator role is required. ### Deploy Teams application 1. Clone this GitHub repo. -2. Open the “extensions/teams” folder with Visual Studio Code +2. Open the “extensions/teams” folder with Visual Studio Code -![Teams](/media/teams.png) +![Teams](/media/teams.png) 3. Open the file env\\.env.test -![ENV](/media/teams-1.png) +![ENV](/media/teams-1.png) 4. Locate the environment variable _AZURE_FUNCTION_URL_. 5. Replace the `` and `` with the name of your Function App resource and its clientKey (created in previous section) @@ -38,14 +38,14 @@ This extension enables users to experience Chat with your data within Teams, wit ``` ![Env](/media/teams-deploy-env.png) 6. Save the file. -7. Select Teams Toolkit from the navigation panel. +7. Select Teams Toolkit from the navigation panel. -![Teams Toolkit in VS Code](/media/teams-2.png) +![Teams Toolkit in VS Code](/media/teams-2.png) 8. Within the Teams Toolkit panel, login to the following accounts: **Sign in to Microsoft 365**: Use your Microsoft 365 work or school account with a valid E5 subscription for building your app. If you don't have a valid account, you can join [Microsoft 365 developer program](https://developer.microsoft.com/microsoft-365/dev-program) to get a free account before you start. - + **Sign in to Azure**: Use your Azure account for deploying your app on Azure. You can [create a free Azure account](https://azure.microsoft.com/free/) before you start. ![Teams Toolkit Accounts](/media/teams-3.png) @@ -60,11 +60,11 @@ This extension enables users to experience Chat with your data within Teams, wit 11. Within the command palette, select **test** for the environment. -![Select an Environment](/media/teams-6.png) +![Select an Environment](/media/teams-6.png) 12. Select the resource group created earlier in the installation -![Select a Resource Group](/media/teams-7.png) +![Select a Resource Group](/media/teams-7.png) 13. When prompted about Azure charges, select **Provision**. @@ -76,15 +76,15 @@ This extension enables users to experience Chat with your data within Teams, wit 15. Under **Lifecycle**, select **Deploy**. -![Teams Toolkit Lifecycle Deploy](/media/teams-10.png) +![Teams Toolkit Lifecycle Deploy](/media/teams-10.png) 16. Within the command palette, select **test** for the environment. -![Select an Environment](/media/teams-6.png) +![Select an Environment](/media/teams-6.png) 17. When prompted, select **Deploy**. -![VS Code Prompt to Deploy](/media/teams-11.png) +![VS Code Prompt to Deploy](/media/teams-11.png) 18. Verify that the Deployment was successful. @@ -96,31 +96,31 @@ This extension enables users to experience Chat with your data within Teams, wit 20. Within the command palette, select **test** for the environment. -![Select an Environment](/media/teams-6.png) +![Select an Environment](/media/teams-6.png) 21. Verify that the Publish was successful. -![Publishing successful](/media/teams-14.png) +![Publishing successful](/media/teams-14.png) 22. Select **Go to admin portal**. -![Go to Admin Portal](/media/teams-15.png) +![Go to Admin Portal](/media/teams-15.png) 23. On the Manage apps page within the Teams Admin portal, you should see one submitted custom app pending approval. -![Pending Approval](/media/teams-16.png) +![Pending Approval](/media/teams-16.png) 24. In the search by name input box, enter: **enterprise chat** -![Filtered app](/media/teams-17.png) +![Filtered app](/media/teams-17.png) 25. Select the app and then select **Allow**. -![Selected app](/media/teams-18.png) +![Selected app](/media/teams-18.png) 26. Select the app name. -![Select app name](/media/teams-19.png) +![Select app name](/media/teams-19.png) 27. Select **Publish**. @@ -128,11 +128,11 @@ This extension enables users to experience Chat with your data within Teams, wit 28. When prompted, select **Publish**. -![Prompt to publish](/media/teams-21.png) +![Prompt to publish](/media/teams-21.png) 29. Depending on your environment, it may take several hours to publish. -![Teams Publish Success](/media/teams-22.png) +![Teams Publish Success](/media/teams-22.png) ### [Local deployment instructions](./TEAMS_LOCAL_DEPLOYMENT.md) @@ -144,4 +144,4 @@ To customize the accelerator or run it locally, first, copy the .env.sample file ## Supporting documentation ### Resource links for Teams extension This solution accelerator deploys the following resources. It's crucial to comprehend the functionality of each. Below are the links to their respective documentation: -- [Bots in Microsoft Teams - Teams | Microsoft Learn](https://learn.microsoft.com/en-us/microsoftteams/platform/bots/what-are-bots) \ No newline at end of file +- [Bots in Microsoft Teams - Teams | Microsoft Learn](https://learn.microsoft.com/en-us/microsoftteams/platform/bots/what-are-bots) diff --git a/media/azure-search-use-iv.png b/media/azure-search-use-iv.png new file mode 100644 index 000000000..a69e741a9 Binary files /dev/null and b/media/azure-search-use-iv.png differ diff --git a/media/delete-search-datasource.png b/media/delete-search-datasource.png new file mode 100644 index 000000000..64dfe894f Binary files /dev/null and b/media/delete-search-datasource.png differ diff --git a/media/delete-search-index.png b/media/delete-search-index.png new file mode 100644 index 000000000..fbe8008d8 Binary files /dev/null and b/media/delete-search-index.png differ diff --git a/media/delete-search-indexer.png b/media/delete-search-indexer.png new file mode 100644 index 000000000..5ca04f841 Binary files /dev/null and b/media/delete-search-indexer.png differ diff --git a/media/delete-search-skillset.png b/media/delete-search-skillset.png new file mode 100644 index 000000000..14e70f18c Binary files /dev/null and b/media/delete-search-skillset.png differ