Edit

Share via


How to build and consume vector indexes in Azure AI Foundry portal

Important

Items marked (preview) in this article are currently in public preview. This preview is provided without a service-level agreement, and we don't recommend it for production workloads. Certain features might not be supported or might have constrained capabilities. For more information, see Supplemental Terms of Use for Microsoft Azure Previews.

In this article, you learn how to create and use a vector index for performing Retrieval Augmented Generation (RAG) in the Azure AI Foundry portal.

A vector index isn't required for RAG, but a vector query can match on semantically similar content, which is useful for RAG workloads.

Prerequisites

You must have:

  • An Azure AI Foundry project
  • An Azure AI Search resource
  • You should have content in a supported format that provides sufficient information for a chat experience. It can be an existing index on Azure AI Search, or create a new index using content files in Azure Blob Storage, your local system, or data in Azure AI Foundry.

Create an index from the Chat playground

Tip

Because you can customize the left pane in the Azure AI Foundry portal, you might see different items than shown in these steps. If you don't see what you're looking for, select ... More at the bottom of the left pane.

  1. Sign in to Azure AI Foundry.

  2. Go to your project or create a new project in Azure AI Foundry portal.

  3. From the menu on the left, select Playgrounds. Select the Chat Playground.

    Screenshot of Project Left Menu.

  4. Select a deployed chat completion model. If you have not done so already, deploy a model by selecting Create new deployment.

    Screenshot of create a deployment button.

  5. Scroll to the bottom of the model window. Select + Add a new data source

    Screenshot of the add your data section.

  6. Choose your Source data. You can choose source data from a list of your recent data sources, a storage URL on the cloud, or upload files and folders from the local machine. You can also add a connection to another data source such as Azure Blob Storage.

    If you don't have sample data, you can download these PDFs to your local system, and then upload them as your source data.

    Screenshot of select source data.

  7. Select Next after choosing source data

  8. Choose the Index Storage - the location where you want your index to be stored in the Index configuration tab.

  9. If you already have an Azure AI Search resource, you can browse the list of search service resources for your subscription and then select Connect for the one you want to use. If you're connecting with API keys, confirm your search service uses API keys.

    Screenshot of select index store.

    1. If you don't have an existing resource, choose Create a new Azure AI Search resource. Select Next.
  10. Select the Azure OpenAI connection you want to use. Select Next.

  11. Enter a name you want to use for your vector index. Select Next.

  12. Review the details you entered and select Create

  13. You're taken to the index details page where you can see the status of your index creation.

Use an index in prompt flow

  1. Sign in to Azure AI Foundry and select your project.

  2. From the collapsible left menu, select Prompt flow from the Build and customize section.

  3. Open an existing prompt flow or select + Create to create a new flow.

  4. On the top menu of the flow designer, select More tools, and then select Index Lookup.

    Screenshot of Vector index Lookup from More Tools.

  5. Provide a name for your Index Lookup Tool and select Add.

  6. Select the mlindex_content value box, and select your index from the value section. After completing this step, enter the queries and query_types to be performed against the index.

    Screenshot of the prompt flow node to configure index lookup.


Additional resources

Training

Module

Develop a RAG-based solution with your own data using Azure AI Foundry - Training

Retrieval Augmented Generation (RAG) is a common pattern used in generative AI solutions to *ground* prompts with your data. Azure AI Foundry provides support for adding data, creating indexes, and integrating them with generative AI models to help you build RAG-based solutions.

Certification

Microsoft Certified: Azure AI Engineer Associate - Certifications

Design and implement an Azure AI solution using Azure AI services, Azure AI Search, and Azure Open AI.