AI Intermediate · 17% practice allocation

AI Intermediate: LLM Evaluation & Fine-tuning Practice Questions

5 free sample questions from the LLM Evaluation & Fine-tuning domain, with answers and explanations. The full AI Intermediate bank has 963 questions across 5 domains. Questions follow the AI Intermediate course content.

1.

A startup is fine-tuning a model via the OpenAI fine-tuning API for a JSON-output task. After training, the model sometimes outputs malformed JSON. Which action is most likely to fix this problem?

  • A. Add a system prompt at inference time instructing the model to output valid JSON, without changing the training data.
  • B. Increase the number of training epochs significantly to force memorization of the output format.
  • C. Switch from the chat format to the prompt-completion format, as JSON outputs are not supported in chat format.
  • D. Audit the training dataset for inconsistent or malformed JSON examples and clean or remove them before retraining.✓ Correct
Explanation

Malformed JSON in outputs most commonly traces back to inconsistent or malformed training examples — the model learns the noisy format it was trained on. Cleaning the dataset is the highest-leverage fix. Increasing epochs could worsen overfitting to bad patterns if the root cause is data quality. The OpenAI fine-tuning API's chat format fully supports structured outputs including JSON, so switching formats is unnecessary. Adding a system prompt at inference time may help marginally but does not address the root cause in the training data and is less reliable than fixing the data.

2.

A researcher wants to evaluate whether a RAG pipeline retrieves enough of the information needed to fully answer a question, measured against a ground-truth reference answer. Which RAGAS metric addresses this retrieval coverage concern?

  • A. Context recall✓ Correct
  • B. Answer relevance
  • C. Answer correctness
  • D. Faithfulness
Explanation

Context recall measures how much of the ground-truth answer's information is covered by the retrieved context passages, directly quantifying retrieval completeness. Faithfulness measures whether the generated answer is supported by the retrieved context — a generation-side metric, not a retrieval coverage metric. Answer relevance scores how well the generated answer addresses the user question, also a generation-side metric. Answer correctness compares the generated answer to the ground truth holistically and is not specific to retrieval coverage.

3.

Which evaluation metric measures the overlap between n-grams in a model's generated text and a set of human-written reference summaries, and is commonly used in summarization benchmarks?

  • A. ROUGE✓ Correct
  • B. RAGAS faithfulness
  • C. Perplexity
  • D. BERTScore
Explanation

ROUGE (Recall-Oriented Understudy for Gisting Evaluation) measures n-gram overlap between generated text and reference texts, making it a standard metric for summarization tasks. BERTScore uses contextual embeddings to compare semantic similarity, not n-gram overlap. RAGAS faithfulness measures whether RAG-generated answers are grounded in retrieved context, not reference overlap. Perplexity measures how well a language model predicts a sequence, not output quality against references.

4.

An engineer uses the OpenAI fine-tuning API to fine-tune gpt-4o-mini on 1,200 prompt-completion pairs for a legal contract review task. After fine-tuning, the model performs well on contract types present in training data but poorly on novel clause structures. Which TWO strategies would MOST effectively address this generalization gap?

  • A. Increase the number of training epochs significantly beyond the default to force the model to memorize all training examples
  • B. Incorporate a validation split and use early stopping based on validation loss to avoid overfitting to the narrow training distribution✓ Correct
  • C. Switch from the OpenAI fine-tuning API to Vertex AI Tuning, which has built-in generalization algorithms
  • D. Add a system prompt instructing the fine-tuned model to generalize to unseen contract types
  • E. Augment the training dataset with diverse contract types and varied clause structures to improve coverage of the input distribution✓ Correct
Explanation

Augmenting training data with more diverse contract types directly addresses the distribution mismatch — the model has not seen enough variety to generalize. Using a validation split and early stopping prevents the model from overfitting to the narrow training set, which is the likely cause of poor performance on novel structures. Increasing epochs beyond defaults encourages memorization of the training distribution, worsening generalization — the opposite of what is needed. The choice of fine-tuning platform (OpenAI vs. Vertex AI) does not determine generalization; neither platform has a proprietary generalization algorithm that compensates for insufficient data diversity. Adding a system prompt to a fine-tuned model does not teach it patterns it never learned during training; it may marginally help but does not address the root cause.

5.

A team is constructing annotation guidelines for a golden evaluation dataset for a conversational AI assistant. They want annotators to rate 'relevance' of responses on a 1–5 Likert scale. Which THREE practices most directly improve inter-annotator agreement for this task?

  • A. Conducting calibration sessions where annotators discuss and reconcile disagreements on a shared practice set before independent annotation begins✓ Correct
  • B. Defining explicit criteria distinguishing each score level (e.g., what separates a '3' from a '4') in the written guidelines✓ Correct
  • C. Using automated spell-checkers on all model outputs before annotation to reduce noise
  • D. Requiring annotators to hold a PhD in linguistics before participating
  • E. Providing concrete, worked examples (anchors) for each score level, including borderline cases✓ Correct
  • F. Assigning each item to only one annotator to prevent anchoring bias
Explanation

Concrete anchor examples for each score level reduce ambiguity by showing annotators exactly what a '2' vs. a '3' looks like in practice, directly improving agreement. Calibration sessions allow annotators to surface and resolve differing interpretations before independent work begins, aligning mental models. Explicit written criteria distinguishing score levels ensure annotators apply the same conceptual standards. A PhD requirement does not improve agreement; what matters is shared understanding of the rubric, not academic credentials. Assigning each item to only one annotator prevents computing inter-annotator agreement at all and removes redundancy for quality control — best practice is multiple annotators per item. Spell-checking model outputs may slightly reduce distraction but has negligible impact on inter-annotator agreement for relevance judgments.

Test yourself across every AI Intermediate domain

The free AI Intermediate practice test mixes about 20 questions weighted like the exam. The full 963-question bank adds instant grading, flashcards and a timed mock exam.

Study this domain

LLM Evaluation & Fine-tuning study guide (AI Intermediate) →

Other AI Intermediate domains

← All AI Intermediate study resources