passdrill

Evaluation, Testing & Safety

10 cards · AI & LLM Engineering · answer each one, then read the explanation. Your score tallies below.

0 / 10 answered · 0 correct

AI & LLM Engineering · Evaluation, Testing & Safety · Card 001/010 easy

When evaluating an autoregressive language model on the same held-out test set, Model A gets a perplexity of 18.4 and Model B gets a perplexity of 42.1. Holding the tokenizer and test set fixed, what does this comparison indicate about the two models?

  1. Model B is better, because a higher perplexity score means the model assigns more probability mass to a wider range of plausible continuations, which reflects greater linguistic flexibility
  2. Neither score is meaningful on its own; perplexity only becomes interpretable once the model has also been evaluated on a downstream task such as translation or summarization
  3. Model A is better at predicting this test text than Model B, because perplexity is derived from the model's average per-token negative log-likelihood, and a lower value means the model assigned higher probability, on average, to the tokens that actually occurred
  4. Model A used a larger training corpus than Model B, since perplexity is primarily a measure of how much data a model was trained on rather than of its predictive accuracy
AI & LLM Engineering · Evaluation, Testing & Safety · Card 002/010 easy

A machine translation system produces a fluent, accurate translation that a human judge rates as excellent, but it uses different word choices and sentence structure than the single reference translation available in the test set. What is the most likely practical consequence for this output's BLEU score, and why?

  1. Its BLEU score will likely be low, because BLEU is computed from n-gram overlap between the candidate and the reference translation(s), so a valid paraphrase that shares few overlapping n-grams with the single reference is penalized even though it is fluent and accurate
  2. Its BLEU score will be high, because BLEU uses a semantic similarity model to detect that the paraphrase conveys the same meaning as the reference, regardless of surface wording
  3. Its BLEU score will be unaffected by the reference wording, because BLEU is computed only from the candidate sentence's internal grammaticality and fluency, without reference to any reference translation
  4. Its BLEU score will be low, because BLEU applies a fixed penalty whenever the candidate sentence is longer than the reference sentence, independent of any n-gram overlap
AI & LLM Engineering · Evaluation, Testing & Safety · Card 003/010 medium

A team uses a strong LLM as an automated judge to pick the better of two candidate responses, which are placed side by side within the same judging prompt. Across many comparisons, they notice the judge tends to favor whichever response sits in the first slot, even when the same two responses are swapped into the other slot and re-judged. What phenomenon does this describe, and what is a standard mitigation?

  1. This is a sign the underlying model being judged is broken, since a properly trained model should never receive different scores across two separately-run evaluations
  2. This is benchmark contamination, and the standard mitigation is to remove the affected test examples from the evaluation set entirely
  3. This is expected and requires no mitigation, because a judge's preference for the first-listed response reflects a genuine and stable quality signal about response ordering
  4. This is position bias in LLM-as-judge evaluation; a standard mitigation is to run each comparison twice with the two responses' positions swapped, and only count a response as preferred if it wins in both orderings (or average the results across both orderings)
AI & LLM Engineering · Evaluation, Testing & Safety · Card 004/010 medium

A research team reports that their new model scores surprisingly high on a widely-used public benchmark, higher than models with far more parameters. Before trusting this result, an independent reviewer wants to rule out one specific and common threat to benchmark validity: that some of the benchmark's test questions, or close paraphrases of them, appeared in the model's pretraining data. What is this threat called, and what is one concrete technique used to check for it?

  1. This threat is called catastrophic forgetting; it is checked by fine-tuning the model on an older task and confirming that performance on that older task does not drop
  2. This threat is called benchmark (data) contamination; one concrete detection technique is searching the pretraining corpus for high n-gram overlap with the benchmark's test examples, or checking for embedded 'canary string' markers placed in the benchmark specifically to detect this
  3. This threat is called mode collapse; it is checked by sampling many outputs from the model at high temperature and confirming that they remain diverse
  4. This threat is called reward hacking; it is checked by inspecting the model's reward model training data for label errors
AI & LLM Engineering · Evaluation, Testing & Safety · Card 005/010 easy

Before releasing a new model, a safety team assembles a group of people whose specific job is to deliberately try to provoke the model into producing harmful, disallowed, or policy-violating outputs, using creative and adversarial prompts, so the team can find and fix weaknesses before real users encounter them. What is this practice called, and how does it differ from routine functional testing?

  1. This is red-teaming; unlike routine functional testing, which checks whether the model performs its intended tasks correctly, red-teaming specifically and adversarially searches for inputs that cause unsafe or policy-violating behavior, deliberately trying to break the model's safety guardrails rather than verify normal functionality
  2. This is A/B testing; like routine functional testing, it measures average task success rate across two model versions shown to random subsets of real users, without any adversarial intent
  3. This is unit testing; it differs from routine functional testing only in that the test cases are written by an external team rather than the model's own developers
  4. This is regression testing; it differs from routine functional testing only in that it is run after every deployment rather than before the first one
AI & LLM Engineering · Evaluation, Testing & Safety · Card 006/010 hard

A team building an agent finds two different attack patterns during security testing: in one, a user of the application directly crafts an unusual prompt trying to get the agent to ignore its instructions; in the other, a trusted user asks the agent to summarize a webpage, and the webpage's own text contains hidden instructions trying to redirect the agent. Using the threat-model distinction drawn in Anthropic's guidance for mitigating these attacks, how are the two cases distinguished?

  1. Both are the same attack, jailbreaking, because in both cases the ultimate effect is that the agent's system prompt is overridden, regardless of who supplied the adversarial text
  2. The first is a direct prompt injection (or jailbreak), where the application's own user is the adversary crafting the input; the second is an indirect prompt injection, where the user is trusted but the agent processes third-party content -- such as a webpage, email, or tool result -- that itself contains adversarial instructions
  3. The first is indirect prompt injection, because the user's prompt is only indirectly related to the agent's task, while the second is direct prompt injection, because the webpage content directly reaches the model
  4. The first is a data poisoning attack, because it targets the model's training data, while the second is a prompt injection attack, because it targets the model's inference-time input
AI & LLM Engineering · Evaluation, Testing & Safety · Card 007/010 medium

A team wants to align a pretrained language model's outputs with human preferences -- for example, favoring helpful, well-formatted answers over unhelpful or poorly formatted ones -- in a way that goes beyond what the original next-token-prediction pretraining objective optimizes for. They collect many pairs of candidate outputs for the same prompt and have human annotators indicate which output in each pair they prefer. How does RLHF (reinforcement learning from human feedback) typically use this preference data to align the model?

  1. It directly edits the pretrained model's weight matrices using the preference labels as targets in an ordinary supervised next-token-prediction loss, with no reward model or reinforcement learning step involved at all
  2. It uses the preference pairs only to filter the pretraining corpus, removing any documents similar in style to the less-preferred outputs, before retraining the model from scratch on the filtered corpus
  3. It first trains a separate reward model to predict which of two outputs a human would prefer, using the collected pairwise comparisons as training data, and then uses reinforcement learning (commonly PPO) to fine-tune the language model's policy to maximize the score that reward model assigns to its outputs
  4. It uses the preference pairs to build a retrieval index, and at inference time retrieves the most similar previously-preferred output to return as the answer instead of generating a new one
AI & LLM Engineering · Evaluation, Testing & Safety · Card 008/010 hard

An evaluation framework for a retrieval-augmented generation (RAG) system reports three separate scores for a generated answer: a score for whether the retrieved passages are relevant to the question, a score for whether the answer directly addresses the question asked, and a score for whether each claim made in the generated answer is actually supported by the retrieved passages. Which of these is the 'faithfulness' (or 'groundedness') score, and what does it specifically measure?

  1. The relevance-of-retrieved-passages score is faithfulness, because a faithful answer is defined entirely by how relevant the retrieval step's passages were to the original question, regardless of what the generated answer actually claims
  2. The answer-addresses-the-question score is faithfulness, because a faithful answer is defined entirely by how directly it addresses the literal wording of the question, regardless of whether its claims are grounded in the retrieved passages
  3. Faithfulness cannot be measured separately from the other two scores, since retrieval relevance, answer relevance, and groundedness in retrieved passages are mathematically the same quantity computed three different ways
  4. The claims-supported-by-retrieved-passages score is faithfulness; it specifically measures whether the claims made in the generated answer can be traced back to and supported by the retrieved context, independent of whether that context was relevant to the question or whether the answer addresses the question asked
AI & LLM Engineering · Evaluation, Testing & Safety · Card 009/010 easy

A public platform for comparing chatbot quality shows users two anonymous model responses to the same prompt side by side and asks only 'which response is better,' rather than asking users to rate each response independently on, say, a 1-5 scale. The platform then aggregates these pairwise votes into a single ranking (an Elo-style rating) for each model. Why is this pairwise-comparison approach generally considered more reliable than collecting independent absolute ratings for ranking relative model quality?

  1. Relative judgments -- deciding which of two responses is better -- are generally easier for humans to make consistently than assigning an absolute numeric score, so pairwise comparisons tend to produce less noisy, better-calibrated signal for ranking models against each other than independently-collected absolute ratings, which vary more across raters and over time
  2. Absolute ratings are mathematically impossible to aggregate across different raters, while pairwise comparisons require no aggregation step at all before a ranking can be produced
  3. Pairwise comparisons take less time for the platform to collect than absolute ratings, and evaluation validity is determined entirely by how many total votes are collected, regardless of how the question is framed
  4. Absolute rating scales are only usable for evaluating machine translation quality specifically, so any other evaluation task must default to pairwise comparison instead
AI & LLM Engineering · Evaluation, Testing & Safety · Card 010/010 easy

A developer building a chat application wants an extra safety layer that classifies both the text a user submits and the text their language model generates, flagging content across categories such as harassment, hate, self-harm, sexual, and violence before either is shown to end users. Referring specifically to OpenAI's Moderation API (the `omni-moderation-latest` model), which statement accurately describes how it is intended to be used?

  1. It replaces the need for the underlying language model to have any safety training of its own, since all content decisions are made entirely by the moderation classifier before generation even begins
  2. It can be called on both standalone user-submitted input and on text generated by a model, returning a flagged status plus per-category violation flags and confidence scores; per OpenAI's own documentation, the underlying model still generates its output normally, and the moderation results are meant to be reviewed before that output is shown to a user or acted on
  3. It can only be used on text a user submits before generation begins, and OpenAI's documentation states it cannot be applied to text a model has already generated
  4. It is a paid, metered endpoint priced per classified token, separate from OpenAI's chat completion pricing, that developers must budget for separately when adding a moderation layer