Courseiva

CompTIA AI+ AI0-001 (AI0-001) — Questions 151225

754 questions total · 11pages · All types, answers revealed

Page 2

Page 3 of 11

Page 4
151
MCQmedium

A developer is integrating an AI microservice that accepts image uploads and returns classification labels. The service must handle spikes of up to 1,000 requests per minute but average 100 requests per minute. Which deployment architecture BEST meets these requirements with cost efficiency?

A.Expose the model via a serverless function (e.g., AWS Lambda) with synchronous invocation
B.Use an async processing queue (e.g., RabbitMQ) with a pool of worker instances that auto-scale based on queue depth
C.Deploy the service as a synchronous REST API on a single always-on VM sized for peak load
D.Stream results directly from the model to the client using WebSockets
AnswerB

Async queue buffers spikes, workers scale only when needed, reducing cost while handling bursts.

Why this answer

Async processing with a queue allows buffering during spikes, scaling workers as needed. A synchronous always-on service would be over-provisioned for average load. Serverless with auto-scaling offers cost efficiency.

152
Multi-Selectmedium

A data science team is developing a churn prediction model. Which TWO data preparation best practices are MOST important to prevent overfitting and ensure generalization?

Select 2 answers
A.Split data into training and test sets before any preprocessing
B.Normalize all features using the entire dataset's statistics
C.Use cross-validation to tune hyperparameters
D.Remove outliers based on the full dataset distribution
E.Encode categorical variables with target encoding on the full dataset
AnswersA, C

Splitting first avoids leaking test information into scaling or imputation.

Why this answer

Splitting data before any preprocessing prevents leakage from test set into training. Cross-validation provides a more robust estimate of generalization than a single hold-out set.

153
MCQhard

A company's AI governance board requires each model to have a model card documenting intended use, performance metrics, and limitations. What is the primary purpose of a model card?

A.To provide transparent documentation of model capabilities and limitations
B.To specify the exact training algorithm and hyperparameters
C.To outline a complete risk assessment framework
D.To serve as a legal contract between developers and users
AnswerA

They promote accountability and informed deployment.

Why this answer

A model card is a standardized documentation framework that provides transparent, concise information about a machine learning model's intended use, performance metrics, and limitations. This transparency enables stakeholders to understand the model's capabilities and potential biases, ensuring responsible deployment and governance as required by AI ethics and governance frameworks.

Exam trap

The AI0-001 exam often tests the distinction between documentation for transparency (model card) and detailed technical specifications (hyperparameters) or legal instruments, so candidates mistakenly choose B or D because they confuse 'documentation' with exhaustive technical detail or binding agreements.

How to eliminate wrong answers

Option B is wrong because specifying the exact training algorithm and hyperparameters is a detail of model development documentation, not the primary purpose of a model card, which focuses on high-level transparency for governance and end-users. Option C is wrong because a complete risk assessment framework is a broader governance artifact (e.g., an AI risk register) that may reference model cards but is not the primary purpose of the card itself. Option D is wrong because a model card is not a legal contract; it is a technical documentation tool for transparency, and legal agreements are separate documents governed by terms of service or licensing.

154
MCQeasy

A company streams sensor data from IoT devices. The data arrives as JSON messages at high velocity. Which data pipeline architecture is BEST suited to handle this streaming data for near-real-time analytics?

A.Batch processing using Hadoop MapReduce every 24 hours.
B.Batch processing using nightly ETL jobs.
C.Single-node database with periodic inserts.
D.Stream processing using Apache Kafka and Spark Streaming.
AnswerD

Kafka ingests streaming data, Spark Streaming processes it with low latency.

Why this answer

Apache Kafka acts as a distributed, fault-tolerant ingestion layer that can handle high-velocity JSON messages, while Spark Streaming processes the data in micro-batches for near-real-time analytics. This combination provides the low-latency, scalable pipeline required for streaming IoT sensor data, unlike batch or single-node approaches.

Exam trap

CompTIA often tests the distinction between batch and stream processing by presenting batch options that seem 'reliable' or 'traditional,' trapping candidates who overlook the explicit 'near-real-time' requirement in the question.

How to eliminate wrong answers

Option A is wrong because Hadoop MapReduce is designed for batch processing of large static datasets, not for continuous high-velocity streaming data, and a 24-hour cycle cannot meet near-real-time requirements. Option B is wrong because nightly ETL jobs introduce hours of latency, making them unsuitable for near-real-time analytics on streaming data. Option C is wrong because a single-node database with periodic inserts cannot scale to handle high-velocity IoT data streams and will become a bottleneck, failing to provide near-real-time processing.

155
MCQmedium

An organization uses a machine learning model to approve loans. The model shows higher false positive rates for a protected group. Which data engineering step should be taken to mitigate this?

A.Remove the protected attribute from training data
B.Use adversarial debiasing technique
C.Increase model complexity
D.Add synthetic data to balance groups
AnswerB

Adversarial debiasing forces the model to be invariant to protected attributes, reducing bias.

Why this answer

Adversarial debiasing is a technique that trains the model to minimize prediction error while simultaneously preventing an adversary from predicting the protected attribute from the model's outputs. This directly reduces disparate impact by forcing the model to learn representations that are uncorrelated with the protected group, thereby lowering false positive rates for that group without simply removing the attribute.

Exam trap

A common misconception tested in CompTIA AI is that removing the protected attribute is sufficient to eliminate bias, when in reality proxy features and correlated variables can perpetuate discrimination, making adversarial debiasing a more robust solution.

How to eliminate wrong answers

Option A is wrong because simply removing the protected attribute from training data does not eliminate proxy features (e.g., zip code, income) that correlate with the protected group, so bias can persist through correlated features. Option C is wrong because increasing model complexity typically exacerbates overfitting and can amplify existing biases rather than mitigate them, as the model may learn spurious correlations tied to the protected group. Option D is wrong because adding synthetic data to balance groups addresses class imbalance but does not directly correct the model's decision boundary bias that causes higher false positives for a specific group; it may even introduce artifacts if synthetic data is not carefully generated.

156
MCQeasy

In the AI project lifecycle, which phase involves splitting the dataset into training, validation, and test sets while ensuring no data leakage?

A.Data preparation
B.Problem definition
C.Data acquisition
D.Model evaluation
AnswerA

Data preparation includes splitting and ensuring no leakage from future information.

Why this answer

Splitting the dataset into training, validation, and test sets is a core data preparation step that must be performed before any model training begins. This phase ensures that data leakage is prevented by keeping the test set completely isolated until final evaluation, which is critical for obtaining an unbiased estimate of model performance. In the AI project lifecycle, data preparation encompasses cleaning, transforming, and partitioning the data, making option A the correct phase.

Exam trap

The trap here is that candidates confuse 'data acquisition' (collecting data) with 'data preparation' (cleaning and splitting), leading them to incorrectly choose option C when the question specifically asks about splitting and leakage prevention.

How to eliminate wrong answers

Option B is wrong because problem definition focuses on identifying business objectives and success criteria, not on technical data partitioning or leakage prevention. Option C is wrong because data acquisition involves collecting raw data from sources (e.g., databases, APIs, sensors) and does not include the splitting or leakage-avoidance steps. Option D is wrong because model evaluation occurs after training and uses the already-split test set to assess performance; it does not involve creating the splits or addressing data leakage.

157
MCQmedium

A batch inference pipeline fails intermittently with out-of-memory errors when processing large datasets. The pipeline uses pandas DataFrames and feeds a pre-trained model. Which change would most effectively reduce memory consumption?

A.Increase the instance size of the compute node
B.Use a database instead of CSV files
C.Convert the model to use half-precision
D.Split the data into smaller chunks and process sequentially
AnswerD

Chunking reduces peak memory by processing subsets of the data at a time.

Why this answer

Splitting a large dataset into smaller chunks and processing them sequentially directly addresses the root cause of the out-of-memory error: the entire dataset is loaded into memory at once via pandas DataFrames. By processing data in batches, each chunk fits within the available RAM, preventing memory exhaustion while still allowing the pipeline to complete the full inference workload.

Exam trap

CompTIA often tests the misconception that scaling up hardware (Option A) is the best solution, when in fact architectural changes like chunking (Option D) are more effective and cost-efficient for batch processing workloads.

How to eliminate wrong answers

Option A is wrong because increasing the instance size merely adds more memory, which is a temporary workaround that does not fix the underlying inefficiency and increases cost; the pipeline will still fail if the dataset grows beyond the new limit. Option B is wrong because using a database instead of CSV files changes the storage layer but does not inherently reduce memory consumption during inference—pandas still loads the entire result set into a DataFrame unless chunked queries are explicitly used. Option C is wrong because converting the model to half-precision (FP16) reduces model memory footprint but does not address the primary memory consumer, which is the pandas DataFrame holding the large dataset; the model is typically much smaller than the data.

158
MCQmedium

During a security audit of an AI system, the auditor applies the STRIDE threat model. Which threat category is MOST relevant to an attacker manipulating the training data to cause the model to misbehave on specific inputs?

A.Spoofing
B.Repudiation
C.Information disclosure
D.Tampering
AnswerD

Tampering covers unauthorized modification, such as corrupting training data.

Why this answer

Tampering refers to unauthorized modification of data or code. Data poisoning is a form of tampering with the training dataset.

159
Multi-Selectmedium

A team is deploying an AI microservice for real-time object detection in streaming video. Which TWO integration patterns are most appropriate? (Choose two.)

Select 2 answers
A.Streaming responses for real-time inference
B.Batch processing with nightly jobs
C.Synchronous request-response with long timeouts
D.Monolithic application deployment
E.AI microservice architecture
AnswersA, E

Streaming enables low-latency, continuous output for video frames.

Why this answer

AI microservices are deployed as independent services, and streaming responses are needed for real-time video processing.

160
MCQeasy

A data scientist is training a model to classify customer support tickets into categories. The dataset has 10,000 labeled examples, but the 'billing' category contains 8,000 examples while the 'technical' category contains 2,000. Which technique is most appropriate to address this imbalance before training?

A.Apply random oversampling on the 'technical' category.
B.Remove all examples except 'billing' and use a one-class classifier.
C.Use accuracy as the only evaluation metric.
D.Train the model as is, then adjust thresholds post-training.
AnswerA

Correct; oversampling balances the classes.

Why this answer

Random oversampling duplicates examples from the minority class ('technical') to balance the class distribution, preventing the model from becoming biased toward the majority class ('billing'). This technique directly addresses the class imbalance before training, which is critical for classification tasks where the minority class is underrepresented.

Exam trap

CompTIA often tests the misconception that adjusting thresholds post-training can compensate for class imbalance, but the trap here is that the model's internal weights are already skewed by the imbalanced training data, making threshold tuning ineffective without prior balancing.

How to eliminate wrong answers

Option B is wrong because removing all 'billing' examples discards the majority of the data, forcing a one-class classifier that cannot learn to distinguish between categories, which defeats the purpose of multi-class classification. Option C is wrong because accuracy is a misleading metric for imbalanced datasets; a model that always predicts 'billing' would achieve 80% accuracy without learning anything about 'technical' tickets. Option D is wrong because training the model as is on imbalanced data will bias the model toward the majority class, and post-training threshold adjustment alone cannot fix the underlying skewed decision boundary learned during training.

161
Multi-Selecthard

A data scientist is preparing a dataset for a text classification model. To prevent train/test leakage, which THREE practices should they follow?

Select 3 answers
A.Shuffle the entire dataset before splitting to ensure randomness
B.Use time-based splitting for temporal data
C.Perform train/test split before any data cleaning or normalization
D.Apply feature scaling to the entire dataset before splitting
E.Remove duplicate samples and ensure that no text from the same document appears in both sets
AnswersB, C, E

For time-series or evolving data, splitting by time ensures the model is not trained on future information.

Why this answer

Time-based splitting preserves the temporal order of data, which is critical for time-series or temporal text data to prevent the model from learning from future information that would not be available at inference time. This avoids train/test leakage where future data leaks into the training set, artificially inflating model performance.

Exam trap

The AI0-001 exam often tests the misconception that shuffling the entire dataset is always safe, but for temporal data or when duplicates exist, shuffling can introduce leakage by mixing future and past samples or spreading identical text across train and test sets.

162
MCQeasy

An organization wants to classify support tickets into categories (billing, technical, etc.). Which type of machine learning is most suitable?

A.Unsupervised learning
B.Reinforcement learning
C.Supervised learning
D.Regression
AnswerC

Classification uses labeled data to predict categories.

Why this answer

Supervised learning is the correct choice because the organization has labeled historical support tickets (e.g., 'billing' or 'technical') and wants to train a model to map new tickets to these predefined categories. This is a classic classification task, where the algorithm learns from input-output pairs to predict the correct label for unseen data.

Exam trap

CompTIA often tests the distinction between classification (supervised) and clustering (unsupervised), so the trap here is that candidates mistakenly choose unsupervised learning because they think 'grouping tickets' is clustering, ignoring that the categories are predefined and labeled.

How to eliminate wrong answers

Option A is wrong because unsupervised learning discovers hidden patterns or clusters in unlabeled data, but here the categories are known and labeled, so clustering is unnecessary. Option B is wrong because reinforcement learning involves an agent learning through trial-and-error interactions with an environment to maximize a reward signal, which is not applicable to static ticket classification. Option D is wrong because regression predicts continuous numerical values (e.g., ticket resolution time), not discrete categorical labels like 'billing' or 'technical'.

163
MCQhard

A company uses a neural network for fraud detection. The dataset has 99% legitimate, 1% fraudulent. The model achieves 99% accuracy but fails to detect most frauds. Which metric should they focus on?

A.Precision
B.F1-score
C.Recall
D.AUC-ROC
AnswerC

Correct: Recall measures the proportion of actual frauds that are correctly identified.

Why this answer

Recall (sensitivity) measures the proportion of actual positives correctly identified. In this fraud detection scenario with 99% legitimate and 1% fraudulent transactions, a 99% accuracy can be achieved by simply predicting all transactions as legitimate, which yields 0% recall for the fraud class. Focusing on recall ensures the model captures the majority of fraudulent cases, addressing the critical failure to detect fraud despite high accuracy.

Exam trap

The AI0-001 exam often tests the misconception that high accuracy implies good model performance, especially in imbalanced datasets, leading candidates to overlook recall as the critical metric for detecting rare events like fraud.

How to eliminate wrong answers

Option A is wrong because precision measures the proportion of predicted positives that are actually positive; while important for avoiding false alarms, it does not directly address the failure to detect fraud (false negatives). Option B is wrong because F1-score is the harmonic mean of precision and recall; although it balances both, the primary issue here is low recall, so focusing on recall directly is more appropriate. Option D is wrong because AUC-ROC measures the model's ability to distinguish between classes across all thresholds, but it can be misleadingly high even when recall for the minority class is poor, especially in imbalanced datasets; it does not directly target the failure to detect fraud.

164
MCQeasy

Which NIST AI RMF function involves identifying the context, risks, and potential impacts of an AI system, including mapping the AI lifecycle and stakeholders?

A.Manage
B.Measure
C.Map
D.Govern
AnswerC

Map is the function for understanding the AI system's context, risks, and impacts.

Why this answer

The AI RMF's four functions are: Govern, Map, Measure, Manage. Map focuses on context and risk identification. Govern sets policies.

Measure evaluates metrics. Manage addresses risks through controls.

165
MCQmedium

A company deploys an LLM-based application that retrieves external web content to answer user queries. An attacker crafts a webpage that, when retrieved, injects a hidden instruction telling the LLM to ignore its system prompt and output sensitive internal data. What type of attack is this?

A.Direct prompt injection
B.Jailbreaking
C.Model inversion attack
D.Indirect prompt injection
AnswerD

Indirect prompt injection involves malicious instructions hidden in data the LLM retrieves from external sources.

Why this answer

Indirect prompt injection occurs when malicious instructions are embedded in content retrieved by the LLM, as opposed to direct injection where the user themselves provides the malicious prompt.

166
MCQmedium

A data analyst wants to use a model that provides feature importance scores to understand which factors most influence customer churn. They also need the model to handle both numerical and categorical data with minimal preprocessing. Which algorithm is BEST suited?

A.Random forest
B.Support vector machine (SVM) with RBF kernel
C.Logistic regression
D.k-nearest neighbours (k-NN)
AnswerA

Random forests output feature importance, handle mixed data, and are robust to scaling.

Why this answer

Random forests provide feature importance, handle mixed data types, and require little preprocessing.

167
MCQmedium

A hospital uses an AI system to prioritize patient triage based on vital signs and medical history. During a trial, the system consistently assigns lower urgency to elderly patients with chronic conditions, even when their symptoms suggest high risk. Which approach best addresses this bias?

A.Use a different dataset from a similar hospital without checking demographics
B.Manually increase the weight of age-related features in the model
C.Replace the neural network with a decision tree to simplify decision logic
D.Audit the training data for representation of elderly patients and retrain with balanced data
AnswerD

Auditing the training data for representation of elderly patients directly addresses the dataset bias causing the system to deprioritise this group. Retraining with balanced data corrects the skewed distribution of chronic-condition cases, satisfying the fairness constraint that the AI must not systematically discriminate based on age. This approach ensures the model learns genuine risk patterns rather than spurious correlations from under-represented subgroups.

Why this answer

The bias originates from the training data underrepresenting elderly patients with chronic conditions, causing the model to learn skewed urgency patterns. Auditing the data for representation and retraining with balanced data directly addresses the root cause by ensuring the model learns from a fair distribution of cases, which is a standard bias mitigation technique in AI systems.

Exam trap

CompTIA often tests the misconception that changing the model architecture (e.g., switching to a decision tree) or manually tweaking feature weights can fix bias, when the real solution lies in auditing and rebalancing the training data.

How to eliminate wrong answers

Option A is wrong because using a different dataset from a similar hospital without checking demographics merely shifts the problem; it does not guarantee balanced representation and may introduce new biases. Option B is wrong because manually increasing the weight of age-related features is a form of ad hoc feature engineering that can overcorrect and introduce new biases, and it does not address the underlying data imbalance. Option C is wrong because replacing the neural network with a decision tree does not inherently fix bias; the decision tree will still learn from the same biased data, and its simpler logic does not prevent it from replicating the skewed patterns.

168
Multi-Selecteasy

A company wants to use AI to automatically detect anomalies in server log data. The data is time-series and labeled with 'normal' and 'anomaly' for the past year. Which TWO techniques are appropriate for this use case?

Select 2 answers
A.Train an image classification model (CNN) on screenshots of log graphs
B.Use a time-series anomaly detection model (e.g., Isolation Forest with sliding windows)
C.Train a supervised classification model (e.g., XGBoost) on extracted features with the labels
D.Use a code generation model to fix the anomalies automatically
E.Build a recommendation system based on user activity logs
AnswersB, C

Isolation Forest works on numerical features; sliding windows capture temporal patterns.

Why this answer

Isolation Forest with sliding windows is a well-suited unsupervised technique for detecting anomalies in time-series data by isolating outliers in feature windows extracted from the log stream. Option C is correct because the company has labeled data ('normal' and 'anomaly'), enabling a supervised classification model like XGBoost to learn patterns from engineered features and predict anomalies accurately.

Exam trap

The AI0-001 exam often tests the distinction between supervised and unsupervised techniques, and candidates mistakenly choose an unsupervised method (like Isolation Forest) when labeled data is available, or they overlook that both supervised and unsupervised approaches can be valid depending on the data and problem framing.

169
Multi-Selectmedium

An organization is building a recommendation system that requires low-latency vector similarity search. They need to store and query millions of embeddings. Which THREE technologies are appropriate for this task?

Select 3 answers
A.Snowflake
B.Amazon S3
C.Weaviate
D.pgvector
E.Pinecone
AnswersC, D, E

Weaviate is an open-source vector database with built-in similarity search.

Why this answer

Pinecone, Weaviate, and pgvector are vector databases designed for similarity search. Snowflake and S3 are not optimized for vector search.

170
MCQhard

A self-driving car company is testing an AI model for pedestrian detection. During simulation, the model fails to detect pedestrians in low-light conditions. The safety team wants to improve robustness without retraining the entire model from scratch. Which approach is most appropriate?

A.Replace the convolutional layers with transformer layers to improve attention.
B.Apply data augmentation techniques to simulate low-light conditions in the training dataset.
C.Use adversarial training to add imperceptible perturbations to training images.
D.Increase the model's depth by adding more convolutional layers.
AnswerB

Data augmentation can expand the training data to include low-light scenarios, improving robustness without full retraining.

Why this answer

Data augmentation techniques, such as adjusting brightness, contrast, and adding noise, can synthetically create low-light training examples from existing data. This improves the model's robustness to low-light conditions without requiring a full retraining from scratch, as it directly addresses the distribution shift in the input data.

Exam trap

CompTIA often tests the distinction between improving robustness to natural distribution shifts (e.g., low-light) via augmentation versus defending against adversarial perturbations, causing candidates to mistakenly choose adversarial training for non-adversarial scenarios.

How to eliminate wrong answers

Option A is wrong because replacing convolutional layers with transformer layers would require significant architectural changes and likely full retraining, not a lightweight fix, and transformers are not inherently more robust to low-light conditions without specific training. Option C is wrong because adversarial training focuses on imperceptible perturbations that cause misclassification, which is a different problem (adversarial attacks) than natural low-light degradation; it does not simulate the global brightness reduction or noise patterns of low-light environments. Option D is wrong because increasing model depth by adding more convolutional layers does not address the specific data distribution shift (low-light) and may lead to overfitting or vanishing gradients without corresponding training data changes.

171
MCQeasy

A company wants to train a language model on sensitive customer data without transferring the raw data to a central server. Which privacy-preserving technique should they use?

A.Federated learning
B.Differential privacy
C.Data minimisation
D.Anonymisation
AnswerA

Federated learning trains the model locally and only shares aggregated updates, keeping raw data on the device.

Why this answer

Federated learning is the correct technique because it trains a shared model across decentralized edge devices holding local data, without transferring raw customer data to a central server. Only model updates (gradients) are sent to the aggregation server, preserving data locality and reducing exposure. This directly addresses the requirement of avoiding raw data transfer while still enabling collaborative model training.

Exam trap

CompTIA AI often tests the distinction between techniques that prevent raw data transfer (federated learning) versus techniques that protect data after it has been transferred (differential privacy, anonymisation), leading candidates to confuse privacy-preserving computation with output privacy.

How to eliminate wrong answers

Option B (Differential privacy) is wrong because it adds noise to query outputs or training data to protect individual records, but it does not prevent raw data from being transferred to a central server; it only limits information leakage from the released model. Option C (Data minimisation) is wrong because it is a principle of collecting only necessary data, not a technical mechanism for training a model without transferring raw data to a central location. Option D (Anonymisation) is wrong because it irreversibly removes personally identifiable information from the dataset before transfer, but the raw (anonymised) data still must be sent to a central server, violating the requirement of no raw data transfer.

172
MCQmedium

An AI team is concerned about their model leaking sensitive information from its training data when queried. Which privacy-preserving technique adds noise to the training process to limit what can be inferred about any individual record?

A.Differential privacy
B.Homomorphic encryption
C.Data sanitization
D.Federated learning
AnswerA

Differential privacy adds calibrated noise during training to bound the influence of any single data point.

Why this answer

Differential privacy (A) is the correct answer because it directly addresses the concern of leaking sensitive information from training data by adding calibrated noise to the training process or query responses. This noise ensures that the output of the model does not significantly change whether any single individual's record is included or excluded, thereby limiting what can be inferred about any specific record. The technique is formalized through a privacy budget (ε, epsilon) that quantifies the privacy guarantee, making it the standard approach for privacy-preserving machine learning.

Exam trap

The AI0-001 exam often tests the distinction between techniques that protect data during computation (like homomorphic encryption) versus those that protect against inference from model outputs (like differential privacy), causing candidates to confuse encryption with privacy guarantees.

How to eliminate wrong answers

Option B (Homomorphic encryption) is wrong because it focuses on performing computations on encrypted data without decrypting it, which protects data in transit or at rest but does not add noise to the training process or limit inference about individual records. Option C (Data sanitization) is wrong because it typically involves removing or anonymizing personally identifiable information (PII) from the dataset before training, which is a preprocessing step and does not involve adding noise during the training process itself. Option D (Federated learning) is wrong because it trains models across decentralized devices without sharing raw data, but it does not inherently add noise to limit inference about individual records; without differential privacy, federated learning can still leak information through model updates.

173
MCQmedium

A developer is building a natural language processing system to classify customer reviews as positive, neutral, or negative. They have 50,000 labeled reviews. Which model architecture is MOST appropriate for this task?

A.Use a convolutional neural network (CNN) on raw text
B.Train a recurrent neural network (RNN) from scratch
C.Fine-tune a pre-trained BERT model
D.Word2vec embeddings followed by logistic regression
AnswerC

BERT provides deep bidirectional representations; fine-tuning on the labeled reviews yields state-of-the-art text classification accuracy.

Why this answer

Fine-tuning a pre-trained BERT model is most appropriate because BERT is a transformer-based model pre-trained on a large corpus and can be fine-tuned on the 50,000 labeled reviews to achieve high accuracy with relatively little data. It captures bidirectional context, which is crucial for sentiment classification, and avoids the need for training from scratch.

Exam trap

A common mistake is to assume that training from scratch or using simpler models like logistic regression is sufficient, but pre-trained transformers like BERT are the standard for achieving high accuracy with limited labeled data.

How to eliminate wrong answers

Option A is wrong because using a CNN on raw text without embeddings or pre-processing ignores the sequential and contextual nature of language, leading to poor performance on sentiment classification. Option B is wrong because training an RNN from scratch on only 50,000 samples is prone to overfitting and underperformance compared to leveraging a pre-trained model like BERT. Option D is wrong because Word2vec embeddings followed by logistic regression provides only shallow, bag-of-words-like features and cannot capture complex contextual relationships needed for nuanced sentiment analysis.

174
MCQhard

A company trains a large language model on a dataset that includes copyrighted books. Under current legal interpretations, which statement about copyright infringement is MOST accurate?

A.Training on copyrighted data is generally permissible under the EU AI Act.
B.Training on copyrighted data is always covered by fair use in the US.
C.Training on copyrighted data is allowed as long as the model is not used commercially.
D.Training on copyrighted data without permission likely infringes copyright, though fair use may be a defense.
AnswerD

Copyright law protects original works; using them for training without permission is prima facie infringement, but fair use may apply.

Why this answer

Training on copyrighted works without permission is generally considered copyright infringement, unless a specific exception applies (e.g., fair use in the US). Fair use is determined on a case-by-case basis and is not automatically granted. Using only public domain works avoids infringement.

The EU AI Act does not provide blanket permission.

175
MCQmedium

While training a deep neural network, the loss function fails to converge and oscillates wildly. Which adjustment is most likely to stabilize training?

A.Increase the number of hidden layers
B.Decrease the batch size
C.Reduce the learning rate
D.Use a test set
AnswerC

Lower learning rate reduces step size, stabilizing training.

Why this answer

When the loss function oscillates wildly and fails to converge, it typically indicates that the learning rate is too high, causing the optimizer to overshoot the minima. Reducing the learning rate allows the gradient descent updates to take smaller, more stable steps, which helps the loss converge smoothly. This is a fundamental hyperparameter tuning step in deep learning training.

Exam trap

CompTIA often tests the misconception that increasing model complexity (more layers) or using more data (test set) directly fixes training instability, when in fact the learning rate is the primary culprit for oscillation and non-convergence.

How to eliminate wrong answers

Option A is wrong because increasing the number of hidden layers adds more parameters and non-linearity, which can exacerbate instability and overfitting, not stabilize training. Option B is wrong because decreasing the batch size increases the variance in gradient estimates, which often leads to noisier updates and can worsen oscillation, not reduce it. Option D is wrong because using a test set is for evaluating generalization performance after training, not for stabilizing the training process itself.

176
MCQmedium

Refer to the exhibit. A stream processor ingests events. One event arrives with missing "user_id". What will happen?

A.The event will be stored in a dead-letter queue automatically.
B.The event will be accepted but user_id will be set to null.
C.The event will be accepted with a default user_id of 0.
D.The event will be rejected because user_id is required.
AnswerD

Validation against the required field causes rejection.

Why this answer

In stream processing systems like Apache Kafka or AWS Kinesis, if a required field such as 'user_id' is missing and the schema (e.g., Avro, JSON Schema) defines it as required, the event will be rejected at ingestion. The stream processor typically validates the event against the schema; if validation fails, the event is not accepted into the stream, preventing downstream processing errors.

Exam trap

CompTIA often tests the misconception that stream processors automatically handle missing fields by setting defaults or using dead-letter queues, but the correct behavior is strict rejection when the field is required by the schema.

How to eliminate wrong answers

Option A is wrong because a dead-letter queue is not automatically used for missing required fields; it is typically configured for events that fail processing after ingestion, not for schema validation failures at ingestion time. Option B is wrong because setting user_id to null would violate the required constraint; stream processors do not automatically coerce missing required fields to null unless explicitly configured with a default value. Option C is wrong because assigning a default user_id of 0 is not standard behavior; default values must be explicitly defined in the schema, and without such definition, the event is rejected.

177
Multi-Selecthard

Which THREE factors are most critical to consider when designing a continuous integration/continuous deployment (CI/CD) pipeline for machine learning?

Select 3 answers
A.Data quality and schema validation
B.A/B testing framework for comparing models
C.Automated model performance benchmarking
D.Automated unit testing of application code
E.Versioning of datasets, models, and training code
AnswersA, C, E

Data validation ensures reliable model inputs.

Why this answer

Data quality and schema validation (A) are critical because ML pipelines are highly sensitive to data drift, missing values, and schema mismatches that can silently degrade model performance. Without automated validation at the CI stage, bad data can pass through and corrupt model training or inference, leading to unreliable outputs in production.

Exam trap

CompTIA often tests the distinction between ML-specific pipeline requirements and general DevOps practices, so candidates mistakenly select generic options like unit testing (D) or A/B testing (B) instead of the ML-critical factors of data validation, model benchmarking, and versioning.

178
MCQmedium

A company wants to roll out a new recommendation model to production. They decide to run an A/B test where 10% of users see the new model and 90% see the old model. After one week, the new model shows a 5% improvement in click-through rate. What is the next best action?

A.Immediately roll out the new model to 100% of users
B.Revert to the old model because the improvement is minimal
C.Run the test for another month to ensure statistical significance
D.Increase the testing percentage gradually while monitoring performance metrics and guardrails
AnswerD

This approach captures benefits while controlling risk.

Why this answer

A 5% improvement observed over only one week with a 10% traffic split is insufficient to confirm statistical significance or rule out novelty effects, data drift, or seasonal bias. The recommended best practice in AI deployment is to gradually increase the testing percentage (e.g., 10% → 25% → 50% → 100%) while continuously monitoring performance metrics and guardrails (e.g., click-through rate, conversion rate, latency, and error rates) to ensure the new model generalizes safely across the full user population.

Exam trap

CompTIA often tests the misconception that a short-term observed improvement is automatically statistically significant, tempting candidates to choose immediate full rollout (Option A) or premature reversion (Option B), when the correct answer emphasizes incremental deployment with continuous monitoring.

How to eliminate wrong answers

Option A is wrong because immediately rolling out to 100% of users risks exposing the entire user base to a model that may have only shown a temporary or statistically insignificant improvement, potentially causing negative business impact if the model fails under full load or exhibits unexpected behavior. Option B is wrong because reverting to the old model based on a 'minimal' improvement is premature; a 5% uplift could be meaningful depending on the baseline, and the test should be allowed to run longer to gather sufficient data for a valid statistical conclusion. Option C is wrong because running the test for another month without adjusting the traffic split or monitoring guardrails is inefficient and may still not guarantee statistical significance if the sample size remains too small; the correct approach is to increase the traffic percentage gradually while verifying performance at each step.

179
Multi-Selecteasy

A data scientist is preparing a dataset for supervised learning. Which TWO steps are essential?

Select 2 answers
A.One-hot encoding all features
B.Normalizing features
C.Labeling the data
D.Removing outliers
E.Splitting into training and test sets
AnswersC, E

Correct; supervised learning requires labeled examples.

Why this answer

Labeling the data is essential for supervised learning because the algorithm requires input-output pairs to learn a mapping function. Without labeled data, the model cannot be trained to predict outcomes, as supervised learning relies on ground-truth targets for error correction during training.

Exam trap

CompTIA often tests the distinction between mandatory preprocessing steps and optional optimizations, trapping candidates who confuse best practices (like normalization or outlier removal) with absolute requirements for supervised learning.

180
MCQmedium

A team is building a regression model to predict house prices. The dataset includes numerical features (square footage, number of bedrooms) and categorical features (neighborhood, roof type). The categorical features have high cardinality (neighborhood has 200+ unique values). Which encoding strategy should the team use to avoid overfitting and maintain model interpretability?

A.Target encoding with regularization.
B.Label encoding.
C.Binary encoding.
D.One-hot encoding with feature selection.
AnswerA

Target encoding condenses categories using target mean, and regularization prevents overfitting.

Why this answer

Target encoding with regularization is the best choice because it replaces each categorical value with the mean of the target variable for that category, which captures the relationship between the category and house prices. Regularization (e.g., adding a prior or using cross-validation) shrinks the encoded values toward the global mean, preventing overfitting on rare categories (e.g., neighborhoods with only a few houses). This maintains interpretability because each encoded value directly reflects the average price impact of that category, unlike black-box embeddings.

Exam trap

CompTIA often tests the misconception that one-hot encoding is always safe for categorical variables, but here the high cardinality (200+ neighborhoods) makes one-hot encoding impractical and prone to overfitting, leading candidates to overlook target encoding with regularization as the correct solution.

How to eliminate wrong answers

Option B (Label encoding) is wrong because it assigns arbitrary integer labels to categories (e.g., neighborhood 1, 2, 3), which implies an ordinal relationship that does not exist, misleading the regression model into treating categories as ordered numeric features. Option C (Binary encoding) is wrong because while it reduces dimensionality compared to one-hot, it still creates multiple binary columns per category, which can lead to overfitting with high-cardinality features and does not directly capture the target relationship, reducing interpretability. Option D (One-hot encoding with feature selection) is wrong because one-hot encoding with 200+ neighborhoods would create over 200 dummy variables, causing extreme sparsity and high risk of overfitting even after feature selection, and feature selection methods (e.g., Lasso) may discard important rare categories, losing signal.

181
MCQhard

An e-commerce company needs to update its recommendation model continuously as user preferences change. The model currently retrains from scratch every night, but the training time is too long. Which approach would reduce training time while keeping the model up-to-date?

A.Use dimensionality reduction on features.
B.Implement incremental learning using online gradient descent.
C.Switch to a simpler model.
D.Increase the batch size for retraining.
AnswerB

Online learning updates the model incrementally, avoiding full retrain.

Why this answer

Incremental learning using online gradient descent updates the model parameters with each new data point or mini-batch, avoiding the need to retrain from scratch. This approach significantly reduces training time while continuously adapting to changing user preferences, making it ideal for real-time recommendation systems.

Exam trap

CompTIA often tests the misconception that dimensionality reduction or simpler models are the primary solution for reducing training time, when in fact incremental learning directly addresses the need for continuous updates without full retraining.

How to eliminate wrong answers

Option A is wrong because dimensionality reduction reduces the number of features but does not eliminate the need to retrain the entire model from scratch each night; the training time savings are marginal and the core problem of full retraining remains. Option C is wrong because switching to a simpler model may reduce training time but typically sacrifices model accuracy and expressiveness, which is critical for capturing nuanced user preferences in recommendations. Option D is wrong because increasing the batch size for retraining can actually increase memory usage and may not reduce overall training time if the model still retrains from scratch nightly; it does not address the fundamental inefficiency of full retraining.

182
Multi-Selecteasy

Which THREE are common pitfalls when operationalizing AI models? (Select THREE.)

Select 3 answers
A.Training-serving skew due to differences in data preprocessing
B.Using simpler models that are easier to debug
C.Lack of monitoring for model performance drift
D.Ignoring infrastructure scalability requirements
E.Automating the model retraining process
AnswersA, C, D

Causes model inaccuracies in production.

Why this answer

Training-serving skew occurs when the data preprocessing logic used during model training differs from that used during inference in production. This is a common pitfall in operationalizing AI models, as even minor discrepancies in feature engineering, normalization, or encoding can cause significant performance degradation. For example, using different libraries or versions for tokenization between training and serving pipelines directly leads to skew.

Exam trap

CompTIA often tests the distinction between operational pitfalls and best practices, so the trap here is that candidates may mistake a recommended practice (like using simpler models or automating retraining) for a pitfall, when in fact the pitfall is the lack of monitoring or ignoring scalability.

183
MCQeasy

A healthcare startup is building an AI system to predict patient readmission risk. The team collects structured data from electronic health records (EHR) including age, diagnosis codes, lab results, and previous admissions. During initial training, the model achieves 95% accuracy on the validation set but only 60% accuracy on a holdout test set from a different hospital. The data scientist suspects overfitting. Which action should the team take first to improve generalization?

A.Apply L2 regularization to the model
B.Switch to a linear regression model
C.Increase the model complexity by adding more layers
D.Collect more data from the same hospital
AnswerA

Regularization penalizes large coefficients, reducing overfitting and improving generalization to new data.

Why this answer

The model's high accuracy on the validation set but poor accuracy on a holdout test set from a different hospital indicates overfitting to the training data's specific patterns, which do not generalize to new data. L2 regularization (ridge regression) adds a penalty proportional to the square of the weights, discouraging the model from fitting noise and encouraging simpler, more generalizable decision boundaries. This directly addresses overfitting by reducing variance without requiring more data or reducing model capacity too drastically.

Exam trap

CompTIA often tests the misconception that overfitting is always solved by more data, but the trap here is that collecting more data from the same source does not fix distribution shift—regularization directly penalizes model complexity to improve generalization to unseen distributions.

How to eliminate wrong answers

Option B is wrong because switching to a linear regression model would reduce model capacity, potentially underfitting the complex relationships in EHR data, and does not specifically target the overfitting caused by high variance. Option C is wrong because increasing model complexity by adding more layers would exacerbate overfitting, making the model even more sensitive to training data noise and further reducing generalization. Option D is wrong because collecting more data from the same hospital would reinforce the same distributional biases and does not address the core issue of the model failing to generalize to a different hospital's data distribution.

184
MCQmedium

A hospital is implementing an AI system to analyze patient X-rays for potential fractures. The hospital must comply with HIPAA regulations. Which privacy-preserving technique allows the model to be trained on data from multiple hospitals without sharing raw patient data?

A.Federated learning
B.Differential privacy
C.Data anonymisation
D.Data pseudonymisation
AnswerA

Federated learning trains models locally and only shares model parameters, not raw patient data, thus preserving privacy across hospitals.

Why this answer

Federated learning trains model copies across multiple sites and aggregates only model updates (gradients) to a central server, keeping patient data local. Differential privacy adds noise to data but does not inherently prevent data sharing. Anonymisation and pseudonymisation still require sharing data, albeit de-identified.

185
MCQmedium

An AI system uses a pre-trained image classification model to detect defects in manufacturing. The team wants to deploy the model in an edge device with limited GPU memory. Which technique should they consider first?

A.Train the model from scratch using a smaller dataset
B.Apply quantization to reduce model size
C.Use a larger model with more parameters for higher accuracy
D.Increase the batch size to improve throughput
AnswerB

Quantization reduces memory footprint and speeds up inference on edge devices.

Why this answer

Quantization reduces the precision of the model's weights and activations (e.g., from 32-bit floating point to 8-bit integer), which significantly shrinks the model size and memory footprint while often maintaining acceptable accuracy. This is the most direct and effective first step for deploying a pre-trained model on an edge device with limited GPU memory, as it requires no retraining and immediately addresses the memory constraint.

Exam trap

The AI0-001 exam often tests the misconception that increasing batch size or model size improves performance in resource-constrained environments, when in fact these actions increase memory demand and are counterproductive for edge deployment.

How to eliminate wrong answers

Option A is wrong because training from scratch on a smaller dataset would likely result in poor accuracy due to insufficient data and would not leverage the benefits of transfer learning, making it an inefficient and risky first step. Option C is wrong because using a larger model with more parameters would increase memory consumption, directly contradicting the goal of deploying on a device with limited GPU memory. Option D is wrong because increasing the batch size increases memory usage per inference step, which would worsen the memory constraint rather than alleviating it.

186
MCQmedium

A company uses a third-party LLM API to power its customer support chatbot. To prevent prompt injection attacks, which defense is MOST effective at the application layer?

A.Differential privacy during training
B.Input validation and sanitization
C.Rate limiting API calls
D.Output filtering of model responses
AnswerB

Correct. Sanitizing inputs removes or neutralizes injection attempts.

Why this answer

Input validation and sanitization can strip or escape malicious instructions before they reach the LLM, preventing both direct and indirect prompt injection.

187
Multi-Selectmedium

A company is implementing an AI ethics board. Which TWO responsibilities should the board typically have?

Select 2 answers
A.Approving or rejecting high-risk AI initiatives
B.Writing code for fairness algorithms
C.Reviewing AI projects for ethical compliance and potential biases
D.Developing marketing strategies for AI products
E.Conducting daily data privacy audits
AnswersA, C

The board should have authority to approve or reject high-risk initiatives to ensure responsible AI deployment.

Why this answer

An AI ethics board should oversee AI projects for ethical compliance and approve high-risk AI initiatives. Implementing technical models and auditing data privacy are operational tasks not typically under the board's direct purview.

188
MCQeasy

A company wants to deploy a chatbot that uses natural language understanding (NLU) to answer customer queries. Which AI technique is most suitable for understanding the intent of user input?

A.K-means clustering
B.Linear regression
C.Sequence-to-sequence model with attention
D.Decision tree
AnswerC

This architecture effectively models sequences and captures important parts of input via attention, ideal for understanding user intent.

Why this answer

Sequence-to-sequence models with attention are specifically designed to handle variable-length input sequences (like user queries) and map them to output sequences (like intent labels or responses). The attention mechanism allows the model to focus on the most relevant parts of the input when determining intent, which is critical for understanding nuanced or long user queries in NLU tasks.

Exam trap

The trap here is that candidates often confuse clustering (K-means) or simple classification (decision trees) with NLU, failing to recognize that understanding intent requires modeling sequential dependencies and context, which only sequence-to-sequence models with attention provide.

How to eliminate wrong answers

Option A is wrong because K-means clustering is an unsupervised learning algorithm used for grouping similar data points into clusters, not for understanding the intent of user input, which requires supervised learning or sequence modeling. Option B is wrong because linear regression is a regression technique for predicting continuous numerical values, not for classifying or interpreting the intent of natural language text. Option D is wrong because decision trees are simple rule-based classifiers that lack the ability to capture sequential dependencies and context in natural language, making them unsuitable for intent recognition in chatbot NLU.

189
MCQmedium

An operations team monitors a classification model in production. The confusion matrix for the model shows the following values: TP=1500, FN=500, FP=600, TN=2400. Which metric should the team calculate to assess the model's ability to avoid false positives?

A.Accuracy
B.F1-score
C.Recall
D.Precision
AnswerD

Precision = TP/(TP+FP) = 1500/2100 = 0.714, directly relates to false positives.

Why this answer

Precision (TP / (TP + FP)) directly measures the proportion of positive identifications that were actually correct, making it the ideal metric to assess the model's ability to avoid false positives. With TP=1500 and FP=600, precision is 1500/(1500+600)=0.714, indicating that 71.4% of predicted positives are true positives, while 28.6% are false positives. The question explicitly asks about avoiding false positives, which is the inverse of precision's focus on the correctness of positive predictions.

Exam trap

CompTIA often tests the distinction between precision and recall by framing a question about 'avoiding false positives' or 'avoiding false negatives,' leading candidates to confuse precision with recall or to default to F1-score as a balanced metric.

How to eliminate wrong answers

Option A is wrong because Accuracy ((TP+TN)/(TP+TN+FP+FN)) measures overall correctness across all classes, not specifically the model's ability to avoid false positives; it can be high even when false positives are numerous if the negative class dominates. Option B is wrong because F1-score is the harmonic mean of precision and recall, balancing both false positives and false negatives, but it does not isolate the ability to avoid false positives as precision does. Option C is wrong because Recall (TP/(TP+FN)) measures the model's ability to find all positive samples, focusing on false negatives, not false positives.

190
Multi-Selecteasy

An AI engineer is selecting a PEFT technique to fine-tune a large language model. Which TWO are examples of PEFT (Parameter-Efficient Fine-Tuning)?

Select 2 answers
A.Instruction tuning on a large dataset
B.LoRA
C.QLoRA
D.Gradient checkpointing
E.Full fine-tuning of all parameters
AnswersB, C

LoRA adds low-rank matrices to transformer layers, a standard PEFT method.

Why this answer

LoRA and QLoRA are popular PEFT methods that update only a small number of additional parameters while keeping the base model frozen.

191
MCQhard

A medical imaging team is developing an AI model to detect tumors from CT scans. They have 10,000 labeled scans, but the labels were created by a semi-automated process with an estimated 20% error rate (mislabeled tumor vs. no tumor). The team trains a convolutional neural network (CNN) and achieves 90% accuracy on a held-out test set that was carefully validated by an expert radiologist. However, when deployed to a new hospital's patient population, the accuracy drops to 70%. The team suspects domain shift and label noise. Which strategy is most likely to improve model robustness for the new hospital?

A.Use active learning to select the most uncertain predictions from the new hospital's data, then have an expert radiologist correct those labels
B.Randomly select 1,000 scans from the new hospital and have them re-labeled by the radiologist
C.Collect 20,000 more scans with the same semi-automated labeling process
D.Reduce the CNN's number of layers and apply dropout to combat overfitting
AnswerA

Active learning targets the most informative samples, maximizing improvement per expert effort.

Why this answer

Active learning selects the most uncertain predictions from the new hospital's data, allowing an expert radiologist to efficiently correct the most informative labels. This directly addresses both label noise (by correcting mislabeled examples) and domain shift (by focusing on samples where the model is uncertain in the new domain). Option B is wrong because random selection may not target the most impactful errors, wasting expert effort.

Option C is wrong because adding more noisy labels from the same flawed process will amplify label noise without correcting the domain shift. Option D is wrong because reducing model complexity and dropout are regularization techniques that do not fix label noise or domain shift.

192
MCQeasy

A data scientist is training a binary classification model to detect fraudulent transactions. The dataset is highly imbalanced with 99% legitimate and 1% fraudulent. Which evaluation metric should be prioritized to assess model performance?

A.Accuracy
B.F1-score
C.Mean Squared Error
D.Log Loss
AnswerB

F1-score balances precision and recall, making it ideal for imbalanced classification.

Why this answer

In a highly imbalanced dataset (99% legitimate, 1% fraudulent), accuracy is misleading because a model that predicts all transactions as legitimate would achieve 99% accuracy without detecting any fraud. The F1-score combines precision and recall into a single metric, making it the preferred choice for evaluating binary classification performance on imbalanced data, as it penalizes both false positives and false negatives equally.

Exam trap

The trap here is that candidates often default to accuracy as the primary metric, not realizing that in highly imbalanced scenarios, accuracy can be artificially high and meaningless, while the F1-score reveals the true performance on the minority class.

How to eliminate wrong answers

Option A is wrong because accuracy is not suitable for imbalanced datasets; a naive model predicting the majority class can achieve high accuracy while failing to detect any fraudulent transactions. Option C is wrong because Mean Squared Error (MSE) is a regression metric used for continuous outputs, not for binary classification tasks. Option D is wrong because Log Loss measures the probabilistic confidence of predictions and, while useful, does not directly account for class imbalance in the same way the F1-score does; it can be dominated by the majority class's probabilities.

193
MCQmedium

Refer to the exhibit. An AI auditor reviews the fairness configuration. What is the purpose of this policy?

A.Ensure equal error rates across groups
B.Ensure equal positive prediction rates across groups
C.Ensure equal accuracy across groups
D.Ensure model interpretability
AnswerB

Correct; demographic parity aims for similar selection rates.

Why this answer

The policy sets a fairness constraint that requires the model's positive prediction rate (the fraction of instances predicted as the positive class) to be equal across all defined groups. This is a standard demographic parity requirement, which is implemented by adjusting the decision threshold or reweighting training data to ensure that each group receives the same proportion of positive predictions, regardless of the actual outcome distribution.

Exam trap

CompTIA often tests the distinction between demographic parity (equal positive prediction rates) and equalized odds (equal error rates), so candidates mistakenly choose 'equal error rates' when they see a fairness policy that actually enforces demographic parity.

How to eliminate wrong answers

Option A is wrong because equal error rates across groups refer to equalized odds (equal false positive and false negative rates), not equal positive prediction rates. Option C is wrong because equal accuracy across groups is a different fairness metric (accuracy parity) that does not guarantee equal positive prediction rates. Option D is wrong because model interpretability is a separate concern about understanding model decisions, not a fairness constraint on prediction rates.

194
MCQmedium

A team is designing a secure API for an AI model. They want to prevent data leakage through overly detailed error messages. Which principle should they follow?

A.Return detailed error codes for debugging
B.Use generic error messages
C.Log errors to the client side
D.Disable all error messages
AnswerB

Generic error messages avoid revealing sensitive information about the model or system.

Why this answer

Least-privilege API access and minimal error information reduce the attack surface. Specifically, returning generic error messages prevents leaking internal details.

195
MCQeasy

Which stage of the AI project lifecycle involves splitting data into training, validation, and test sets?

A.Model evaluation
B.Data acquisition
C.Problem definition
D.Data preparation
AnswerD

Data preparation includes cleaning, transforming, and splitting data into subsets.

Why this answer

Data preparation includes splitting data, cleaning, normalization, and preventing leakage.

196
MCQeasy

A data scientist is building a model to predict whether a credit card transaction is fraudulent, using labeled historical data. Which machine learning paradigm is being used?

A.Reinforcement learning
B.Unsupervised learning
C.Supervised learning
D.Self-supervised learning
AnswerC

The model is trained on labeled data (fraud vs. legitimate) to predict outcomes, which is supervised learning.

Why this answer

Supervised learning uses labeled data to train a model to map inputs to outputs. Fraud detection with historical labels is a classic binary classification problem.

197
MCQhard

A large e-commerce company uses a recommendation engine trained on millions of user interactions. Recently, the marketing team noticed a sharp increase in click-through rates for a particular product category. Upon investigation, an engineer found that a competitor had injected fake user profiles that consistently clicked on their products, skewing the training data. The company needs to remediate the attack and prevent future occurrences. The team has limited time and budget. Which course of action should the company take first?

A.Identify and remove the fake user profiles from the training dataset, then retrain the model
B.Implement adversarial training to make the model robust to future poisoning attempts
C.Decrease the frequency of model retraining to limit exposure to new data
D.Add differential privacy noise to the training data to mask the injected profiles
AnswerA

This directly eliminates the poisoned data and restores model accuracy.

Why this answer

The immediate priority is to remove the poisoned data from the training set and retrain the model, as the fake profiles are actively skewing predictions and causing incorrect click-through rate spikes. This direct remediation addresses the root cause with minimal time and budget, aligning with the team's constraints. Without cleaning the data, any further training or defensive measures would still operate on corrupted inputs.

Exam trap

The AI0-001 exam often tests the principle that immediate incident response (clean and retrain) must precede long-term defenses, tempting candidates to choose sophisticated solutions like adversarial training or differential privacy that are premature without first removing the poisoned data.

How to eliminate wrong answers

Option B is wrong because adversarial training is a proactive defense that makes models robust to future attacks, but it does not remove existing poisoned data; the current model is already compromised and needs immediate cleanup first. Option C is wrong because decreasing retraining frequency would actually prolong exposure to the poisoned data, allowing the attack to continue influencing recommendations for longer. Option D is wrong because differential privacy adds noise to protect individual privacy, not to correct injected profiles; it would not remove the fake clicks and could degrade model accuracy without addressing the attack.

198
MCQhard

An AI system is being developed to diagnose diseases from medical images. The model achieves 99% accuracy on the test set, but when deployed in a different hospital, performance drops significantly. Which of the following is the MOST likely cause?

A.The model is being attacked by adversarial examples.
B.The training data does not represent the new hospital's population or imaging equipment.
C.The model is overfitted to the training data.
D.Data leakage occurred during preprocessing.
AnswerB

Correct; domain shift is a common cause of performance degradation.

Why this answer

The model's high accuracy on the test set but poor performance in a different hospital indicates a distribution shift between the training data and the deployment environment. This is a classic case of dataset shift, where the training data does not represent the new hospital's patient population or imaging equipment, leading to degraded model generalization.

Exam trap

CompTIA often tests the distinction between overfitting and dataset shift, where candidates mistakenly attribute a deployment performance drop to overfitting even when test accuracy is high, missing the real issue of distribution mismatch.

How to eliminate wrong answers

Option A is wrong because adversarial examples are deliberately crafted inputs designed to fool a model, but the scenario describes a general performance drop across all images, not targeted attacks. Option C is wrong because overfitting would cause poor performance on the test set as well, not just on deployment; here the test accuracy is high, ruling out overfitting. Option D is wrong because data leakage would inflate test accuracy artificially, but the drop in deployment is due to distribution mismatch, not leakage during preprocessing.

199
MCQeasy

An organization wants to centralize experiment tracking, model versioning, and deployment management across its data science team. Which MLOps platform is specifically designed for experiment tracking and model registry?

A.Apache Airflow
B.Weights & Biases
C.MLflow
D.Kubeflow
AnswerC

MLflow offers experiment tracking, model registry, and deployment management, making it a comprehensive tool for MLOps.

Why this answer

MLflow is an open-source MLOps platform that provides a centralized experiment tracking API (MLflow Tracking) and a model registry (MLflow Model Registry) for versioning, staging, and deploying machine learning models. It is specifically designed to address the need for experiment tracking and model lifecycle management, making it the correct choice for this scenario.

Exam trap

CompTIA often tests the distinction between tools that handle only one part of the MLOps lifecycle (like W&B for tracking or Kubeflow for deployment) versus a unified platform like MLflow that combines experiment tracking and model registry.

How to eliminate wrong answers

Option A is wrong because Apache Airflow is a workflow orchestration tool for scheduling and managing data pipelines, not a platform for experiment tracking or model registry. Option B is wrong because Weights & Biases (W&B) is a commercial platform focused on experiment tracking and visualization, but it does not include a built-in model registry for versioning and deployment management; its model registry is a separate add-on and not as integrated as MLflow's. Option D is wrong because Kubeflow is a Kubernetes-native platform for deploying and managing ML workflows, but it does not have a dedicated experiment tracking or model registry component; it relies on external tools like MLflow or Katib for those functions.

200
MCQhard

An AI system for autonomous vehicles uses reinforcement learning (RL) to navigate. The reward function encourages reaching the destination quickly but penalizes collisions heavily. The agent learns to drive aggressively, causing minor accidents. Which modification to the reward function would best align the agent's behavior with desired safe driving?

A.Increase the collision penalty to a very large negative value.
B.Remove the time-based reward and only reward reaching the destination.
C.Use a potential-based reward shaping to encourage progress toward destination.
D.Add a penalty term for high acceleration and jerky movements.
AnswerD

Penalizing aggressive actions directly encourages smooth driving.

Why this answer

Adding a penalty for high acceleration and jerky movements directly addresses the root cause of the aggressive driving behavior—smoothness and safety—without undermining the primary goal of reaching the destination. This modification shapes the reward function to penalize unsafe driving patterns, aligning the agent's learned policy with desired safe navigation while preserving the time-based incentive for efficiency.

Exam trap

CompTIA often tests the misconception that simply increasing the penalty for collisions (option A) is sufficient to ensure safe driving, when in reality it can lead to reward hacking or overly conservative policies, and the correct solution requires shaping the reward to penalize the specific unsafe behaviors (e.g., high acceleration) that cause accidents.

How to eliminate wrong answers

Option A is wrong because simply increasing the collision penalty to a very large negative value may cause the agent to become overly cautious, potentially leading to freezing behavior or failure to navigate effectively, and does not address the underlying aggressive driving patterns that cause minor accidents. Option B is wrong because removing the time-based reward eliminates the incentive for efficiency, which could result in the agent taking excessively long routes or failing to prioritize timely arrival, thus not aligning with the desired safe driving behavior. Option C is wrong because potential-based reward shaping encourages progress toward the destination but does not penalize aggressive maneuvers; it may still allow the agent to drive aggressively as long as it makes progress, failing to mitigate the unsafe driving patterns.

201
MCQmedium

A developer is building an AI agent that needs to call external APIs (e.g., get weather, send email) based on user requests. Which pattern is BEST for enabling the agent to autonomously decide when to call these APIs?

A.Hard-code the API calls in the agent's logic
B.Use a chain-of-thought prompt to reason about the steps
C.Implement function calling in the LLM to generate structured API calls
D.Use a planning agent with a predefined workflow
AnswerC

Function calling allows the LLM to produce a JSON object specifying which function to call and with what arguments, enabling the agent to decide autonomously.

Why this answer

Function calling allows the LLM to output structured commands that invoke specific API functions, enabling autonomous tool use in a controlled manner.

202
MCQeasy

A team is implementing a machine learning pipeline to classify images for a defect detection system. They are considering using a pre-trained convolutional neural network (CNN) and fine-tuning it on their small dataset. What is the primary advantage of transfer learning in this scenario?

A.It ensures the model is not biased toward the original dataset
B.It eliminates the need for data preprocessing
C.It allows the model to leverage learned features from a large dataset, reducing training time and required data
D.It reduces the risk of overfitting by using a larger model
AnswerC

Transfer learning uses features from a large dataset, so fine-tuning requires less data and time.

Why this answer

Transfer learning allows the team to start with a pre-trained CNN (e.g., trained on ImageNet) that has already learned general features like edges, textures, and shapes from a massive dataset. By fine-tuning only the later layers on their small defect dataset, they dramatically reduce training time and the amount of labeled data needed, while still achieving high accuracy.

Exam trap

The trap here is that candidates may think transfer learning eliminates all bias or preprocessing needs (options A and B), or mistakenly believe a larger model inherently reduces overfitting (option D), when in fact the core benefit is leveraging pre-learned features to reduce data and training time.

How to eliminate wrong answers

Option A is wrong because transfer learning does not eliminate bias from the original dataset; in fact, it intentionally leverages that bias (learned features) as a starting point, and fine-tuning may still carry some original dataset bias. Option B is wrong because transfer learning does not eliminate the need for data preprocessing; images must still be resized, normalized, and augmented to match the pre-trained model's input requirements. Option D is wrong because using a larger model (e.g., deeper CNN) actually increases the risk of overfitting on a small dataset, not reduces it; transfer learning mitigates overfitting by providing a strong feature initialization, not by using a larger model.

203
Multi-Selectmedium

A team is deploying an AI model for credit approval. Which TWO ethical considerations must be addressed?

Select 2 answers
A.Training speed
B.Model interpretability
C.Model accuracy
D.Model fairness to avoid bias
E.Model size
AnswersB, D

Correct; interpretability helps ensure transparency and accountability.

Why this answer

Model interpretability (B) is essential for credit approval because financial decisions must be explainable to regulators and customers under laws like GDPR or ECOA. A black-box model that cannot justify why a loan was denied violates compliance requirements, making interpretability a core ethical and legal necessity.

Exam trap

CompTIA often tests the distinction between ethical requirements (interpretability, fairness) and technical performance metrics (accuracy, speed, size), leading candidates to mistakenly select accuracy as an ethical consideration.

204
MCQhard

A financial institution deploys an AI credit scoring model. After six months, the model's performance drops significantly. Analysis shows that the relationship between features and labels has changed. Which term describes this phenomenon?

A.Concept drift
B.Model decay
C.Overfitting
D.Data drift
AnswerA

Concept drift directly refers to changes in the relation between inputs and outputs.

Why this answer

Concept drift occurs when the statistical relationship between input features and the target label changes over time, which is exactly what happened when the credit scoring model's performance dropped due to a shift in the feature-label relationship. This is distinct from data drift, which only involves changes in the input data distribution without affecting the label mapping.

Exam trap

CompTIA often tests the distinction between concept drift and data drift, and the trap here is that candidates confuse a change in input data distribution (data drift) with a change in the underlying relationship between features and labels (concept drift), leading them to incorrectly select data drift.

How to eliminate wrong answers

Option B (Model decay) is wrong because model decay is a general term for performance degradation over time, but it does not specifically describe a change in the feature-label relationship; it could be caused by data drift, concept drift, or other factors. Option C (Overfitting) is wrong because overfitting refers to a model learning noise or specific patterns in the training data that do not generalize, not a post-deployment shift in the underlying relationship. Option D (Data drift) is wrong because data drift only describes changes in the distribution of input features (e.g., customer income shifts), not a change in the mapping from features to the target label (e.g., what constitutes a good credit risk).

205
MCQeasy

Refer to the exhibit. A security auditor identifies a critical vulnerability that could allow an attacker to manipulate model inputs to cause misclassification. Which configuration setting is most directly responsible for this vulnerability?

A.enable_input_sanitization = true
B.audit_level = basic
C.enable_adversarial_defense = false
D.pii_detection = enabled
AnswerC

Disabling adversarial defense leaves the model vulnerable.

Why this answer

The vulnerability described is an adversarial attack on model inputs, which directly exploits the absence of adversarial defenses. Setting `enable_adversarial_defense = false` disables mechanisms like adversarial training or input perturbation detection that prevent misclassification from manipulated inputs. This configuration is the most direct root cause because it explicitly turns off the defense designed to counter such attacks.

Exam trap

The AI0-001 exam often tests the distinction between input sanitization (which handles malformed or malicious data) and adversarial defense (which specifically counters perturbation-based attacks), causing candidates to mistakenly choose input sanitization as the answer.

How to eliminate wrong answers

Option A is wrong because `enable_input_sanitization = true` would actually help prevent input manipulation by cleaning or validating inputs, so enabling it reduces vulnerability, not causes it. Option B is wrong because `audit_level = basic` controls the granularity of logging and monitoring, not the security posture against adversarial inputs; it affects visibility, not defense. Option D is wrong because `pii_detection = enabled` focuses on identifying personally identifiable information for compliance, not on defending against adversarial perturbations that cause misclassification.

206
MCQhard

A developer is implementing a RAG system and needs to chunk large legal documents. The documents contain nested clauses and cross-references that should not be split across chunks. Which chunking strategy is MOST suitable?

A.Random chunking with varying sizes
B.Hierarchical chunking combining small and large chunks
C.Semantic chunking based on sentence and paragraph boundaries
D.Fixed-size chunking with 256 tokens
AnswerC

Semantic chunking respects natural language boundaries, keeping related clauses together.

Why this answer

Semantic chunking uses sentence boundaries or natural breakpoints, preserving logical units.

207
MCQeasy

A retail company wants to build a model to predict customer churn based on purchase history and demographics. The dataset includes categorical features like region and gender, and numerical features like total spend. What is the best initial step before training the model?

A.Train a deep neural network directly on raw data
B.One-hot encode categorical variables and normalize numerical variables
C.Remove all categorical features to simplify the model
D.Perform principal component analysis (PCA) on all features
AnswerB

This is the correct initial step to prepare the data for most machine learning models.

Why this answer

One-hot encoding categorical variables and normalizing numerical variables is standard preprocessing to convert categorical data into numeric format and scale features, which many algorithms require for optimal performance.

208
MCQhard

A generative AI model produces images from text prompts. The outputs are often blurry and lack fine details. Which model type is MOST likely being used, and which improvement would best address this issue?

A.Variational Autoencoder (VAE); switch to a diffusion model
B.Variational Autoencoder (VAE); switch to a Generative Adversarial Network (GAN)
C.Generative Adversarial Network (GAN); increase the discriminator's capacity
D.Diffusion model; use a larger batch size during training
AnswerA

VAEs tend to blur; diffusion models iteratively denoise, producing high-quality details.

Why this answer

Variational Autoencoders (VAEs) are known for producing blurry outputs because their loss function (ELBO) encourages pixel-wise averaging, which smooths out fine details. Diffusion models, by contrast, iteratively denoise a random field, learning to reconstruct high-frequency details through a multi-step reverse process, directly addressing the blurriness issue.

Exam trap

The AI0-001 exam often tests the misconception that GANs are always the best for sharp images, but the trap here is that the question specifically describes blurry outputs—a hallmark of VAEs—and the best modern improvement is a diffusion model, not a GAN.

How to eliminate wrong answers

Option B is wrong because switching from a VAE to a GAN would improve sharpness but GANs are prone to mode collapse and training instability, making diffusion models a more robust and state-of-the-art choice for fine detail generation. Option C is wrong because GANs already produce sharp images; increasing discriminator capacity would not fix blurriness (which is a VAE characteristic) and could worsen training instability. Option D is wrong because diffusion models do not inherently produce blurry outputs; using a larger batch size during training improves gradient stability but does not address a blurriness problem that is not characteristic of diffusion models.

209
Multi-Selecthard

An ML operations team needs to monitor a deployed model's performance. Which TWO metrics are most useful for detecting concept drift in a regression model? (Choose two.)

Select 2 answers
A.Distribution of input features
B.Distribution of residuals between predictions and actuals
C.Classification accuracy
D.Model inference latency
E.Mean absolute error (MAE) over a sliding time window
AnswersB, E

Changing residual distribution can indicate concept drift.

Why this answer

Monitoring the distribution of residuals (predicted vs. actual values) directly reveals when the relationship between inputs and outputs has shifted, which is the essence of concept drift. In a regression model, if the residuals become systematically biased or their variance changes over time, it indicates that the underlying data-generating process has changed, even if input feature distributions remain stable.

Exam trap

CompTIA often tests the distinction between covariate drift and concept drift, trapping candidates who think monitoring input features is sufficient for detecting all types of model degradation.

210
MCQhard

An AI engineer trains a deep learning model for image classification. After training, the training accuracy is 99% but validation accuracy is 85%. Which technique would best address this discrepancy?

A.Increase data augmentation
B.Decrease the learning rate
C.Increase the number of layers
D.Add dropout layers
AnswerD

Dropout reduces overfitting by preventing co-adaptation of neurons.

Why this answer

The high training accuracy (99%) and lower validation accuracy (85%) indicate overfitting, where the model memorizes training data but fails to generalize. Dropout layers randomly deactivate neurons during training, forcing the network to learn more robust features and reducing overfitting. This technique directly addresses the discrepancy by improving validation performance without sacrificing training capacity.

Exam trap

CompTIA often tests the distinction between techniques that address overfitting (like dropout) versus those that improve convergence (like learning rate adjustment) or model capacity (like adding layers), trapping candidates who confuse regularization with optimization.

How to eliminate wrong answers

Option A is wrong because increasing data augmentation can help reduce overfitting by creating more varied training samples, but it is not the best technique here as it may not sufficiently address the already severe overfitting and could introduce noise; dropout is a more direct regularization method. Option B is wrong because decreasing the learning rate addresses convergence issues (e.g., slow training or oscillation) but does not directly combat overfitting; it may even worsen the gap if the model continues to memorize. Option C is wrong because increasing the number of layers adds more parameters, which typically exacerbates overfitting by increasing model capacity, making the discrepancy worse.

211
MCQhard

An ML team uses the model registry above. After deploying version 3 to production, they discover it has a critical bug. What is the fastest way to roll back to a stable version without re-deploying from scratch?

A.Promote version 2 from Staging to Production
B.Redeploy version 1 by updating the production deployment to use its artifact
C.Retrain the model with corrected data
D.Delete version 3 from the registry
AnswerB

Version 1 is still in Production and can be quickly redeployed.

Why this answer

It directly updates the production deployment to reference the artifact of version 1, which is a stable, previously validated version. This avoids the overhead of re-deploying from scratch by simply pointing the existing deployment to a known good artifact in the model registry, leveraging the registry's artifact storage and deployment integration.

Exam trap

CompTIA often tests the misconception that deleting a model version or promoting a staging version is the fastest rollback, when in reality the fastest method is to update the existing deployment's artifact reference to a known stable version.

How to eliminate wrong answers

Option A is wrong because promoting version 2 from Staging to Production would require a new deployment process (e.g., updating the deployment configuration or triggering a CI/CD pipeline), which is not the fastest rollback method; it also assumes version 2 is stable, which may not be the case if it was never validated in production. Option C is wrong because retraining the model with corrected data is a time-consuming process that involves data preparation, training, and validation, and does not address the immediate need to roll back to a stable version. Option D is wrong because deleting version 3 from the registry does not affect the running production deployment; the deployment continues to use the artifact of version 3 until the deployment configuration is explicitly updated to reference a different version.

212
Multi-Selecthard

Which THREE components are essential for implementing a successful MLOps pipeline for a continuously deployed AI system?

Select 3 answers
A.Manual approval gates for each deployment
B.Canary deployment strategy
C.Model registry for version control and metadata management
D.Automated testing and validation of models and pipelines
E.Data and model versioning
AnswersC, D, E

Registry is critical for tracking and managing model versions.

Why this answer

A model registry (C) is essential for MLOps because it provides version control, metadata management, and lineage tracking for all trained models. This enables reproducibility, auditability, and seamless rollback in a continuously deployed AI system, ensuring that only validated models are promoted to production.

Exam trap

CompTIA often tests the distinction between operational strategies (like canary deployments) and foundational pipeline components (like versioning and registries), leading candidates to confuse deployment tactics with essential infrastructure.

213
MCQmedium

A company wants to build a customer service chatbot that answers questions about their internal policy documents. The documents are updated monthly, and the team cannot afford to retrain a model each time. Which approach is MOST appropriate?

A.Use a larger foundation model with a longer context window and paste all documents into each prompt
B.Use Retrieval-Augmented Generation (RAG) with the policy documents indexed in a vector store
C.Fine-tune a base LLM on the policy documents monthly
D.Train a custom model from scratch on the policy documents each month
AnswerB

RAG retrieves relevant document chunks at query time, ensuring the chatbot always answers from the latest uploaded documents without any model retraining.

Why this answer

Retrieval-Augmented Generation (RAG) is the most appropriate approach because it allows the chatbot to answer questions based on the latest policy documents without retraining the model. By indexing the documents in a vector store and retrieving relevant chunks at query time, RAG provides up-to-date, contextually accurate answers while keeping the underlying LLM static, which avoids the cost and complexity of monthly retraining.

Exam trap

CompTIA often tests the misconception that a larger context window or fine-tuning is the only way to handle dynamic data, when in fact RAG is the scalable, cost-effective solution for frequently updated knowledge bases without retraining.

How to eliminate wrong answers

Option A is wrong because pasting all policy documents into each prompt would quickly exceed the model's context window (even with larger models, context windows are finite and costly), leading to truncated inputs, degraded performance, and high token costs. Option C is wrong because fine-tuning a base LLM monthly on the policy documents is expensive, time-consuming, and requires storing and managing multiple model versions, which directly contradicts the requirement to avoid retraining. Option D is wrong because training a custom model from scratch each month is prohibitively expensive, requires vast amounts of data and compute resources, and is entirely unnecessary for a task that only needs to retrieve and synthesize existing information.

214
MCQhard

A data scientist is training a large language model and wants to reduce the carbon footprint. Which practice is MOST effective for reducing energy consumption during training?

A.Use FP32 precision instead of mixed precision
B.Apply model pruning and knowledge distillation
C.Use more GPUs in parallel to finish training faster
D.Increase the number of training epochs for better accuracy
AnswerB

Pruning removes unnecessary weights and distillation trains a smaller student model, both reducing the computational load and energy footprint.

Why this answer

Model pruning reduces the number of parameters in the model, and knowledge distillation trains a smaller student model to mimic a larger teacher model. Both techniques directly reduce the computational operations (FLOPs) required during training and inference, leading to significant energy savings. In contrast, using FP32 or increasing epochs increases energy consumption, and adding more GPUs increases total power draw even if wall-clock time decreases.

Exam trap

A common trap is thinking that finishing faster always saves energy, but using more GPUs increases total power draw, and the energy equation (power × time) often results in higher overall consumption due to parallelization overhead and idle power.

How to eliminate wrong answers

Option A is wrong because FP32 precision uses 32-bit floating-point numbers, which require more memory bandwidth and compute operations than mixed precision (FP16/FP32), thereby increasing energy consumption. Option C is wrong because using more GPUs in parallel increases the total power draw (e.g., from 300W to 1200W for 4 GPUs), and the energy consumed is power × time; even if training finishes faster, the total energy often increases due to overhead and idle power. Option D is wrong because increasing the number of training epochs directly multiplies the total number of forward and backward passes, linearly increasing energy consumption without any efficiency gain.

215
MCQeasy

Which privacy-preserving technique allows a model to be trained across decentralized data sources without the raw data ever leaving each source?

A.Homomorphic encryption
B.Secure multi-party computation
C.Differential privacy
D.Federated learning
AnswerD

Correct. Federated learning trains across decentralized data without raw data sharing.

Why this answer

Federated learning trains models locally on each device or server and only shares model updates, preserving data locality.

216
MCQeasy

Based on the exhibit, which action is most likely to resolve the memory issue?

A.Add more training data.
B.Increase the learning rate.
C.Switch to a CPU.
D.Reduce the batch size.
AnswerD

Smaller batches reduce the memory allocated for intermediate tensors.

Why this answer

The exhibit shows an out-of-memory (OOM) error during training. Reducing the batch size decreases the memory footprint per iteration, allowing the model to fit within available GPU memory. This directly resolves the memory issue without altering the model architecture or data.

Exam trap

CompTIA often tests the misconception that memory errors are solved by adding more data or changing hardware, when in fact the simplest and most common fix is adjusting the batch size to fit within available GPU memory.

How to eliminate wrong answers

Option A is wrong because adding more training data increases the dataset size, which does not reduce per-batch memory consumption and may even exacerbate memory pressure during data loading. Option B is wrong because increasing the learning rate affects convergence behavior and gradient magnitudes, not memory usage; it can cause instability or divergence but does not free GPU memory. Option C is wrong because switching to a CPU would typically use system RAM instead of GPU memory, but CPUs are far slower for deep learning training and do not resolve the underlying memory constraint—they just shift the bottleneck, often making training impractically slow.

217
MCQmedium

A developer is building an AI-powered code completion tool. They want to ensure that the tool does not inadvertently suggest insecure code patterns. Which practice is MOST effective for reducing this risk?

A.Red teaming the AI system
B.Rate limiting
C.Secure data pipelines
D.Output filtering of insecure patterns
AnswerA

Red teaming proactively probes the model for harmful outputs, including insecure code suggestions, allowing fixes before deployment.

Why this answer

Red teaming involves adversarial testing to find vulnerabilities. Output filtering can catch some insecure suggestions but may not cover all patterns. Secure data pipelines focus on training data security, not output.

Rate limiting is unrelated.

218
MCQmedium

An organization wants to use a pre-trained language model from a third-party vendor. What is the most important security step before deployment?

A.Host the model on a public cloud
B.Vet the model for backdoors and malicious behavior
C.Apply differential privacy to the model
D.Fine-tune the model on internal data
AnswerB

Vetting ensures the model does not contain hidden malicious functionality introduced by the supplier.

Why this answer

Vetting the pre-trained model for backdoors or malicious behavior is critical to supply chain security. This may include scanning for anomalies, testing on specific inputs, and reviewing the model's origins.

219
MCQhard

Refer to the exhibit. A data scientist is training a binary classifier. Based on the training log, which problem is the model experiencing?

A.Underfitting
B.Data leakage
C.Overfitting
D.Vanishing gradient
AnswerC

Training loss decreases while validation loss increases, a classic sign of overfitting.

Why this answer

The training log shows that the model's training accuracy continues to improve while the validation accuracy plateaus or degrades after a certain number of epochs. This divergence between training and validation performance is the hallmark of overfitting, where the model memorizes the training data noise rather than learning generalizable patterns.

Exam trap

CompTIA often tests the distinction between overfitting and underfitting by showing a training log where training accuracy is high but validation accuracy is low, leading candidates to mistakenly think the model is underfitting because validation performance is poor.

How to eliminate wrong answers

Option A is wrong because underfitting would show poor performance on both training and validation sets, not the divergence seen here. Option B is wrong because data leakage typically causes unrealistically high performance on both sets or sudden jumps in metrics, not a gradual divergence after convergence. Option D is wrong because vanishing gradient affects deep networks by causing gradients to approach zero, preventing weight updates and stalling training, which would manifest as flat loss curves, not the overfitting pattern observed.

220
MCQeasy

An AI development team is building a system to detect fraudulent transactions. They want to ensure the model complies with regulations requiring that individuals can question automated decisions. Which governance element is most relevant?

A.Right to explanation
B.Model versioning
C.Differential privacy
D.Data minimization
AnswerA

Right to explanation allows individuals to question and understand automated decisions.

Why this answer

The right to explanation is a governance principle that requires automated decision-making systems to provide individuals with meaningful information about how decisions are made. In the context of fraudulent transaction detection, this regulation ensures that a customer can question why a transaction was flagged, and the model must be able to provide an interpretable rationale. This directly aligns with the scenario's requirement for compliance with regulations allowing individuals to question automated decisions.

Exam trap

The trap here is that candidates often confuse governance principles like data minimization or differential privacy (which deal with data handling and privacy) with the specific regulatory requirement for transparency and contestability of automated decisions, which is the right to explanation.

How to eliminate wrong answers

Option B (Model versioning) is wrong because it refers to tracking and managing different iterations of a model for reproducibility and rollback, not to providing explanations to end-users about specific decisions. Option C (Differential privacy) is wrong because it is a technique for adding noise to data to protect individual privacy during training, not a mechanism for explaining or justifying individual automated decisions. Option D (Data minimization) is wrong because it is a principle of collecting only the necessary data for a task, which relates to privacy and storage, not to the transparency or contestability of automated decisions.

221
MCQhard

A company develops an AI model that recommends job candidates. The model inadvertently discriminates against a protected group. Which approach is most effective for mitigating this bias?

A.Remove the protected attribute from the training data
B.Use a fairness-aware machine learning algorithm
C.Analyze model predictions after deployment
D.Collect more training data from the protected group
AnswerB

Fairness-aware algorithms incorporate constraints to reduce disparate impact.

Why this answer

Fairness-aware machine learning algorithms explicitly incorporate fairness constraints or objectives during model training, directly addressing and mitigating bias against protected groups. Unlike simple removal of protected attributes, these algorithms can detect and correct for proxy discrimination and disparate impact, ensuring the model's recommendations are equitable by design.

Exam trap

CompTIA often tests the misconception that removing a protected attribute from training data is sufficient to eliminate bias, but the trap is that models can still discriminate through correlated proxy features, making fairness-aware algorithms necessary.

How to eliminate wrong answers

Option A is wrong because simply removing the protected attribute from training data does not eliminate bias; the model can still learn proxies for that attribute from correlated features (e.g., zip code correlating with race), leading to indirect discrimination. Option C is wrong because analyzing model predictions after deployment is a detection step, not a mitigation approach; it can identify bias but does not prevent or correct it in the model's behavior. Option D is wrong because collecting more training data from the protected group does not inherently address bias; it may even amplify existing disparities if the data collection process or underlying societal biases remain unchanged, and it does not adjust the model's learning process to ensure fairness.

222
MCQhard

A team is evaluating an LLM-based code generation assistant. They want to measure the quality of generated code for correctness, security, and efficiency. Which evaluation framework is BEST suited for this task?

A.Human evaluation by a panel of experienced developers
B.Pass@k metric using unit tests from benchmarks like HumanEval
C.Perplexity of the model on a code corpus
D.BLEU score comparing generated code to reference code
AnswerB

Pass@k measures the probability that any of k generated samples pass a set of unit tests, directly assessing correctness.

Why this answer

HumanEval and similar frameworks (e.g., MBPP) use unit tests to automatically assess functional correctness of generated code, which is the most objective measure for code generation tasks.

223
MCQeasy

A hospital wants to deploy a machine learning model to predict patient readmission risk within 30 days. They have a dataset with 10,000 records, 70 features including demographics, lab results, and past admissions. The target variable is binary (readmitted or not). The data scientist trains a logistic regression model and achieves an AUC of 0.85 on the test set. However, the hospital's clinicians require interpretability of predictions to trust the model. Which action should the data scientist take to ensure the model meets the interpretability requirement while maintaining performance?

A.Reduce the number of features to 10 using PCA and retrain the logistic regression
B.Replace logistic regression with a random forest model and use feature importance plots
C.Train a deep neural network and apply LIME or SHAP for explanations
D.Use the logistic regression model as is, since it is inherently interpretable with coefficients
AnswerD

Logistic regression coefficients provide direct interpretability for each feature.

Why this answer

(PCA + logistic regression) reduces dimensionality but loses interpretability and may degrade performance. Option B (random forest with feature importance) is less interpretable than logistic regression. Option C (deep neural network with LIME/SHAP) adds complexity and may reduce transparency.

Option D (keep logistic regression) provides inherent interpretability through coefficients, meeting the requirement without sacrificing performance.

224
MCQeasy

A data scientist is preparing a dataset for a classification task. The dataset contains 10,000 rows and 50 features, but many features have missing values. Which approach should the scientist take first to address the missing data?

A.Use a deep learning model to predict missing values without preprocessing.
B.Analyze the pattern and proportion of missing values to choose an appropriate imputation strategy.
C.Remove all rows with any missing values to ensure a clean dataset.
D.Replace missing values with the mean of each feature immediately.
AnswerB

Understanding missingness pattern is crucial before deciding on imputation or deletion.

Why this answer

The first step in handling missing data is to understand the pattern and proportion of missingness (e.g., MCAR, MAR, MNAR) to select an appropriate imputation method. Blindly applying imputation or deletion without analysis can introduce bias or reduce model performance. This diagnostic step ensures the chosen strategy aligns with the data's underlying structure and the classification task's requirements.

Exam trap

CompTIA often tests the misconception that immediate imputation (e.g., mean/median) or row deletion is the safest first step, when in reality, a diagnostic analysis of missingness patterns is required before any data modification.

How to eliminate wrong answers

Option A is wrong because deep learning models typically require complete data or sophisticated handling of missingness; using them to predict missing values without preprocessing ignores the need to first understand the missing data mechanism and can lead to overfitting or biased predictions. Option C is wrong because removing all rows with any missing values can discard a significant portion of the dataset (up to 50 features with missingness), potentially losing valuable information and reducing statistical power, especially when missingness is not completely random. Option D is wrong because immediately replacing missing values with the mean of each feature assumes the data is missing completely at random (MCAR) and can distort feature distributions, reduce variance, and introduce bias if the missingness is related to the feature values themselves.

225
MCQhard

A team is training a deep neural network on a large image dataset. They observe that the training loss decreases smoothly but validation loss oscillates. Which regularization technique should be applied?

A.Data augmentation
B.L1 regularization
C.Dropout
D.Batch normalization
AnswerC

Dropout reduces overfitting by randomly dropping units during training, forcing the network to learn robust features.

Why this answer

Dropout is the correct regularization technique because it randomly drops neurons during training, which prevents co-adaptation of features and reduces overfitting. This addresses the validation loss oscillation (a sign of overfitting) while allowing the training loss to decrease smoothly, as dropout only applies during training and not during validation.

Exam trap

The trap here is that candidates often confuse batch normalization as a regularization technique because it can reduce overfitting slightly due to its noise injection, but it is primarily for training stability, not a dedicated regularizer like dropout.

How to eliminate wrong answers

Option A is wrong because data augmentation increases the diversity of the training dataset by applying transformations (e.g., rotations, flips), which can improve generalization but does not directly regularize the network to reduce validation loss oscillation caused by overfitting. Option B is wrong because L1 regularization adds a penalty proportional to the absolute value of weights, promoting sparsity, but it does not specifically address the oscillating validation loss pattern; it is more suited for feature selection. Option D is wrong because batch normalization normalizes layer inputs to stabilize training and accelerate convergence, but it is not a regularization technique; it does not prevent overfitting or reduce validation loss oscillation.

Page 2

Page 3 of 11

Page 4

All pages