AAIA study materials
AAIA study resources

AAIA practice questions

One question at a time. Build your AAIA understanding.

First 50 of 200 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.

Continue in the practice tool above to load more questions, 50 at a time.

Question 1Fundamentals of AI and ML

A team wants a model that can classify support tickets into one of eight fixed departments. Which learning paradigm fits this task?

  1. Unsupervised clustering
  2. Supervised classification Correct answer.
  3. Reinforcement learning
  4. Dimensionality reduction

Explanation

When every training example carries a known department label and the goal is to predict one of a fixed set of categories, the task is supervised classification. The model learns a mapping from input features to discrete labels using labeled data.

Question 2Fundamentals of AI and ML

Which statement best describes overfitting in a machine learning model?

  1. It improves steadily as more irrelevant features are added
  2. It performs poorly on the training set because the model is too simple
  3. It occurs when the test set leaks into the training pipeline
  4. It captures noise in the training data and generalizes poorly to unseen data Correct answer.

Explanation

Overfitting means the model fits idiosyncratic noise and quirks of the training data, so training performance is high while performance on new data degrades. The usual remedy is more data, regularization, or reduced model complexity.

Question 3Fundamentals of AI and ML

In a dataset of 200 records, a binary feature has values recorded for only 120 records. Which statement about that feature is accurate?

  1. It requires no handling because missing values are ignored by all algorithms
  2. It has 80 outliers that should be clipped to the mean
  3. It has 120 missing values because only complete rows count
  4. It has 80 missing values, which must be handled before most models can use it Correct answer.

Explanation

Missing values equal total records minus recorded values, so 200 minus 120 gives 80 missing entries. Most algorithms cannot consume nulls directly, so they must be imputed, dropped, or flagged.

Question 4Fundamentals of AI and ML

A model predicts loan default. Of 100 actual defaulters, it flags 70. Of 100 actual non-defaulters, it flags 20. What is the recall for the default class?

  1. 0.70 Correct answer.
  2. 0.78
  3. 0.20
  4. 0.50

Explanation

Recall is true positives divided by all actual positives, so 70 out of 100 equals 0.70. Precision would instead divide 70 by all flagged cases, which is 90.

Question 5Fundamentals of AI and ML

Why is accuracy a misleading metric for a fraud dataset where only 1 percent of transactions are fraudulent?

  1. Accuracy cannot be computed for binary labels
  2. Accuracy ignores the number of records in the dataset
  3. A model predicting all transactions as legitimate already reaches 99 percent accuracy Correct answer.
  4. Fraud detection always requires regression metrics

Explanation

With severe class imbalance, a trivial majority-class predictor scores near the base rate, here about 99 percent, while detecting no fraud at all. Precision, recall, and PR-AUC reveal the failures that accuracy hides.

Question 6Fundamentals of AI and ML

Which technique reduces dimensionality by projecting data onto directions of maximum variance?

  1. Principal Component Analysis Correct answer.
  2. Random forest bagging
  3. Logistic regression
  4. K-means clustering

Explanation

Principal Component Analysis finds orthogonal linear directions that maximize retained variance and projects data onto the leading components. It is unsupervised and commonly used for compression and visualization.

Question 7Fundamentals of AI and ML

A model's training loss keeps falling while validation loss starts rising after epoch 15. What is the most appropriate interpretation?

  1. Learning rate is too low and must be reduced further
  2. The model is underfitting and needs more capacity
  3. The validation set is corrupted and should be discarded
  4. The model is beginning to overfit and early stopping around epoch 15 is reasonable Correct answer.

Explanation

Divergence between falling training loss and rising validation loss is the classic signature of overfitting. Stopping near the minimum validation loss, or adding regularization, is the standard response.

Question 8Fundamentals of AI and ML

Which statement correctly distinguishes parameters from hyperparameters?

  1. Hyperparameters are the weights of the network, and parameters are the loss values
  2. Both are learned during training and differ only in name
  3. Parameters are learned from data during training, while hyperparameters are set before training to control the learning process Correct answer.
  4. Parameters are set by the engineer, while hyperparameters are learned by gradient descent

Explanation

Model parameters such as weights and biases are optimized from data, whereas hyperparameters such as learning rate and tree depth govern training and are chosen beforehand. Hyperparameters are usually tuned with validation data.

Question 9Fundamentals of AI and ML

In a neural network, what is the primary role of a non-linear activation function such as ReLU?

  1. It guarantees the loss surface is convex
  2. It enables the network to approximate non-linear mappings between inputs and outputs Correct answer.
  3. It removes the need for backpropagation
  4. It normalizes each feature to zero mean and unit variance

Explanation

Stacked linear layers without activation collapse into a single linear transformation. Non-linear activations let deep networks represent complex non-linear relationships.

Question 10Fundamentals of AI and ML

A regression model predicts house prices. Which metric penalizes large errors most heavily?

  1. Mean absolute error
  2. R-squared
  3. Mean squared error Correct answer.
  4. Mean absolute percentage error

Explanation

Squaring residuals before averaging makes mean squared error grow quadratically with error magnitude, so large deviations dominate it. Mean absolute error grows only linearly.

Question 11Fundamentals of AI and ML

Which problem is reinforcement learning specifically designed to address?

  1. Reducing feature count before classification
  2. Grouping unlabeled customers into segments
  3. Learning a policy that maximizes cumulative reward through trial-and-error interaction with an environment Correct answer.
  4. Estimating a continuous target from labeled examples

Explanation

Reinforcement learning agents act in an environment, receive rewards, and adjust behavior to maximize long-run return. This sequential decision framing differs from supervised or unsupervised learning.

Question 12Fundamentals of AI and ML

A dataset has a feature 'city' with values such as Tokyo, Osaka, and Nagoya. Which encoding is most appropriate for a linear model that should not imply an ordering?

  1. Standard scaling of the string values
  2. Label encoding with integers 0, 1, 2
  3. Target encoding using the row index
  4. One-hot encoding Correct answer.

Explanation

One-hot encoding creates a separate binary column per category, avoiding any artificial numeric ordering. Integer label encoding would imply Tokyo < Osaka < Nagoya, which is meaningless for a linear model.

Question 13Fundamentals of AI and ML

What is the purpose of k-fold cross-validation?

  1. To increase the size of the training set by duplicating rows
  2. To eliminate the need for a separate test set in production reporting
  3. To select the single best feature for the model
  4. To estimate generalization performance by training and validating on multiple data splits Correct answer.

Explanation

Cross-validation rotates the validation fold across k partitions so performance estimates use all data for validation exactly once. It reduces the variance of the performance estimate compared with a single split.

Question 14Fundamentals of AI and ML

A model trained on data from one hospital shows much lower accuracy at a second hospital. Which explanation is most plausible?

  1. Accuracy is undefined when data comes from multiple sites
  2. The second hospital has fewer patients, which always lowers accuracy
  3. The model's loss function was computed incorrectly at training time
  4. Covariate shift, because the input distribution differs between sites Correct answer.

Explanation

When feature distributions differ between training and deployment environments, the model faces distribution shift and may not generalize. Differences in equipment, coding practices, or patient mix can all drive this.

Question 15Fundamentals of AI and ML

Which statement about the bias-variance tradeoff is correct?

  1. High-bias models tend to underfit, while high-variance models tend to overfit Correct answer.
  2. Reducing model complexity always lowers both bias and variance
  3. Variance measures the systematic error of a model family
  4. High bias always reduces test error regardless of variance

Explanation

Bias reflects error from overly simplistic assumptions, producing underfitting, whereas variance reflects sensitivity to training sample fluctuations, producing overfitting. Good models balance the two.

Question 16Fundamentals of AI and ML

What does the softmax function output in a multi-class classifier?

  1. A single unbounded score for the most likely class
  2. A probability distribution over the classes that sums to one Correct answer.
  3. The raw logits unchanged
  4. A binary label for each class independently

Explanation

Softmax exponentiates each logit and normalizes by their sum, producing non-negative values that total one. This supports interpreting outputs as class probabilities.

Question 17Fundamentals of AI and ML

A team wants to detect anomalous credit card transactions but has almost no labeled fraud examples. Which approach is most suitable?

  1. Use linear regression to predict transaction amount
  2. Train a supervised classifier on the few labels and ignore the imbalance
  3. Apply k-fold cross-validation to generate fraud labels
  4. Train an unsupervised anomaly detector on normal transactions and flag deviations Correct answer.

Explanation

When positive labels are scarce, unsupervised anomaly detection models typical behavior and flags deviations. This avoids relying on too few examples of the rare class.

Question 18Fundamentals of AI and ML

Which scenario best illustrates data leakage during model development?

  1. Evaluating the final model once on a held-out test set
  2. Scaling features using statistics computed from the full dataset before splitting into train and test Correct answer.
  3. Splitting data into train and test before fitting any preprocessing
  4. Using cross-validation on the training portion only

Explanation

Computing scaling statistics on the full dataset lets information from the test set influence training, inflating apparent performance. Preprocessing should be fit on training data only and applied to test data.

Question 19Fundamentals of AI and ML

What is the primary function of a convolutional layer in an image classification network?

  1. It learns local spatial filters that detect patterns such as edges and textures Correct answer.
  2. It applies softmax normalization to the input pixels
  3. It stores the entire training set for nearest-neighbor lookup
  4. It reduces the number of classes in the output layer

Explanation

Convolutional layers slide learnable filters across spatial positions, exploiting local structure and weight sharing. Early layers detect simple patterns, and deeper layers compose them into complex features.

Question 20Fundamentals of AI and ML

A gradient boosting model performs very well on training data but poorly on validation data. Which adjustment is most directly aimed at reducing this gap?

  1. Remove the validation set from the workflow
  2. Decrease tree depth and increase regularization Correct answer.
  3. Increase the number of boosting rounds substantially
  4. Add more raw features without selection

Explanation

Shallow trees and stronger regularization constrain model complexity, which reduces variance and the train-validation gap. Adding rounds or features typically widens the gap further.

Question 21Fundamentals of AI and ML

Which statement correctly describes the difference between precision and recall?

  1. Precision measures how many flagged items are truly positive, while recall measures how many true positives were flagged Correct answer.
  2. Recall is only defined for regression problems
  3. Precision measures how many true positives were flagged, while recall measures how many flagged items are truly positive
  4. Precision and recall are identical when classes are balanced

Explanation

Precision is true positives over all predicted positives, focusing on the purity of positive predictions. Recall is true positives over all actual positives, focusing on coverage of the positive class.

Question 22Fundamentals of AI and ML

A feature has a highly skewed distribution with extreme outliers. Which preprocessing step is most likely to help a distance-based model such as k-nearest neighbors?

  1. Increasing the number of neighbors to the dataset size
  2. Encoding the feature as one-hot categories
  3. Applying a log or rank transformation before scaling Correct answer.
  4. Removing the feature entirely

Explanation

Log or rank transforms compress extreme values, and subsequent scaling prevents large-magnitude features from dominating distance calculations. This improves the behavior of distance-based models.

Question 23Fundamentals of AI and ML

What does an ROC curve plot?

  1. Predicted values against residuals
  2. Precision against recall across classification thresholds
  3. Training loss against validation loss across epochs
  4. True positive rate against false positive rate across classification thresholds Correct answer.

Explanation

The ROC curve sweeps the decision threshold and plots sensitivity, the true positive rate, against the false positive rate. The area under this curve summarizes ranking performance across thresholds.

Question 24Fundamentals of AI and ML

An AI system must explain why it denied a loan application. Which property is most directly relevant?

  1. Throughput of the training cluster
  2. Size of the raw dataset
  3. Interpretability of the model's decision rationale Correct answer.
  4. Number of hyperparameters tuned

Explanation

Regulatory and ethical requirements often demand that automated decisions be explainable to affected individuals. Interpretability, whether intrinsic or via post-hoc methods, addresses this need.

Question 25Fundamentals of AI and ML

Which statement about training, validation, and test splits is correct?

  1. The test set is used once for a final unbiased estimate after model selection is complete Correct answer.
  2. The training set is used to compare candidate models
  3. The validation set is used to report final production accuracy
  4. The test set should be used repeatedly to tune hyperparameters

Explanation

Model selection and tuning use training and validation data, and the test set is reserved for a final unbiased evaluation. Repeatedly consulting the test set leaks information and inflates reported performance.

Question 26Fundamentals of AI and ML

A team is building a supervised classifier for loan default prediction. Which combination of characteristics best describes a well-posed supervised learning problem?

  1. A fixed rule base written by domain experts that requires no training data
  2. Labeled historical examples, a defined target variable, and features available at prediction time Correct answer.
  3. Unlabeled transaction logs, a reward signal, and an agent that explores an environment
  4. A generative process that models the joint distribution of inputs without any target variable

Explanation

Supervised learning requires labeled examples that pair inputs with a target, and the features used must be obtainable at inference time to avoid leakage. The other listed settings describe reinforcement learning, unsupervised or generative modeling, and pure rule-based systems, none of which fit supervised classification.

Question 27Fundamentals of AI and ML

Which statement best captures the essential difference between classification and regression tasks?

  1. Classification predicts a discrete category, whereas regression predicts a continuous numeric quantity Correct answer.
  2. Regression outputs probability distributions, whereas classification outputs point estimates
  3. Regression requires labeled data, whereas classification works only with unlabeled data
  4. Classification always uses neural networks, whereas regression always uses linear models

Explanation

The defining distinction lies in the type of target: classification assigns inputs to discrete classes, while regression estimates continuous values. Algorithm choice and labeling requirements are independent of this distinction, so the other statements misrepresent it.

Question 28Fundamentals of AI and ML

An engineer computes mean squared error (MSE) on a test set and reports it alongside the target's units. Which statement about MSE is accurate?

  1. MSE measures ranking quality rather than the magnitude of prediction errors
  2. MSE is expressed in squared units of the target, so its square root (RMSE) restores the original units Correct answer.
  3. MSE is insensitive to outliers because squaring compresses large deviations
  4. MSE is bounded between 0 and 1, making it directly interpretable as an accuracy percentage

Explanation

Squaring residuals gives MSE units that are the square of the target units, which is why RMSE is often preferred for interpretability. Squaring actually amplifies large errors rather than compressing them, and MSE is unbounded above and unrelated to ranking metrics.

Question 29Fundamentals of AI and ML

A dataset contains a numeric feature 'age' ranging from 18 to 90 and a feature 'income' ranging from 10,000 to 2,000,000. A k-nearest-neighbors classifier performs poorly. Which preprocessing step most directly addresses the cause?

  1. Apply feature scaling such as standardization so both features contribute comparably to distance Correct answer.
  2. Increase the number of neighbors k until accuracy on the training set reaches 100%
  3. Remove the age feature because it has fewer distinct values than income
  4. Convert both features to categorical bins before computing distances

Explanation

Distance-based methods such as k-NN are dominated by features with larger numeric ranges unless inputs are scaled. Standardization or min-max scaling puts features on comparable scales so each contributes meaningfully to the distance computation.

Question 30Fundamentals of AI and ML

In a binary classifier, the confusion matrix shows 40 true positives, 10 false positives, 30 true negatives, and 20 false negatives. What is the recall for the positive class?

  1. 0.57
  2. 0.50
  3. 0.80
  4. 0.67 Correct answer.

Explanation

Recall equals true positives divided by the sum of true positives and false negatives, that is 40/(40+20) = 0.67. The other values correspond to precision (40/50 = 0.80), overall accuracy (70/100 = 0.70 is not listed but 0.57 mixes terms), and unrelated ratios.

Question 31Fundamentals of AI and ML

A model must output a calibrated probability that a customer will churn, and the business wants to rank customers by risk. Which loss function is most appropriate for training this model?

  1. Binary cross-entropy Correct answer.
  2. Mean absolute error on the binary labels
  3. K-means inertia
  4. Hinge loss with a linear SVM head

Explanation

Binary cross-entropy directly optimizes the likelihood of probabilistic binary outputs and yields well-calibrated scores suitable for ranking. MAE on binary labels gives weak gradients, hinge loss targets margins rather than probabilities, and inertia is a clustering objective.

Question 32Fundamentals of AI and ML

A team trains a decision tree and finds it perfectly classifies the training set but generalizes poorly. Which change is most likely to improve generalization?

  1. Grow the tree until every leaf is pure and then add more features
  2. Increase the number of training epochs for the tree induction algorithm
  3. Limit tree depth or require a minimum number of samples per leaf Correct answer.
  4. Remove the validation set so the model can use all data for training

Explanation

Deep, fully grown trees memorize training noise, so constraining depth or leaf size acts as regularization and reduces variance. Adding features or removing validation data does not address overfitting and may worsen it.

Question 33Fundamentals of AI and ML

Which statement correctly describes how L2 regularization (ridge penalty) affects a linear model?

  1. It adds a penalty proportional to the squared magnitude of weights, shrinking coefficients toward zero without eliminating them entirely Correct answer.
  2. It removes the regularization term during inference to preserve training accuracy
  3. It increases model capacity by allowing weights to grow without bound
  4. It adds a penalty proportional to the absolute value of weights, driving many coefficients exactly to zero

Explanation

L2 regularization penalizes the sum of squared weights, which shrinks coefficients smoothly toward zero and controls variance. Exact zero coefficients are characteristic of L1 (lasso), and regularization by definition constrains rather than expands weights.

Question 34Fundamentals of AI and ML

An analyst wants to group retail customers by purchasing behavior without any predefined segment labels. Which approach is appropriate?

  1. A reinforcement learning agent maximizing basket size
  2. Clustering algorithms such as k-means applied to behavioral features Correct answer.
  3. A gradient boosting regressor predicting next-month spend
  4. Logistic regression trained on a churn label

Explanation

Discovering groups without labels is the definition of unsupervised clustering, and k-means is a standard choice for behavioral segmentation. The other options are supervised prediction or reinforcement learning tasks that require labels or reward signals.

Question 35Fundamentals of AI and ML

A hospital wants a model that flags sepsis risk hours before clinical onset, and missing a true case is considered far worse than a false alarm. Which evaluation strategy best reflects this requirement?

  1. Prioritize recall and examine the precision-recall curve to choose an operating threshold Correct answer.
  2. Report only the area under the ROC curve without selecting a threshold
  3. Maximize overall accuracy because it treats both error types equally
  4. Optimize specificity so that false alarms are minimized above all else

Explanation

When false negatives carry the highest cost, recall must be prioritized, and the precision-recall curve helps select a threshold that balances recall against an acceptable false-alarm rate. Accuracy and specificity-oriented metrics can look strong while missing many true cases.

Question 36Fundamentals of AI and ML

A model's predicted probabilities are evaluated with log loss. Predictions of 0.99 for a sample whose true label is 0 contribute approximately what penalty?

  1. Exactly 0, because log loss ignores confident predictions
  2. About 0.01, because the error equals the complement of the predicted probability
  3. About 4.6, because the negative log of 0.01 is large Correct answer.
  4. About 0.5, because log loss is symmetric around 0.5

Explanation

For a true positive label, log loss is -ln(p), so a confident wrong prediction of 0.99 gives -ln(0.01) ≈ 4.6. This illustrates why log loss heavily penalizes overconfident mistakes, unlike error-rate metrics that count them once.

Question 37Fundamentals of AI and ML

Which statement correctly distinguishes batch gradient descent from stochastic gradient descent (SGD)?

  1. Batch gradient descent uses a smaller learning rate by definition, while SGD always uses a larger fixed rate
  2. Batch gradient descent requires no learning rate, while SGD requires one
  3. SGD guarantees convergence to the global optimum of any non-convex loss, while batch descent does not
  4. Batch gradient descent computes the gradient over the full dataset per update, while SGD updates using one or a few samples at a time Correct answer.

Explanation

The distinction concerns how much data each parameter update uses: batch methods use the whole dataset, and SGD uses individual samples or mini-batches. Both rely on a learning rate, and neither guarantees global optimality for non-convex losses.

Question 38Fundamentals of AI and ML

A practitioner wants to reduce variance in a high-variance model by averaging many decorrelated predictors. Which technique is designed for this purpose?

  1. Principal component analysis, which rotates the feature space
  2. Boosting, which sequentially fits models to the residuals of previous ones
  3. Early stopping, which halts training when validation loss stops improving
  4. Bagging, which trains models on bootstrap samples and averages their predictions Correct answer.

Explanation

Bagging reduces variance by averaging predictions from models trained on resampled data, and random forests extend this idea with feature subsampling. Boosting primarily reduces bias, while PCA and early stopping serve different purposes.

Question 39Fundamentals of AI and ML

A model trained on data collected during winter months is deployed in summer and accuracy drops sharply. Which diagnosis and remedy pair is most appropriate?

  1. Label noise; discard all summer data as unusable
  2. Distribution shift; retrain or reweight with data representative of the deployment period Correct answer.
  3. Overfitting; reduce the number of features until training accuracy falls
  4. Class imbalance; apply SMOTE to the winter training set

Explanation

A seasonal change in input distribution relative to training data is covariate or distribution shift, and the remedy is to train on data representative of deployment conditions. Overfitting, label noise, and class imbalance do not explain a systematic drop tied to the deployment period.

Question 40Fundamentals of AI and ML

A team claims their model is fair because overall accuracy is equal across two demographic groups. Which analysis most directly tests whether this claim is sufficient?

  1. Confirm that the overall AUC exceeds 0.9 before deployment
  2. Verify that the training set contains the same number of rows for each group
  3. Compare error rates and calibration across groups, since equal aggregate accuracy can mask unequal false positive and false negative rates Correct answer.
  4. Check that the model uses no demographic feature as an input

Explanation

Equal aggregate accuracy does not imply equal treatment, because group-specific false positive and false negative rates and calibration can differ substantially. Fairness assessment therefore requires disaggregated error and calibration analysis rather than a single aggregate metric.

Question 41Fundamentals of Generative AI

In a generative AI system, what distinguishes a foundation model from a task-specific model?

  1. A foundation model is pre-trained on broad data and can be adapted to many downstream tasks. Correct answer.
  2. A foundation model must be retrained from scratch for every new deployment.
  3. A foundation model can only generate images, while task-specific models generate text.
  4. A foundation model uses rule-based logic instead of learned parameters.

Explanation

Foundation models are trained on large, broad corpora and learn general representations that transfer to many downstream tasks through prompting or fine-tuning. Task-specific models are built or tuned for a single narrow objective. This generality is the defining trait of the foundation-model paradigm.

Question 42Fundamentals of Generative AI

What is the primary role of the tokenizer in a large language model pipeline?

  1. It compresses the model to reduce inference latency.
  2. It converts raw text into discrete token IDs the model can process. Correct answer.
  3. It stores the model weights on disk between training runs.
  4. It ranks candidate responses by predicted quality.

Explanation

A tokenizer splits input text into subword units and maps each to an integer ID drawn from a fixed vocabulary, producing the sequence the model actually consumes. Detokenization reverses the mapping to render output text. Ranking and compression happen elsewhere in the stack.

Question 43Fundamentals of Generative AI

A team wants a model output that is deterministic across repeated identical requests. Which decoding setting best supports this goal?

  1. Greedy decoding with temperature set to zero Correct answer.
  2. Beam search with randomized tie-breaking enabled
  3. Top-k sampling with a large k value
  4. Nucleus sampling with a high probability threshold

Explanation

Greedy decoding always selects the highest-probability next token, and setting temperature to zero collapses the distribution to that same argmax, removing sampling randomness. The result is repeatable for a fixed prompt and model. Sampling methods deliberately reintroduce variation.

Question 44Fundamentals of Generative AI

Which statement best describes the function of the attention mechanism in a transformer?

  1. It applies a fixed convolutional kernel across adjacent token positions.
  2. It maps token IDs to dense embedding vectors at the input layer.
  3. It lets each token weigh the relevance of other tokens when building its representation. Correct answer.
  4. It normalizes activations so gradients stay within a fixed numeric range.

Explanation

Self-attention computes query-key similarity scores so each position aggregates information from contextually relevant positions, capturing long-range dependencies. This is what allows transformers to model relationships regardless of distance in the sequence. The other options describe layer normalization, embedding lookup, and convolution.

Question 45Fundamentals of Generative AI

A prompt instructs a model: 'Summarize the review below in exactly three bullet points, each under fifteen words.' This is best classified as which prompting technique?

  1. Retrieval-augmented prompting with external documents
  2. Chain-of-thought prompting with reasoning traces
  3. Zero-shot prompting with explicit output constraints Correct answer.
  4. Few-shot prompting with labeled exemplars

Explanation

The prompt supplies only the task instruction and formatting constraints, with no worked examples and no retrieved context, so it is zero-shot. Constraints on length and structure are part of the instruction design. Few-shot would require demonstrations, and retrieval would require supplied documents.

Question 46Fundamentals of Generative AI

What does the term 'hallucination' refer to in generative AI output?

  1. The model refuses to answer a benign question.
  2. The model returns output in an unexpected language.
  3. The model exceeds its maximum context length.
  4. The model produces fluent content that is factually unsupported or fabricated. Correct answer.

Explanation

Hallucination describes confident, well-formed generation that is not grounded in fact or in the provided source material. It arises because models optimize for plausible continuations rather than verified truth. Grounding and retrieval are common mitigations.

Question 47Fundamentals of Generative AI

Which metric is most appropriate for evaluating a generative model on an open-ended summarization task?

  1. ROUGE score against reference summaries Correct answer.
  2. Area under the ROC curve
  3. Mean squared error on predicted logits
  4. Top-1 classification accuracy

Explanation

ROUGE measures overlap of n-grams and longest common subsequences between generated and reference summaries, which suits free-text generation. Accuracy, ROC AUC, and MSE are designed for classification or regression targets, not variable-length text. Human evaluation is often paired with ROUGE because overlap metrics are imperfect.

Question 48Fundamentals of Generative AI

What is the purpose of the temperature parameter during text generation?

  1. It sets the maximum number of tokens the model may output.
  2. It controls the learning rate used during fine-tuning.
  3. It scales the logits before softmax, controlling how random the sampling is. Correct answer.
  4. It determines the size of the model's context window.

Explanation

Temperature divides the logits before the softmax, flattening or sharpening the next-token distribution. Lower values make output more focused and repeatable, while higher values increase diversity. It does not govern length, context size, or training dynamics.

Question 49Fundamentals of Generative AI

A retrieval-augmented generation system answers questions over an internal knowledge base. Which component retrieves the most relevant passages for a user query?

  1. A dropout mask applied during inference
  2. A vector similarity search over embedded document chunks Correct answer.
  3. A softmax layer over the model vocabulary
  4. A layer normalization block inside the decoder

Explanation

RAG embeds documents and the query into a shared vector space, then retrieves chunks whose embeddings are closest to the query embedding. Those passages are inserted into the prompt as grounding context. The other options are internal neural network operations, not retrieval mechanisms.

Question 50Fundamentals of Generative AI

Which training approach adapts a pre-trained language model to a downstream task by updating only a small set of added parameters while freezing the base weights?

  1. Parameter-efficient fine-tuning such as LoRA Correct answer.
  2. Knowledge distillation into a smaller student
  3. Pre-training from scratch on web text
  4. Reinforcement learning from human feedback

Explanation

LoRA and similar methods inject small trainable matrices and leave the original weights frozen, cutting memory and compute costs. This is the hallmark of parameter-efficient fine-tuning. Pre-training from scratch, distillation, and RLHF change the training objective or model size rather than restricting which parameters are updated.