Courseiva

AI0-001 AI Concepts and Foundations Practice Question

A natural language processing team is building a sentiment analysis model for customer reviews. They want to ensure the model generalizes well to new, unseen reviews and does not simply memorize the training data. Which TWO techniques are most appropriate to achieve this goal? (Choose two.)

⚠ Common exam trap

The trap here is assuming that any technique that speeds up training or reduces data size will also improve generalization, when in fact only methods that constrain model complexity or monitor validation performance directly address overfitting.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Apply L2 regularization to the model's weights.

L2 regularization penalizes large weights, encouraging simpler models that generalize better, while early stopping halts training when validation performance degrades, preventing overfitting. Both directly target the goal of avoiding memorization of training data. Increasing epochs, larger batch sizes, and stop word removal do not reliably improve generalization and may even hurt performance.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Remove all stop words from the reviews before training.

    Why it's wrong here

    Stop word removal is a text preprocessing step that can reduce noise and dimensionality, but it does not inherently prevent overfitting. In sentiment analysis, some stop words (e.g., 'not') carry critical sentiment information, so removing them could harm performance. This technique addresses feature selection, not model generalization to unseen data.

  • ✗

    Use a larger batch size during training.

    Why it's wrong here

    Increasing batch size can affect optimization dynamics and may speed up training, but it does not directly address overfitting. In fact, very large batches can sometimes lead to poorer generalization if not accompanied by other techniques. The primary goal here is to prevent memorization, and batch size alone is not a regularization method for that purpose.

  • ✓

    Apply L2 regularization to the model's weights.

    Why this is correct

    L2 regularization adds a penalty proportional to the square of the weights to the loss function, discouraging large weights and reducing model complexity. This helps prevent overfitting by forcing the model to learn smoother, more generalizable patterns rather than memorizing training examples. For sentiment analysis, it is a standard and effective technique to improve performance on unseen reviews.

  • ✗

    Increase the number of training epochs until training loss approaches zero.

    Why it's wrong here

    Training until training loss nears zero typically causes the model to memorize noise and idiosyncrasies of the training set, leading to overfitting. This would harm generalization to unseen reviews. While it may improve training accuracy, it is counterproductive for the stated goal of performing well on new data, and is a common mistake in model development.

  • ✓

    Implement early stopping based on validation loss.

    Why this is correct

    Early stopping monitors validation loss during training and halts when it begins to increase, which indicates the model is starting to overfit. This prevents the model from continuing to memorize training data and preserves its ability to generalize. It is a widely used and effective regularization technique for neural networks, including those used in sentiment analysis.

About these practice questions

One of 962 original AI0-001 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official CompTIA exam blueprint

This AI0-001 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI0-001 exam.