What You’ll Need
- Fiddler account
- Python 3.11 or higher
- Fiddler 26.25 or later, and
fiddler-evals0.8.0 or later - Fiddler API key and access token
- Dataset for experiments
Quick Start
New to the Evals SDK? Start with Experiments Quick Start, which connects to Fiddler, builds a dataset, and runs your first experiment. This guide covers pre-built evaluators, custom evaluators, and advanced options; its examples reuseapplication, my_llm_task, and score_mapping from the quick start.
Pre-Built Evaluators
Safety & Trust
- FTLPromptSafety - Detect prompt injection, jailbreaks, and unsafe prompts (runs on Fiddler Centor Models)
Quality & Accuracy
- AnswerRelevance - Assess how well responses address user queries (High / Medium / Low)
- ContextRelevance - Evaluate whether retrieved documents are relevant to the query (High / Medium / Low). Available in Agentic Monitoring and Experiments only
- RAGFaithfulness - Check if responses are grounded in retrieved documents (Yes / No)
- FTLResponseFaithfulness - Powered by the Centor Model for Faithfulness for low-latency guardrails
- Coherence - Measure logical flow and consistency
- Conciseness - Evaluate response brevity and efficiency
Content Analysis
- Sentiment - Analyze emotional tone
- TopicClassification - Categorize content by topic
- RegexSearch / RegexMatch - Custom pattern-based evaluation
- EvalFn - Wrap any Python function as an evaluator
Example Usage
Batch Experiment with Multiple Evaluators
Custom Evaluators
Importing Test Cases from Files
update_items() call that changes items saves one new dataset version. Keep the returned dataset: evaluate() runs on the version that the object holds.
Running on a Past Version
To run an experiment on an earlier version of a dataset, load that version by its number. A dataset object shows its version number indataset.version.version. The experiment records the version that it ran on.
Viewing Results
Results are automatically tracked in the Fiddler UI. Navigate to your application to:- View experiment results with detailed scores
- Compare experiments side-by-side
- Filter and analyze by metadata
- Export results for further analysis
Programmatic Analysis
Advanced Configuration
Parallel Processing
Experiment Metadata and Organization
Custom Parameter Mapping
Troubleshooting
Connection Issues
Problem: Cannot connect to Fiddler instance Solution:- Verify your URL is correct (e.g.,
https://your-org.fiddler.ai) - Ensure your access token is valid and not expired
- Check network connectivity:
curl -I https://your-org.fiddler.ai - Regenerate token from Fiddler UI: Settings > Credentials
Import Errors
Problem:ModuleNotFoundError: No module named 'fiddler_evals'
Solution:
Experiment Failures
Problem: Evaluators failing with parameter errors Solution:- Check
score_fn_kwargs_mappingmatches evaluator requirements - Verify task output format matches expected structure
- Test evaluators individually:
Performance Issues
Problem: Experiment running slowly Solution:Related Integrations
- Experiments Quick Start - Detailed setup guide with code examples
- Evals SDK Reference - Complete SDK API documentation
- LangGraph SDK - Runtime monitoring for LangGraph agents
- Strands Agents SDK - Monitor Strands Agents
- Python Client SDK - Full platform API access
Next Steps
- Experiments Quick Start - Complete tutorial with working examples
- Experiments Guide - Understand experiment concepts and best practices
- SDK API Reference - Explore all available classes and methods