Blog Post

Azure Architecture Blog
3 MIN READ

Building 3IQ Retail Assistant Demo – Part 2

pranabpaul's avatar
pranabpaul
Icon for Microsoft rankMicrosoft
Sep 03, 2026

How to build a demo agentic solution to assist retail customer reps using Microsoft 3IQs. Part 2 –Foundry.

In part 1 while setting up the Azure environment, I informed the template puts everything under VNET and all the services are having only private endpoints. Which is great from the security point of view. We also spoke about creating a jumpbox as a Bastion host to work on those services. If you did it already – great, if not, we can bypass the situation by opening the public endpoint from Networking menu for each of these following services. 

Setting up Blob Storage Container

Unlike structured data used for Foundry, we will use some unstructured data (pdf files) for Foundry and build knowledge source and knowledge base and will use those with our Foundry agent. To start with, I used 3 PDF files as listed below:

  • Adventure Works Inc Retail Customer Support Representative Guide.pdf
  • Adventure Works Inc. – Retail Customer Terms and Conditions.pdf
  • Adventure Works Inc. – Retail Customer Payment, Purchase, Shipping & Refund Information.pdf

I used synthetic data for these PDF files. You can use Copilot, ChatGPT, Gemini, or Claude to generate the content.

Once done, we will create a Blob Container. There is a Storage Account created already by the template. You can use it to create the Blob Container. Now upload these 3 files there. You may have to add your account as a Storage Blob Data Contributor to upload the files if not already there.

We need to add few more permissions to this container. Add Storage Blob Data Reader access to:

  • Foundry account's managed identity
  • Foundry Project's managed identity
  • Azure AI Search service's managed identity

Setting up Search

A search service is already provisioned by the template. Use this to set up your knowledgebase and knowledgesource. Create the knowledgesource with similar set up:

 

 

Then create a knowledgebase using this knowledgesource and with the following description: “Use this to answer questions related to Adventure Works Inc.'s retail customer policies, including the Support Representative Guide, Terms and Conditions, and Payment, Purchase, Shipping & Refund information”. I kept the Retrieval Reasoning Effect as Minimal and didn’t add any Chat completion model as such.

Setting up Foundry Agent

It’s time now to set up our Foundry Agent. Create a simple prompt agent and use any Chat completion model. It can be any LLM or SLM of your choice. This agent can be pro-code one using either Agent Service SDK or a hosted agent using MAF or LangGraph. But we would like to keep it simple for this demo.

For the Instructions I have written –

“You are an intelligent agent to answer questions on Adventure Works Inc. Retail Customer Support Representative Guide, Retail Customer Terms and Conditions, Retail Customer Payment, Purchase, Shipping & Refund Information.

Please answer from the knowledgebase only. If answer is not available within knowledgebase say not available politely”.

And now add the knowledgebase you created within the search service. That’s pretty much it. Your Foundry Agent with IQ is ready and you can now ask a few complex questions to it like – “Can customer get refund if the delivery is returned due to wrong address?”, "Can customer get refund if the shipping is delayed?", “Customer wants to return but she doesn't have the bill. Can she return the product?” etc.

At last, make sure you turn your Foundry service public on Azure Portal by going to Resource Management > Networking > Firewall and Virtual Networks. This is required to publish the Foundry Agent to M365 Copilot:

 

 

As of today, you cannot publish the agent if it has a private endpoint. There are workarounds by creating the Bot service separately (the publish option does the magic silently) and exposing the Agent endpoint using APIM/App Gateway etc. I haven’t taken that route for this demo to make it simple. But here are some links just in case someone would like to explore:

Publish agents to Microsoft 365 and Teams by using the REST API - Microsoft Foundry | Microsoft Learn

Publish Foundry Agents to Teams Behind a Private Endpoint · Russ Rimmerman

graemefoster/locked-down-foundry-m365-agent

Published Sep 03, 2026
Version 1.0
No CommentsBe the first to comment