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

# Multimodal Evals

> Map image, audio, and PDF variables with Use as file, choose input modes, and check supported formats and PDF limits for judge evaluators.

Evaluate images, audio, and PDFs alongside text by passing media from your traces or datasets to an [LLM-as-a-judge](/docs/ax/evaluate/evaluators/llm-as-a-judge.md) evaluator.

## Prerequisites

* Traces or datasets containing media recorded using OpenInference attributes. See [Multimodal tracing](/docs/ax/instrument/multimodal-tracing.md).
* An [AI provider integration](/docs/ax/security-and-settings/integrations-playground/overview.md) with a model that supports the required input modalities (Image, Audio, or PDF).

[Decision Judge](/docs/ax/evaluate/decision-judge.md) evaluators support text inputs only.

## Create a multimodal evaluator

1. In **Evaluators**, create an LLM-as-a-judge evaluator from scratch or from a template.
2. Write a prompt with variables for your media and text inputs.
3. Select a judge model that supports your media types.
4. Under **Variable Mappings**, map each variable to a dataset column or span attribute.
5. Enable **Use as file** for media variables. Leave text variables as text.
6. Use **Test Evaluator** or the preview to verify your mappings.
7. Save the evaluator and attach it to an online or offline task.

### Example: PDF groundedness

This prompt evaluates whether an agent's answer is supported by a source PDF.

```text theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
You are evaluating whether the assistant's answer is supported by the attached PDF.

Question:
{question}

Assistant answer:
{output}

Attached PDF: {pdf}

Label grounded if every claim is supported by the PDF.
Label not_grounded if any claim invents content.
Label needs_review if the PDF is unreadable or insufficient.
```

Map `{question}` and `{output}` as text. Map `{pdf}` to `attributes.input.documents.0.document.url` or the corresponding message-level document attribute, with **Use as file** enabled.

![Arize AX evaluator page for a PDF groundedness LLM-as-a-judge eval using claude-sonnet-5-5, showing the template with question, output, and pdf variables, and grounded, needs\_review, and not\_grounded labels](https://storage.googleapis.com/arize-assets/doc-images/multimodal/pdf-groundedness-evaluator.webp)

A PDF groundedness LLM-as-a-judge evaluator with question, output, and pdf variables.

Results appear on the span's **Evaluations** tab, with the label, score, and the judge's explanation.

![Evaluations tab on an analyze-invoice span showing a pdf\_groundedness result labeled needs\_review with score 0, and an explanation that cites the invoice number, due date, and total read from the attached PDF](https://storage.googleapis.com/arize-assets/doc-images/multimodal/pdf-groundedness-eval-result.webp)

The judge's result on a span with an attached PDF, including its explanation.

## Variable mappings

The input mode determines how each variable is passed to the judge.

| Mode | What the judge receives | Example |
| - | - | - |
| Text | Raw string (default) | Prompts, responses, URLs |
| Image | Image content part | Receipts, screenshots |
| Audio | Audio content part | Voice clips, call recordings |
| Document | PDF content part | Invoices, contracts, scanned forms |

When a mapping resolves to media, the UI displays an image thumbnail, audio control, or PDF icon.

Images and audio can be detected automatically from attribute paths when no input mode is set. PDFs require an explicit document mode; otherwise, the URL is passed as text.

Arize AX warns you before running an evaluator if the selected model does not support a mapped modality.

### Map media from traces

| Content | Example attribute path | Mode |
| - | - | - |
| Message-level image | `attributes.llm.input_messages.0.message.contents.1.message_content.image.image.url` | Image |
| Span-level image | `attributes.input.images.0.image.url` | Image |
| Audio clip | `attributes.input.audio.url` | Audio |
| Message-level PDF | `attributes.llm.input_messages.0.message.contents.2.message_content.document.document.url` | Document |
| Span-level PDF | `attributes.input.documents.0.document.url` | Document |
| Structured output | `attributes.output.value` | Text |

To evaluate whether extracted receipt fields match the source image, map `{image}` as a file and `{output}` as text. See [Evaluate receipt agents with an image judge](/docs/ax/cookbooks/evaluate/evaluate-receipt-agents-with-image-judge.md) for a full walkthrough.

### Map an attribute as both text and a file

You can map the same attribute to multiple variables. For example, pass a PDF as a file and its URL as text so the judge can reference the link in its explanation.

```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "column_mappings": {
    "pdf": "attributes.input.documents.0.document.url",
    "link": "attributes.input.documents.0.document.url"
  },
  "input_modes": {
    "pdf": "DOCUMENT",
    "link": "TEXT"
  }
}
```

In the UI, create two mappings to the same attribute and enable **Use as file** only for `{pdf}`.

## Supported media

| Modality | Formats |
| - | - |
| Images | PNG, JPEG, GIF, WebP |
| Audio | WAV, MP3/MPEG, OGG, Opus, WebM |
| PDFs | `application/pdf` only |
| Video | Not supported as an eval file input |

Image formats match those supported by tracing previews. Other `audio/*` formats may be detected automatically.

For video, map a transcript as text or a frame URL as an image instead.

### PDF inputs

PDF file mode accepts:

* Base64 data URIs (`data:application/pdf;base64,...`)
* `arize://` references created when inline PDFs are offloaded at ingestion
* HTTPS URLs
* Object storage URLs (`gs://`, `s3://`, `azure://`) when your space supports signing for the generative path

PDFs are subject to the following constraints:

* Only `application/pdf` is supported.
* PDF content is sent under the user role in the judge request.
* Oversized attachments fail without retries. Use HTTPS or object storage URLs for large files.
* Provider Files API IDs (`document.id`) are not retrieved as eval inputs. Map `document.url` or a dataset column containing a URL or data URI instead.

## REST API

When creating or updating evaluators and tasks through the REST API, include `input_modes` alongside `column_mappings`.

Supported values are `TEXT`, `IMAGE`, `AUDIO`, and `DOCUMENT`. Omitting the mode allows image and audio auto-detection. PDFs require `DOCUMENT`.

## Related resources

* [Multimodal tracing](/docs/ax/instrument/multimodal-tracing.md)
* [LLM-as-a-judge](/docs/ax/evaluate/evaluators/llm-as-a-judge.md)
* [Run evals on your data](/docs/ax/evaluate/run-evals.md)
* [Evaluate receipt agents with an image judge](/docs/ax/cookbooks/evaluate/evaluate-receipt-agents-with-image-judge.md)
