---
type: concept
x-llmwiki:
  schemaVersion: "0.1"
  contentHash: 04933f9a1e01223a66d164106f66bb7c906186eb9d1439928564d287aaad8ebd
  pageDirectory: concepts
  sources:
    - access-trace-data-databricks-on-aws.md
  confidence: 0.95
  provenanceState: extracted
  freshnessStatus: unverified
  aliases:
    - assessments-on-traces
    - AOT
    - AssessmentSource
  citations:
    - file: access-trace-data-databricks-on-aws.md
title: Assessments on Traces
description: Traces support assessments (feedback and expectations) searchable by name, type, span_id, with details like value, source, rationale, and metadata.
tags:
  - mlflow
  - evaluation
  - assessments
timestamp: "2026-06-18T10:38:13.712Z"
---

# Assessments on Traces

**Assessments** are evaluation annotations attached to [[MLflow Trace|MLflow Traces]] that capture human feedback, automated evaluation results, and other quality metrics for generative AI application interactions. They enable systematic tracking of model performance, user satisfaction, and application behavior over time.

## Overview

Assessments on traces represent evaluative judgments about the quality, correctness, or appropriateness of a trace's outputs. Each assessment records a value, source, and optional rationale, providing a structured way to capture both human and automated evaluation results alongside the execution data they evaluate.^[access-trace-data-databricks-on-aws.md]

Assessments can be attached at the trace level or to individual Spans within a trace, allowing for evaluation of specific components of an application (such as a retriever or a specific tool call) as well as the overall interaction.^[access-trace-data-databricks-on-aws.md]

## Assessment Properties

Each assessment contains the following properties:

| Property | Description |
|---|---|
| **name** | The name of the assessment (e.g., "helpfulness", "correctness") |
| **value** | The assessment value (e.g., a score, rating, or boolean) |
| **source** | Origin information including `source_type` (e.g., "human", "automated") and `source_id` |
| **rationale** | Optional explanation for the assessment |
| **metadata** | Optional additional contextual data |
| **error** | Optional error information if the assessment failed |
| **span_id** | Optional identifier linking the assessment to a specific span |

^[access-trace-data-databricks-on-aws.md]

## Assessment Types

### Feedback Assessments

Feedback assessments represent explicit human judgments, such as user ratings or annotations. These typically come from:
- End-user feedback collected through application interfaces
- Developer annotations made during testing and debugging
- Expert review annotations from domain specialists

### Expectation Assessments

Expectation assessments represent automated evaluation results comparing outputs against expected values or predefined criteria. These are typically generated by evaluation tools such as [MLflow Evaluation](/concepts/mlflow-evaluation-ui.md) scorers.^[access-trace-data-databricks-on-aws.md]

## Searching Assessments

### Get All Assessments

Use `search_assessments()` to retrieve all assessments on a trace:

```python
all_assessments = trace.search_assessments()
print(f"Total assessments: {len(all_assessments)}")
```

^[access-trace-data-databricks-on-aws.md]

### Search by Name

Filter assessments by their name to find specific evaluation metrics:

```python
helpfulness = trace.search_assessments(name="helpfulness")
if helpfulness:
    assessment = helpfulness[0]
    print(f"Helpfulness: {assessment.value}")
    print(f"Source: {assessment.source.source_type} - {assessment.source.source_id}")
    print(f"Rationale: {assessment.rationale}")
```

^[access-trace-data-databricks-on-aws.md]

### Search by Type

Filter assessments by their type (`"feedback"` or `"expectation"`):

```python
feedback_only = trace.search_assessments(type="feedback")
expectations_only = trace.search_assessments(type="expectation")
print(f"Feedback assessments: {len(feedback_only)}")
print(f"Expectation assessments: {len(expectations_only)}")
```

^[access-trace-data-databricks-on-aws.md]

### Search by Span ID

Find assessments attached to a specific span:

```python
span_assessments = trace.search_assessments(span_id=retriever_span.span_id)
print(f"Assessments for retriever span: {len(span_assessments)}")
```

^[access-trace-data-databricks-on-aws.md]

### Including Overridden Assessments

Get all assessments, including those that have been overridden by more recent evaluations:

```python
all_including_invalid = trace.search_assessments(all=True)
print(f"All assessments (including overridden): {len(all_including_invalid)}")
```

^[access-trace-data-databricks-on-aws.md]

### Combining Search Criteria

Multiple criteria can be combined to narrow results:

```python
human_feedback = trace.search_assessments(
    type="feedback",
    name="helpfulness"
)
for fb in human_feedback:
    print(f"Human feedback: {fb.name} = {fb.value}")
```

^[access-trace-data-databricks-on-aws.md]

## Accessing Assessment Details

Access detailed properties of each assessment through iteration:

```python
for assessment in trace.info.assessments:
    print(f"\nAssessment: {assessment.name}")
    print(f"  Type: {type(assessment).__name__}")
    print(f"  Value: {assessment.value}")
    print(f"  Source: {assessment.source.source_type.value}")
    print(f"  Source ID: {assessment.source.source_id}")
    if assessment.rationale:
        print(f"  Rationale: {assessment.rationale}")
    if assessment.metadata:
        print(f"  Metadata: {assessment.metadata}")
    if assessment.error:
        print(f"  Error: {assessment.error}")
    if hasattr(assessment, 'span_id') and assessment.span_id:
        print(f"  Span ID: {assessment.span_id}")
```

^[access-trace-data-databricks-on-aws.md]

## Integration with [MLflow Tracing](/concepts/mlflow-tracing.md)

Assessments are a key component of the [MLflow Tracing](/concepts/mlflow-tracing.md) ecosystem. They integrate with:

- **[MLflow Evaluation](/concepts/mlflow-evaluation-ui.md)**: Automated scorers produce expectation assessments
- **[MLflow Human Feedback Collection](/concepts/mlflow-human-feedback-collection.md)**: End-user ratings and annotations become feedback assessments
- **[MLflow Experiment Tracking](/concepts/mlflow-experiment-tracking.md)**: Assessments persist alongside trace data in MLflow experiments

## Best Practices

- **Use descriptive assessment names** (e.g., "helpfulness", "correctness", "safety") to make filtering and analysis easier
- **Provide rationale** when possible to give context to scores and ratings
- **Attach assessments to specific spans** when evaluating individual components rather than the whole trace
- **Consider type classification** to distinguish between human feedback and automated evaluation results
- **Handle overrides gracefully** by checking the `all` parameter when complete history is needed

## Related Concepts

- [[MLflow Trace|MLflow Traces]] — The execution records that assessments evaluate
- [MLflow Tracing](/concepts/mlflow-tracing.md) — The framework for capturing and analyzing traces
- Spans — Individual operations within a trace that can be assessed independently
- [MLflow Evaluation](/concepts/mlflow-evaluation-ui.md) — Automated evaluation that produces expectation assessments
- [MLflow Human Feedback Collection](/concepts/mlflow-human-feedback-collection.md) — Manual evaluation that produces feedback assessments

## Sources

- access-trace-data-databricks-on-aws.md

# Citations

1. [access-trace-data-databricks-on-aws.md](/references/access-trace-data-databricks-on-aws-0c458734.md)
