diff --git a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/challenges/challenge-01.md b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/challenges/challenge-01.md index 7451d9b02..d5ba153de 100644 --- a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/challenges/challenge-01.md +++ b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/challenges/challenge-01.md @@ -49,7 +49,7 @@ The data lives in **Microsoft Fabric** (a governed Lakehouse with inventory, dem ```text What can you do? ``` - - You will inspect agent decisions in Challenges 3 and 4 via **Traces → Response view** on an agent (not a top-level *Tracing* menu). + - You will inspect agent decisions in Challenges 3 and 4 in the agent's **Traces** tab (not a top-level *Tracing* menu). ![Models and endpoints view in the Foundry portal showing gpt-5.4-mini deployed with status Succeeded](../images/challenge-00-model-deployments.png) @@ -172,7 +172,7 @@ The data lives in **Microsoft Fabric** (a governed Lakehouse with inventory, dem - **Workspace ID** — the value between `/workspaces/` and `/dataagents/` - **Agent ID** — the value between `/dataagents/` and `/agent` - You paste both IDs into the Fabric Data Agent tool in Challenge 2. + Keep both IDs for diagnostics. In Challenge 2 you select your published `inventory-hack-agent` by name through **Fabric IQ**, so you don't paste them anywhere. ![MCP server URL with the Workspace ID and Agent ID segments identified](../images/challenge-00-agent-ids.png) @@ -210,7 +210,7 @@ The data lives in **Microsoft Fabric** (a governed Lakehouse with inventory, dem > 2. Then **either** re-run the notebook's publish cell (it's idempotent), **or** open the **`inventory-hack-agent`** data agent → tick **all 7 tables** in the **Explorer** (left pane) → **Publish**. **d. Copy your two IDs.** - When it finishes, the **last cell prints your Workspace ID and Agent ID**. Note both — you paste them into the Fabric Data Agent tool in Challenge 2. + When it finishes, the **last cell prints your Workspace ID and Agent ID**. Note both for diagnostics. Challenge 2 selects the published item by name through **Fabric IQ**, so you don't paste them anywhere. ![Final notebook cell output printing the Workspace ID and Data Agent ID](../images/challenge-00-notebook-ids.png) @@ -229,10 +229,9 @@ The data lives in **Microsoft Fabric** (a governed Lakehouse with inventory, dem |-------|---------------------| | Workspace ID | printed by the notebook's last cell (also in the workspace URL) | | Artifact / Data Agent ID | printed by the notebook's last cell | - | Connection name | `inventory-hack-agent` | > [!NOTE] - > You attach the **Fabric Data Agent** as a *tool* on each Foundry agent, and the connection is created the **first time** you add it (Challenge 2). After that you simply **select** it. It points your Foundry agents at the data agent on top of **your** inventory Lakehouse. + > You attach your published Data Agent as a *tool* on each Foundry agent through **Fabric IQ (OneLake Catalog)**. The connection is created the **first time** you add it (Challenge 2). After that you simply **select** it. It points your Foundry agents at the data agent on top of **your** inventory Lakehouse. The IDs above are for diagnostics only, because you pick the agent by name. 5. **Understand the three-agent pattern.** Draw (on paper or a whiteboard) the flow: @@ -257,7 +256,7 @@ The data lives in **Microsoft Fabric** (a governed Lakehouse with inventory, dem - [ ] You can name the key inventory tables and explain what each one is used for. - [ ] You have confirmed the `gpt-5.4-mini` model is deployed in your Foundry project. -- [ ] You have created your own Fabric workspace on your Fabric capacity, run the setup notebook, and published your `inventory-hack-agent` Data Agent — and noted its **Workspace ID** and **Agent ID** (used in Challenge 2). +- [ ] You have created your own Fabric workspace on your Fabric capacity, run the setup notebook, and published your `inventory-hack-agent` Data Agent — and noted its **Workspace ID** and **Agent ID** (for diagnostics; Challenge 2 selects the agent by name through Fabric IQ). - [ ] You can describe, in one sentence each, what each of the three agents does. - [ ] You can explain why combining web signals with governed data produces better decisions than either source alone. diff --git a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/challenges/challenge-02.md b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/challenges/challenge-02.md index d8fd98b1c..d368f996a 100644 --- a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/challenges/challenge-02.md +++ b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/challenges/challenge-02.md @@ -4,7 +4,7 @@ ## 🎯 Objective -Build your first Foundry prompt agent. Configure it with two tools — **Web Search** and the **Fabric Data Agent** — and use it to sense a real-world demand change and reconcile it against the current inventory position. No code required; everything is done in the Foundry portal. +Build your first Foundry prompt agent. Configure it with two tools — **Web Search** and **Fabric IQ** (connected to your published Fabric Data Agent) — and use it to sense a real-world demand change and reconcile it against the current inventory position. No code required; everything is done in the Foundry portal. ## 🧭 Context @@ -28,7 +28,7 @@ Your agent must sense this signal from the web, query the governed inventory dat Your role is to detect real-world signals that could affect product demand and reconcile them against the company's current inventory position. - IMPORTANT - tool use (non-negotiable): You have a Fabric Data Agent tool connected to the + IMPORTANT - tool use (non-negotiable): Fabric IQ connects inventory-hack-agent to the governed Zava inventory data (Inventory, Products, Stores, DemandHistory, ExternalSignals, Suppliers, ReplenishmentOrders). EVERY response that gives a demand assessment MUST include at least one Fabric Data Agent call - this is mandatory and NOT conditional on Web Search. @@ -61,26 +61,25 @@ Your agent must sense this signal from the web, query the governed inventory dat ### Part B — Confirm the Web Search tool (5 min) -**Web Search** is added to prompt agents by default and needs no configuration — it grounds the demand signal in live external context (news, market trends). Confirm it's listed under **Tools** in the agent editor. If it isn't there, add it via **+ Add tool → Web Search** (no API key required), then **Save**. +**Web Search** is added to prompt agents by default and needs no configuration — it grounds the demand signal in live external context (news, market trends). Confirm it's listed under **Tools** in the agent editor. If it isn't there, select **Add** under **Tools** and switch **Web search** on (no API key required), then **Save**. -![Tool catalogue in the agent editor showing Web Search and Fabric Data Agent available to add](../images/challenge-01-add-tool.png) +### Part C — Connect the Data Agent through Fabric IQ (10 min) -### Part C — Add the Fabric Data Agent tool (10 min) +The published **Fabric Data Agent** is still your governed query backend. The Foundry tool that connects to it is now **Fabric IQ (OneLake Catalog)**: the earlier **Fabric Data Agent** tool (which asked for a Workspace ID and Agent ID) is deprecated and greyed out in the tool catalogue. You select your Data Agent by name, so you no longer need the two IDs. -This is the first agent where you attach the Fabric Data Agent, so you'll **create** the `inventory-hack-agent` connection here using the two IDs from Challenge 1. Every later challenge just selects it. +1. In the agent editor, under **Tools**, select **Add → Add tools**. +2. In the **Select a tool** dialog, stay on the **Configured** tab, choose **Fabric IQ (OneLake Catalog)** and select **Add tool**. The older **Fabric Data Agent** tile is greyed out; don't use it. -1. In the agent editor, expand **Tools** and select **Add**. -2. Choose **Fabric Data Agent** from the tool catalogue. -3. Create the connection with the two IDs your **setup notebook printed in Challenge 1**: - - **Workspace ID** → your Fabric workspace ID - - **Artifact / Data Agent ID** → your `inventory-hack-agent` Agent ID - - **Connection name** → `inventory-hack-agent` -4. Select **Add tool**, then **Save**. + ![The Select a tool dialog with Fabric IQ (OneLake Catalog) selected and the retiring Fabric Data Agent greyed out](../images/challenge-01-add-tool.png) -![The Add tool → Fabric Data Agent connection dialog with the Workspace ID and Artifact ID fields, named inventory-hack-agent](../images/challenge-01-new-connection.png) +3. In the **OneLake Catalog**, filter by **Data agent**, then select your published **`inventory-hack-agent`**. Check that its **Location** is **your** `inventory-hack-…` workspace. Do not select another team's item. Then select **Add**. + + ![The OneLake Catalog dialog with inventory-hack-agent selected and its Location column visible](../images/challenge-01-fabric-iq-catalog.png) + +4. If the portal asks you to sign in or consent for Fabric, do so with your lab account in the same browser. Then select **Save**. The tool appears under **Tools** as **Fabric IQ (inventoryhackagent)**; later challenges reuse this connection. > [!TIP] -> **No "Fabric Data Agent" in the catalogue?** Your Fabric capacity must be running (Azure portal → your Fabric capacity → **Resume**) and the setup notebook must have published the agent. +> **Data Agent missing from the catalog?** Your Fabric capacity must be running (Azure portal → your Fabric capacity → **Resume**), and the setup notebook must have published the agent. > [!NOTE] > **Why two tools?** Web Search gives the agent access to what is happening *outside* the business. The Fabric Data Agent gives access to what is happening *inside* — including the `ExternalSignals` table of pre-loaded market signals. Combining live web context with governed internal data is the core pattern of this hack. @@ -115,7 +114,7 @@ This is the first agent where you attach the Fabric Data Agent, so you'll **crea ## 🏁 Success criteria -- [ ] The `demand-sensing-agent` prompt agent exists in your Foundry project with the Fabric Data Agent tool attached (and Web Search too, if it is enabled). +- [ ] The `demand-sensing-agent` prompt agent exists in your Foundry project with Fabric IQ connected to `inventory-hack-agent` (and Web Search too, if it is enabled). - [ ] A test run produces a response backed by at least one governed data point from the Fabric Data Agent (and an external web source, if Web Search is enabled). - [ ] The agent produces a clear demand assessment (adequate / at risk / critically exposed) with reasoning. - [ ] You can explain in your own words what each tool contributed to the response. @@ -124,15 +123,14 @@ This is the first agent where you attach the Fabric Data Agent, so you'll **crea | Symptom | Fix | |---------|-----| -| **Web Search** isn't listed on the agent | Add it via **+ Add tool → Web Search** — it needs no extra configuration. | -| **Fabric Data Agent** isn't in the catalogue | The integration needs **your** Fabric capacity to be running — resume it (Azure portal → your Fabric capacity → **Resume**) and confirm the setup notebook published the agent. | +| **Web Search** isn't listed on the agent | Under **Tools**, select **Add** and switch **Web search** on. It needs no extra configuration. | +| **Fabric IQ (OneLake Catalog)** or your Data Agent isn't there | The integration needs **your** Fabric capacity to be running — resume it (Azure portal → your Fabric capacity → **Resume**) and confirm the setup notebook published the agent. | | The agent answers inventory questions from memory | Strengthen the *IMPORTANT – tool use* line in the instructions; it must call the Fabric Data Agent for any stock number. | | The agent gives a demand assessment from web signals only (says it *"couldn't verify inventory"*) | It skipped the Fabric call. Reply *"Call the Fabric Data Agent now for current stock + sales velocity of the affected SKUs before assessing,"* or set **tool choice = required** in the agent's tool settings. `gpt-5.4-mini` (a reasoning model) sometimes skips available tools. | -| The agent has `fx` functions like `query_inventory` / `list_low_stock` instead of the Fabric Data Agent | The portal **auto-generated stub functions** from your instructions — they're empty and never reach your Lakehouse. Remove them (each tool row → **⋮ → Remove**) and add the **Fabric Data Agent** connector (Part C). | -| You didn't copy the **Workspace ID / Agent ID** in Challenge 1 | Reopen `inventory-hack-agent` in Fabric → **Settings → Model Context Protocol → MCP server URL** (both IDs are in the URL), or re-run the setup notebook's last cell. | +| The agent has `fx` functions like `query_inventory` / `list_low_stock` instead of Fabric IQ | The portal **auto-generated stub functions** from your instructions — they're empty and never reach your Lakehouse. Remove them (each tool row → **⋮ → Remove**) and add **Fabric IQ (OneLake Catalog)** (Part C). | +| You see a message that the **Fabric Data Agent** tool is deprecated, or it asks for a Workspace ID and Agent ID | That is the earlier connector. Cancel and use **Add → Add tools → Fabric IQ (OneLake Catalog)** (Part C). You select the agent by name, so you don't need the IDs. | | *"Your requests to gpt-5.4-mini … exceeded rate limit"* | You hit the model's tokens-per-minute (TPM) limit. Wait ~30–60s and retry, and avoid firing many runs back-to-back. Facilitators can raise the deployment TPM or give each attendee their own subscription (see [`labautomation/README.md`](../labautomation/README.md)). | | The run fails with **`Stage configuration not found`** (or *configuration not found*) | Your Fabric Data Agent works in Fabric's **Test data agent** pane but isn't **published** — the Foundry tool consumes the *published* stage, not the draft/Preview runtime. In Fabric, open `inventory-hack-agent` → confirm the 7 tables → click **Publish**, then retry. | -| The connection dialog asks for IDs you don't have | Copy the **Workspace ID** and **Agent ID** your setup notebook printed in its last cell (Challenge 1). | ## 🚀 Go further diff --git a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/challenges/challenge-03.md b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/challenges/challenge-03.md index 6f4a2be44..67662e67a 100644 --- a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/challenges/challenge-03.md +++ b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/challenges/challenge-03.md @@ -32,7 +32,7 @@ Your Inventory Optimisation Agent answers these questions by querying the Fabric description of the affected product categories or SKUs. Your job is to produce a concrete reorder recommendation. - IMPORTANT - tool use: You have a Fabric Data Agent tool connected to the governed Zava + IMPORTANT - tool use: Fabric IQ connects inventory-hack-agent to the governed Zava inventory data (Inventory, Products, Stores, DemandHistory, Suppliers, ReplenishmentOrders). For ANY inventory number - stock level, reorder point, safety stock, average daily sales - you MUST call the Fabric Data Agent and answer from its result. Never answer from memory @@ -59,8 +59,10 @@ Your Inventory Optimisation Agent answers these questions by querying the Fabric If you cannot find a SKU in the data, say so clearly - do not invent numbers. ``` -5. Add the **Fabric Data Agent** tool and select the existing **`inventory-hack-agent`** connection (created in Challenge 2). -6. **Remove the Web Search tool.** New prompt agents ship with **Web Search** attached by default, and `gpt-5.4-mini` will happily reach for it instead of the governed data. Under **Tools**, delete **Web Search** so the **only** tool is the Fabric Data Agent — this agent works from internal data only. +5. Add **Fabric IQ** by **reusing the connection you made in Challenge 2**: under **Tools** select **Add → Add tools**, and on the **Configured** tab choose the existing **`inventoryhackagent`** tile, then **Add tool**. It points to your published `inventory-hack-agent`, so you don't need to browse the catalog again. Do not use the deprecated **Fabric Data Agent** tool. + + ![The Select a tool dialog with the existing inventoryhackagent connection listed under Configured](../images/challenge-02-reuse-connection.png) +6. **Remove the Web Search tool.** New prompt agents ship with **Web Search** attached by default, and `gpt-5.4-mini` will happily reach for it instead of the governed data. Under **Tools**, delete **Web Search** so the **only** tool is Fabric IQ — this agent works from internal data only. 7. Click **Save**. ### Part B — Run the agent (15 min) @@ -94,18 +96,18 @@ Your Inventory Optimisation Agent answers these questions by querying the Fabric > [!IMPORTANT] > This is the most important part of the challenge. Understanding what an agent did — and why — is essential for building trust with stakeholders and catching errors before they reach production. -1. Open the `inventory-optimisation-agent` and select **Traces → Response view**. (In the current Foundry portal, tracing lives on the agent as **Traces** — there is no top-level *Tracing* menu.) -2. Find the most recent run of `inventory-optimisation-agent`. -3. Open the trace and locate: - - The **model call** — what instructions and context were sent to gpt-5.4-mini? - - The **tool call** — what exact NL query was sent to the Fabric Data Agent? - - The **tool response** — what data did Fabric return? - - The **final generation** — how did the model synthesise the data into the recommendation? +1. Open the `inventory-optimisation-agent` and select the **Traces** tab (next to **Playground** and **Details**). The **Trace view** lists each run with its duration, tokens, estimated cost and agent version. +2. Select the **Trace ID** of the most recent run. +3. In the **Trajectories** tab, expand the span tree and locate: + - The **model call**: the `Chat` span. Select it to see what instructions and context were sent to gpt-5.4-mini. + - The **tool call**: the `Execute Tool` span (`mcp_inventoryhackagent.DataAgent_inventory_hack_agent`). Select it to see the exact natural-language query sent to the Fabric Data Agent. + - The **tool response**: the same span. Select **Input + Output** on the right to see what data Fabric returned. + - The **final generation**: the `Invoke Agent` span's output, which shows how the model turned the data into the recommendation. - ![Expanded trace view showing the model call, Fabric tool call, tool response, and final generation spans](../images/challenge-02-trace.png) + ![A trace showing the Invoke Agent span with its Execute Tool and Chat spans, and the Input + Output panel with the agent's final answer](../images/challenge-02-trace.png) > [!NOTE] - > The **Traces → Response view** on the agent gives the full span tree shown above. The quick **Traces** link at the bottom of a playground chat opens a lighter, differently-laid-out view of the same run — either works, but the Response view is the one this challenge describes. + > The quick **Traces** link under an answer in the playground opens the same viewer as a popup for the whole conversation, with one **Invoke Agent** span per question. The **Traces** tab shows one run at a time. Either works. 4. Answer these questions by reading the trace: - Did the agent query Fabric once or multiple times? Why? - Was the reorder quantity calculation visible in the trace? @@ -113,7 +115,7 @@ Your Inventory Optimisation Agent answers these questions by querying the Fabric ## 🏁 Success criteria -- [ ] The `inventory-optimisation-agent` prompt agent exists with only the Fabric Data Agent tool (no Web Search). +- [ ] The `inventory-optimisation-agent` prompt agent exists with only the Fabric IQ tool (no Web Search). - [ ] A test run returns a recommendation table with at least one CRITICAL flagged item. - [ ] You have opened the trace for your run and can identify the model call, tool call, tool response, and final generation steps. - [ ] You can explain, by pointing to the trace, why the agent made the recommendation it did. diff --git a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/challenges/challenge-04.md b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/challenges/challenge-04.md index 9ff552836..5a1284071 100644 --- a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/challenges/challenge-04.md +++ b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/challenges/challenge-04.md @@ -69,17 +69,17 @@ This human-in-the-loop pattern is critical for **agentic AI in enterprise settin (from today's date) after a YES; never fabricate a real ERP order ID. ``` -5. Click **Save** — you'll attach the Fabric Data Agent tool next. +5. Click **Save** — you'll attach Fabric IQ next. -### Part B — Add the Fabric Data Agent tool (10 min) +### Part B — Add Fabric IQ for governed costs (10 min) The "act" step — submitting the purchase order — is **simulated by the agent itself**. In the current **New Foundry** portal, prompt agents don't expose a no-code custom-function tool: the tool catalogue's **Custom** tab offers only **OpenAPI**, **MCP**, and **Agent2Agent (A2A)** connectors, which all require a hosted endpoint. Because the Fabric Data Agent is **read-only**, the agent closes the loop by *generating* a submission confirmation on approval — which delivers the exact human-in-the-loop teaching point with zero infrastructure. -You need exactly **one** tool here — the Fabric Data Agent — so you must also remove the Web Search tool that new prompt agents ship with by default: +You need exactly **one** tool here — Fabric IQ, connected to your Data Agent — so you must also remove the Web Search tool that new prompt agents ship with by default: 1. In the agent editor, expand **Tools**. New prompt agents ship with **Web Search** attached by default — **delete it**, or `gpt-5.4-mini` will reach for the web instead of the governed cost data. -2. Select **Add**, and on the **Configured** tab choose **Fabric Data Agent** and connect the existing **`inventory-hack-agent`** connection — the agent needs it to look up unit costs from the `Products` table when building the PO. -3. Select **Add tool**, then **Save**. Confirm the **only** tool left is the Fabric Data Agent. +2. Select **Add → Add tools**, and on the **Configured** tab choose the existing **`inventoryhackagent`** connection from Challenge 2 (the same one used in Challenge 3), then **Add tool**. The agent needs it to look up unit costs from the `Products` table when building the PO. Do not use the deprecated **Fabric Data Agent** tool. +3. Select **Save**. Confirm the **only** tool left is Fabric IQ. > [!NOTE] > **Want a *real* submit action?** In production you'd add an **OpenAPI tool** (New Foundry) or a custom function that writes to the `ReplenishmentOrders` table / your ERP. That needs a hosted endpoint, so it's out of scope for this no-code lab — see **Part E — Stretch** at the end of this challenge. @@ -105,11 +105,11 @@ You need exactly **one** tool here — the Fabric Data Agent — so you must als - Then reply `YES` — verify the agent responds with the simulated submission confirmation (`✅ Purchase order PO-... submitted to ERP.`). ![Playground showing the MODIFY 1 50 adjustment followed by a YES approval and the submission confirmation](../images/challenge-03-approval-flow.png) -5. Open the agent's **Traces → Response view** and find this run. Trace the complete sequence: - - Model call (format PO from the recommendation) → **Fabric tool call** (unit-cost lookup from `Products`) → model call (present proposal) → model call (apply MODIFY, re-present) → model call (confirm submission after YES). +5. Open the agent's **Traces** tab, select the **Trace ID** of this run and find it in the **Trajectories** tree. (The **Traces** link under an answer in the playground opens the same tree as a popup for the whole conversation, as in the screenshot below.) Trace the complete sequence: + - Three **Invoke Agent** spans, one per message. Only the first has an **Execute Tool** span (the unit-cost lookup from `Products`), followed by its `Chat` span that presents the proposal. The **MODIFY** and **YES** turns have only a `Chat` span, because the agent reuses the costs it already has. 6. **Discuss with your team:** At which step did the human add value that an automated pipeline could not? -![Trace view showing the model calls and the Fabric unit-cost lookup across the approval cycle](../images/challenge-03-trace.png) +![The conversation trace for the approval run: three Invoke Agent spans, with the Fabric unit-cost lookup only in the first](../images/challenge-03-trace.png) ### Part D — Reflect on the full loop (optional, 10 min) @@ -135,7 +135,7 @@ Either path turns the simulated confirmation into a genuine side effect while ke ## 🏁 Success criteria -- [ ] The `replenishment-action-agent` prompt agent exists on `gpt-5.4-mini` with the Fabric Data Agent tool attached (and the default Web Search tool removed). +- [ ] The `replenishment-action-agent` prompt agent exists on `gpt-5.4-mini` with Fabric IQ connected (and the default Web Search tool removed). - [ ] A test run successfully presents a formatted purchase order proposal (per-line cost table with a total). - [ ] The MODIFY flow works correctly — the agent updates the specified line, recalculates the total, and re-presents. - [ ] A YES reply produces the simulated submission confirmation (`✅ Purchase order PO-... submitted`). diff --git a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/challenges/challenge-05.md b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/challenges/challenge-05.md index 9cb3ebeac..bfc2bc9a6 100644 --- a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/challenges/challenge-05.md +++ b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/challenges/challenge-05.md @@ -58,11 +58,14 @@ You'll chain the three specialist agents you built in Challenges 2–4. **You do 2. Send a single request, e.g.: ```text - A prolonged heatwave is hitting the Pacific Northwest. Check our exposure on outdoor power tools and prepare a replenishment order for approval. + A prolonged heatwave is hitting the Pacific Northwest. Check our exposure on outdoor power tools and prepare a replenishment order for approval. Include Leaf Blower X2 (P004) at Seattle and Portland. ``` -3. Watch the nodes execute in order: demand sensing → optimisation → replenishment. When the replenishment node presents the PO proposal, reply `YES` (or `MODIFY `). -4. Open **Traces** and find the run. Confirm you can see the **node-by-node execution** — each agent node's model call with its **Fabric Data Agent** tool call underneath, and the human approval turn on the replenishment node. + > [!TIP] + > **Name the product, as in Challenge 3.** A prompt that only says "outdoor power tools" sometimes makes the Fabric Data Agent write a query that fails with a *collation conflict*, and then the later agents have no data to work with. Naming the SKU (`P004`) and the locations avoids it. If a run says it cannot verify inventory, send the request again. + +3. Watch the nodes execute in order: demand sensing → optimisation → replenishment. When the replenishment node presents the PO proposal, check that the unit costs are **$95** (P004) and not the **$20** fallback, then reply `YES` (or `MODIFY `). +4. Open **Traces** and find the run. Confirm you can see the **node-by-node execution** — each agent node's model call with its **Fabric IQ** tool call underneath, and the human approval turn on the replenishment node. ## 🏁 Success criteria @@ -113,6 +116,8 @@ Everything so far lives in the Foundry portal — great for builders, but the ** | Chatting a published **workflow** in Teams/M365 fails: *"Agent kind 'workflow' is not supported"* | Teams / Microsoft 365 publishing supports only **prompt and hosted agents**. Publish a **prompt agent** (e.g. `demand-sensing-agent`) instead — see Part E. | | The replenishment node never stops looping | The **Loop condition** `Find` is **case-sensitive** — keep the Challenge 4 confirmation wording (`submitted to ERP`, `Order cancelled`) exactly. | | A node doesn't receive the previous agent's output | Set **Save agent output message as** on the upstream node and reference that variable in the next node's **Input message**. | +| The purchase order shows **$20** unit costs | That is the fallback: the replenishment agent skipped the Fabric cost lookup. Reply `NO`, then run the workflow again in a **new** conversation. The costs should be $95 (P004), $140 (P005) and $85 (P006). | +| The replenishment node asks you to paste a table or SKU data instead of presenting a purchase order | An earlier node returned no usable recommendation. Run the workflow again in a **new** conversation, and name the product as in step 2 (*Include Leaf Blower X2 (P004) at Seattle and Portland*). | | The visual designer isn't available | Do the **Part D** evaluation bonus instead, or export the workflow **YAML** and run it as a hosted agent (see Learning resources). | ## 🚀 Go further diff --git a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/README.md b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/README.md index 6e1ce9d65..c2a1489f8 100644 --- a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/README.md +++ b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/README.md @@ -4,7 +4,7 @@ This folder holds the screenshots embedded throughout the challenge guides and w > **Model name in captures is illustrative.** Where a screenshot shows a selected chat model (e.g. `gpt-4o-mini` or `gpt-5.4-mini`), that name reflects only what was deployed when the capture was taken. The model is **swappable** — attendees use whatever their facilitator provisioned. You do **not** need to re-shoot screenshots when the deployed model changes; challenge-01 tells attendees this explicitly. -> **Portal UI captures pending re-shoot.** The Fabric/Foundry portals changed after some captures were taken; the guide text is already updated for the current UI. Re-capture when convenient: the Data Agent **Settings → Model Context Protocol → MCP server URL** page (replaces the retired *Publishing → Published URL*; used by `challenge-00-agent-settings.png`, `challenge-00-agent-url.png`, `challenge-00-agent-ids.png`) and the agent **Traces → Response view** (`challenge-02-trace.png`, `challenge-03-trace.png`). +> **Portal UI captures pending re-shoot.** The Fabric/Foundry portals changed after some captures were taken; the guide text is already updated for the current UI. Re-capture when convenient: the Data Agent **Settings → Model Context Protocol → MCP server URL** page (replaces the retired *Publishing → Published URL*; used by `challenge-00-agent-settings.png`, `challenge-00-agent-url.png`, `challenge-00-agent-ids.png`). The Foundry captures for Challenges 2-4 (Fabric IQ tool, recommendation, approval flow and traces) were re-taken in October 2026. | Filename | Challenge | Shows | |----------|-----------|-------| @@ -22,13 +22,14 @@ This folder holds the screenshots embedded throughout the challenge guides and w | `challenge-00-notebook-ids.png` | 0 | The setup notebook's final cell output printing the **Workspace ID** and **Data Agent (Agent) ID** (values redacted). | | `challenge-00-agent-test.png` | 0 | The published data agent's **Test data agent** pane answering the Leaf Blower X2 question with exact **CRITICAL** stock levels for Portland and Seattle (all tables selected). | | `challenge-00-no-tables.png` | 0 | Troubleshooting: the data agent with **no tables selected** and the agent replying it *can't access the data source*. | -| `challenge-01-new-connection.png` | 1 | The **Add tool → Fabric Data Agent** connection dialog (Workspace ID / Artifact ID redacted) named `inventory-hack-agent` — created in Challenge 2. | -| `challenge-01-new-agent.png` | 1 | New agent editor for `demand-sensing-agent`: name, `gpt-5.4-mini` model, and populated instructions. | -| `challenge-01-add-tool.png` | 1 | The tool catalogue in the agent editor with **Web Search** and **Fabric Data Agent** available. | -| `challenge-01-playground.png` | 1 | Playground response with a Fabric inventory result (and a web source if Web Search is on) ending in a demand assessment. | -| `challenge-02-recommendation.png` | 2 | Reorder **recommendation table** (SKU / Warehouse / Current Stock / Suggested Reorder Qty / Priority) with a **CRITICAL** item. | -| `challenge-02-trace.png` | 2 | **Traces → Response view** detail expanded to the model call, Fabric tool call, tool response, and final generation spans. | +| `challenge-01-fabric-iq-catalog.png` | 1 | The **OneLake Catalog** dialog with `inventory-hack-agent` selected and its Location visible (Challenge 2, Part C). | +| `challenge-01-new-agent.png` | 1 | New agent editor for `demand-sensing-agent`: name, `gpt-5.4-mini` model, instructions and **Web search** under **Tools**. | +| `challenge-01-add-tool.png` | 1 | The **Select a tool** dialog (**Configured** tab) with **Fabric IQ (OneLake Catalog)** selected; the deprecated Fabric Data Agent tile is greyed out. | +| `challenge-01-playground.png` | 1 | Playground answer to the heatwave scenario: cited web sources, Fabric stock numbers and a demand assessment, with `inventoryhackagent` and `Web search` chips. | +| `challenge-02-reuse-connection.png` | 2 | The **Select a tool** dialog showing the existing `inventoryhackagent` connection under **Configured** (Challenges 3 and 4). | +| `challenge-02-recommendation.png` | 2 | Reorder **recommendation table** (SKU / Location / Current Stock / Suggested Reorder Qty / Priority), all rows **CRITICAL**. | +| `challenge-02-trace.png` | 2 | The **Traces** tab's trace detail: an **Invoke Agent** span with its **Execute Tool** (Fabric) and **Chat** spans, and **Input + Output**. | | `challenge-03-approval-flow.png` | 3 | The `MODIFY 1 50` → `YES` approval exchange and the simulated submission confirmation. | -| `challenge-03-trace.png` | 3 | Trace of the approval run: model calls plus the Fabric unit-cost lookup across propose → MODIFY → YES. | +| `challenge-03-trace.png` | 3 | The conversation trace for the approval run: three **Invoke Agent** spans, with the Fabric unit-cost lookup only in the first. | | `challenge-04-orchestrator.png` | 4 *(stretch)* | The `inventory-planning-workflow` canvas: Start → demand-sensing → inventory-optimisation → replenishment-action. | | `challenge-04-teams.png` | 4 *(stretch)* | The workflow's **Publish** menu open on **Teams & Microsoft 365 Copilot** — the "what's next" showcase entry point. | diff --git a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-01-add-tool.png b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-01-add-tool.png index 0aa4e2710..c3e87f4af 100644 Binary files a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-01-add-tool.png and b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-01-add-tool.png differ diff --git a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-01-fabric-iq-catalog.png b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-01-fabric-iq-catalog.png new file mode 100644 index 000000000..9bdb0ec63 Binary files /dev/null and b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-01-fabric-iq-catalog.png differ diff --git a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-01-new-agent.png b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-01-new-agent.png index 6c05a7ef5..23c6e437d 100644 Binary files a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-01-new-agent.png and b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-01-new-agent.png differ diff --git a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-01-new-connection.png b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-01-new-connection.png deleted file mode 100644 index 969325d61..000000000 Binary files a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-01-new-connection.png and /dev/null differ diff --git a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-01-playground.png b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-01-playground.png index acb2eb939..601cc72e2 100644 Binary files a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-01-playground.png and b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-01-playground.png differ diff --git a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-02-recommendation.png b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-02-recommendation.png index f6f26d3b6..14dab9476 100644 Binary files a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-02-recommendation.png and b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-02-recommendation.png differ diff --git a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-02-reuse-connection.png b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-02-reuse-connection.png new file mode 100644 index 000000000..dba6c7c78 Binary files /dev/null and b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-02-reuse-connection.png differ diff --git a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-02-trace.png b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-02-trace.png index 580aaa222..4c8c6f8a9 100644 Binary files a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-02-trace.png and b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-02-trace.png differ diff --git a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-03-approval-flow.png b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-03-approval-flow.png index d60338cb1..aa72a883b 100644 Binary files a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-03-approval-flow.png and b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-03-approval-flow.png differ diff --git a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-03-trace.png b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-03-trace.png index 801efc1b7..a93131fed 100644 Binary files a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-03-trace.png and b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/images/challenge-03-trace.png differ diff --git a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/walkthrough/challenge-01/solution-01.md b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/walkthrough/challenge-01/solution-01.md index 76c1936ac..2a4e810ce 100644 --- a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/walkthrough/challenge-01/solution-01.md +++ b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/walkthrough/challenge-01/solution-01.md @@ -28,7 +28,7 @@ Understand the inventory scenario, provision your own Fabric workspace + Data Ag 2. Select your project — in a shared tenant, match the **`FoundryProjectEndpoint`** from your lab dashboard (Credentials tab) to the project's **Parent resource** to be sure it's yours. 3. Open your **model deployments** → confirm `gpt-5.4-mini` is listed with status **Succeeded**. 4. Open a **deployed model → Playground** → send "Hello" → confirm a response is returned. (The current portal opens the Playground from a model or agent, not a top-level *Agents → Playground* menu.) -5. You attach the **Fabric Data Agent** as a *tool* on each agent you build — the `inventory-hack-agent` connection is created the first time (Challenge 2) via **Tools → Add → Fabric Data Agent**, using the **Workspace ID and Agent ID your setup notebook printed** in Challenge 1. No standalone connection page is needed. +5. You attach your published Data Agent as a *tool* on each agent you build, through **Tools → Add → Add tools → Fabric IQ (OneLake Catalog)**. The `inventoryhackagent` connection is created the first time (Challenge 2); later agents reuse it. You pick the agent by name, so the Workspace ID and Agent ID are only for diagnostics. No standalone connection page is needed. ### Provision your Fabric workspace + Data Agent (Challenge 1 Task 3) @@ -36,7 +36,7 @@ Understand the inventory scenario, provision your own Fabric workspace + Data Ag 2. **Create the Lakehouse.** **+ New item → Lakehouse**, named exactly **`InventoryLakehouse`**. 3. **Import + attach.** Download **`Setup-InventoryDataAgent.ipynb`** from the repo's **`setup/`** folder (or your facilitator's link), then **Import → Notebook → From this computer → Upload** in the workspace toolbar. Open it and, in the **Explorer**, **Add data items → From OneLake catalog → `InventoryLakehouse`** as the **default** — if names collide, pick the one whose **Location** is your `inventory-hack-…` workspace (the write cells fail without a default Lakehouse). 4. **Run all** (~5–10 min). The kernel restarts once after the `%pip` cell — expected. It writes 7 tables and publishes `inventory-hack-agent`. -5. Copy the **Workspace ID** and **Agent ID** the final cell prints — you'll use them in Challenge 2. +5. Copy the **Workspace ID** and **Agent ID** the final cell prints for diagnostics. You won't paste them in Challenge 2, because you select the agent by name through Fabric IQ. **Common stumbles:** capacity not in the dropdown (paused, or wrong signed-in user) · table-write cells fail (Lakehouse not attached as default) · Data Agent tool missing later in Foundry (capacity paused, or the notebook didn't finish publishing). diff --git a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/walkthrough/challenge-02/solution-02.md b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/walkthrough/challenge-02/solution-02.md index 11b2da207..77800cc62 100644 --- a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/walkthrough/challenge-02/solution-02.md +++ b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/walkthrough/challenge-02/solution-02.md @@ -6,13 +6,17 @@ ## Goal -Build a Foundry prompt agent with Web Search + Fabric Data Agent tools to sense a real-world demand change. +Build a Foundry prompt agent with Web Search + Fabric IQ (connected to your published Fabric Data Agent) to sense a real-world demand change. ## Solution walkthrough ### Agent creation -Navigate to **Agents → + New agent**. If the portal shows a wizard, select **Prompt agent** (not Hosted agent). +Navigate to **Agents → New agent**. If the portal shows a wizard, select **Prompt agent** (not Hosted agent). + +### Connecting the Data Agent + +Use **Tools → Add → Add tools → Fabric IQ (OneLake Catalog)**, filter by **Data agent**, and select the team's `inventory-hack-agent` (check its **Location** is the attendee's own workspace). The earlier **Fabric Data Agent** tool, which asked for a Workspace ID and Agent ID, is deprecated and greyed out in the catalogue; it retires on 6 November 2026. The new connection is named after the Data Agent (`inventoryhackagent`), and Challenges 3 and 4 reuse it from the **Configured** tab. ### Common issues diff --git a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/walkthrough/challenge-03/solution-03.md b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/walkthrough/challenge-03/solution-03.md index 3f296a254..a3c1d7db9 100644 --- a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/walkthrough/challenge-03/solution-03.md +++ b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/walkthrough/challenge-03/solution-03.md @@ -12,31 +12,27 @@ Build the Inventory Optimisation Agent and use agent tracing to inspect its reas ### Agent — key configuration point -This agent should have **only the Fabric Data Agent tool** — no Web Search. New prompt agents ship with **Web Search attached by default**, so the key step is to **remove it**; otherwise `gpt-5.4-mini` tends to reach for the web instead of the governed data. The instructions say "governed data only" for a reason: optimisation decisions should be traceable to authoritative internal data, not unverified web content. +This agent should have **only the Fabric IQ tool** — no Web Search. Reuse the `inventoryhackagent` connection from Challenge 2 (**Tools → Add → Add tools → Configured**). New prompt agents ship with **Web Search attached by default**, so the key step is to **remove it**; otherwise `gpt-5.4-mini` tends to reach for the web instead of the governed data. The instructions say "governed data only" for a reason: optimisation decisions should be traceable to authoritative internal data, not unverified web content. ### Reading the trace — what to look for -In the agent's **Traces → Response view**, each run shows a tree of spans: +In the agent's **Traces** tab, open a run's **Trace ID**. The **Trajectories** tab shows a tree of spans: ``` -run -├── model_call (instructions + user message sent to gpt-5.4-mini) -├── tool_call: Fabric Data Agent -│ ├── input: { query: "current stock and reorder point for Leaf Blower X2 (P004) across all locations" } -│ └── output: { ... table of rows ... } -├── tool_call: Fabric Data Agent ← agent may call multiple times -│ ├── input: { query: "average weekly sales for outdoor power tools over the last 8 weeks" } -│ └── output: { ... } -└── model_call (final synthesis → recommendation table) +Invoke Agent: invoke_agent inventory-optimisation-agent: +├── Execute Tool: mcp_inventoryhackagent.DataAgent_inventory_hack_agent (the Fabric call, tens of seconds) +└── Chat: gpt-5.4-mini (final synthesis, under a second) ``` +Select a span and use **Input + Output** on the right to read the query, the data Fabric returned and the final answer. The agent may call Fabric more than once. + ### Common issues | Symptom | Cause | Fix | |---------|-------|-----| | Agent returns "I don't have enough information" or an empty table | Product/category words don't match Fabric values | Ask by **SKU/productId** (e.g. `P004`) or the exact snake_case category value (`outdoor_power_tools`), not a friendly label like "Outdoor Power Tools" | | Reorder quantity seems wrong | Agent used a different formula | Remind the agent of the formula in a follow-up: "Use the rule: reorder_qty = max(0, 30-day demand - current stock)" | -| Trace not appearing | Tracing may take 30–60 seconds to update | Refresh the agent's **Traces → Response view** | +| Trace not appearing | Tracing may take 30–60 seconds to update | Refresh the agent's **Traces** tab | ### Sample recommendation table diff --git a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/walkthrough/challenge-04/solution-04.md b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/walkthrough/challenge-04/solution-04.md index f74aa05a8..82a74a90b 100644 --- a/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/walkthrough/challenge-04/solution-04.md +++ b/03-Azure/01-04-AI/02_Inventory_Planning_Fabric/walkthrough/challenge-04/solution-04.md @@ -12,7 +12,7 @@ Build the Replenishment Action Agent, implement the human approval loop, and tra ### Tools — one tool, and remove the default Web Search -This agent needs **only the Fabric Data Agent tool** (to look up unit costs from the `Products` table). New prompt agents ship with **Web Search attached by default** — **remove it**, or `gpt-5.4-mini` will reach for the web instead of the governed cost data. After configuring, confirm the Fabric Data Agent is the only tool listed. +This agent needs **only the Fabric IQ tool** (to look up unit costs from the `Products` table). Reuse the `inventoryhackagent` connection from Challenge 2 (**Tools → Add → Add tools → Configured**). New prompt agents may ship with **Web Search attached by default** — **remove it**, or `gpt-5.4-mini` will reach for the web instead of the governed cost data. After configuring, confirm Fabric IQ is the only tool listed. ### Simulated submission (no function tool) @@ -31,17 +31,21 @@ If the agent skips the re-presentation, add to the instructions: *"After any MOD ### Trace — what the full cycle looks like +In the agent's **Traces** tab (or the playground's **Traces** link), one conversation shows one **Invoke Agent** span per message: + ``` -run (challenge 3 approval) -├── model_call (format PO proposal from recommendation) -│ └── tool_call: Fabric Data Agent (unit-cost lookup from Products) -├── model_call (present proposal + ask for approval) -│ → user replies: MODIFY 1 50 -├── model_call (update line 1, recalculate, re-present) -│ → user replies: YES -└── model_call (simulated confirmation: "✅ Purchase order PO-... submitted") +Conversation +├── Invoke Agent (first message: the recommendation table) +│ ├── Execute Tool: Fabric IQ (unit-cost lookup from Products) +│ └── Chat (present proposal + ask for approval) +├── Invoke Agent (user replies: MODIFY 1 50) +│ └── Chat (update line 1, recalculate, re-present) +└── Invoke Agent (user replies: YES) + └── Chat (simulated confirmation: "✅ Purchase order PO-... submitted") ``` +Only the first turn calls Fabric, because the later turns reuse the costs the agent already has. + ### Where does the human add value? The human approval step adds value that an automated pipeline cannot replicate: