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

# Overview

> Core eval workflow using the Evidently library at a glance.

## Define and run the eval

> [!TIP]
>
> To log the evaluation results to the Evidently Platform, first connect to [Evidently Cloud](https://docs.evidentlyai.com/docs/setup/cloud) or your [local workspace](https://docs.evidentlyai.com/docs/setup/self-hosting.md) and [create a Project](https://docs.evidentlyai.com/docs/platform/projects_manage.md). It's optional: you can also run evals locally in Python.

**1. Prepare the input data**

Get your data in a table like a `pandas.DataFrame`. More on [data requirements](https://docs.evidentlyai.com/docs/library/overview.md#dataset). You can also [load data](https://docs.evidentlyai.com/docs/platform/datasets_workflow.md) from Evidently Platform, like tracing data you captured or synthetic datasets.

**2. Create a Dataset object**

Create a Dataset object with `DataDefinition()` that specifies column role and types. You can also use default type detection. [How to set Data Definition](https://docs.evidentlyai.com/docs/library/data_definition.md).

```python theme={null}
eval_data = Dataset.from_pandas(
    source_df,
    data_definition=DataDefinition()
)
```

**3. (Optional) Add descriptors**

For LLM and text evals, define row-level `descriptors` to compute. Here, you can use a variety of methods, from deterministic to LLM judges. Optionally, add row-level tests to get explicit pass/fail outcomes on set conditions. [How to use Descriptors](https://docs.evidentlyai.com/docs/library/descriptors.md).

```python theme={null}
eval_data.add_descriptors(descriptors=[
    TextLength("Question", alias="Length"),
    Sentiment("Answer", alias="Sentiment")
])
```

**4. Configure Report**

For dataset-level evals (classification, data drift) or to summarize descriptors, create a `Report` with chosen `metrics`  or `presets`. How to [configure Reports](https://docs.evidentlyai.com/docs/library/report.md).

```python theme={null}
report = Report([
    DataSummaryPreset()
])
```

**5. (Optional) Add Test conditions**

Add dataset-level Pass/Fail conditions, like to check if all texts in the dataset are in \< 100 symbols length. How to [configure Tests](https://docs.evidentlyai.com/docs/library/tests.md).

```python theme={null}
report = Report([
    DataSummaryPreset(),
    MaxValue(column="Length", tests=[lt(100)]),
])
```

**6. (Optional) Add Tags and Timestamps**

Add `tags` or `metadata` to identify specific evaluation runs or datasets, or override the default `timestamp `. [How to add metadata](https://docs.evidentlyai.com/docs/library/tags_metadata.md).

**7. Run the Report**

To execute the eval, `run`the Report on the `Dataset` (or two).

```python theme={null}
my_eval = report.run(eval_data, None)
```

**8. Explore the results**

* To upload to the Evidently Platform. [How to upload results](https://docs.evidentlyai.com/docs/platform/evals_api.md).

```python theme={null}
ws.add_run(project.id, my_eval, include_data=True)
```

* To view locally. [All output formats](https://docs.evidentlyai.com/docs/library/output_formats.md).

```python theme={null}
my_eval
##my_eval.json()
```

## Quickstarts

Check for end-to-end examples:

> [card] [LLM quickstart](https://docs.evidentlyai.com/quickstart_llm.md)
>
> Evaluate the quality of text outputs.

> [card] [ML quickstart](https://docs.evidentlyai.com/quickstart_ml.md)
>
> Test tabular data quality and data drift.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.