Items marked (preview) in this article are currently in public preview. This preview is provided without a service-level agreement, and we don’t recommend it 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.
- Builder annotations: Builders and domain experts annotate traces from the Foundry portal while reviewing agent interactions. These annotations are automatically tagged with a source of
builder. - End user feedback: Log annotations programmatically from your application when end users provide thumbs up or thumbs down feedback. These annotations carry a source of
end_userand appear on the trace page alongside builder annotations. For details on logging end user feedback, see Log end user feedback.
Prerequisites
- A Foundry project with an Application Insights resource connected. See Set up tracing.
- OpenTelemetry instrumentation configured in your application. See Set up tracing in Microsoft Foundry for setup instructions.
-
For programmatic annotations: the
azure-ai-projectsandazure-monitor-opentelemetrypackages installed.
Default scoring template
Every Foundry project is preseeded with a default thumbs up/down scoring template that is immediately available with no additional setup. You can start annotating traces on day one. The default template uses binary pass/fail scoring:- Thumbs up = score
1.0, labelpass - Thumbs down = score
0.0, labelfail
gen_ai.evaluation.name attribute to have value task_completion so every annotation is attributable to a specific evaluation dimension. task_completion supports thumbs up and down.
Annotate traces in the Foundry portal
Add annotations directly from the trace detail page to record your assessment of agent responses.- Open your Foundry project and navigate to Tracing in the left navigation.
- Select a trace to open the trace detail view.
- On the trace detail page, select the Annotate button in the upper-right corner.
- Select Thumbs up or Thumbs down to submit your score. Optionally add a free-text explanation.
- The annotation saves immediately and appears on the trace.

microsoft.gen_ai.human_evaluation.source="builder"- Records will be with
microsoft.gen_ai.evaluation.actor.typeas"human"
Score editing
Each user can annotate multiple times, however:- Multiple users can each have their own annotation of the same type on the same trace.
- Prior annotations are never deleted in Application Insights, new annotations are appended, and the portal displays all annotations in Annotation History section of annotation panel.
Log end user feedback as trace annotations
When end users provide thumbs up or thumbs down feedback in your application, you can log that feedback so it appears as annotations on the corresponding trace. This approach uses thegen_ai.evaluation.result OpenTelemetry event, with the feedback automatically correlated to the originating trace.
Annotation attribute schema
Use the following attributes when you emit a thumbs up or thumbs down annotation:
You must emit the evaluation event within the same trace context (using the same trace ID and span ID) as the agent interaction it annotates. This correlation ensures the annotation appears on the correct trace in the portal.
For a complete runnable example, see sample_human_evaluations.py.
View annotations on the trace page
After you add annotations (from the portal or programmatically), they appear on the trace detail page.- Open your Foundry project and go to Tracing.
- Select a trace that has annotations.
- On the trace detail page, annotation icons appear next to the annotated spans. A thumbs up icon indicates positive feedback and a thumbs down icon indicates negative feedback.
- Hover over an annotation to see metadata, including the source (
builderorend_user), evaluation name, and timestamp.
Filter traces by annotation
You can filter the trace list by:- Evaluation type (
gen_ai.evaluation.name): value is"task_completion". - Score value or label (
gen_ai.evaluation.score.value,gen_ai.evaluation.score.label): for example, show only traces with a thumbs-down rating. - Source (
microsoft.gen_ai.human_evaluation.source): show only builder annotations or only end-user feedback.