Create a storage account
Add Headings and they will appear in your table of contents.
Create a storage account
Create a container docs
Generate SAS token
Upload the documents into a folder in the container
Now we will deploy a vector embedding engine in our Azure OpenAI resource. Navigate to the “Azure AI Foundry portal” associated with your “Azure OpenAI resource”.
Go to Deployments
Create the below model
Create a standard model
Now deploy an Azure AI Search Solution that will store the content of the PDF documents along with vector embeddings to form a vector storage solution; For this search for “Azure AI Search” in your Azure portal and proceed to deploy the resource.
Create a search service resource
Once you enter into your freshly deployed AI Search solution, select the “Import Data” option.
Select Azure Blob Storage
Select RAG
Select the storage account and other details
Vectorize the text
You can also vectorise your images, meaning building a retriever function on your images too! But we won’t do that as generation of embeddings for text content would suffice in our case.
You can also schedule your indexing, meaning every time you upload documents or new content to your Azure Storage account, that new content would get indexed into our Azure AI Search solution within the specified indexing scheduled, making it searchable. But for now we’ll set it to “once”.
Type object name
Once the indexing gets completed, navigate to the “indexes” section of your Azure AI Search solution. Select your vector index that has been deployed.
Search with any keyword to test
Now that we have all the components set into place, its time to finally build our RAG prompt flow. Navigate to the “Azure AI Foundry” portal associated with your Azure AI Hub Project.
Click on Management Center
Click on New Connection
Select Azure AI Search
Add connection
Now navigate to the Project and then “prompt Flow” section to create a new prompt flow.
Create a standard prompt flow
Delete the components pre-built/pre-generated for us as part of the prompt flow. Click on the “Start Compute Session” button.
Click on the “More Tools” option and select the “Index Lookup” option and name that as “index_lookup”.
Add the index_lookup
Enter the value of mlindex_content
Rename the input parameter name
Set the values of other parameters
Add a LLM
Set the values below
Set input parameters
Now lets set the output for this prompt flow; name the output variable as “response” and set it to “Augmentation.output”.
Set in the input query and run your prompt flow to see the magic in action!
Check the output
If you search with the below question, you will not get the result
What hotel are available in Kolkata?