Bilješka
Pristup ovoj stranici zahtijeva provjeru vjerodostojnosti. Možete pokušati da se prijavite ili promijenite direktorije.
Pristup ovoj stranici zahtijeva provjeru vjerodostojnosti. Možete pokušati promijeniti direktorije.
Warning
Prompt flow in Microsoft Foundry and Azure Machine Learning will be retired on April 20, 2027. Prompt flow is no longer recommended for new development. Migrate existing Prompt flow applications and deployments to Microsoft Agent Framework before April 20, 2027.
Prompt flow container images are no longer receiving updates, including security and package updates. This applies to Prompt
flow runtime images, including promptflow-runtime, promptflow-runtime-stable, and promptflow-python.
After April 20, 2027, Prompt flow, including the web authoring experience in Microsoft Foundry and Azure Machine Learning, the VS Code extensions, and related Prompt flow container images, will no longer be supported or available.
If your application depends on Prompt flow deployments or runtime images, plan to move those workloads to supported alternatives such as Microsoft Agent Framework before the retirement date. For migration guidance, see the Prompt flow migration guide and migration code samples.
Use Azure Machine Learning model monitoring to track the quality of an existing generative AI application deployed to a managed online endpoint. The monitor evaluates collected prompts and completions on a recurring schedule and displays metric trends and alerts in Azure Machine Learning studio.
Prompt Flow deployments on Azure Machine Learning managed online endpoints don't have a direct Microsoft Agent Framework equivalent. Review the migration options before you change an existing deployment.
Important
Model monitoring for generative AI applications is currently in public preview. This preview is provided without a service-level agreement and isn't recommended for production workloads. Certain features might not be supported or might have constrained capabilities. For more information, see Supplemental Terms of Use for Microsoft Azure Previews.
Prerequisites
- An Azure Machine Learning workspace.
- An Azure OpenAI resource with quota for an evaluator model deployment. Model availability changes over time. Review Azure OpenAI model retirements and deprecations before you create the deployment.
- A user-assigned managed identity attached to the workspace. Grant the identity the least-privileged permissions required to access the workspace and the connected Azure OpenAI resource. To create role assignments, your identity needs the
Microsoft.Authorization/roleAssignments/writepermission at the required scope. - An Azure OpenAI workspace connection that uses the managed identity. Keep this connection for as long as the monitor uses it.
- An existing prompt flow deployment on an Azure Machine Learning managed online endpoint. This procedure is intended for workloads that you maintain until you migrate from prompt flow.
Prepare the deployment
Configure the deployed flow to collect the inputs and outputs required by the monitoring metrics:
- Create a compute session, and run your prompt flow.
- Deploy the flow to a managed online endpoint.
- Under Basic settings, enable Inference data collection.
- Under Advanced settings > Outputs & Connections, select
completionand any outputs required by the metrics that you plan to use, such ascontextorground_truth. - Confirm that the collected input data contains a prompt column and that the collected output data contains a completion column. Record the exact column names for the monitor configuration.
Note
If your compute instance is behind a VNet, see Network isolation in prompt flow.
Understand evaluation metrics
The monitor uses an Azure OpenAI model deployment as an evaluator. It applies evaluation instructions to the collected prompt, completion, and supporting data. For detailed metric definitions and interpretation guidance, see Monitoring evaluation metrics descriptions and use cases.
| Metric | Prompt | Completion | Context | Ground truth |
|---|---|---|---|---|
| Coherence | Required | Required | Not required | Not required |
| Fluency | Required | Required | Not required | Not required |
| Groundedness | Required | Required | Required | Not required |
| Relevance | Required | Required | Required | Not required |
| Similarity | Required | Required | Not required | Required |
Create the monitor
Create a generation safety and quality signal from the data collected by your deployed flow:
- In Azure Machine Learning studio, go to the monitoring overview for your workspace, and create a model monitor.
- For the model task type, select Prompt & completion.
- Select the input and output data assets created by Model Data Collector, and add a generation safety and quality monitoring signal.
- Select the workspace connection for the Azure OpenAI evaluator resource, enter the evaluator deployment name, and map the prompt and completion columns. Map the context or ground-truth columns required by the metrics you select.
- Keep the automatically generated join configuration unless your data assets use a custom identifier. Model Data Collector generates
correlationidto correlate input and output records. Confirm the exact field name in each data asset before you customize the join. - Configure the available metric thresholds, sampling rate, schedule, and notification recipients. Then review the configuration, and create the monitor.
Confirm the monitoring status
On the monitor overview, confirm that the scheduled monitoring pipeline job completes successfully. If the job fails, review its logs and verify the workspace connection, evaluator deployment, data assets, and mapped column names.
Review monitoring results
Use the signal details to review metric trends and respond to alerts:
- On the monitor overview, review the status and performance of each monitoring signal.
- Open the generation safety and quality signal to view metric trends and score distributions.
- Review alerts for metrics that don't meet the configured thresholds.
- Adjust the thresholds or notification settings when your monitoring requirements change.