> ## Documentation Index
> Fetch the complete documentation index at: https://arize-ax.mintlify.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Trace LangChain Agent & Microsoft Risk+Safety Evaluators (Microsoft Foundry)

> Comprehensive Tracing and Evaluation tutorial with Microsoft Foundry Agents and Evaluators

Deploy and orchestrate AI agents at scale - governed, observable, and integrated for enterprise transformation. [<u>Microsoft Foundry</u>](https://azure.microsoft.com/en-us/products/ai-foundry) offers a rich library of enterprise-grade evaluation capabilities such as Risk and Safety, while [<u>Arize AX</u>](https://arize.com/generative-ai/) delivers observability, evaluation and experimentation workflows for continuous improvement. Combined, they let organizations close the loop between insight and action, transforming Responsible AI from policy into practice. The result is a continuous feedback system where the same evaluators that power offline testing also monitor live production traffic. Data moves seamlessly from trace logs to evaluation results to experiment dashboards.\
\
This tutorial follows examples illustrated in this blog:

<Card title="Blog: Evaluating and Improving AI Agents at Scale with Microsoft Foundry" icon="sparkles" iconType="solid" color="#0dcfef" horizontal href="https://arize.com/blog/evaluating-and-improving-ai-agents-at-scale-with-microsoft-foundry/" />

This tutorial covers two sections:

### **1. Azure AI Foundry and Arize for Agent Observability and Evaluation**

This notebook demonstrates how to:

1. Build a LangChain multi-chain agent on Azure AI Foundry while tracing all operations to Arize AX for observability
2. Leverage Microsoft Risk and Safety Evaluators to evaluate LLM behavior
3. Log evaluation results to Arize AX for visibility

<Card title="Notebook Tutorial - Foundry Agent Observability and Evaluation" icon="sparkles" iconType="solid" color="#0bdfef" horizontal href="https://github.com/Arize-ai/tutorials/blob/main/python/llm/agents/Azure%2BArize_observability_evaluations.ipynb" />

*Screenshot shows Arize AX Agent graph view with aggregate span level  evaluation performance*

![Microsoft Foundry Agent Observability Agent Graph](https://storage.googleapis.com/arize-phoenix-assets/assets/images/microsoft-foundry-agent-observability-agent-graph.png)

*Screenshot showing Microsoft hate and unfairness evaluation metric attached to a span.*

![Arize Ax Microsoft Foundry Trace Unfairness](https://storage.googleapis.com/arize-phoenix-assets/assets/images/arize-ax-microsoft-foundry-trace-unfairness.png)

*Screenshot showing summarized dashboard with key observability metrics and evaluation KPI metrics*

![Arize Ax Dash](https://storage.googleapis.com/arize-phoenix-assets/assets/images/arize-ax-dash.png)

### **2. Azure Risk and Safety Evaluators on Arize Datasets+Experiments**

This notebook demonstrates how to leverage Azure Risk and Safety Evaluators with Arize Datasets+Experiments to track and visualize experiments and evaluations in the Arize.

We will use the Hate Unfairness Evaluator to evaluate the output an Azure AI Foundry agent.

<Card title="Notebook Tutorial - Using Foundry Evaluators on Arize Datasets + Experiments" icon="sparkles" iconType="solid" color="#0bf3ee" horizontal href="https://github.com/Arize-ai/tutorials/blob/main/python/llm/agents/Azure%2BArize_evaluators-datasets.ipynb" />

*Screenshot showing experiment runs on the dataset, comparison of evaluation hate and unfairness metric in Arize AX*

![Arize Ax Experiment Runs](https://storage.googleapis.com/arize-phoenix-assets/assets/images/arize-ax-experiment-runs.png)

*Screenshot showing row level comparison of experiment runs in Arize AX with hate and unfairness scores, labels and explanations.*

![Arize Ax Prompts](https://storage.googleapis.com/arize-phoenix-assets/assets/images/arize-ax-prompts.png)
