Build an end-to-end Caldova data agent solution
Caldova Pharmaceuticals must decide where to focus before launch program LP001 moves forward. The core path combines planning and supplier data with simulated operational evidence, then validates the same grounded facts across Fabric, Microsoft Foundry, and Microsoft Copilot Studio.
In this exercise, you first build the complete core launch-readiness path. Optional sentiment and enrichment tasks then add customer evidence, and a final ontology models the cross-source relationships explicitly.
This exercise should take approximately 225 minutes to complete when you perform every task.
Learning objectives
By the end of this exercise, you can:
-
Build a Fabric foundation that combines planning, supplier, batch, and operational data.
-
Route simulated events to Eventhouse and Lakehouse destinations.
-
Build, tune, test, and publish a multi-source Fabric data agent.
-
Inspect discovery, security, governance, and lineage in OneLake catalog.
-
Ground Microsoft Foundry and Microsoft Copilot Studio agents through a published Fabric data agent.
-
Compare planning, supplier, and operational evidence across three agent experiences.
-
Optionally apply Azure OpenAI sentiment analysis and issue-category enrichment, then model cross-source business context with a Fabric ontology.
Before you start
Complete the checklist in Prepare your environment before you start. It applies to both your own environment and a hosted lab computer.
Note: This exercise requires a paid F2 or higher Fabric capacity. Have your prepared Azure subscription, supported region, Microsoft Copilot Studio environment, and Azure OpenAI resource and deployment names available. In a hosted lab, the provider supplies these values.
Important: Fabric Trial can support the Lakehouse and streaming foundation, but it doesn't meet the data-agent capacity prerequisite. Confirm that your lab identity can create a workspace on the prepared paid capacity. Capacity and tenant settings are configured before the exercise.
Note: Fabric data agent, Fabric IQ, and ontology features used in this exercise are in preview. Labels in the user interface can change.
Configure the environment
Caldova needs a shared, governed foundation before teams can assess LP001. In this task, you create the workspace, Lakehouse, and curated launch-readiness tables.
Estimated time: 25 minutes.
Download the necessary files
Download and extract the learner package so every required dataset, notebook, code file, and event-simulation asset is available for the remaining tasks.
-
Open a browser on your lab computer, and download the learner package:
Download L300-unify-data.zip{:target="_blank"} from
https://raw.githubusercontent.com/MicrosoftLearning/mslearn-unify-data/main/Allfiles/L300-unify-data/L300-unify-data.zip. -
Open the Downloads folder in File Explorer.
-
Extract the
L300-unify-data.zipto the default locationDownloads\L300-unify-data. -
Open the extracted
L300-unify-datafolder, and verify that it contains:codedatanotebooksevent-simulator
Create the workspace and lakehouse
Create a capacity-backed Fabric workspace and Lakehouse that provide the governed storage foundation for the Caldova solution and its agents.
-
Open the Microsoft Fabric home page{:target="_blank"} at
https://app.fabric.microsoft.com/home?experience=fabric, and sign in with the account you prepared for the exercise. -
Select Workspaces > + New workspace and name it
caldova-agent. -
Expand Advanced, select the Fabric license mode and the paid capacity you prepared for the exercise, and create the workspace.
-
Open the workspace, and select Import > Notebook > From this computer.
-
Import the notebook from
Downloads\L300-unify-data\notebooks\curate_caldova_tables.ipynb. -
In the notebook Explorer pane, select Add data items > New lakehouse.
-
Enter
caldova_lakehouse, select your workspace, enable Lakehouse schemas (which might be labeled Public Preview), and select Create. The notebook writes its tables to thedboschema. -
Return to
curate_caldova_tables, and select Run all. -
Confirm these outcomes:
-
The final output reports:
Validation passed: 318 rows across six tables; all tested relationships are valid. -
The Lakehouse contains
dbo.launch_program,dbo.product,dbo.plant,dbo.capacity_plan,dbo.batch, anddbo.supplier. -
The notebook result grids show an 18,900-unit gap and a 7% gap for
LP001. The launch result displays the binding plant name. To verify the plant ID, opendbo.launch_programin the Lakehouse, findLP001, and confirm thatBindingConstraintPlantIDisPL003. -
Meridian Biologics ranks first among eligible suppliers.
-
Configure streaming data and detect exceptions
The static LP001 plan doesn't show new production or supplier exceptions. In this task, you stream operational events and detect threshold breaches that can increase launch risk.
Estimated time: 25 minutes.
Create the eventhouse table and mapping
Prepare Eventhouse to receive consistently typed events. This setup creates an empty destination; you analyze the events after the replay.
-
Select + New item in the Caldova workspace, search for Eventhouse, and create
caldova_events. -
Open
caldova_events, and verify that its default KQL database appears. Dismiss any first-time welcome or guided-tour panels. -
In the default KQL database, select KQL Queryset on the toolbar, and name it
caldova_exception_queries. The New menu is for table-related objects. -
Open
Downloads\L300-unify-data\code\05-operational-events.txt. The file contains the table command, JSON ingestion mapping, and LP001 threshold-breach query. -
Copy and run the
.create table operational_eventscommand. This creates the empty destination table and defines the data type for each event field. -
Copy and run the
.create-or-alter table operational_events ingestion json mappingcommand. This maps each incoming JSON field to its Eventhouse column. -
Confirm that
operational_eventsappears in the KQL database. The table remains empty until you configure the Eventstream destination and replay the events.
You use the final query in 05-operational-events.txt after the replay to analyze which observations exceed their thresholds.
Create and publish the eventstream
Create and publish an eventstream that routes each simulated event to Eventhouse for low-latency analysis and to the Lakehouse for durable history.
-
Return to the workspace, select + New item, search for Eventstream, and create
caldova_operational_stream. -
Select Add source > Custom endpoint in Edit mode, and name the source
caldova-simulator. -
Select Add destination, find Eventhouse in the destination catalog, select Configure, and enter:
Setting Value Ingestion mode Direct ingestion Destination name eventhouse-operational-eventsWorkspace Your Caldova workspace Eventhouse caldova_eventsKQL database caldova_events -
Connect the default stream's output port to the Eventhouse destination's input port. Adding a destination doesn't automatically connect it.
-
Select Add destination, find Lakehouse in the destination catalog, select Configure, and enter:
Setting Value Destination name lakehouse-operational-historyWorkspace Your Caldova workspace Lakehouse caldova_lakehouseDelta table Create dbo.operational_event_historyInput data format JSONMinimum rows (under Advanced settings) 1Seconds per file (under Advanced settings) 60 -
Connect the default stream to the Lakehouse destination.
-
Select Publish, and wait until the custom source and Lakehouse destination show Active. The Eventhouse destination remains Unconfigured until you send the priming event and complete its Get data wizard.
Prepare the simulator and prime the stream
Publish the simulated event set, validate four LP001 threshold breaches, and confirm that both streaming destinations receive the expected operational evidence.
-
Select the
caldova-simulatorsource in the eventstream, open Details, and select Event Hub > SAS Key Authentication. Locate Connection string-primary key and Event hub name. Use the complete connection string, not the standalone Primary key or credentials from the AMQP or Kafka tabs. -
Open PowerShell, and change to the event simulator folder:
Set-Location "$HOME\Downloads\L300-unify-data\event-simulator" -
Set temporary process-level environment variables. Run these commands, then paste each value from Fabric at its prompt:
$env:EVENTSTREAM_CONNECTION_STRING = ( [System.Net.NetworkCredential]::new( '', (Read-Host 'Paste the complete Event Hub connection string-primary key' -AsSecureString) ).Password ).Trim() $env:EVENTSTREAM_ENTITY_NAME = (Read-Host 'Paste Event hub name').Trim()EVENTSTREAM_ENTITY_NAMEmust match Event hub name, which is also the connection string'sEntityPathvalue. It isn't the source display namecaldova-simulator. The connection-string prompt hides your input and keeps it out of the command text in PowerShell history. Don't share credentials in chat, screenshots, or saved files. -
Send one nonexception priming event, and confirm that PowerShell reports
Replay complete: 1 event sent.:python .\replay_events.py --prime --delay-seconds 0The event supplies a representative JSON schema without adding a threshold breach. A local guard prevents accidental repeat priming. Priming is tracked separately and doesn't block the full replay.
-
Keep this PowerShell window open for the full replay. The credential variables are available only in this session.
Connect the Eventhouse destination
-
Return to the eventstream Live view, and select Configure on the Eventhouse destination.
-
Select the existing
operational_eventstable in thecaldova_eventsKQL database, retain the generated Data connection name, and select Next. -
On Inspect the data, select JSON as the format.
-
Open the mapping dropdown above the preview grid, turn on Use existing mapping, and select
operational_events_json. -
Confirm that the preview displays the event in the expected columns, then select Finish to complete the Get data flow.
-
Verify that the Eventhouse destination reports a successful connection.
Replay and verify the simulated events
-
Return to PowerShell, send the ten deterministic simulated events, and confirm that PowerShell reports
Replay complete: 10 events sent.:python .\replay_events.pyNote: The simulator records the attempt in a local state file beside the script. After a successful run, another full replay stops with Replay already completed. No events sent. If an attempt fails or is interrupted, the guard also blocks a retry because some events might already have arrived. If results haven't appeared yet, refresh the destination or rerun the query, not the simulator.
With instructor approval, append
--forceto intentionally repeat a full replay, or add it to the priming command to repeat priming. This can duplicate events and change the expected counts. Never use--forcewhile another replay is running. The guard applies only to this extracted simulator folder, not another copy or machine. Keep the state files in place. -
Clear the temporary credentials:
Remove-Item Env:\EVENTSTREAM_CONNECTION_STRING Remove-Item Env:\EVENTSTREAM_ENTITY_NAMERemoving the variables keeps the endpoint secrets out of later commands in the current process.
-
Reopen
Downloads\L300-unify-data\code\05-operational-events.txt, and locate the final query.The query begins with
operational_events, filtersLaunchProgramIDtoLP001, and comparesMetricValuewithThreshold. -
Copy only the final query that begins with
operational_events, paste it intocaldova_exception_queries, and run it. -
Review the four returned rows. For each row, compare
MetricValuewithThresholdand useAmountOverThresholdto determine the size of the exception. -
Confirm these findings:
PL003has two utilization exceptions above 110% and one quality-deviation exception.CMO006has one projected supplier lead-time exception.- The results contain four simulated threshold breaches in total.
Verify Lakehouse history
-
Open
caldova_lakehouse, refresh its table list, and expand Tables > dbo. Selectoperational_event_historyto preview the persisted events. -
Switch to the Lakehouse's SQL analytics endpoint, open a new SQL query, and run:
SELECT COUNT(*) AS SimulatorRows, SUM(CASE WHEN LaunchProgramID = 'LP001' AND MetricValue > Threshold THEN 1 ELSE 0 END) AS ThresholdBreaches FROM dbo.operational_event_history WHERE SourceSystem = 'CaldovaLabSimulator'; -
For a fresh table with one successful priming event and one full replay, confirm
SimulatorRowsis11andThresholdBreachesis4. Allow at least the configured 60-second batching interval, plus ingestion and SQL endpoint synchronization time. If the table or rows aren't available immediately, wait, refresh, and rerun the query. Don't resend the events.
These simulated exceptions add current operational evidence to Caldova's existing LP001 capacity and supplier risks.
Build, tune, test, and publish a Fabric data agent
Decision makers need one way to evaluate planning, suppliers, and current exceptions. In this task, you publish the initial Fabric data agent over the governed core sources.
Estimated time: 20 minutes.
Create the data agent
Create a Fabric data agent that reasons across curated planning and supplier records with simulated Eventhouse telemetry.
-
Return to the workspace, select + New item, search for Data agent, and create
caldova_data_agent. -
Select Add a data source, and add
caldova_lakehouse. -
Select these Lakehouse tables:
launch_programproductplantcapacity_planbatchsupplier
-
Select Add a data source, add the
caldova_eventsKQL database, and selectoperational_events.
Tip: For easier copying, open
Downloads\L300-unify-data\code\06-fabric-data-agent-snippets.txt.
You are Caldova's launch-readiness data assistant. Use only the selected Lakehouse and Eventhouse sources. Join records with their documented business keys. Treat operational events as simulated exercise evidence. For launch recommendations, report the capacity gap, binding plant, eligible supplier evidence, operational threshold breaches, and supporting record counts. Separate source facts from recommendations. Never present a supplier ranking as procurement approval, and don't make medical, clinical, safety, or efficacy claims.
- Open Agent instructions in the data agent, copy the preceding instructions, and save them.
Add Lakehouse source instructions and SQL examples
Guide the agent to join Lakehouse records correctly and answer capacity and supplier questions with governed SQL evidence.
launch_program has one row per launch and joins to product on ProductID. product has one row per product. plant has one row per plant. capacity_plan and batch join to launch_program on LaunchProgramID and to plant on PlantID. supplier joins to launch_program on LaunchProgramID and to product on ProductID. For eligible supplier comparisons, require a currently valid GMP certificate, zero open critical findings, fast-track eligibility, and enough qualified available capacity to cover the launch gap.
- Open the
caldova_lakehouseData source instructions, copy the preceding instructions, and save them.
Add the first example question and SQL query:
What is the capacity gap and binding plant for LP001?
SELECT LaunchProgramID, TargetLaunchVolume, QualifiedCapacity,
CapacityGapUnits, CapacityGapPercent, BindingConstraintPlantID
FROM dbo.launch_program
WHERE LaunchProgramID = 'LP001';
- Add the preceding question and SQL query to the Lakehouse source.
Add the second example question and SQL query:
Which eligible supplier leads for LP001?
SELECT CMOName, QualifiedAvailableCapacityUnits, LeadTimeWeeks,
GMPCertStatus, OpenCriticalFindings, FastTrackEligible, WeightedScore
FROM dbo.supplier
WHERE LaunchProgramID = 'LP001'
AND GMPCertStatus = 'Currently valid'
AND OpenCriticalFindings = 0
AND FastTrackEligible = 'Yes'
AND QualifiedAvailableCapacityUnits >= 18900
ORDER BY WeightedScore DESC;
- Add the preceding question and SQL query to the Lakehouse source.
Add Eventhouse source instructions and a KQL example
Guide the agent to interpret simulated operational telemetry correctly and identify threshold breaches with qualified KQL evidence for LP001 launch analysis.
operational_events contains simulated telemetry. EventID is the event key. LaunchProgramID, ProductID, PlantID, BatchID, and CMOID connect events to curated business records. A threshold breach requires MetricValue greater than Threshold, not equal to Threshold. State that event evidence is simulated and don't describe it as historical production telemetry.
- Open the
caldova_eventsData source instructions, copy the preceding instructions, and save them.
Add the example question and KQL query:
Which simulated LP001 events breached their thresholds?
operational_events
| where LaunchProgramID == "LP001" and MetricValue > Threshold
| summarize BreachCount=count() by EventType, PlantID, CMOID, MetricName
- Add the preceding question and KQL query to the Eventhouse source.
Test and publish the Fabric data agent
Validate that the agent invokes both source types, preserves fixed facts and evidence qualifiers, and publishes a shareable grounded experience.
-
Ask this question in the agent test pane:
For LP001, summarize the capacity gap, binding plant, leading eligible supplier, and simulated threshold breaches. Separate source facts, simulated evidence, and recommendations. -
Review the completed steps and response:
- The agent uses both SQL and KQL.
- An 18,900-unit, 7% gap
PL003as the binding plant- Meridian Biologics as the leading eligible supplier
- Four simulated threshold breaches
-
Select Publish, review the selected sources, and publish
caldova_data_agent. -
Confirm that the agent shows a published state and that you have permission to share it with the assigned Foundry and Copilot Studio environments.
Tour OneLake catalog
Caldova must make the estate findable, controlled, and traceable before agents are shared. In this task, you inspect discovery, access, governance metadata, and lineage.
Estimated time: 15 minutes.
Discover items and review details
Find the Caldova items you created and inspect the metadata that identifies each item's purpose, owner, type, and location.
-
Select OneLake catalog in the Fabric navigation pane.
-
Filter Workspace to your Caldova workspace in the Explore section.
-
Search for
caldova, and verify that these items from your workspace are discoverable:caldova_lakehousecaldova_eventscaldova_operational_streamcaldova_data_agent
-
Find the imported
curate_caldova_tablesnotebook in the same workspace. -
Select
caldova_lakehouse, and review Details, owner, item type, location, and last refresh information. -
See that the description is empty. Add the following details:
Curated Caldova launch, capacity, supplier, batch, plant, product, and operational-event history for the L300 agent journey. -
Set the
caldova_lakehouseendorsement to Promoted.
Inspect security and governance
Inspect access and governance information for the Caldova workspace and the items you created.
-
Navigate to the Secure section.
-
Filter to your Caldova workspace, and review the workspace and item access shown for your identity.
-
Confirm that your identity can read
caldova_lakehouseandcaldova_events. -
Navigate to the Govern section.
-
Review the description and endorsement coverage for the Caldova items you created, and inspect any recommended actions associated with those items.
Trace workspace lineage
Trace how notebooks, eventstreams, storage items, and the data agent connect so each answer remains linked to visible or documented source relationships.
-
Return to the Caldova workspace, and open Lineage view.
-
Confirm these lineage outcomes:
caldova_operational_streamfeedscaldova_eventsandcaldova_lakehouse.- The curated notebook connects to
caldova_lakehouse. caldova_data_agentshows its visible source dependencies.- Any relationship not displayed in lineage can still be traced through the source instructions and business keys you configured.
Build a Microsoft Foundry agent
Solution teams need the core Caldova assessment in broader AI prototypes. In this task, you connect Foundry to the initial published Fabric data agent.
Estimated time: 25 minutes.
Create the Foundry project and deploy a model
Create an isolated Foundry project and deploy the model that runs the learner-created Foundry agent.
-
Open the Microsoft Foundry portal{:target="_blank"} at
https://ai.azure.com/. -
Open the project selector, and select Create new project.
-
Enter
caldova-foundry-followed by your initials as the project name. -
Expand Advanced options.
-
Create a resource group named
caldova-foundry-followed by your initials and-rg, and select the supported region supplied for the exercise. -
Select Create project, and wait for the project overview page to open.
-
Select Build > Models.
-
Select Deploy > Deploy a base model, and search for
gpt-5-mini. -
Select
gpt-5-mini, and then select Deploy > Default settings. -
Confirm that the deployment is available in the project, and note its deployment name.
For project and model setup details, see Set up Microsoft Foundry resources.
Create and ground the Foundry agent
Create a Foundry agent that invokes the published Fabric data agent while preserving its governed query, permission, and evidence boundaries.
-
Open the agent creation experience in your
caldova-foundry-<initials>project, and create an agent namedcaldova_foundry_agent. -
Select the
gpt-5-minideployment you created. -
Enter these agent instructions:
You are Caldova's launch-readiness assistant. Use the connected Fabric IQ data agent for every question about Caldova launch programs, capacity, plants, batches, suppliers, or operational events. Preserve the simulated-event qualifier from the tool, separate facts from recommendations, and never treat a supplier result as procurement approval. -
Select Tools > Add > Browse all tools.
-
Select Fabric IQ (OneLake Catalog).
-
Sign in or create the connection with the learner identity if prompted.
-
Filter the catalog item type to Data agent.
-
Select the published
caldova_data_agent. -
Add the selected data agent as a tool.
Test the Foundry grounding
Confirm that the Foundry agent invokes the Fabric tool and returns the planning, supplier, and operational evidence.
-
Ask:
For LP001, summarize the capacity gap, binding plant, leading eligible supplier, and simulated threshold breaches. Separate source facts, simulated evidence, and recommendations. -
Review the completed steps and response:
- The published
caldova_data_agenttool is invoked. - The response includes the 18,900-unit, 7% gap,
PL003, Meridian Biologics, and four simulated threshold breaches.
- The published
-
Save the agent configuration.
Build a Microsoft Copilot Studio agent
Business users need the same core launch-readiness answer through a low-code experience. In this task, you connect Copilot Studio to the initial published Fabric data agent.
Estimated time: 15 minutes.
Add the Fabric IQ Data MCP tool
Create a Copilot Studio agent that delegates Caldova data questions to the published Fabric data agent through Fabric IQ Data MCP.
-
Open Microsoft Copilot Studio{:target="_blank"} at
https://copilotstudio.microsoft.com/, and select the provided environment. -
Create an agent named
Caldova launch readiness. -
Set its description to:
Answers governed Caldova launch-readiness questions through the published Fabric data agent. -
Add these agent instructions:
Use the Caldova Fabric IQ data tool for every question about launch programs, capacity, plants, batches, suppliers, or operational events. Use only returned data. Preserve simulated-event qualifiers, separate facts from recommendations, and don't represent a supplier result as procurement approval. -
Open the Build tab, and select Tools > + > Fabric IQ Data MCP > OneLake catalog.
-
Sign in with the learner identity if prompted.
-
Select the published
caldova_data_agent. -
Configure the tool description:
Queries governed Caldova launch, capacity, plant, batch, supplier, and simulated operational-event data. -
Configure the tool instructions:
Call this tool for all Caldova data questions. Pass the user's complete question. Return the grounded answer and preserve source names, counts, and simulated-event qualifiers. -
Save the tool.
Test and publish the Copilot Studio agent
Validate the complete grounded launch-readiness answer, then publish the agent for continued testing.
-
Ask this question in the test pane:
For LP001, summarize the capacity gap, binding plant, leading eligible supplier, and simulated threshold breaches. Separate source facts, simulated evidence, and recommendations. -
Review the completed steps and response:
- The Fabric IQ Data MCP tool invokes the published
caldova_data_agent. - The response includes the same planning, supplier, and operational evidence returned in Fabric and Foundry.
- The response identifies operational events as simulated.
- The Fabric IQ Data MCP tool invokes the published
-
Select Publish, and publish the Copilot Studio agent.
-
Switch back to the test pane, and confirm that the published agent still returns the complete grounded launch-readiness result.
Validate the same facts across three agent experiences
In this task, you confirm that Fabric, Foundry, and Copilot Studio return the same planning, supplier, and operational evidence from one published Fabric data agent.
Estimated time: 15 minutes.
Run the shared prompt set
Run the same launch-readiness question through all three agents.
-
Open the published Fabric data agent, the Foundry agent test pane, and the Copilot Studio test pane.
-
Submit this prompt unchanged in all three experiences:
For LP001, summarize the capacity gap, binding plant, leading eligible supplier, and simulated threshold breaches. Separate source facts, simulated evidence, and recommendations.
Compare the results
Confirm that all three agents return the same core Caldova facts.
-
Check the responses for these expected results:
- The
LP001capacity gap is 18,900 units, or 7%. - The binding plant is
PL003. - The leading eligible supplier is Meridian Biologics.
- The simulated data contains four threshold breaches.
- The responses identify operational events as simulated.
- The
Core solution complete: Fabric, Microsoft Foundry, and Microsoft Copilot Studio return the same planning, supplier, and operational evidence. Continue with the optional extensions and ontology tasks.
Analyze customer sentiment
This optional extension adds customer evidence to the already working launch-readiness agent without changing the core planning, supplier, and operational path.
Estimated time: 25 minutes.
Create and load the customer database
Create the operational product and feedback tables so customer evidence uses the same Caldova product keys as the launch data.
-
Select + New item in the Caldova workspace, search for SQL database, and create
caldova_customer_db. -
Open
caldova_customer_db, and select New query. -
Open
Downloads\L300-unify-data\code\01-create-customer-database.txt.The file starts with
SET NOCOUNT ON, createsdbo.productanddbo.customer_feedback, loads the records, and ends with three validation queries. -
Copy the code into the query editor, and select Run.
-
Confirm the run completed successfully:
- The first result reports 25 products, matching
products.csv. - The second result reports 16 feedback records.
- The final result contains only
P101with 6 records,P104with 5 records, andP113with 5 records. - After you refresh the database explorer,
dbo.productanddbo.customer_feedbackappear under Tables.
- The first result reports 25 products, matching
Create the feedback shortcut
Make the submitted comments available to the Lakehouse as a read-only shortcut for sentiment analysis.
-
Return to
caldova_lakehouse, and select Get data > New shortcut. -
Select Microsoft OneLake > SQL database.
-
Select the current workspace and
caldova_customer_db. -
Select
customer_feedback, retain the table name, and select Create. -
Refresh Tables, open
customer_feedback, and confirm:- The table has a shortcut icon.
- It contains 16 rows mapped to
P101,P104, andP113. - The
Sentimentvalues can remain empty before scoring.
Fabric SQL automatically maintains the read-only OneLake analytical copy. Later scoring updates flow to the shortcut through mirroring.
Configure Azure OpenAI credential
Create the managed identity credential that allows Fabric SQL to call the provided Azure OpenAI endpoint without storing an API key.
-
Open a new query in
caldova_customer_db. -
Open
Downloads\L300-unify-data\code\02-create-azure-openai-credential.txt. The file creates theManaged Identitydatabase-scoped credential used to call Azure OpenAI. -
Replace each
<azure-openai-resource>placeholder with the provided Azure OpenAI resource name. -
Paste the updated code into the query editor, and select Run.
-
Expand Security > Database scoped credentials, and verify that the Azure OpenAI endpoint credential appears.
Run sentiment scoring
Create and run the sentiment procedure so each mapped feedback record receives a validated sentiment label for later agent analysis.
-
Open
Downloads\L300-unify-data\code\03-create-sentiment-procedure.txt. The file createsdbo.score_feedback_sentiment, callssp_invoke_external_rest_endpoint, validates the returned label, and updatesdbo.customer_feedback. -
Replace
<azure-openai-resource>with the provided Azure OpenAI resource name and<deployment-name>with the provided model deployment name. -
Paste the updated code into a new query, and select Run.
-
Verify that
dbo.score_feedback_sentimentappears under Programmability > Stored procedures. -
Open
Downloads\L300-unify-data\code\04-score-customer-feedback.txt. The file processes unscored records, checks for errors, and returns the sentiment counts. Copy the code into a new query, and select Run. -
Confirm that the sentiment counts total 16, every row has a valid
positive,negative,neutral, ormixedvalue, and record the distribution for later comparisons.
Add sentiment to the Fabric data agent
Add the feedback shortcut to the working agent, teach it how to use model-generated sentiment, validate the six P101 labels, and republish.
-
Return to
caldova_lakehouse. Wait for Fabric SQL mirroring to update the OneLake analytical copy, refresh Tables, and reopen thecustomer_feedbackshortcut. -
Confirm that all 16 rows contain
Sentimentvalues and no rows contain anAIError. -
Open
caldova_data_agent, and select Edit to work on its draft configuration. -
Edit the
caldova_lakehousesource, and addcustomer_feedback.
Tip: For easier copying, open
Downloads\L300-unify-data\code\07-add-sentiment-to-fabric-agent.txt.
Copy UPDATED LAKEHOUSE SOURCE INSTRUCTIONS:
launch_program has one row per launch and joins to product on ProductID. capacity_plan and batch join to launch_program on LaunchProgramID and to plant on PlantID. supplier joins to launch_program on LaunchProgramID and to product on ProductID. customer_feedback joins to product on ProductID and contains submitted comments. Sentiment is model-generated. Ignore customer_feedback rows where AIError is not null when analyzing sentiment. For eligible supplier comparisons, require a currently valid GMP certificate, zero open critical findings, fast-track eligibility, and enough qualified available capacity to cover the launch gap.
- Replace the
caldova_lakehouseData source instructions with the preceding instructions, and save them.
Copy SENTIMENT EXAMPLE:
What is the sentiment distribution for P101?
SELECT ProductID, Sentiment, COUNT(*) AS FeedbackCount
FROM dbo.customer_feedback
WHERE ProductID = 'P101'
AND AIError IS NULL
GROUP BY ProductID, Sentiment
ORDER BY Sentiment;
-
Add the preceding question and SQL query to the Lakehouse source.
-
Save the draft, and ask:
What is the sentiment count and distribution for P101? -
Expand the completed steps, and confirm that the response:
- Uses
dbo.customer_feedback. - Reports sentiment as model-generated.
- Returns only valid sentiment labels whose counts total 6 for
P101. - Matches the distribution recorded in
caldova_customer_db.
- Uses
-
Select Publish, publish the updated
caldova_data_agent, and confirm that the published version returns the six-recordP101sentiment distribution.
Add customer-feedback enrichment to the Fabric data agent
Sentiment supplies the broad tone of customer feedback. In this task, enrichment adds an issue category and priority so the agent can identify specific P101 concerns that could affect LP001.
Estimated time: 15 minutes.
Run the enrichment notebook
Create an enriched feedback table that classifies each comment by issue and converts sentiment into a follow-up priority linked to the affected Caldova product.
-
Return to the Fabric workspace, and select Import > Notebook > From this computer.
-
Import
Downloads\L300-unify-data\notebooks\05-enrich-caldova-feedback.ipynb. -
Open the imported notebook, select Add lakehouse, select Existing lakehouse, and attach
caldova_lakehouseas the default. -
Select Run all.
-
Confirm these enrichment outcomes:
-
The final output reports:
Validation passed: 16 feedback records enriched and written to customer_feedback_enriched. -
After you refresh Tables and open
customer_feedback_enriched, the table contains 16 rows withIssueCategory,ReviewPriority, andCategoryAIError. -
IssueCategoryusesdelivery,packaging,instructions,support,scheduling, orother. -
Negative sentiment receives
highpriority, mixed sentiment receivesmediumpriority, and positive or neutral sentiment receivesstandardpriority. -
The notebook retains the mapped
P101,P104, andP113ProductIDvalues.
-
Add the enriched source and republish
Extend the Fabric data agent so it can identify which products have high-priority feedback, the issue categories involved, and the supporting record counts.
-
Open
caldova_data_agent, and select Edit to work on its draft configuration. -
Edit the
caldova_lakehousesource, and addcustomer_feedback_enriched. -
Add this source instruction:
customer_feedback_enriched has one row per feedback record and joins to product on ProductID. IssueCategory is AI-generated. ReviewPriority is derived from analytical fields. Ignore category results where CategoryAIError is not null, report the number of records behind summaries, and identify these fields as analytical enrichment rather than verified customer intent. -
Add this example question and SQL query:
Which issue categories contain high-priority feedback for P101?SELECT ProductID, IssueCategory, COUNT(*) AS FeedbackCount FROM dbo.customer_feedback_enriched WHERE ProductID = 'P101' AND ReviewPriority = 'high' AND CategoryAIError IS NULL GROUP BY ProductID, IssueCategory ORDER BY FeedbackCount DESC, ProductID, IssueCategory;The query excludes failed classifications and retains the product key for explainable joins.
-
Save the draft, and ask:
For P101, which high-priority customer issue categories could affect LP001 readiness, and how many records support each category? -
Expand the completed steps, and confirm that the agent:
- Uses
customer_feedback_enriched. - Joins product context through
ProductID. - Returns
P101, the issue category, and the record count for high-priority feedback.
- Uses
-
Select Publish, publish the updated
caldova_data_agent, and confirm that the published version includes the enriched table.
The enrichment doesn't change the capacity gap, binding plant, supplier evidence, or operational exceptions. It adds customer concern themes that the ontology relates to the existing launch evidence in the next task.
Build an ontology and ontology-grounded Fabric data agent
As Caldova combines planning, feedback, supplier, and event data, implicit joins become harder to govern. In this task, you model those relationships in a Fabric ontology.
Estimated time: 30 minutes.
Create and bind the eight entities
Bind eight ontology entities to governed Lakehouse and Eventhouse sources so reusable business concepts retain their keys, properties, and evidence classifications.
-
Return to the workspace, select + New item, search for Ontology, and create
caldova_launch_ontology. -
Create the entity types and bind them as shown:
Entity type Source item Source table Key property LaunchProgramcaldova_lakehouselaunch_programLaunchProgramIDProductcaldova_lakehouseproductProductIDPlantcaldova_lakehouseplantPlantIDCapacityPlancaldova_lakehousecapacity_planCapacityPlanIDBatchcaldova_lakehousebatchBatchIDSuppliercaldova_lakehousesupplierCMOIDCustomerFeedbackcaldova_lakehousecustomer_feedback_enrichedFeedbackIDOperationalEventcaldova_eventsoperational_eventsEventID -
Repeat these steps for each entity:
-
Select Add entity type and enter the entity type name.
-
Select Bind data.
-
Select the source item and table from the binding table.
-
Select the key property.
-
Retain the identifier and descriptive properties needed for relationships and agent answers.
-
Save the binding and inspect at least one instance.
-
-
Include these properties at minimum:
Entity type Required properties LaunchProgramLaunchProgramID,ProductID,TargetLaunchVolume,QualifiedCapacity,CapacityGapUnits,CapacityGapPercent,BindingConstraintPlantID,StatusProductProductID,ProductName,TherapyArea,LifecycleStagePlantPlantID,PlantName,Country,GMPStatusCapacityPlanCapacityPlanID,LaunchProgramID,PlantID,AvailableCapacity,UtilizationPercentBatchBatchID,LaunchProgramID,PlantID,ProductID,BatchStatus,ProductionVolumeSupplierCMOID,CMOName,LaunchProgramID,ProductID,GMPCertStatus,OpenCriticalFindings,QualifiedAvailableCapacityUnits,LeadTimeWeeks,FastTrackEligible,WeightedScoreCustomerFeedbackFeedbackID,ProductID,FeedbackText,Sentiment,IssueCategory,ReviewPriority,CategoryAIErrorOperationalEventEventID,LaunchProgramID,ProductID,PlantID,CMOID,EventType,MetricName,MetricValue,Threshold,Severity,SourceSystem -
Add concise descriptions that distinguish source facts from analytical or simulated values. For example:
CustomerFeedback represents a submitted synthetic exercise comment. Sentiment, IssueCategory, and ReviewPriority are analytical enrichment and can be wrong.OperationalEvent represents simulated telemetry. Compare MetricValue with Threshold and don't describe an event as historical production evidence. -
Confirm that the ontology contains exactly eight entity types and that each entity opens at least one instance.
For binding guidance, see Data binding in ontology.
Create the ontology relationships
Connect the eight entities with nine directed relationships so launch, product, plant, supplier, feedback, and operational evidence can be traversed explicitly.
| Relationship | From entity and property | To entity and property |
|---|---|---|
launches |
LaunchProgram.ProductID |
Product.ProductID |
hasCapacityPlan |
LaunchProgram.LaunchProgramID |
CapacityPlan.LaunchProgramID |
plannedAt |
CapacityPlan.PlantID |
Plant.PlantID |
hasBatch |
LaunchProgram.LaunchProgramID |
Batch.LaunchProgramID |
runsAt |
Batch.PlantID |
Plant.PlantID |
evaluatesSupplier |
LaunchProgram.LaunchProgramID |
Supplier.LaunchProgramID |
receivesFeedback |
Product.ProductID |
CustomerFeedback.ProductID |
hasOperationalEvent |
LaunchProgram.LaunchProgramID |
OperationalEvent.LaunchProgramID |
eventAtPlant |
OperationalEvent.PlantID |
Plant.PlantID |
-
Select Add relationship type.
-
Enter the relationship name exactly as shown.
-
Select the source and target entities.
-
Map the source and target properties from the table.
-
Save the relationship.
-
Repeat until all nine relationships appear in the ontology graph.
-
Confirm these relationship outcomes:
- An
LP001instance resolves related instances throughlaunches,hasCapacityPlan,hasBatch,evaluatesSupplier, andhasOperationalEvent. - The
hasCapacityPlan>plannedAtpath resolves the related plant instance. - The
receivesFeedbackrelationship from productP101resolves related feedback instances.
- An
-
Save and publish
caldova_launch_ontology.
Create and publish the ontology-grounded agent
Create and publish an ontology-grounded agent that answers cross-source launch-readiness questions through named relationships.
-
Return to the workspace, select + New item, search for Data agent, and create
caldova_ontology_agent. -
Select Add a data source, add
caldova_launch_ontology, and confirm that all eight entities and nine relationships appear. -
Open Agent instructions, and enter:
You are Caldova's ontology-grounded launch-readiness assistant. Use the ontology entities and relationships to answer cross-source questions. For LP001, traverse launches, hasCapacityPlan, plannedAt, hasBatch, runsAt, evaluatesSupplier, receivesFeedback, hasOperationalEvent, and eventAtPlant as needed. Treat sentiment and issue classification as analytical enrichment and operational events as simulated evidence. State record counts, name the relationships used, separate facts from recommendations, and never treat a supplier result as procurement approval. -
Save the instructions.
-
Ask:
For LP001, explain the capacity gap, binding plant, leading eligible supplier, related customer-feedback themes, and simulated operational breaches. Name the ontology relationships used. -
Expand the completed steps, and confirm that the agent traverses multiple entities.
-
Select Publish, publish
caldova_ontology_agent, and confirm its published state.
Validate the ontology-grounded agent
Caldova needs proof that semantic relationships improve traceability without changing source facts. In this task, you compare direct and ontology-grounded answers for the same decisions.
Estimated time: 10 minutes.
Run cross-source prompts
Compare direct and ontology-grounded answers to confirm that semantic traversal improves traceability without changing governed facts or required evidence qualifiers.
-
Open
caldova_data_agentandcaldova_ontology_agent. -
Ask both agents:
For LP001, trace the launch to its product, binding plant, leading eligible supplier, customer-feedback issue categories, and simulated threshold breaches. State counts and identify the relationships or keys used. -
Ask both agents:
Does the customer and operational evidence change the capacity-gap fact or the supplier eligibility result? Separate source facts, analytical enrichment, simulated evidence, and recommendation. -
Record the results:
Criterion Direct caldova_data_agentcaldova_ontology_agentCapacity gap remains 18,900 units and 7% Record result Record result Binding plant remains PL003Record result Record result Leading eligible supplier remains Meridian Biologics Record result Record result Four simulated threshold breaches Record result Record result Sentiment and categories match current tables Record result Record result Product-to-feedback connection is traceable Record keys used Record relationship used Launch-to-event-to-plant path is traceable Record keys used Record relationships used Evidence types remain qualified Record result Record result -
Review the ontology agent's completed steps and comparison table:
- The cross-source answer uses
receivesFeedback,hasOperationalEvent, andeventAtPlant. - Both agents preserve the same governed facts even when their reasoning paths differ.
- The cross-source answer uses
Ontology solution complete: You now have direct and ontology-grounded agents that preserve the same governed facts through different reasoning paths.
Summary
In this exercise, you:
- Built the Fabric planning foundation and streamed simulated operational events to Lakehouse and Eventhouse destinations.
- Built and published the initial Fabric data agent over planning, supplier, batch, plant, and operational evidence.
- Reviewed discovery, security, governance, and lineage in OneLake catalog.
- Grounded Foundry and Copilot Studio agents through the initial Fabric data agent and validated the same core evidence.
- Created the customer database and shortcut, scored sentiment, and extended the Fabric data agent with customer evidence.
- Added customer-feedback issue-category enrichment to the Fabric data agent.
- Built and validated an eight-entity, nine-relationship ontology and ontology-grounded agent.
You have successfully completed this exercise.
Clean up
Now that you've finished the exercise, delete the cloud resources you created to avoid unnecessary resource usage. Preserve shared resources managed by the training environment.
Estimated time: 5 minutes.
-
Delete
Caldova launch readinessin Microsoft Copilot Studio. -
Open the Azure portal{:target="_blank"} at
https://portal.azure.com/. -
Delete the
caldova-foundry-<initials>-rgresource group you created for the Foundry project. -
Open the Caldova workspace in Fabric.
-
Select Workspace settings > General > Remove this workspace.
-
Enter the workspace name, confirm deletion, and verify that it no longer appears under Workspaces.
-
Don't delete the shared Fabric capacity, sentiment Azure OpenAI resource and deployment, Copilot Studio environment, or shared connections.