Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Task 03 - Configure Azure AI Search to extract data from the brochures and test the search index

Introduction

Azure AI Search includes a wizard that allows you to import and vectorize data. You’ll use the wizard to extract and vectorize data from the hotel brochures. As part of the wizard, you’ll create an Azure OpenAI Service instance and deploy models to the instance. You’ll use these models later in the lab to build the chatbot that lets visitors ask questions about hotels.

Description

In this task, you’ll use Azure AI Search to import and vectorize data from the hotel brochures. You’ll then test the index.

The key steps are as follows:

  1. Launch the import and vectorize data and connect to Azure Blob Storage.
  2. Create an Azure OpenAI Service instance and deploy models to the instance.
  3. Vectorize text from the brochures.
  4. Index the data.
  5. Test the index.

Success Criteria

  • You’ve successfully completed all steps in the Import and vectorize data wizard.
  • You’ve deployed models to an Azure OpenAI instance.
  • You’ve tested the search index by using Search Explorer and can view results.

Learning Resources

Solution

Expand this section to view the solution
  1. Open a browser window and go to Azure portal. Sign in to Azure.

  2. On the Azure Home page, select Resource groups and then select ContosoHotel.

  3. In the list of resources that displays, select the Azure AI Search service instance from the list of resources.

  4. On the Overview page for the Search service, select Import and vectorize data.

    o6vixwo1.png

  5. On the Connect to your data page, select Azure Blob Storage.

    rkshmz9t.png

  6. On the Configure your Azure Blob Storage page, enter the following information and then select Next. Wait while Azure validates the connection:

    Setting Value
    Storage acccount Use the name for the storage account that you created in Exercise 04, Task 01, Step 11
    Blob container brochures

    The data import wizard will fail at this step if you haven’t uploaded any brochures to the storage container.

    p7r3flis.png

  7. On the Vectorize your text page, enter the following information:

    Setting Value
    Kind Azure OpenAI
    Azure OpenAI service The name you recorded in Task 01 Step 20.
    Model deployment ada
    Authentication type System assigned identity

    iw994w0j.png

  8. Select the checkbox to acknowledge that connecting to Azure OpenAI service will incur costs and then select Next. Select Next again to skip the Vectorize and enrich your images step.

    vgpo13i3.png

  9. On the Advanced settings page, select Enable semantic ranker. In the Schedule indexing dropdown list, select Once.

    9wx3fylu.png

  10. On the Review and create page, enter brochures-vector in the Objects name prefix text field and then select Create. Wait for the creation process to complete and select Close.

    dblr2z51.png

    It should take only a few minutes for the Import and vectorize data tool to index the data from the 40 hotel brochures.

  11. In the left navigation pane for the Search Service instance, in the Search management section, select Indexers.

    0aurkfrp.png

    The Status for the indexer should be Succeeded. If the Status indicates that indexing is still in progress, wait a few minutes and refresh the page. If the Status shows as Failed, select the indexer to review error messages and then notify your coach.

  12. In the left navigation pane for the Search Service instance, in the Search management section, select Indexes and then select the index.

    fzle8i6m.png

  13. In the Search field, enter Skiing and then select Search.

  14. Review the output from the search operation. The results should list data about skiing and should also contain a text vector.

    v5e9zqh6.png

  15. Leave Visual Studio Code open. You’ll run additional commands in the next exercise.