Skip to content

feat: multimodal content in evaluators#2876

Merged
Kathryn May (katmayb) merged 6 commits intomainfrom
multimodal-content-evaluators
Mar 5, 2026
Merged

feat: multimodal content in evaluators#2876
Kathryn May (katmayb) merged 6 commits intomainfrom
multimodal-content-evaluators

Conversation

@katmayb
Copy link
Copy Markdown
Contributor

@katmayb Kathryn May (katmayb) commented Mar 2, 2026

@github-actions github-actions bot added langsmith For docs changes to LangSmith internal labels Mar 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 2, 2026

Mintlify preview ID generated: preview-multim-1772484891-f183e47

@katmayb Kathryn May (katmayb) force-pushed the multimodal-content-evaluators branch from 7b64f9a to 5cbf33a Compare March 2, 2026 21:20
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 2, 2026

Mintlify preview ID generated: preview-multim-1772486524-1b98060

Comment thread src/langsmith/online-evaluations-llm-as-judge.mdx
Comment thread src/langsmith/evaluate-with-attachments.mdx Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 4, 2026

Mintlify preview ID generated: preview-multim-1772643135-c02f520

@katmayb Kathryn May (katmayb) force-pushed the multimodal-content-evaluators branch from 8d4bb46 to c785d38 Compare March 4, 2026 22:00
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 4, 2026

Mintlify preview ID generated: preview-multim-1772661701-f0d5798

@katmayb Kathryn May (katmayb) changed the title WIP: multimodal content in evaluators feat: multimodal content in evaluators Mar 5, 2026
@katmayb Kathryn May (katmayb) marked this pull request as ready for review March 5, 2026 15:28
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 5, 2026

Mintlify preview ID generated: preview-multim-1772724522-db00cdb

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 5, 2026

Mintlify preview ID generated: preview-multim-1772725052-2c7077a

You can also create text-only evaluators that don't use attachments but evaluate the model's text output:

- OCR → text correction: Use a vision model to extract text from a document, then evaluate the accuracy of the extracted output.
- Speech-to-text → transcription quality: Use a voice model to transcribe audio to text, then evaluate the transcription against your reference.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a component on how it will take in any base64 components ?

Not all customers will use attachments to render traces, so we allow you to pass in any base64 format. For example, if part of their input / output is in base64 format, if they follow this guide here: https://docs.langchain.com/langsmith/log-multimodal-traces to set up their traces correctly, they will not only be able to visualize them in the UI, if i do variable mapping with {{input}} in the evaluator, they will also be passed correctly to the LLM that supports. I know this section is about atachments, but I think this may be worth calling out here.

We can use the images that I sent in the slack

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

1. Select **+ Evaluator** from the dataset page.
1. In the **Template variables** editor, add a variable for the attachment(s) to include:
- For a single attachment type: Use the suggested variable name. All examples must have an attachment with this name.
- For multiple attachments or if attachment names vary across examples: Use the `All attachments` variable to include all available attachments for each example.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not entirely accurate in temrs of recommednation - I would say something like:

  • if you want to include all attachmetns, use the {{attachments}} evaluator
  • if you want to include a speicifc attachment, you can use the suggested variable name, such as {{attachment.file_name}}, this will map the file with file_name in the attachment list to passs it to the evaluator

(this is bc for 1 singel attachemnt, they can still do {{attachments}} which is probably easiest.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

- **Using attachments from traces**: Similar to [offline evaluations with attachments](/langsmith/evaluate-with-attachments), you can use attachments from your traces in online evaluations. Since your traces already include attachments logged via the SDK, you can reference them directly in your evaluator. To do so:

1. In your evaluator configuration, click the file icon in the evaluator message where you want to add multimodal content.
1. In the **Template variables** tab, add a variable for the attachment(s) to include:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update this section to mirror the above

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Comment thread src/langsmith/online-evaluations-llm-as-judge.mdx
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 5, 2026

Mintlify preview ID generated: preview-multim-1772734590-4b8b514

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 5, 2026

Mintlify preview ID generated: preview-multim-1772735417-638e527

@katmayb Kathryn May (katmayb) merged commit 5fb4c4c into main Mar 5, 2026
17 checks passed
@katmayb Kathryn May (katmayb) deleted the multimodal-content-evaluators branch March 5, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal langsmith For docs changes to LangSmith

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants