Agent Skillslangwatch/langwatch › evaluate-multimodal

evaluate-multimodal

GitHub

评估处理图像、音频或文档等多模态输入的AI代理。通过LangWatch LLM-as-judge及专用模式,验证多模态输入下的输出质量与提取准确性。

skills/_compiled/native/evaluate-multimodal/SKILL.md langwatch/langwatch

Trigger Scenarios

需要评估处理非文本输入(如图片、音频、PDF)的AI代理 设置多模态测试场景和文档解析评估

Install

npx skills add langwatch/langwatch --skill evaluate-multimodal -g -y
More Options

Non-standard path

npx skills add https://github.com/langwatch/langwatch/tree/main/skills/_compiled/native/evaluate-multimodal -g -y

Use without installing

npx skills use langwatch/langwatch@evaluate-multimodal

指定 Agent (Claude Code)

npx skills add langwatch/langwatch --skill evaluate-multimodal -a claude-code -g -y

安装 repo 全部 skill

npx skills add langwatch/langwatch --all -g -y

预览 repo 内 skill

npx skills add langwatch/langwatch --list

SKILL.md

Frontmatter
{
    "name": "evaluate-multimodal",
    "license": "MIT",
    "metadata": {
        "category": "recipe"
    },
    "description": "Evaluate multimodal AI agents that process images, audio, PDFs, or other files. Sets up evaluations using LangWatch's LLM-as-judge with image inputs, Scenario's multimodal testing, and document parsing evaluation patterns. Use when your agent handles non-text inputs.",
    "compatibility": "Requires LangWatch SDK and optionally @langwatch\/scenario. Works with Claude Code and similar coding agents. Uses the `langwatch` CLI for documentation and platform operations."
}

Evaluate Your Multimodal Agent

This recipe helps you evaluate agents that process images, audio, PDFs, or other non-text inputs.

Step 1: Identify Modalities

Read the codebase to understand what your agent processes:

  • Images: classification, analysis, generation, OCR
  • Audio: transcription, voice agents, audio Q&A
  • PDFs/Documents: parsing, extraction, summarization
  • Mixed: multiple input types in one pipeline

Step 2: Read the Relevant Docs

Use the langwatch CLI to fetch the right pages:

langwatch scenario-docs                            # Index: locate multimodal pages
langwatch scenario-docs multimodal/audio-to-text   # Audio testing patterns
langwatch scenario-docs multimodal/multimodal-files # Generic file analysis patterns
langwatch docs                                     # LangWatch docs index
langwatch docs evaluations/experiments/sdk         # Experiment SDK basics
langwatch docs evaluations/evaluators/list         # Browse evaluator types

For PDF evaluation specifically, reference the pattern from sdks/python/examples/pdf_parsing_evaluation.ipynb:

  • Download/load documents
  • Define extraction pipeline
  • Use LangWatch experiment SDK to evaluate extraction accuracy

Step 3: Set Up Evaluation by Modality

Image Evaluation

LangWatch's LLM-as-judge evaluators can accept images. Create an evaluation that:

  1. Loads test images
  2. Runs the agent on each image
  3. Uses an LLM-as-judge evaluator to assess output quality
import langwatch

experiment = langwatch.experiment.init("image-eval")

for idx, entry in experiment.loop(enumerate(image_dataset)):
    result = my_agent(image=entry["image_path"])
    experiment.evaluate(
        "llm_boolean",
        index=idx,
        data={
            "input": entry["image_path"],  # LLM-as-judge can view images
            "output": result,
        },
        settings={
            "model": "openai/gpt-5-mini",
            "prompt": "Does the agent correctly describe/classify this image?",
        },
    )

Audio Evaluation

Use Scenario's audio testing patterns:

  • Audio-to-text: verify transcription accuracy
  • Audio-to-audio: verify voice agent responses

Read the dedicated guide:

langwatch scenario-docs multimodal/audio-to-text

PDF/Document Evaluation

Follow the pattern from the PDF parsing evaluation example:

  1. Load documents (PDFs, CSVs, etc.)
  2. Define extraction/parsing pipeline
  3. Evaluate extraction accuracy against expected fields
  4. Use structured evaluation (exact match for fields, LLM judge for summaries)

File Analysis

For agents that process arbitrary files, read the file analysis guide:

langwatch scenario-docs multimodal/multimodal-files

Step 4: Generate Domain-Specific Test Data

For each modality, generate or collect test data that matches the agent's actual use case:

  • If it's a medical imaging agent → use relevant medical image samples
  • If it's a document parser → use real document types the agent encounters
  • If it's a voice assistant → record realistic voice prompts

Step 5: Run and Iterate

Run the evaluation, review results, fix issues, re-run until quality is acceptable.

Common Mistakes

  • Do NOT evaluate multimodal agents with text-only metrics. Use image-aware judges
  • Do NOT skip testing with real file formats. Synthetic descriptions aren't enough
  • Do NOT forget to handle file loading errors in evaluations
  • Do NOT use generic test images. Use domain-specific ones matching the agent's purpose
  • Always read the relevant langwatch scenario-docs ... page for the modality before writing code; multimodal patterns differ a lot from text-only ones

Version History

  • 12615f1 Current 2026-08-20 10:01

Same Skill Collection

.claude/skills/browser-pair/SKILL.md
.claude/skills/browser-test/SKILL.md
.claude/skills/code-review/SKILL.md
.claude/skills/feature-map/SKILL.md
.claude/skills/haven-setup/SKILL.md
.claude/skills/langwatch-kanban/SKILL.md
plugins/langwatch/skills/langwatch/SKILL.md
services/langy-agent/skills/github/SKILL.md
skills/_compiled/native/agent-best-practices/SKILL.md
skills/_compiled/native/agent-performance/SKILL.md
skills/_compiled/native/connect-agent/SKILL.md
skills/_compiled/native/datasets/SKILL.md
skills/_compiled/native/debug-instrumentation/SKILL.md
skills/_compiled/native/debug-with-langwatch/SKILL.md
skills/_compiled/native/eval-triage/SKILL.md
skills/_compiled/native/evaluations/SKILL.md
skills/_compiled/native/experiments/SKILL.md
skills/_compiled/native/generate-rag-dataset/SKILL.md
skills/_compiled/native/github/SKILL.md
skills/_compiled/native/level-up/SKILL.md
skills/_compiled/native/online-evaluations/SKILL.md
skills/_compiled/native/prompts/SKILL.md
skills/_compiled/native/scenarios/SKILL.md
skills/_compiled/native/setup-lw/SKILL.md
skills/_compiled/native/test-cli-usability/SKILL.md
skills/_compiled/native/test-compliance/SKILL.md
skills/_compiled/native/tracing/SKILL.md

Metadata

Files
0
Version
12615f1
Hash
eec354cc
Indexed
2026-08-20 10:01

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-22 05:52
浙ICP备14020137号-1 $mapa de visitantes$