Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Note
This document refers to the Microsoft Foundry (classic) portal.
🔍 View the Microsoft Foundry (new) documentation to learn about the new 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 Microsoft 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:
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 you can create a new index using content files in Azure Blob Storage, your local system, or data in Foundry.
Create an index from the Chat playground
Tip
Because you can customize the left pane in the Microsoft 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.
Sign in to the Foundry portal.
Go to your project or create a new project in your Foundry resource.
From the sidebar menu, select Playgrounds. Select Try the Chat playground.
Select a deployed chat completion model. If you don't have one, deploy a model by selecting Create new deployment, then choose a model.
Scroll to the bottom of the model window. Select + Add a new data source.
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.
Select Next after choosing source data.
In the Index configuration tab, choose the Index storage location where you want your index to be stored.
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.
If you don't have an existing resource, choose Create a new Azure AI Search resource. Select Next.
Select the Azure OpenAI connection you want to use. Select Next.
Review the details you entered and select Create vector index.
You're taken to the index details page where you can see the status of your index creation.
Use an index in prompt flow
Under Build and customize in the sidebar menu, select Prompt flow.
Open an existing prompt flow or select + Create to create a new flow.
Select Create in the Chat flow tile, then select Create again.
Select Start compute session, and wait a few minutes for the compute session to begin.
Select More tools, and then select Index Lookup.
Provide a node name for your Index Lookup Tool and select Add.
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.