Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Machine Learning Engineer practice bank has an additional 974 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
Your ML engineering team operates a customer-facing RAG application powered by a fine-tuned Gemini model. During release testing, a candidate prompt template received high scores from a custom 1–5 PointwiseMetric judge model configured for coherence, grounding, and safety, yet domain experts frequently rejected its responses during human review.
You must diagnose the judge-human misalignment and establish a calibrated evaluation workflow that meets these requirements:
Which evaluation strategy should you implement?
PointwiseMetric judge with computation-based metrics (ROUGE-L, BLEU, and Exact Match) evaluated against expert-written reference responses, measure judge quality using raw accuracy and cross-entropy loss across the 1–5 scale, and increase the evaluation dataset to 1,000 examples to stabilize aggregate scores without modifying the evaluation rubric.Computation-based metrics such as ROUGE-L, BLEU, and Exact Match apply deterministic string and n-gram matching formulas to compare a candidate response against a static golden reference. They are fast, inexpensive, and repeatable when a single canonical answer exists.
AutoSxS pipeline in single-model mode by supplying only response_column_a and human_preference_column to generate Cohen's Kappa alignment statistics, replace the custom judge with types.RubricMetric.GENERAL_QUALITY without human ground-truth calibration, and expand the test set beyond 400 examples to eliminate rating variance.Automatic side-by-side (AutoSxS) is a pairwise model-based evaluation pipeline that compares two candidate responses (response_column_a and response_column_b) using an autorater and optionally computes human-preference alignment metrics including Cohen's Kappa. types.RubricMetric.GENERAL_QUALITY is an adaptive rubric metric that automatically generates per-prompt evaluation criteria.
response_column_a and response_column_b) to determine a preference. It cannot run in single-model mode.GENERAL_QUALITY without benchmarking against human ratings leaves the team unable to verify whether the adaptive rubrics actually capture domain-specific rejection criteria.summarization and question_answering criteria (with a 4,096 input token limit) rather than arbitrary custom 1–5 pointwise scales.guidelines or paired with GROUNDING and SAFETY.response_column_a and response_column_b) against a binary/tie human_preference_column dataset of roughly 100–400 examples to benchmark AutoSxS alignment via Cohen's Kappa.{metric_name}/human_pairwise_choice column directly to PairwiseMetric within EvalTask, compute 2-class balanced accuracy via evaluate_autorater to diagnose minority-class errors, and merge coherence, grounding, and safety checks into a single types.RubricMetric.SAFETY check.This approach attempts to combine pairwise judge evaluation (PairwiseMetric), autorater calibration (evaluate_autorater), and a managed static rubric (types.RubricMetric.SAFETY), but misapplies their required schemas, metric formulas, and evaluation scopes.
PairwiseMetric compares two responses (response and baseline_model_response) and expects binary or tie preference labels (model_A, model_B) in {metric_name}/human_pairwise_choice. Supplying 1–5 pointwise scores violates the pairwise schema; pointwise calibration requires PointwiseMetric paired with {metric_name}/human_rating.0.5 * (TPR + TNR)) only supports binary outcomes. A 1–5 scale has five classes and requires multiple-class balanced accuracy and multiple-class balanced F1.types.RubricMetric.SAFETY only checks for policy violations such as hate speech, harassment, PII exposure, or dangerous content. It does not evaluate coherence or RAG grounding.{metric_name}/human_pairwise_choice contains numeric 1–5 integers instead of preference strings.1 for safe, 0 for unsafe) and cannot substitute for linguistic quality or factuality metrics.model_A/model_B human labels, and only needed to screen outputs for policy violations.{metric_name}/human_rating column, run EvalTask with your PointwiseMetric, and call evaluate_autorater to evaluate multi-class balanced accuracy, multi-class balanced F1, and the confusion matrix (computing Cohen's Kappa with open-source libraries); if 1–5 rubric ambiguity persists, migrate to PairwiseMetric with {metric_name}/human_pairwise_choice or AutoSxS, alongside managed SAFETY and GROUNDING metrics.Calibrated LLM-as-a-judge evaluation benchmarks an automated judge model (such as Gemini) against human expert ratings before relying on it for CI/CD release gates. Using the Gen AI evaluation service, teams validate pointwise or pairwise judge alignment quantitatively and decompose broad quality checks into targeted, well-defined rubrics.
{metric_name}/human_rating aligns directly with PointwiseMetric outputs ({metric_name}/score) inside EvalTask and evaluate_autorater.evaluate_autorater computes multiple-class balanced accuracy (the macro-average recall across all 5 classes) and multiple-class balanced F1, preventing majority classes from masking poor calibration on rejected responses. Inspecting the confusion matrix pinpoints exactly which score boundaries (for example, 3 vs. 4) diverge, while open-source statistical libraries calculate Cohen's Kappa to adjust for random agreement (or AutoSxS computes Cohen's Kappa natively for pairwise preferences).PairwiseMetric with {metric_name}/human_pairwise_choice or AutoSxS with human_preference_column) simplifies judgment to direct side-by-side comparison against a baseline. Separating managed static rubrics—types.RubricMetric.SAFETY for policy compliance and types.RubricMetric.GROUNDING for RAG factuality—prevents high fluency from masking unsafe or ungrounded claims.SAFETY, GROUNDING, TEXT_QUALITY) for targeted debugging.This workflow follows standard judge-calibration practices by systematically measuring alignment on imbalanced multi-class ratings, addressing chance agreement, and replacing ambiguous composite scales with pairwise comparisons and specialized rubrics.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated