An organization is deploying a large language model inference endpoint using Azure Machine Learning managed online endpoints. The security team requires that inference requests containing PII must be detected and logged separately for compliance purposes. What is the recommended approach to implement this within the Azure ML inference pipeline?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Here's the deal — b is correct because Azure Machine Learning managed online endpoints execute a scoring script (score.py) that can be customized to include pre-processing logic. Adding a call to Azure AI Language's PII detection service within the scoring script enables real-time PII detection on each inference request before it reaches the model, with results logged to a separate compliance logging store.
Full explanation below image
Full Explanation
B is correct because Azure Machine Learning managed online endpoints execute a scoring script (score.py) that can be customized to include pre-processing logic. Adding a call to Azure AI Language's PII detection service within the scoring script enables real-time PII detection on each inference request before it reaches the model, with results logged to a separate compliance logging store. This approach integrates seamlessly within the existing ML deployment without external proxy infrastructure. A is incorrect because adding APIM as a proxy adds latency and infrastructure complexity; it also requires APIM to have visibility into request bodies which requires careful configuration. C is incorrect because Purview DLP on inference request logs would provide after-the-fact compliance scanning, not real-time detection during inference. D is incorrect because Application Insights provides telemetry infrastructure but does not itself perform PII detection; the PII detection logic must still be implemented in the scoring script.