CustomJudge with vision-capable models. This cookbook covers common document processing pipeline monitoring scenarios.
Use this cookbook when: You need to verify that a GenAI application correctly extracted, summarized, or described content from images or documents.
Time to complete: ~25 minutes
Prerequisites
- Fiddler account with API access
- Vision-capable model configured in LLM Gateway:
- Fiddler-hosted:
fiddler/ministral3-8b(available by default) - Third-party: Configure provider credentials (OpenAI, Anthropic, etc.)
- Fiddler-hosted:
pip install fiddler-evals requests
This capability is currently in private preview and is not yet available to all customers. Contact your Fiddler Customer Success Manager to request access.
Example 1: Document Extraction Verification
This example verifies that data extracted from a table matches the source document.1
Connect to Fiddler and Load Helper
Base64 Payload Size — Base64 representation adds ~33% to the original file size. A 20KB image becomes ~27KB in the API request. Keep this overhead in mind when working near size limits.
2
Create the Extraction Verification Judge
This evaluator compares extracted fields against the source document:
3
Evaluate the Extraction
Load a sample document and verify the extracted data:
Sample document: Text Statistics evaluators table
Sample document: Text Statistics evaluators tableExample 2: Document Summarization Faithfulness
This example verifies that a summary accurately represents the source document. Source document: Fiddler Platform Release 26.7 notes (PDF)1
Create the Summarization Judge
2
Evaluate the Summary
Scaling Up — For batch evaluation across datasets, see Running RAG Experiments at Scale which demonstrates the
evaluate() function for efficient processing.Tips
Stay Within Size Limits
Optimize Large Documents
- Compress images before encoding — reduce resolution if full quality isn’t needed
- Split large PDFs — evaluate sections separately if exceeding page limits
- Use appropriate DPI — higher DPI means larger file sizes but better text recognition
Use Multiple Images
Fiddler Ministral supports up to 8 images per evaluation. To evaluate content with multiple images, add a separate template variable for each image in your prompt template (e.g.,{{ image_1 }}, {{ image_2 }}) and pass each as a structured input list following the same format as Example 1’s document field.
Next Steps
- Building Custom Judge Evaluators — General CustomJudge patterns
- Evaluator Rules — Deploy evaluators in production monitoring