> For the complete documentation index, see [llms.txt](https://docs.seldon.ai/seldon-core-2/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.seldon.ai/seldon-core-2/v2.10/user-guide/data-science-monitoring/explainers.md).

# Explainability

Explainers are Model resources with some extra settings. They allow a range of explainers\
from the Alibi-Explain library to be run on MLServer.

An example Anchors explainer definitions is shown below.

```yaml
# samples/models/income-explainer.yaml
apiVersion: mlops.seldon.io/v1alpha1
kind: Model
metadata:
  name: income-explainer
spec:
  storageUri: "gs://seldon-models/scv2/samples/mlserver_1.5.0/income-sklearn/anchor-explainer"
  explainer:
    type: anchor_tabular
    modelRef: income
```

The key additions are:

* `type`: This must be one of the[supported Alibi Explainer types](https://github.com/SeldonIO/MLServer/blob/191ee44297712192fed882afe0797d6a2732965e/runtimes/alibi-explain/mlserver_alibi_explain/alibi_dependency_reference.py#L15-L19)\
  supported by the Alibi Explain runtime in MLServer.
* `modelRef`: The model name for black box explainers.
* `pipelineRef`: The pipeline name for black box explainers.

Only one of modelRef and pipelineRef is allowed.

## Pipeline Explanations

Blackbox explainers can explain a Pipeline as well as a model. An example from the [Huggingface sentiment demo](https://github.com/SeldonIO/seldon-core/blob/release-2.10/examples/speech-to-sentiment.md) is show below.

```yaml
# samples/models/hf-sentiment-explainer.yaml
apiVersion: mlops.seldon.io/v1alpha1
kind: Model
metadata:
  name: sentiment-explainer
spec:
  storageUri: "gs://seldon-models/scv2/examples/huggingface/speech-sentiment/explainer"
  explainer:
    type: anchor_text
    pipelineRef: sentiment-explain
```

## Examples

* [Tabular income classification model with Anchor Tabular black box model explainer](/seldon-core-2/v2.10/user-guide/examples/income.md)
* [Huggingface Sentiment model with Anchor Text black box pipeline explainer](/seldon-core-2/v2.10/user-guide/examples/speech-to-sentiment.md)
* [Anchor Text movies sentiment explainer](/seldon-core-2/v2.10/user-guide/examples/explainer-examples.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.seldon.ai/seldon-core-2/v2.10/user-guide/data-science-monitoring/explainers.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
