Courseiva

CompTIA AI+ AI0-001 (AI0-001) — Questions 301–375

962 questions total · 13pages · All types, answers revealed

Page 4

Page 5 of 13

Page 6
301
MCQmedium

An organization is deploying a large language model on-premises for compliance reasons. They need to serve inference requests with low latency. Which architecture should they use?

A.Use a batch processing system like Apache Spark
B.Containerize the model and deploy it on a Kubernetes cluster with autoscaling
C.Use a serverless function like AWS Lambda
D.Deploy the model as a REST API on a single powerful server
AnswerB

Containerising the model on Kubernetes keeps inference inside the organisation's own infrastructure, satisfying the on-premises compliance constraint. Autoscaling horizontally scales replicas to match request load, and local GPU nodes serve requests without network round trips to a public endpoint, delivering the low latency required.

Why this answer

Containerizing the model and deploying it on a Kubernetes cluster with autoscaling is the correct architecture because it provides horizontal scaling, low-latency inference through load-balanced pods, and supports on-premises deployment for compliance. Kubernetes can automatically scale replicas based on CPU/memory utilization or custom metrics (e.g., request queue depth), ensuring consistent response times under varying load.

Exam trap

CompTIA often tests the misconception that a single powerful server is sufficient for low-latency inference, but the trap is that it ignores the need for horizontal scalability and fault tolerance, which are critical for production workloads.

How to eliminate wrong answers

Option A is wrong because batch processing systems like Apache Spark are designed for large-scale data processing jobs, not real-time inference; they introduce high latency due to job scheduling and data shuffling, making them unsuitable for serving low-latency requests. Option C is wrong because serverless functions like AWS Lambda are typically cloud-only and may not support on-premises deployment; they also have cold-start latency and execution time limits that conflict with low-latency inference requirements. Option D is wrong because deploying on a single powerful server creates a single point of failure and cannot scale horizontally to handle traffic spikes, leading to increased latency under load.

302
MCQeasy

An AI system must extract text from scanned invoices and output structured fields (invoice number, date, total amount). Which type of AI application is this?

A.Chatbot/virtual assistant
B.Code generation
C.Image classification/object detection
D.Document intelligence
AnswerD

Document intelligence combines optical character recognition with field extraction models, converting scanned invoice images into structured key-value output such as invoice number, date and total amount. This matches the stem's requirement to extract text from scans and return named structured fields.

Why this answer

Document intelligence (D) is the correct answer because it specifically refers to AI systems that extract, classify, and structure data from documents like invoices, receipts, and forms. This application uses optical character recognition (OCR) combined with natural language processing (NLP) to identify and output structured fields such as invoice number, date, and total amount, which is exactly what the question describes.

Exam trap

The AI0-001 exam often tests the distinction between general image analysis (object detection) and specialized document processing (document intelligence), so candidates may mistakenly choose image classification because they think scanning an invoice is just 'looking at a picture,' but the key is that the system extracts structured text fields, not just identifies objects.

How to eliminate wrong answers

Option A is wrong because a chatbot/virtual assistant is designed for conversational interactions (e.g., answering questions or performing tasks via dialogue), not for extracting structured data from scanned documents. Option B is wrong because code generation focuses on producing programming code from natural language or other inputs, not on processing scanned invoices. Option C is wrong because image classification/object detection identifies objects or categories within an image (e.g., 'this is a cat' or 'there is a car'), but does not extract specific text fields like invoice numbers or amounts from documents.

303
MCQhard

A company is fine-tuning a pre-trained open-source model for a sensitive application. They want to detect if the model contains a backdoor inserted by the original developers. Which supply chain security measure is most directly applicable?

A.Apply input validation and sanitization techniques
B.Use homomorphic encryption for model weights
C.Implement differential privacy during fine-tuning
D.Create a software bill of materials (SBOM) for the model and its dependencies
AnswerD

An SBOM provides transparency into the model's origin and components, helping identify tampered or backdoored parts.

Why this answer

A Software Bill of Materials (SBOM) for the model and its dependencies provides a formal, machine-readable inventory of all components, including the base model, training data sources, and third-party libraries. This allows the security team to trace the provenance of each component and identify known vulnerabilities or suspicious artifacts that could indicate a backdoor inserted by the original developers. SBOMs are a key supply chain security measure recommended by frameworks like NIST SP 800-161 and are directly applicable to detecting unauthorized modifications in pre-trained models.

Exam trap

The exam often tests the distinction between runtime security controls (like input validation) and supply chain provenance measures (like SBOM), so the trap here is that candidates confuse operational defenses with the static analysis needed to detect pre-installed backdoors.

How to eliminate wrong answers

Option A is wrong because input validation and sanitization techniques are runtime defenses against injection attacks (e.g., prompt injection) and do not address the static detection of a backdoor embedded in the model weights or architecture during the supply chain phase. Option B is wrong because homomorphic encryption protects model weights in transit or at rest by allowing computation on encrypted data, but it does not help detect whether a backdoor exists in the model; it only preserves confidentiality. Option C is wrong because differential privacy during fine-tuning adds noise to gradients to prevent memorization of sensitive training data, which is a privacy-preserving technique, not a supply chain security measure for detecting pre-existing backdoors.

304
MCQeasy

During feature engineering, a data scientist creates a new feature that is a linear combination of two existing features. What risk does this pose to the model?

A.Multicollinearity
B.Data leakage
C.Overfitting
D.Underfitting
AnswerA

A feature built as a linear combination of two existing features is perfectly correlated with them, producing multicollinearity. This inflates the variance of coefficient estimates, making them unstable and hard to interpret, which is the specific risk the engineered linear combination introduces.

Why this answer

Creating a new feature as a linear combination of two existing features introduces perfect multicollinearity, where the new feature is an exact linear function of the original ones. This violates the assumption of no perfect multicollinearity in linear models, causing the design matrix to become singular and making coefficient estimates unstable or impossible to compute. Even in non-linear models, high multicollinearity can inflate variance and reduce interpretability.

Exam trap

CompTIA often tests the distinction between multicollinearity and overfitting, trapping candidates who confuse feature redundancy with model complexity.

How to eliminate wrong answers

Option B is wrong because data leakage refers to using information from outside the training set (e.g., future data or target leakage), not to relationships among features within the training data. Option C is wrong because overfitting is caused by a model learning noise or overly complex patterns, not by linear dependencies between features; multicollinearity primarily affects coefficient stability, not generalization error directly. Option D is wrong because underfitting occurs when a model is too simple to capture underlying patterns, whereas multicollinearity is a data structure issue that can actually increase model complexity without improving fit.

305
MCQmedium

An AI system for detecting anomalies in manufacturing sensor data uses a model trained on normal operation data only. During monitoring, the model flags many false positives. Which adjustment is MOST likely to reduce false positives?

A.Switch from an autoencoder to a one-class SVM
B.Add synthetic anomalies to the training set and retrain as a supervised classifier
C.Adjust the anomaly detection threshold to be less sensitive (e.g., require a higher reconstruction error)
D.Increase the size of the training dataset with more normal operation data
AnswerC

Raising the reconstruction-error threshold makes the model flag only stronger deviations, so borderline normal sensor readings no longer trigger alerts. This directly reduces the false positives caused by an overly sensitive threshold, satisfying the stem's requirement to cut false alarms during monitoring.

Why this answer

For an unsupervised anomaly detector trained only on normal data, false positives are typically controlled by tuning the decision threshold — e.g., requiring a higher reconstruction error (for autoencoders) or a lower anomaly score before flagging. Raising the threshold makes the model less sensitive, reducing false positives at the cost of potentially missing some true anomalies. This is the most direct, lowest-effort adjustment.

Exam trap

The trap is over-engineering the fix — candidates pick model swaps or synthetic data generation because they sound sophisticated, but the question asks for the MOST likely adjustment to reduce false positives, which is the simple, direct threshold tuning.

How to eliminate wrong answers

Option A is wrong because switching model families (autoencoder to one-class SVM) does not inherently reduce false positives and may introduce new tuning challenges; it is a larger change without guaranteed benefit. Option B is wrong because adding synthetic anomalies and retraining as a supervised classifier changes the problem framing entirely and requires labeled anomaly data, which may not be available or representative — it is not the most likely quick fix. Option D is wrong because adding more normal data does not address the threshold/sensitivity issue; if the model is already over-flagging normal variation, more normal data alone may not shift the decision boundary enough.

306
MCQmedium

A financial institution uses a machine learning model to approve personal loans. The model was trained on historical data that includes applicant age, income, credit score, and loan amount. Compliance officers have received customer complaints suggesting the model may be discriminating against applicants over 60 years old. Initial analysis shows that the approval rate for applicants over 60 is 20 percentage points lower than for younger applicants with similar credit profiles. The data science team has been asked to investigate and remediate any bias. They have access to the training data, model coefficients, and can retrain or modify the model. What is the FIRST step the team should take?

A.Replace the model with a third-party vendor model that claims to be bias-free.
B.Re-sample the training data to have equal numbers of applicants over and under 60.
C.Conduct a fairness audit using appropriate metrics such as disparate impact ratio on the current model.
D.Remove the age feature from the training data and retrain the model.
AnswerC

A fairness audit quantifies the disparity using metrics such as disparate impact ratio before any remediation, establishing whether the 20-point gap constitutes unlawful discrimination and which features drive it. This diagnostic step must precede retraining, since modifying the model without measuring the bias gives no baseline for verifying improvement.

Why this answer

The first step in addressing potential bias is to conduct a fairness audit using established metrics like the disparate impact ratio (e.g., the 80% rule from the US Equal Employment Opportunity Commission). This quantifies whether the model's approval rate for applicants over 60 is less than 80% of the rate for the younger group, providing a legally and technically sound baseline before any remediation. Without this measurement, any subsequent changes (like resampling or removing features) could be misguided or ineffective.

Exam trap

CompTIA often tests the misconception that removing a protected attribute (like age) is sufficient to eliminate bias, when in fact proxy features can perpetuate discrimination, making a fairness audit the mandatory first step.

How to eliminate wrong answers

Option A is wrong because replacing the model with a third-party vendor model that claims to be bias-free does not address the specific bias found in the current system, and it bypasses the necessary diagnostic step of understanding the root cause; vendor claims are not a substitute for empirical validation. Option B is wrong because resampling the training data to have equal numbers of applicants over and under 60 does not guarantee fairness—it can introduce sampling bias, distort the real-world distribution, and may not correct the underlying model behavior that causes disparate impact. Option D is wrong because simply removing the age feature from the training data and retraining the model is a naive approach; age may be correlated with other features (e.g., income, credit score), so the model could still indirectly discriminate through proxy variables, a phenomenon known as 'bias amplification' or 'redundant encoding'.

307
MCQhard

A healthcare AI system diagnosing diabetic retinopathy from retinal images shows high accuracy overall but significantly lower recall for patients with darker skin tones. Which fairness metric would BEST capture this disparity by comparing true positive rates across groups?

A.Calibration
B.Demographic parity
C.Equalised odds
D.Individual fairness
AnswerC

Equalised odds compares true positive rates and false positive rates across groups, so it directly exposes the lower recall for darker-skinned patients. Demographic parity or equal opportunity alone would not capture the full disparity across both error types that this metric requires.

Why this answer

Equalised odds is a fairness metric that requires both true positive rates (TPR) and false positive rates (FPR) to be equal across groups. In this scenario, the disparity is specifically in recall (TPR) for patients with darker skin tones, so equalised odds directly captures the difference in TPR between groups. It ensures that the model's ability to correctly identify positive cases is independent of the group attribute.

Exam trap

AI0-001 often tests the confusion between different fairness metrics. Candidates may choose demographic parity because it is commonly mentioned, but it does not address TPR disparities. The key is to recognize that the question asks for a metric comparing true positive rates across groups, which is equalised odds.

How to eliminate wrong answers

Option A is wrong because calibration measures how well predicted probabilities match actual outcomes, not the disparity in true positive rates across groups. Option B is wrong because demographic parity requires the same proportion of positive predictions across groups, regardless of actual outcomes; it does not focus on TPR. Option D is wrong because individual fairness requires similar predictions for similar individuals, which is a different concept and not group-based.

308
MCQmedium

A data scientist fine-tunes a large language model for a legal document summarization task. After fine-tuning, the model performs well on test data but produces summaries that include hallucinated legal clauses. Which mitigation strategy is most effective?

A.Use a different tokenizer during fine-tuning.
B.Decrease the temperature parameter to 0.1 during inference.
C.Implement retrieval-augmented generation (RAG) to provide factual context.
D.Set a maximum token limit of 50 for each summary.
AnswerC

Retrieval-augmented generation grounds each summary in retrieved source passages, so the model conditions on actual clause text rather than parametric memory. This directly targets the hallucinated clauses arising after fine-tuning, satisfying the requirement to supply factual context at inference time without retraining the model.

Why this answer

Implement retrieval-augmented generation (RAG) to provide factual context. RAG reduces hallucinations by allowing the model to retrieve relevant, factual information from an external knowledge base during generation, grounding its output in verified data. Option A (different tokenizer) does not address the core issue of factual accuracy.

Option B (decrease temperature) affects randomness but does not prevent the model from fabricating content. Option D (max token limit) truncates output but does not stop the model from including false information within that limit.

309
MCQhard

A deep learning model for natural language processing uses a recurrent neural network (RNN) to process long sequences. The gradients vanish after many time steps. Which architectural change is most effective to mitigate this problem?

A.Add dropout regularization
B.Use a larger learning rate
C.Replace the RNN cells with Long Short-Term Memory (LSTM) units
D.Increase the number of hidden layers
AnswerC

LSTM units add gating mechanisms and a cell state that preserve gradient flow across many time steps, directly counteracting the vanishing gradients an RNN suffers on long sequences. Replacing the RNN cells satisfies the stem's constraint, whereas simply adding layers or changing activation functions would not address the underlying decay.

Why this answer

LSTMs are specifically designed with a gating mechanism (input, forget, and output gates) and a cell state that allows gradients to flow unchanged over many time steps, directly addressing the vanishing gradient problem in standard RNNs. This architectural change preserves long-range dependencies in sequences, which is critical for tasks like language modeling or machine translation.

Exam trap

CompTIA AI often tests the misconception that regularization or hyperparameter tuning (like learning rate) can fix architectural gradient problems, but the correct answer always targets the root cause—here, the LSTM's gated structure that directly mitigates vanishing gradients.

How to eliminate wrong answers

Option A is wrong because dropout regularization randomly drops units during training to prevent overfitting, but it does not solve the vanishing gradient problem—it can even exacerbate gradient issues by reducing signal flow. Option B is wrong because increasing the learning rate can cause the gradients to explode or the loss to diverge, and it does not address the fundamental issue of gradients shrinking to zero over time. Option D is wrong because adding more hidden layers increases model depth, which typically worsens the vanishing gradient problem in standard RNNs due to repeated multiplication of small gradients through additional layers.

310
MCQmedium

A team is using an API from a cloud AI service to generate text. They notice that repeated requests with the same prompt return different outputs. They want consistent responses for testing. Which parameter should they adjust?

A.Increase the top_p parameter to 1.0
B.Set the frequency_penalty to 0
C.Increase the max_tokens parameter
D.Set the temperature to 0
AnswerD

Temperature controls sampling randomness; setting it to 0 makes the model select the highest-probability token at each step, producing near-deterministic output for identical prompts. This satisfies the requirement for consistent responses during testing, unlike top-p or penalty adjustments.

Why this answer

Temperature controls the randomness of the model's sampling distribution. Setting temperature to 0 makes the model deterministically pick the highest-probability token at each step, producing consistent (near-identical) outputs for the same prompt. This is the standard setting for reproducible testing.

Exam trap

AI0-001 often tests whether candidates confuse temperature (randomness) with top_p (nucleus sampling breadth) or max_tokens (length), leading them to pick top_p=1.0 as a determinism fix.

How to eliminate wrong answers

Option A is wrong because top_p=1.0 means consider all tokens in the nucleus, which actually increases diversity rather than reducing it. Option B is wrong because frequency_penalty=0 is the neutral default — it doesn't reduce randomness, it just stops penalizing repeated tokens. Option C is wrong because max_tokens only caps output length; it has no effect on determinism or sampling randomness.

311
Multi-Selectmedium

A company is deploying a chatbot using a large language model. They want to mitigate the risk of prompt injection attacks. Which TWO measures should be implemented?

Select 2 answers
A.Implement input validation and sanitisation
B.Use a system prompt that strictly defines the chatbot's behavior
C.Fine-tune the model on safe conversational examples
D.Use a larger context window
E.Limit the maximum output token length
AnswersA, B

Input validation and sanitisation strip or escape injected instructions before they reach the model, blocking attempts to override system prompts. This constrains untrusted user input at the application boundary, mitigating prompt injection without altering the model itself.

Why this answer

Option A is correct because input validation and sanitisation directly strip or neutralise adversarial payloads (e.g., embedded instructions, delimiter-breaking characters, or encoded jailbreak strings) before they reach the LLM, reducing the attack surface for prompt injection. Option B is correct because a strict system prompt establishes immutable behavioural boundaries and instruction hierarchy, making it harder for user-supplied text to override the model's intended role or exfiltrate system instructions. Option C is not a reliable mitigation because fine-tuning on safe examples does not prevent novel injection payloads at inference time and can even be undone by adversarial prompting.

Option D is irrelevant, since a larger context window merely allows more tokens to be processed and does not filter or constrain malicious instructions. Option E only caps response size and does nothing to stop an injected prompt from altering the model's behaviour or leaking data.

Exam trap

CompTIA often tests the misconception that fine-tuning or output limits can prevent prompt injection, when in fact these measures do not address the root cause of untrusted input being processed as instructions.

312
MCQeasy

Which principle ensures that AI decisions can be traced back and understood by humans?

A.Transparency
B.Privacy
C.Robustness
D.Accountability
AnswerA

Transparency requires documenting data sources, model logic and decision pathways, so each AI output can be traced and explained to auditors, regulators or affected users. It directly satisfies the stem's demand for traceability and human comprehension, unlike accountability, which assigns responsibility without necessarily exposing how a decision was reached.

Why this answer

Transparency is the principle that ensures AI decisions can be traced back and understood by humans. It requires that the internal workings of an AI model, including its inputs, decision paths, and outputs, are documented and interpretable, enabling auditability and trust. Without transparency, stakeholders cannot verify whether the AI system is behaving as intended or complying with ethical and regulatory standards.

Exam trap

The AI0-001 exam often tests the confusion between Accountability and Transparency, where candidates mistakenly think that assigning responsibility (Accountability) automatically ensures the decision path is visible, but in reality, Accountability can exist without full Transparency if the system is a black box.

How to eliminate wrong answers

Option B is wrong because Privacy focuses on protecting personal data and controlling its collection, use, and sharing, not on making AI decisions traceable or understandable. Option C is wrong because Robustness concerns the system's ability to maintain performance under adversarial conditions or unexpected inputs, not the traceability of its decision-making process. Option D is wrong because Accountability refers to assigning responsibility for AI outcomes and ensuring there are mechanisms for redress, but it does not inherently require that the decision-making process itself be transparent or understandable.

313
MCQhard

A company is deploying a real-time object detection model on a fleet of IoT cameras. The model must run at 30 FPS on a device with limited memory and no internet connectivity. Which combination of techniques is MOST suitable?

A.Use FP16 inference and deploy via Docker containers
B.Use model distillation to create a smaller model and deploy via ONNX Runtime
C.Deploy on a GPU-based edge server with a full PyTorch model
D.Apply INT8 quantization and pruning, then deploy using TensorFlow Lite
AnswerD

INT8 quantization reduces memory footprint and accelerates inference; pruning removes redundant parameters. TensorFlow Lite is optimized for edge devices.

Why this answer

INT8 quantization reduces model size and latency, while pruning removes redundant weights, making the model suitable for memory-constrained edge devices. TensorFlow Lite is optimized for on-device inference with no internet dependency, supporting real-time 30 FPS object detection on IoT cameras.

Exam trap

CompTIA often tests the misconception that any lightweight deployment framework (like ONNX Runtime) is sufficient for edge devices, ignoring the need for hardware-specific quantization and pruning to meet strict memory and FPS constraints.

How to eliminate wrong answers

Option A is wrong because FP16 inference reduces precision but still requires significant memory and compute resources; Docker containers add overhead and are not designed for ultra-low-memory IoT cameras. Option B is wrong because model distillation creates a smaller model, but ONNX Runtime is a cross-platform inference engine that does not inherently provide the aggressive memory and latency optimizations needed for 30 FPS on constrained devices; it also lacks native support for hardware-specific quantization like TensorFlow Lite. Option C is wrong because deploying a full PyTorch model on a GPU-based edge server contradicts the 'limited memory and no internet connectivity' constraint; GPUs are power-hungry and expensive, and PyTorch's runtime overhead is too high for a memory-constrained IoT camera.

314
Multi-Selecthard

A company is deploying an LLM-powered application that answers questions based on internal documents. They want to minimize prompt injection attacks where users trick the model into ignoring instructions. Which THREE measures should they implement? (Select THREE)

Select 3 answers
A.Use a system-level prompt that clearly defines allowed behavior and boundaries
B.Set temperature to 0.0 for all queries
C.Allow the model to execute any code from user prompts for flexibility
D.Implement a separate classifier to detect and block injection attempts
E.Sanitize user inputs to remove special tokens or injection patterns
AnswersA, D, E

A system-level prompt establishes persistent instructions that take precedence over user turns, defining permitted behaviour and boundaries. This constrains the model's response space so user input is less able to override the application's original directives.

Why this answer

Option A is correct because a system-level prompt that clearly defines allowed behavior and boundaries establishes the model's operating rules and helps it distinguish trusted instructions from untrusted user content, which is a core defense against prompt injection. Option D is correct because a separate classifier trained to detect and block injection attempts adds an independent detection layer that can catch malicious prompts before they reach the LLM, reducing the chance that a user overrides system instructions. Option E is correct because sanitizing user inputs to remove special tokens or known injection patterns prevents attackers from injecting delimiters, role markers, or instruction-like text that could confuse the model's instruction hierarchy.

Option B is not correct because setting temperature to 0.0 only makes output more deterministic and does not prevent prompt injection. Option C is not correct because allowing the model to execute arbitrary code from user prompts dramatically increases risk and is the opposite of a security control.

Exam trap

The AI0-001 exam often tests the misconception that reducing model temperature or randomness can mitigate security threats, when in fact temperature only affects output creativity, not instruction adherence or input safety.

315
MCQmedium

A hospital deploys an AI system to detect pneumonia from chest X-rays. The model achieves 95% accuracy on the test set but later is found to be less accurate for patients under 18. The development team suspects bias. Which step should be taken first to investigate?

A.Automatically retrain the model with a balanced dataset including more pediatric cases.
B.Expand the test set with more pediatric X-rays and re-evaluate overall accuracy.
C.Compute and compare performance metrics for different age subgroups in the test set.
D.Add more features to the model to capture age-related anatomical differences.
AnswerC

Comparing accuracy across age subgroups quantifies whether the model underperforms for under-18 patients, confirming or refuting bias before remediation. This subgroup metric analysis is the necessary first diagnostic step, since overall accuracy alone masks disparate performance.

Why this answer

The first step in investigating suspected model bias is to perform a disaggregated analysis of performance metrics across relevant subgroups, such as age brackets. This directly identifies whether the model's accuracy, precision, recall, or other metrics differ significantly for pediatric patients versus adults, confirming the presence and nature of the bias before any remediation is attempted.

Exam trap

CompTIA often tests the principle that aggregate metrics like overall accuracy can be misleading, and the trap here is that candidates jump to a solution (retraining or adding features) before performing the necessary diagnostic step of subgroup performance analysis.

How to eliminate wrong answers

Option A is wrong because automatically retraining the model with a balanced dataset without first understanding the root cause of the bias could introduce new biases or fail to address the specific issue, and it skips the critical diagnostic step of measuring subgroup performance. Option B is wrong because expanding the test set with more pediatric X-rays and re-evaluating overall accuracy would dilute the subgroup signal into a single aggregate metric, masking the disparity rather than revealing it. Option D is wrong because adding more features to the model without first analyzing the existing bias is a premature intervention; it assumes the bias stems from missing features rather than from imbalanced training data or model behavior, and it could increase complexity without solving the underlying problem.

316
MCQmedium

A data scientist is training a deep neural network for sentiment analysis. The training loss decreases steadily but the validation loss starts to increase after 10 epochs. What is the most likely cause and best corrective action?

A.Underfitting; increase model complexity
B.Vanishing gradients; use ReLU activation
C.Data leakage; shuffle data before splitting
D.Overfitting; apply dropout and early stopping
AnswerD

Diverging training and validation loss after 10 epochs signals overfitting: the model memorises training data and generalises poorly. Dropout regularises the network, while early stopping halts training at the point validation loss begins rising, restoring generalisation.

Why this answer

The scenario describes a classic case of overfitting: the training loss decreases steadily, indicating the model is learning the training data well, but the validation loss increases after 10 epochs, meaning the model is memorizing noise and patterns specific to the training set rather than generalizing. The best corrective action is to apply dropout (which randomly drops neurons during training to reduce co-adaptation) and early stopping (which halts training when validation performance degrades), both of which are standard regularization techniques for deep neural networks.

Exam trap

CompTIA often tests the distinction between underfitting and overfitting by describing a diverging validation loss after initial improvement, leading candidates to mistakenly choose underfitting or vanishing gradients when the key indicator is the validation loss increase after a period of good training loss reduction.

How to eliminate wrong answers

Option A is wrong because underfitting would cause both training and validation loss to remain high or plateau, not a decreasing training loss with increasing validation loss; increasing model complexity would worsen overfitting, not fix it. Option B is wrong because vanishing gradients typically cause the training loss to stagnate or decrease very slowly, not a steady decrease followed by validation loss increase; ReLU activation helps mitigate vanishing gradients but does not address the overfitting pattern described. Option C is wrong because data leakage would cause both training and validation metrics to be artificially high from the start, not a divergence after 10 epochs; shuffling data before splitting is a best practice but does not correct overfitting that has already occurred.

317
MCQhard

A team is fine-tuning a BERT model for a document classification task. They notice the model achieves high F1 scores on the training set but low F1 on the validation set. Which regularization technique would be MOST effective?

A.L1 regularization
B.L2 regularization
C.Dropout
D.Reduce batch size
AnswerC

Dropout randomly deactivates neurons during each training pass, forcing the network to learn redundant, distributed representations rather than memorising training samples. This directly targets the overfitting gap between high training F1 and low validation F1 described in the stem, making it the most effective regulariser for fine-tuned BERT classification.

Why this answer

Dropout is the most effective regularization for transformer-based models like BERT because it randomly deactivates neurons during training, forcing the network to learn redundant representations and preventing co-adaptation. BERT already includes dropout layers in its architecture (attention dropout, hidden dropout), and increasing or tuning the dropout rate directly addresses overfitting on the training set.

Exam trap

AI0-001 often tests the misconception that L2 regularization is the go-to fix for overfitting in deep learning — candidates overlook that dropout is already embedded in transformer architectures and is the more targeted regularization technique for BERT fine-tuning.

How to eliminate wrong answers

Option A (L1 regularization) is wrong because L1 promotes sparsity in weights and is rarely used for deep transformer fine-tuning; it can destabilize training and does not target the co-adaptation that causes overfitting in BERT. Option B (L2 regularization) is wrong because while L2 (weight decay) helps, it is already applied via AdamW in most BERT fine-tuning recipes and is less effective than dropout at regularizing attention and feed-forward layers. Option D (Reduce batch size) is wrong because batch size affects optimization dynamics and gradient noise, not regularization directly; smaller batches can even increase variance and do not prevent overfitting.

318
MCQeasy

During an AI model deployment, the operations team notices that inference requests are taking longer than expected. Which component is most likely causing the bottleneck?

A.Input data preprocessing pipeline
B.API gateway rate limiting
C.Database connection pool size
D.The machine learning model's size and architecture
AnswerD

Inference latency is dominated by the model itself: larger parameter counts and deeper architectures require more computation per forward pass. Since the stem describes slow inference requests, the model's size and architecture is the component most likely constraining throughput.

Why this answer

The machine learning model's size and architecture directly determine the computational complexity of inference. Larger models with more parameters or deeper architectures require more matrix multiplications and memory bandwidth, which increases latency per request. This is the most common bottleneck in AI deployment because the model itself is the core computation unit, and its inference time scales with its complexity.

Exam trap

CompTIA often tests the misconception that operational components like API gateways or databases are the primary cause of slow inference, when in fact the model's computational demand is the root cause, especially in scenarios where preprocessing and postprocessing are negligible.

How to eliminate wrong answers

Option A is wrong because input data preprocessing typically involves lightweight operations like normalization or tokenization, which are orders of magnitude faster than model inference and rarely the primary bottleneck unless the pipeline is poorly optimized. Option B is wrong because API gateway rate limiting controls the number of requests per second, not the latency of individual inference requests; it would cause throttling errors, not slow responses. Option C is wrong because database connection pool size affects the ability to fetch or store data concurrently, but inference latency is dominated by model computation, not database lookups, unless the model relies on external data retrieval per request.

319
MCQeasy

An organization is deploying an AI model on edge devices with limited computational resources. Which model optimization technique is most appropriate?

A.Perform additional feature engineering
B.Apply model quantization
C.Use an ensemble of models
D.Increase the training dataset size
AnswerB

Quantization reduces weight and activation precision, typically from FP32 to INT8, shrinking memory footprint and speeding inference on constrained edge hardware. This directly satisfies the limited computational resources constraint, unlike pruning or distillation, which alter architecture or require a teacher model.

Why this answer

Model quantization reduces the precision of the model's weights and activations (e.g., from 32-bit floating point to 8-bit integer), which significantly decreases memory footprint and computational requirements. This makes it ideal for deployment on edge devices with limited resources, as it enables faster inference with minimal accuracy loss.

Exam trap

CompTIA often tests the misconception that improving model performance (e.g., via feature engineering or more data) is equivalent to optimizing for deployment constraints, when in fact techniques like quantization directly address resource limitations.

How to eliminate wrong answers

Option A is wrong because feature engineering improves model input quality but does not reduce the computational load or model size required for inference on edge devices. Option C is wrong because using an ensemble of models increases the total number of parameters and inference time, which is counterproductive for resource-constrained edge devices. Option D is wrong because increasing the training dataset size improves model generalization but does not reduce the model's computational requirements during inference; it may even increase training time and model complexity.

320
MCQmedium

A retail bank is rolling out an AI assistant built on Azure AI Foundry to answer customer questions about account policies. The compliance team requires that any response containing financial advice be routed to a human agent and that all interactions be logged for audit. Which combination of capabilities should the developer implement to meet these requirements?

A.Raise the model's temperature so responses are more varied and enable Azure Policy to restrict which users can query the assistant.
B.Use Azure AI Content Safety to filter harmful content and enable diagnostic logging on the Foundry project.
C.Rely on the model's built-in safety system message to refuse advice questions and enable Application Insights for performance metrics.
D.Implement a custom intent classifier that flags advice-related queries, route flagged sessions to a human agent, and write all turns to Azure Monitor Logs with a retention policy.
AnswerD

A custom intent classifier can be trained to recognize financial-advice requests and trigger a handoff to a human agent, satisfying the routing requirement. Writing every conversation turn to Azure Monitor Logs with a defined retention policy creates the durable, queryable audit trail compliance needs. Together these two mechanisms directly address both stated requirements in a way that is verifiable during an audit.

Why this answer

Meeting both requirements demands a detection mechanism for advice-related content and a durable record of every interaction. A custom intent classifier can flag advice requests and trigger a human handoff, while writing conversation turns to Azure Monitor Logs with a retention policy produces an auditable history. Content filtering, temperature changes, and performance metrics do not provide the routing logic or the compliance-grade logging the bank needs.

Exam trap

The trap here is treating content safety filtering as equivalent to business-specific intent routing, when safety categories and financial-advice detection are entirely different classification problems.

321
MCQeasy

During model training, the data science team discovers that many input features contain missing values. Which step should be taken to improve data quality?

A.Implement data validation checks to handle missing data appropriately (e.g., imputation).
B.Increase the model complexity to handle missing data.
C.Ignore missing values and train the model.
D.Remove all records with missing values.
AnswerA

Missing values corrupt feature distributions, so validation checks that detect and impute them (mean, median, or model-based) restore dataset completeness before training. This directly satisfies the stem's data-quality constraint, preventing biased or failed model fitting caused by null inputs.

Why this answer

Data validation checks, such as imputation (e.g., mean, median, or KNN imputation), directly address missing values by estimating plausible replacements based on the available data. This improves data quality and prevents bias or loss of information that could degrade model performance. In the context of AI implementation, handling missing data is a fundamental data preprocessing step to ensure robust model training.

Exam trap

CompTIA often tests the misconception that 'ignoring missing data' or 'removing rows' is acceptable, when in fact proper data validation and imputation are required to maintain data integrity and model validity.

How to eliminate wrong answers

Option B is wrong because increasing model complexity (e.g., adding more layers or parameters) does not inherently handle missing data; it may overfit to noise or propagate errors from incomplete features. Option C is wrong because ignoring missing values can cause algorithms (e.g., linear regression, SVM) to fail during training or produce biased coefficients, as many implementations do not natively support NaN inputs. Option D is wrong because removing all records with missing values can lead to significant data loss, reduce sample size, and introduce selection bias, especially when missingness is not completely at random (MCAR).

322
Multi-Selectmedium

Which TWO of the following are effective techniques for detecting bias in an AI model?

Select 2 answers
A.Fairness metrics such as equal opportunity difference
B.Feature importance scores
C.Confusion matrix on the entire dataset
D.Cross-validation accuracy
E.Disparate impact analysis
AnswersA, E

Equal opportunity difference compares true positive rates across protected groups, revealing whether a model misses positive cases disproportionately for one group. This group-fairness metric directly quantifies disparate error rates, making it an effective bias detection technique.

Why this answer

Option A, fairness metrics such as equal opportunity difference, is correct because it quantitatively compares true positive rates across protected groups, directly exposing unequal model performance that indicates bias. Option E, disparate impact analysis, is correct because it applies the four-fifths (80%) rule to compare selection or approval rates between groups, a standard legal and statistical method for detecting discriminatory outcomes. Options B, C, and D are not marked correct: feature importance scores only show which inputs influence predictions and do not by themselves reveal bias against a group; a confusion matrix on the entire dataset aggregates all groups and hides per-group disparities unless disaggregated; and cross-validation accuracy measures overall generalization performance, not fairness across subgroups.

Exam trap

The AI0-001 exam often tests the distinction between model performance metrics (accuracy, confusion matrix) and fairness-specific metrics, leading candidates to mistakenly select cross-validation accuracy or feature importance as bias detection tools.

323
MCQmedium

A data scientist is building a model to predict credit default using historical loan data. The dataset contains 100,000 records with 50 features, including income, debt-to-income ratio, and loan amount. The target variable is binary (default vs. no default). The goal is to maximize interpretability while maintaining high accuracy. Which algorithm is MOST appropriate?

A.Logistic regression
B.Random forest
C.Gradient boosting machine
D.Decision tree
AnswerA

Logistic regression produces coefficients whose sign and magnitude directly indicate each feature's contribution to default probability, giving the interpretability the goal demands. With 100,000 records and 50 features, it also achieves high accuracy on this binary target without sacrificing transparency.

Why this answer

Logistic regression is a linear model that is highly interpretable (coefficients indicate direction and magnitude of feature impact) and performs well on binary classification with many features, especially when the goal is to balance interpretability with accuracy. It avoids the overfitting risk of a single decision tree and the black-box nature of ensembles.

Exam trap

The trap is equating 'high accuracy' with complex models — candidates may pick random forest or GBM for accuracy, but the question explicitly prioritizes interpretability, making logistic regression the best fit.

How to eliminate wrong answers

Option B is wrong because random forest is an ensemble of trees that sacrifices interpretability for accuracy; it is harder to explain feature effects. Option C is wrong because gradient boosting machines are even more powerful but less interpretable and prone to overfitting without careful tuning. Option D is wrong because a single decision tree is interpretable but unstable and less accurate than logistic regression on this type of data, especially with 50 features.

324
MCQmedium

An AI platform team is building a feature store that feeds both offline training jobs and an online model that must return features within a few milliseconds. They are concerned that a feature computed one way during training could be computed differently at serving time. Which design choice best prevents this training-serving skew?

A.Precompute all features nightly and have the online model read them from the same batch tables used for training.
B.Log raw request payloads during serving and retrain the model on that log so training data matches production inputs.
C.Define each feature once in a shared transformation definition that is executed by both the batch and online paths.
D.Compute features with separate code paths for batch training and online serving, and reconcile differences in periodic audits.
AnswerC

A single transformation definition executed by both the offline and online engines guarantees that the same logic produces training values and serving values, which removes the divergence that causes skew. The online engine materializes the result in a low-latency store, so millisecond serving requirements are met without duplicating the feature logic.

Why this answer

Training-serving skew arises when the same feature is computed by different logic in the offline and online environments. A shared transformation definition executed by both engines makes the computation identical by construction, and the online path simply materializes the result into a low-latency store, satisfying the millisecond requirement without duplicating logic.

Exam trap

The trap here is assuming that logging production data and retraining closes the gap, when skew comes from divergent feature logic rather than from differing input distributions.

325
MCQeasy

A bank deploys an AI system to approve loan applications. During testing, the model denies a disproportionate number of applicants from a particular demographic group, even after controlling for credit history. Which ethical principle is being violated?

A.Transparency
B.Privacy
C.Accountability
D.Fairness
AnswerD

Fairness requires that outcomes not disadvantage protected groups after legitimate factors are controlled. Denying one demographic disproportionately despite equivalent credit history breaches this principle, indicating bias embedded in training data or features rather than genuine creditworthiness differences.

Why this answer

The AI system's disparate impact on a demographic group, even after controlling for credit history, directly violates the principle of fairness. Fairness in AI requires that models do not produce biased outcomes that systematically disadvantage protected groups, regardless of whether the bias stems from training data, feature selection, or algorithmic design. This scenario describes a clear case of algorithmic bias, which fairness principles aim to prevent.

Exam trap

The AI0-001 exam often tests the distinction between fairness and transparency, where candidates mistakenly choose transparency because they confuse 'explaining why the model denied loans' with 'the model being biased against a group.'

How to eliminate wrong answers

Option A is wrong because transparency refers to the openness and explainability of AI decisions, not the presence of biased outcomes; a model can be fully transparent yet still unfair. Option B is wrong because privacy concerns the protection of personal data and consent, not the equitable treatment of groups in decision-making. Option C is wrong because accountability involves assigning responsibility for AI outcomes, but the core ethical breach here is the biased result itself, not the lack of a responsible party.

326
Multi-Selectmedium

A hospital deploys an AI model to predict patient readmission risk. The compliance team asks which TWO technical controls help comply with data minimization principles under AI governance frameworks. (Choose two.)

Select 2 answers
A.Use federated learning to keep raw data on local devices.
B.Apply differential privacy during model training.
C.Anonymize data by removing patient names before training.
D.Store all training data in a single encrypted data lake.
E.Require users to consent to broad data usage terms.
AnswersA, B

Federated learning trains a shared model by exchanging only model updates, not raw patient records, so sensitive data never leaves the local environment. This reduces the volume of data centralized, satisfying data minimization by design. It is particularly relevant in healthcare, where moving patient data across systems increases regulatory and breach risk.

Why this answer

Differential privacy and federated learning both limit how much individual data influences the model or leaves its source, which is the core of data minimization. Encryption, consent, and simple de-identification do not reduce the scope of data collection or use, so they do not satisfy the principle as directly.

Exam trap

The trap here is assuming that any privacy-related measure, such as encryption or consent, automatically fulfills data minimization requirements.

327
MCQmedium

A data scientist is building a model to predict whether a transaction is fraudulent. The dataset has 99.9% legitimate transactions and 0.1% fraudulent ones. Which evaluation metric is MOST appropriate to assess model performance given this class imbalance?

A.BLEU score
B.Accuracy
C.F1-score
D.Perplexity
AnswerC

F1-score combines precision and recall into a single harmonic mean, so it penalises models that ignore the 0.1% fraudulent minority. Unlike accuracy, which reaches 99.9% by predicting "legitimate" always, F1-score reflects performance on the positive class, satisfying the stem's class-imbalance constraint.

Why this answer

With 99.9% legitimate transactions and only 0.1% fraudulent ones, accuracy would be misleadingly high (99.9%) even if the model never predicts fraud. The F1-score is the harmonic mean of precision and recall, making it robust to class imbalance by penalizing both false positives and false negatives. This makes it the most appropriate metric for evaluating fraud detection performance.

Exam trap

A common trap is that candidates default to accuracy as the universal metric, failing to recognize that in extreme class imbalance (e.g., 99.9% vs 0.1%), accuracy becomes meaningless and F1-score is the standard alternative.

How to eliminate wrong answers

Option A is wrong because BLEU score is a metric for evaluating machine translation quality by comparing n-gram overlap, not for binary classification or imbalanced datasets. Option B is wrong because accuracy is misleading in extreme class imbalance; a model that always predicts 'legitimate' would achieve 99.9% accuracy but fail to detect any fraud. Option D is wrong because perplexity is a metric used in language models to measure how well a probability distribution predicts a sample, not for evaluating classification performance on imbalanced data.

328
MCQhard

A financial institution deploys an AI model for loan approval. To meet regulatory requirements under the EU AI Act for high-risk AI systems, they must ensure human oversight. Which implementation best satisfies the requirement for meaningful human intervention?

A.Audit model decisions quarterly for bias
B.Allow users to appeal decisions through a customer service hotline
C.Display a confidence score for each decision
D.Provide a human reviewer with the ability to override the model's decision before finalization
AnswerD

Meaningful human oversight under the EU AI Act requires a reviewer who can actually intervene in the outcome, not merely observe. Granting authority to override the model's decision before it is finalised provides that effective intervention, satisfying the high-risk human-oversight obligation.

Why this answer

The EU AI Act's human oversight requirement for high-risk systems demands that humans can effectively monitor, intervene, and override AI outputs. Providing a human reviewer with the ability to override the model's decision before it is finalized directly implements meaningful human intervention at the decision point, which is the core of Article 14 oversight obligations.

Exam trap

AI0-001 often tests the distinction between post-hoc redress (appeals, audits) and pre-decision human intervention, causing candidates to select appeal mechanisms that do not satisfy Article 14's real-time oversight requirement.

How to eliminate wrong answers

Option A is wrong because quarterly bias audits are a post-hoc governance control, not real-time human oversight of individual decisions. Option B is wrong because a customer appeal hotline is a redress mechanism after the decision has already been made, not intervention before finalization. Option C is wrong because displaying a confidence score only informs a human; it does not by itself grant the ability to intervene or override the decision.

329
Multi-Selecthard

A large enterprise is developing an internal LLM-powered assistant that can access the internet and execute code. To mitigate risks from excessive agency (e.g., the model performing unauthorized actions), which THREE security measures should be implemented?

Select 3 answers
A.Deploy monitoring for anomalous input patterns
B.Require human-in-the-loop approval for code execution and write operations
C.Use least-privilege API tokens for external tool access
D.Implement input validation and sanitization to prevent prompt injection
E.Apply output filtering to block sensitive data in responses
AnswersB, C, D

Human-in-the-loop approval inserts a person before code execution or write operations, so no unauthorised action occurs without explicit consent. This directly constrains excessive agency, satisfying the stem's requirement to prevent the assistant acting autonomously on destructive or irreversible operations.

Why this answer

Option B is correct because requiring human-in-the-loop approval for code execution and write operations directly constrains excessive agency by ensuring a human authorizes high-impact actions before the model can perform them. Option C is correct because least-privilege API tokens limit the blast radius of any tool or external access the model invokes, so even a misused token can only perform the minimum permitted operations. Option D is correct because input validation and sanitization reduce prompt-injection vectors that could otherwise hijack the model into issuing unauthorized tool calls or code, which is a primary enabler of excessive agency.

Option A is not among the marked answers because monitoring anomalous input patterns is detective and does not by itself prevent unauthorized model actions. Option E is not among the marked answers because output filtering addresses data leakage in responses rather than constraining the model's ability to take unauthorized actions.

Exam trap

The AI0-001 exam often tests the distinction between detection controls (like monitoring) and prevention controls (like human approval), leading candidates to select monitoring as a security measure for excessive agency when it only provides visibility, not restriction.

330
Multi-Selectmedium

A research team is developing an AI system to predict patient outcomes from electronic health records. The team must ensure the system adheres to ethical AI principles. Which TWO practices best align with the principle of transparency and explainability? (Choose two.)

Select 2 answers
A.Document the model's intended use, limitations, and performance across demographic subgroups in a model card.
B.Implement a feature attribution method that shows which patient factors contributed most to each prediction.
C.Restrict access to the model's source code and training data to a small group of developers.
D.Focus solely on maximizing predictive accuracy, as ethical concerns are secondary to clinical outcomes.
E.Use a complex ensemble model and provide only the overall accuracy metric to clinicians.
AnswersA, B

A model card provides structured documentation of a model's development, intended use, and performance characteristics, including subgroup analysis. This practice directly supports transparency by making key information available to stakeholders. It helps clinicians and regulators understand when and how the model should be used, and where it may fail.

Why this answer

The two practices that best align with transparency and explainability are documenting model details in a model card and implementing feature attribution for individual predictions. A model card communicates intended use, limitations, and subgroup performance, while feature attribution explains specific outputs. Together, they enable stakeholders to understand and scrutinize the model, fostering trust and accountability.

Exam trap

The trap here is equating transparency with merely disclosing aggregate accuracy or restricting access, rather than providing meaningful documentation and per-prediction explanations.

331
MCQmedium

An MLOps engineer is building a feature pipeline for a recommendation model. Features must be served to the online model with single-digit millisecond latency, while the same feature definitions must also be usable by offline training jobs to prevent training-serving skew. Which component of a feature store architecture directly satisfies the low-latency serving requirement?

A.The feature registry that versions feature definitions
B.A scheduled batch job that materializes features every hour
C.The online store backed by a low-latency key-value database
D.The offline store backed by a data lakehouse
AnswerC

The online store is the serving layer of a feature store, typically implemented on a low-latency key-value database such as Redis or Bigtable. It holds the latest feature values keyed by entity ID and returns them in single-digit milliseconds during inference. Using the same feature definitions registered in the feature store for both online and offline paths is what prevents training-serving skew.

Why this answer

A feature store splits storage into an offline store for training and an online store for serving. The online store uses a low-latency key-value database so the model can retrieve the latest feature values in single-digit milliseconds. Because both paths are populated from the same registered feature definitions, the team also avoids training-serving skew, which is the second requirement in the scenario.

Exam trap

The trap here is assuming that a feature registry or a materialization job is the serving path, when only the online store actually answers low-latency inference reads.

332
MCQmedium

A team trains a decision tree on a customer churn dataset with 40 features. The unpruned tree reaches 100% accuracy on the training set but only 68% on a held-out validation set. The team wants to reduce this gap without changing the algorithm. Which action is most appropriate?

A.Increase the maximum tree depth
B.Remove the validation set and report training accuracy
C.Add more training examples without changing hyperparameters
D.Apply post-pruning with cost-complexity pruning
AnswerD

Cost-complexity pruning removes subtrees that add little predictive value, trading a small amount of training accuracy for better generalization. The parameter alpha controls the penalty for tree size and is tuned via cross-validation. Since the unpruned tree perfectly memorizes training data, pruning directly targets the overfitting gap and usually raises validation accuracy. It keeps the same algorithm, satisfying the team's constraint.

Why this answer

A tree with perfect training accuracy and much lower validation accuracy is overfitting, so the fix is to constrain its complexity. Cost-complexity pruning is the standard, algorithm-preserving remedy: it prunes branches that contribute little to reducing impurity and selects the penalty strength by cross-validation. The other actions either worsen overfitting, address it only indirectly, or destroy the ability to detect it.

Exam trap

The trap here is equating a perfect training score with a better model, when a 100% training accuracy alongside weak validation accuracy is a classic overfitting signal that calls for pruning rather than more capacity.

333
Multi-Selectmedium

Which TWO statements correctly describe the difference between supervised and unsupervised learning?

Select 2 answers
A.Supervised learning is only used for classification
B.Unsupervised learning always requires a target variable
C.Supervised learning requires labeled data
D.Supervised learning is a subset of reinforcement learning
E.Unsupervised learning discovers hidden patterns
AnswersC, E

Supervised learning trains on labelled datasets, where each input is paired with its known output, enabling the model to map inputs to correct answers. This directly satisfies the stem's requirement to distinguish it from unsupervised learning, which finds patterns in unlabelled data without predefined target values.

Why this answer

Supervised learning relies on labeled datasets where each training example is paired with an output label, enabling the model to learn a mapping from inputs to outputs. This is a fundamental distinction from unsupervised learning, which works with unlabeled data to find inherent structures or patterns.

Exam trap

CompTIA often tests the misconception that supervised learning is synonymous with classification, ignoring regression, or that unsupervised learning requires a target variable, which is a direct contradiction of its definition.

334
MCQmedium

A media company runs an on-premises inference cluster for an image-tagging model. The model is trained on-premises and deployed into a container image that is rebuilt nightly in the company's internal registry. Security policy forbids any outbound internet access from the cluster. Which deployment approach best fits these constraints?

A.Export the trained model to ONNX, then serve it with ONNX Runtime inside the container image pulled from the internal registry.
B.Deploy the model to a managed cloud inference endpoint and route internal cluster traffic to it through the corporate VPN.
C.Store the model in a public Hugging Face repository and have the container download it at startup with a read-only token.
D.Use TensorFlow Serving with a remote model repository mounted over SMB from a partner network share.
AnswerA

ONNX Runtime is a self-contained inference engine that can be installed from internal package mirrors and loaded directly from the container image, so the model never has to fetch weights or metadata from the internet at runtime. Exporting to ONNX also fixes the computation graph ahead of time, which keeps nightly rebuilds deterministic and avoids any dependency on external model hubs.

Why this answer

An air-gapped cluster needs a self-contained inference stack: the runtime, the model, and all dependencies must travel inside the container image from the internal registry. Exporting to ONNX produces a portable, framework-independent graph that ONNX Runtime can execute without contacting any external service, so nightly rebuilds remain deterministic and no outbound traffic is required.

Exam trap

The trap here is assuming that a model must always be fetched from a hub or endpoint at runtime, when a self-contained ONNX artifact inside the image removes that dependency entirely.

335
MCQeasy

An organization wants to integrate an AI-powered summarization feature into their existing web application. The AI service will be called via API. Which factor is MOST important to consider for cost management?

A.Token pricing of the AI model
B.Authentication method (API key vs. OAuth)
C.Rate limits per minute
D.Network latency to the API endpoint
AnswerA

Token pricing directly governs API call costs: providers bill per input and output token, so summarisation of long documents scales expense with token volume. This satisfies the stem's API-based cost management constraint, since compute, storage and licensing are not consumed by the web application itself.

Why this answer

Token pricing directly determines the cost of each API call because AI models charge based on the number of input and output tokens processed. Since the summarization feature will make frequent API calls, token pricing is the primary cost driver. Other factors like authentication, rate limits, and latency affect security, throughput, and performance, but not the direct cost per request.

Exam trap

AI0-001 often tests the distinction between cost drivers and operational factors; candidates may incorrectly focus on rate limits or authentication as cost-related, but token pricing is the direct cost component.

How to eliminate wrong answers

Option B is wrong because authentication method affects security and implementation complexity, not the cost of using the AI service. Option C is wrong because rate limits control how many requests can be made per minute, which impacts scalability and throttling, but not the per-request cost. Option D is wrong because network latency affects response time and user experience, not the monetary cost of the AI service.

336
MCQhard

A healthcare company is developing a predictive model to identify patients at risk of readmission within 30 days. The data engineering team has built a pipeline that collects data from multiple sources, including electronic health records (EHR), lab results, and wearable device data. During initial testing, the model's performance is poor, with high false positives. Upon investigation, the team discovers that the data contains significant temporal misalignment: lab results are timestamped when ordered, not when collected; wearable data is aggregated hourly; and EHR data has inconsistent update frequencies. The data pipeline currently joins all features on the patient ID without aligning timestamps. The data volume is large, and processing time is a concern. Which action should the data engineering team take to most effectively address the issue and improve model performance?

A.Discard all records where timestamps do not match exactly across sources, and only use records with perfect alignment.
B.Implement a window-based feature aggregation (e.g., 6-hour windows) and align all features to the same time windows before joining.
C.Leave the pipeline unchanged and instead adjust the model's classification threshold to reduce false positives.
D.Use a data imputation algorithm to fill in missing timestamps and then join on the nearest timestamp.
AnswerB

Window-based aggregation aligns lab, wearable and EHR features onto shared 6-hour timestamps, removing the temporal misalignment that causes spurious correlations and false positives. It satisfies the processing-time constraint by aggregating incrementally rather than joining raw event-level records.

Why this answer

Temporal misalignment causes features to be joined at incorrect times, leading to data leakage or irrelevant features that degrade model performance. Implementing window-based aggregation aligns all features to consistent time windows (e.g., 6-hour) before joining, ensuring that features reflect the patient's state at the same point in time. This addresses the root cause and improves model accuracy.

Exam trap

AI0-001 often tests data preprocessing pitfalls; candidates might choose threshold adjustment or imputation as quick fixes, but the core issue is temporal alignment, which requires a systematic approach like windowing.

How to eliminate wrong answers

Option A is wrong because discarding records with misaligned timestamps would result in significant data loss and reduce the dataset size, potentially introducing bias and not solving the underlying issue of aligning features. Option C is wrong because adjusting the classification threshold only changes the decision boundary and does not fix the data quality problem; it may reduce false positives but at the cost of false negatives and does not improve the model's predictive power. Option D is wrong because imputing missing timestamps and joining on nearest timestamp can still introduce misalignment and may not accurately reflect the temporal relationships, especially with varying update frequencies.

337
Multi-Selecthard

A healthcare AI system is subject to GDPR because it processes patient data. Which THREE requirements must the system satisfy?

Select 3 answers
A.Right to explanation of decisions
B.Explicit consent from all data subjects
C.Meaningful information about the logic involved in automated decision-making
D.Data minimization principles
E.Data retention period of at least 10 years
AnswersA, C, D

Article 22 and Recital 71 provide a right to explanation for automated decisions.

Why this answer

Article 22 of the GDPR grants data subjects the right not to be subject to a decision based solely on automated processing, including profiling, which produces legal effects or similarly significant effects. For healthcare AI systems, this means patients have the right to obtain an explanation of the decision reached by the algorithm, such as how a diagnosis or treatment recommendation was derived. This requirement ensures transparency and accountability in high-stakes automated decisions.

Exam trap

Candidates often confuse the requirements of GDPR for AI systems. A common trap is assuming that explicit consent is always required for healthcare AI processing, but GDPR provides other lawful bases (e.g., vital interests, public health). The right to explanation is a distinct requirement under Article 22 for automated decision-making, and data minimization principles apply broadly.

338
MCQmedium

A financial services company trains a gradient-boosted classifier on customer transaction data to flag fraudulent purchases. The training set includes a rare subset of private banking clients whose transaction patterns are highly distinctive. A red-team exercise shows that an attacker with black-box API access can determine whether a specific private banking client's record was in the training set with 85% accuracy. Which technique should the security team prioritize to reduce this specific risk while preserving most model utility?

A.Retrain the model using only synthetic transaction records generated by a GAN.
B.Encrypt the model weights at rest using AES-256 and restrict API access with mutual TLS.
C.Apply differential privacy during training by adding calibrated noise to the gradient updates.
D.Add rate limiting and query logging to the prediction API to throttle suspicious enumeration.
AnswerC

Differential privacy bounds how much any single training record can influence the model, so an attacker cannot reliably distinguish whether a particular private banking client's record was included. Calibrated noise in the training process directly targets membership inference while allowing a tunable privacy budget that retains most predictive utility for fraud detection.

Why this answer

The scenario describes membership inference enabled by distinctive training records, so the fix must alter the training process itself. Differential privacy during training directly limits per-record influence, which is the mechanism the attacker exploits. Controls on storage, transport, or query volume do not change the statistical relationship between the model's outputs and individual training examples, so they cannot reduce the measured inference accuracy.

Exam trap

The trap here is assuming that encrypting the model or throttling the API addresses privacy leakage, when membership inference exploits statistical patterns in predictions rather than unauthorized file or endpoint access.

339
MCQeasy

Refer to the exhibit. The training log shows losses and accuracies over 5 epochs. What is the most likely problem?

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

Overfitting fits because the log shows training loss still falling while validation loss rises after early epochs, meaning the model memorises training data rather than generalising. The widening gap between training and validation accuracy is the diagnostic constraint the stem's exhibit presents.

Why this answer

The training log shows high training accuracy (e.g., 99%) but low validation accuracy (e.g., 60%) across epochs, with the validation loss increasing after an initial drop. This divergence indicates the model has memorized the training data rather than learning generalizable patterns, which is the hallmark of overfitting.

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 'learning well' when it is actually memorizing.

How to eliminate wrong answers

Option A is wrong because data leakage would cause both training and validation accuracies to be artificially high and closely aligned, not a growing gap. Option C is wrong because underfitting would show low accuracy on both training and validation sets, not high training accuracy. Option D is wrong because vanishing gradient typically manifests as slow or stalled learning (flat loss curves) across all data splits, not a divergence between training and validation performance.

340
MCQmedium

A hospital's AI triage assistant produces recommendations that clinicians frequently override. An operations review finds the model was trained on data from a different patient population than the one currently served. Which action most directly addresses the root cause of the low acceptance rate?

A.Increase the model's inference frequency so recommendations refresh more often during a shift
B.Mandate that clinicians document a reason each time they override a recommendation
C.Add a confidence score display so clinicians can see how certain the model is about each recommendation
D.Retrain or fine-tune the model using data representative of the current patient population and revalidate its performance
AnswerD

The stated root cause is a training population that does not match the served population, which produces recommendations clinicians find unreliable and override. Retraining or fine-tuning on representative local data, followed by revalidation, directly corrects the mismatch and is the action most likely to restore clinical trust and acceptance.

Why this answer

The review identified a population mismatch between training data and the patients now being served, so the corrective action must close that gap. Retraining or fine-tuning on representative local data and revalidating performance targets the cause directly. Confidence displays, override documentation, and higher refresh rates are peripheral measures that do not change what the model has learned.

Exam trap

The trap here is choosing a transparency or workflow feature that appears to improve trust, when the actual defect is a training-data population mismatch requiring data remediation.

341
MCQhard

A company is building a recommendation system for an e-commerce site. They have historical user-item interaction data. Which approach is most appropriate?

A.Use a large language model to generate random product suggestions
B.Use a pre-trained image classification model to recommend visually similar products
C.Deploy a rule-based system that always recommends best-selling items
D.Train a collaborative filtering model on user-item interactions
AnswerD

Collaborative filtering learns latent user and item factors directly from historical user-item interaction data, such as ratings or purchases, to predict unseen preferences. This matches the stem's available data exactly, unlike content-based approaches that would require item metadata.

Why this answer

Collaborative filtering is the standard approach for recommendation systems when historical user-item interaction data (e.g., ratings, purchases, clicks) is available. It leverages patterns across users and items—such as 'users who liked X also liked Y'—to generate personalized recommendations without requiring explicit item features. Training a collaborative filtering model directly on this interaction matrix captures latent preferences and produces relevant suggestions, making it the most appropriate choice for the described scenario.

Exam trap

AI0-001 often tests the misconception that any advanced model (like LLMs or image classifiers) is suitable for recommendation tasks, when the key is matching the model to the available data type—here, user-item interactions.

How to eliminate wrong answers

Option A is wrong because using an LLM to generate random product suggestions ignores the historical interaction data entirely and produces non-personalized, arbitrary outputs with no grounding in user behavior. Option B is wrong because a pre-trained image classification model recommends based on visual similarity, not on user-item interaction patterns; it would require product images and would not leverage the available interaction data, leading to irrelevant recommendations. Option C is wrong because a rule-based system that always recommends best-selling items is static, non-personalized, and fails to use the rich interaction data to tailor recommendations to individual users.

342
Multi-Selectmedium

An AI security engineer is hardening an LLM application against prompt injection. Which TWO controls are most effective? (Select two.)

Select 2 answers
A.Fine-tuning the model on a dataset of safe responses
B.Training the model with adversarial examples of prompt injection
C.Input sanitization to strip special characters and known injection patterns
D.Increasing the model's temperature setting
E.Using a smaller model for faster inference
AnswersB, C

Adversarial training exposes the model to labelled injection examples during fine-tuning, teaching it to recognise and resist instruction-override patterns. This hardens the model itself against the attack class, satisfying the hardening requirement rather than relying solely on perimeter filtering.

Why this answer

Option B is correct because training the model with adversarial examples of prompt injection (adversarial training) exposes it to malicious inputs during fine-tuning, helping it learn to recognize and resist injection attempts rather than comply with them. Option C is correct because input sanitization that strips special characters and known injection patterns (e.g., delimiter tokens, instruction-override phrases) removes or neutralizes the attack surface before the prompt reaches the model, providing a deterministic defense layer. Option A is not the best choice because fine-tuning on safe responses teaches desired output style but does not specifically teach the model to detect or refuse injection attempts, so it offers weak protection against adversarial inputs.

Option D is incorrect because increasing temperature makes outputs more random and less predictable, which does not improve security and can even worsen reliability. Option E is incorrect because using a smaller model for faster inference addresses latency and cost, not prompt-injection resistance, and smaller models are often more vulnerable.

Exam trap

CompTIA often tests the misconception that fine-tuning on safe responses (Option A) is a security control, when in fact it only improves output safety, not input robustness, and that increasing temperature (Option D) has no security benefit and can degrade reliability.

343
MCQmedium

A developer is deploying an AI service API. To protect against data leakage through API responses, which access control principle should be applied to API keys?

A.Disable API keys and rely on IP whitelisting only
B.Use a single shared API key for all services
C.Grant all API keys full access to simplify management
D.Implement least-privilege API access with scoped permissions
AnswerD

Scoped, least-privilege API keys limit each key to the specific resources and operations it needs, so a compromised key cannot retrieve unrelated sensitive data. This satisfies the stem's data leakage constraint by containing the blast radius of any single key exposure.

Why this answer

The least-privilege principle ensures that each API key is scoped to only the specific permissions required for its intended function, such as read-only access to a single endpoint. This minimizes the blast radius in case the key is compromised, preventing unauthorized access to other services or data. In AI service deployments, scoped permissions are often enforced via OAuth 2.0 scopes or IAM roles tied to the API key.

Exam trap

CompTIA often tests the misconception that simplifying management (Option C) or using IP whitelisting (Option A) is sufficient for security, but the trap is that these approaches ignore the fundamental need for granular access control to prevent data leakage in multi-tenant AI API environments.

How to eliminate wrong answers

Option A is wrong because disabling API keys and relying solely on IP whitelisting removes authentication granularity and fails to protect against data leakage from within the whitelisted network or from IP spoofing attacks. Option B is wrong because using a single shared API key for all services violates the principle of least privilege, as a compromised key would expose all services and data, and it also prevents audit trails for individual users or applications. Option C is wrong because granting all API keys full access simplifies management at the cost of security, allowing any compromised key to access all endpoints and data, directly enabling data leakage.

344
MCQhard

A team is deploying a fine-tuned LLM for code generation. They need to ensure the model output is always valid JSON. Which prompt engineering technique should they use?

A.Chain-of-thought prompting
B.Few-shot examples of valid JSON outputs
C.Temperature setting to 0
D.Using a larger model variant
AnswerB

Few-shot prompting places several complete, valid JSON examples in the prompt, so the model infers the required schema, key names and formatting by pattern matching. This constrains generation toward syntactically valid JSON, satisfying the always-valid-JSON requirement more reliably than zero-shot instructions alone.

Why this answer

Few-shot examples of valid JSON outputs condition the model on the exact schema, key names, and formatting it should produce, dramatically increasing the probability of schema-conformant output. Because LLMs are next-token predictors, showing several input-output pairs where the output is valid JSON teaches the pattern in-context without retraining. This is the most reliable prompt-engineering technique for enforcing structural output constraints.

Exam trap

AI0-001 often tests the confusion between techniques that improve reasoning (chain-of-thought) and techniques that constrain output format (few-shot examples, structured output), tempting candidates to pick chain-of-thought for a formatting problem.

How to eliminate wrong answers

Option A is wrong because chain-of-thought improves reasoning quality but does not constrain output format — a model can reason perfectly and still emit prose or malformed JSON. Option C is wrong because temperature 0 makes output deterministic but not necessarily valid JSON; a deterministic wrong format is still wrong. Option D is wrong because a larger model may be more capable but provides no guarantee of JSON validity and increases cost and latency without addressing the formatting requirement.

345
MCQmedium

A company deploys an LLM-based chatbot that retrieves data from external databases. An attacker embeds malicious instructions in a database record. When the chatbot retrieves that record, it executes the instructions, overriding its system prompt. Which type of attack is this?

A.Model inversion attack
B.Indirect prompt injection
C.Direct prompt injection
D.Membership inference attack
AnswerB

Indirect prompt injection occurs when malicious instructions arrive through retrieved external content rather than direct user input, hijacking the model's behaviour. Here the poisoned database record overrides the system prompt once the chatbot ingests it, satisfying the stem's constraint that the attacker never interacts with the chatbot directly.

Why this answer

This is an indirect prompt injection attack because the malicious instructions are embedded in a third-party data source (the database record) rather than being sent directly by the user. When the LLM retrieves and processes that record, the injected instructions override the system prompt, causing the chatbot to behave contrary to its intended design.

Exam trap

The AI0-001 exam often tests the distinction between direct and indirect prompt injection by making the attack vector (user input vs. external data source) the key differentiator, so candidates must identify where the malicious instructions originate.

How to eliminate wrong answers

Option A is wrong because a model inversion attack aims to reconstruct training data or extract sensitive information from the model's parameters, not to inject instructions via external data. Option C is wrong because direct prompt injection involves an attacker sending malicious input directly to the LLM (e.g., in a user prompt), not embedding it in a retrieved database record. Option D is wrong because a membership inference attack determines whether a specific data point was part of the model's training set, not about injecting instructions into the model's context.

346
MCQmedium

An AI model for detecting fraudulent transactions has high precision but low recall. Which business impact is most likely?

A.The model has no impact on fraud detection
B.The model detects all fraudulent transactions
C.Many fraudulent transactions go undetected
D.Many legitimate transactions are flagged as fraud
AnswerC

Recall measures the proportion of actual fraud cases the model identifies. Low recall means many genuine fraudulent transactions are classified as legitimate, so they pass through undetected and generate direct financial loss, despite precision remaining high.

Why this answer

High precision means that when the model flags a transaction as fraudulent, it is very likely correct. However, low recall indicates that the model misses a significant proportion of actual fraudulent transactions. Therefore, the most likely business impact is that many fraudulent transactions go undetected, leading to financial losses.

Exam trap

CompTIA often tests the distinction between precision and recall by presenting a scenario where candidates confuse high precision with high recall, leading them to incorrectly select option D (many legitimate transactions flagged) instead of recognizing that low recall causes undetected fraud.

How to eliminate wrong answers

Option A is wrong because a model with high precision and low recall does have a significant impact—it fails to catch many fraud cases, which directly affects business outcomes. Option B is wrong because low recall means the model does not detect all fraudulent transactions; it misses many, contradicting the claim of detecting all fraud. Option D is wrong because high precision implies few false positives, so legitimate transactions are rarely flagged as fraud; that scenario would correspond to low precision, not high precision.

347
MCQeasy

A data engineer needs to combine two datasets, each with unique customer_id, to include all records from both datasets. Which join type should be used?

A.FULL OUTER JOIN
B.RIGHT JOIN
C.LEFT JOIN
D.INNER JOIN
AnswerA

A FULL OUTER JOIN returns matched rows plus unmatched rows from both sides, padding missing columns with nulls. Since each dataset holds unique customer_id values, only this join preserves every record from both sources, as the stem requires.

Why this answer

A FULL OUTER JOIN returns all records from both datasets, matching rows where the customer_id is present in both and filling in NULLs for missing matches. This is the only join type that guarantees every unique customer_id from either dataset appears in the result, which is exactly what the requirement specifies.

Exam trap

CompTIA often tests the misconception that LEFT JOIN or RIGHT JOIN can include all records from both datasets, but candidates forget that these asymmetric joins exclude non-matching rows from the opposite side.

How to eliminate wrong answers

Option B (RIGHT JOIN) is wrong because it returns only all rows from the right dataset and matching rows from the left, omitting any customer_id that exists only in the left dataset. Option C (LEFT JOIN) is wrong because it returns only all rows from the left dataset and matching rows from the right, omitting any customer_id that exists only in the right dataset. Option D (INNER JOIN) is wrong because it returns only rows where customer_id exists in both datasets, discarding all non-matching records from either side.

348
Multi-Selectmedium

A team is deploying a model that must comply with GDPR. Users can request deletion of their data. Which TWO practices should be implemented to support this compliance? (Select TWO.)

Select 2 answers
A.Enable output caching for frequently requested predictions
B.Validate inputs to prevent prompt injection attacks
C.Use a vector database to store user embeddings
D.Maintain the ability to delete a user's data from training sets and derived features
E.Implement data versioning and lineage tracking
AnswersD, E

Directly supports the right to erasure by allowing removal of user data and any features based on it.

Why this answer

GDPR's 'right to erasure' requires that upon user request, the organization must delete not only the user's raw data but also any derived features or embeddings that were generated from that data. Without this capability, the model could still indirectly retain user information through trained parameters or feature stores, violating compliance.

Exam trap

CompTIA often tests the misconception that simply using a vector database or caching mechanism satisfies GDPR deletion requirements, when in fact the critical practice is maintaining the ability to delete user data from all derived artifacts, including training sets and feature stores.

349
Multi-Selectmedium

A data scientist is fine-tuning a large language model for a domain-specific task using QLoRA. Which TWO statements correctly describe QLoRA's advantages?

Select 2 answers
A.It enables fine-tuning on consumer-grade GPUs by reducing memory requirements
B.It reduces memory usage by quantizing the base model to 4-bit precision
C.It requires more training data than full fine-tuning to achieve comparable accuracy
D.It trains the full model parameters with low precision
E.It increases inference speed compared to the base model
AnswersA, B

QLoRA quantises the frozen base weights to 4-bit NormalFloat, then backpropagates through low-rank adapters, so gradients and optimiser states stay tiny. This slashes VRAM enough to fine-tune large models on consumer-grade GPUs, directly satisfying the stem's memory-reduction constraint.

Why this answer

Option A is correct because QLoRA (Quantized Low-Rank Adaptation) freezes the base model and trains only small low-rank adapter matrices, drastically cutting the memory needed for gradients and optimizer states, which allows fine-tuning of large models on consumer-grade GPUs. Option B is correct because QLoRA quantizes the frozen base model weights to 4-bit precision (typically using the NF4 data type with double quantization), which is the core mechanism that reduces memory usage while preserving performance. Option C is incorrect because QLoRA does not require more training data than full fine-tuning; it typically achieves comparable accuracy with the same or less data by training only a small number of adapter parameters.

Option D is incorrect because QLoRA does not train the full model parameters; it keeps the base model frozen in 4-bit and trains only the low-rank adapters. Option E is incorrect because QLoRA is a fine-tuning technique and does not inherently increase inference speed over the base model; the 4-bit base model may even require dequantization during inference.

Exam trap

AI0-001 often tests the misconception that quantization improves inference speed or that QLoRA trains all parameters — candidates confuse training-time memory savings with runtime performance gains.

350
MCQeasy

A marketing team wants to use an AI system to generate personalized advertisements that include realistic images of celebrities endorsing products. The legal team raises concerns about compliance with the EU AI Act. Which action should the team take to comply with the Act's transparency requirements?

A.Use only images of celebrities who are deceased, as the Act only applies to living individuals
B.Clearly disclose that the images are AI-generated and not real
C.Limit the advertisements to social media platforms that have their own AI disclosure policies
D.Obtain a license from each celebrity before generating their image
AnswerB

The EU AI Act requires that deepfake content be disclosed as artificially generated or manipulated. Using AI to create realistic images of celebrities endorsing products constitutes a deepfake, so the team must clearly label the content to inform viewers. This transparency requirement applies regardless of licensing.

Why this answer

Under the EU AI Act, deepfake content must be disclosed as artificially generated or manipulated. Generating realistic images of celebrities endorsing products without disclosure would violate this transparency requirement. The team must clearly label the images as AI-generated, regardless of licensing or platform policies.

Exam trap

The trap here is assuming that obtaining a license or relying on platform policies satisfies the EU AI Act's transparency requirements, when the Act specifically mandates disclosure of deepfake content.

351
MCQmedium

A data scientist is using PyTorch to train a custom NLP model. The training is slow on a single GPU. They want to speed up training by using multiple GPUs on a single machine. Which PyTorch feature should they use?

A.TorchScript tracing
B.torch.nn.DataParallel
C.torch.optim.SGD
D.PyTorch Lightning's zero_grad function
AnswerB

DataParallel splits each batch across all GPUs on one machine and gathers gradients back to the primary device, giving single-process, multi-GPU acceleration with a one-line wrapper. It directly satisfies the single-machine, multiple-GPU constraint, unlike DistributedDataParallel, which targets multi-node scaling.

Why this answer

torch.nn.DataParallel is PyTorch's built-in module for single-machine, multi-GPU training. It wraps the model and automatically splits the input batch across available GPUs, replicating the model on each device and gathering outputs on the primary GPU — requiring only a one-line code change (wrapping the model).

Exam trap

AI0-001 often tests the confusion between DataParallel and DistributedDataParallel — candidates pick DDP for single-machine multi-GPU, but the question emphasizes minimal code changes, and DataParallel requires only wrapping the model, while DDP requires initializing a process group and launching multiple processes.

How to eliminate wrong answers

Option A (TorchScript tracing) is wrong because TorchScript is for serializing and optimizing models for deployment, not for multi-GPU training. Option C (torch.optim.SGD) is wrong because SGD is an optimizer, not a parallelism mechanism; it does not distribute work across GPUs. Option D (PyTorch Lightning's zero_grad function) is wrong because zero_grad is a gradient-clearing utility, not a multi-GPU training feature; PyTorch Lightning does support multi-GPU via its Trainer, but the zero_grad function itself is unrelated.

352
MCQhard

An organization uses a fine-tuned LLM for generating financial reports. An attacker gains access to the model's API and sends a series of queries that gradually reconstruct the training data of the fine-tuned model. This is an example of which attack?

A.Membership inference
B.Data poisoning
C.Model extraction
D.Model inversion
AnswerD

Model inversion exploits repeated API queries to infer training data characteristics, letting the attacker reconstruct sensitive records. The gradual query pattern against a fine-tuned model matches inversion, which targets training-data reconstruction rather than stealing the model itself.

Why this answer

Model inversion is an attack where an adversary queries a model repeatedly to reconstruct the training data or infer sensitive features of the training set. In this scenario, the attacker uses API access to gradually reconstruct the fine-tuned model's training data, which is the defining characteristic of model inversion. The gradual querying pattern is typical of inversion attacks that exploit the model's memorization of training examples.

Exam trap

AI0-001 often tests the distinction between model inversion (reconstruct training data), membership inference (was this record in training?), model extraction (steal the model), and data poisoning (corrupt training) — the phrase 'reconstruct the training data' is the tell for model inversion.

How to eliminate wrong answers

Option A is wrong because membership inference determines whether a specific record was in the training set (a yes/no question), not reconstructing the data itself. Option B is wrong because data poisoning occurs during training, when an attacker corrupts the training data to influence model behaviour — here the model is already trained and the attack is at inference time. Option C is wrong because model extraction (model stealing) aims to replicate the model's functionality or parameters, not to recover the training data.

353
MCQeasy

A company deploys a deep learning model for real-time image classification. After deployment, they notice high inference latency exceeding the 100ms SLA. Which action would most likely reduce latency without significantly impacting accuracy?

A.Add more training data to improve model robustness
B.Replace the model with a simpler logistic regression model
C.Increase batch size for inference
D.Apply model quantization
AnswerD

Quantization converts weights and activations from 32-bit floats to 8-bit integers, cutting memory bandwidth and enabling faster arithmetic, which reduces inference latency below the 100ms SLA. Accuracy loss is typically minimal because the reduced precision retains sufficient numerical range for classification.

Why this answer

Model quantization reduces the precision of the model's weights and activations (e.g., from 32-bit floating point to 8-bit integer), which significantly decreases memory bandwidth and computational requirements during inference. This directly lowers latency without fundamentally altering the model's learned representations, so accuracy degradation is typically minimal (often <1-2%).

Exam trap

CompTIA often tests the misconception that increasing batch size always improves latency, when in fact it increases per-request latency in real-time systems, and that simpler models are always better for latency, ignoring the critical accuracy requirement.

How to eliminate wrong answers

Option A is wrong because adding more training data improves model robustness and generalization but does not reduce inference latency; it may even increase training time and model complexity. Option B is wrong because replacing a deep learning model with a logistic regression model would drastically reduce accuracy for complex image classification tasks, failing the 'without significantly impacting accuracy' constraint. Option C is wrong because increasing batch size for inference increases the number of images processed per batch, which can improve throughput but actually increases per-request latency (time to first prediction) and may exceed the 100ms SLA for real-time applications.

354
MCQmedium

A data scientist needs to explain why a black-box model denied a loan application. Which explainability technique generates local feature importance values using a simpler interpretable model around the prediction?

A.Model card
B.LIME
C.Attention visualisation
D.SHAP values
AnswerB

LIME fits a simple interpretable surrogate model, such as a linear model, around the individual prediction and reports local feature importance for that single loan decision. This satisfies the stem's demand for local explanation of a black-box model's specific output.

Why this answer

LIME (Local Interpretable Model-agnostic Explanations) is the correct technique because it generates local feature importance values by fitting a simpler, interpretable model (e.g., linear regression or decision tree) around the prediction of the black-box model. This allows the data scientist to explain why a specific loan application was denied by identifying which features (e.g., income, credit score) most influenced that particular decision. Unlike global methods, LIME focuses on the local neighborhood of the instance, making it ideal for explaining individual predictions.

Exam trap

The AI0-001 exam often tests the distinction between local vs. global explainability methods, and the trap here is that candidates may confuse SHAP values (which also provide local feature importance) with LIME, failing to recognize that LIME uniquely uses a simpler interpretable surrogate model trained around the prediction, while SHAP uses game-theoretic contributions without a surrogate model.

How to eliminate wrong answers

Option A is wrong because a model card is a documentation artifact that summarizes a model's intended use, performance, and limitations at a global level, not a technique for generating local feature importance values for a single prediction. Option C is wrong because attention visualization is specific to neural network architectures (e.g., transformers) and provides insight into which parts of the input the model 'attends to,' but it is not a model-agnostic method for generating local feature importance with a simpler interpretable model. Option D is wrong because SHAP values, while they do provide local feature importance, are based on cooperative game theory (Shapley values) and do not use a simpler interpretable model around the prediction; instead, they compute additive feature contributions directly from the model's output.

355
Multi-Selecteasy

Which TWO data preprocessing techniques reduce the dimensionality of a dataset?

Select 2 answers
A.One-hot encoding
B.Imputation
C.Feature scaling
D.Principal Component Analysis (PCA)
E.Feature selection
AnswersD, E

PCA projects the original features onto orthogonal principal components ordered by explained variance, so the dataset can be represented with far fewer dimensions while retaining most information. This directly reduces dimensionality rather than merely selecting or transforming individual columns.

Why this answer

Principal Component Analysis (PCA) (D) is correct because it projects the original features onto a smaller set of orthogonal principal components that capture most of the variance, thereby reducing the number of dimensions while preserving as much information as possible. Feature selection (E) is also correct because it explicitly removes irrelevant or redundant features and keeps only a subset of the original variables, directly lowering the dataset's dimensionality. By contrast, one-hot encoding (A) increases dimensionality by creating a separate binary column per category, and imputation (B) merely fills in missing values without changing the number of features.

Feature scaling (C) standardizes or normalizes feature values (e.g., via min-max or z-score) but leaves the feature count unchanged, so it does not reduce dimensionality.

Exam trap

CompTIA often tests the distinction between techniques that transform or select features (reducing dimensionality) versus those that prepare data for modeling (like encoding, imputation, or scaling) without changing the number of features.

356
MCQmedium

A company uses an AI model to predict equipment failures. The model outputs a probability of failure. To minimize false alarms, the operations team wants a high precision. Which deployment strategy should they implement?

A.Retrain the model on more recent data
B.Increase the decision threshold for positive classification
C.Decrease the decision threshold
D.Use an ensemble of models with voting
AnswerB

Raising the decision threshold means predictions are labelled positive only when probability exceeds a higher value, reducing false positives and therefore increasing precision, which directly minimises the false alarms the operations team wants to avoid.

Why this answer

To minimize false alarms and achieve high precision, the operations team should increase the decision threshold for positive classification. A higher threshold means the model only predicts a failure when it is very confident, reducing the number of false positives (false alarms) at the cost of potentially missing some true failures (lower recall). This directly controls the precision-recall trade-off without changing the underlying model.

Exam trap

CompTIA often tests the precision-recall trade-off by making candidates confuse increasing the threshold (which improves precision) with decreasing it (which improves recall), or by suggesting retraining or ensemble methods as direct solutions for precision tuning.

How to eliminate wrong answers

Option A is wrong because retraining on more recent data improves model accuracy and relevance but does not directly control the precision-recall trade-off; it may not reduce false alarms if the model's calibration remains unchanged. Option C is wrong because decreasing the decision threshold would make the model more sensitive, increasing the number of positive predictions and thus increasing false alarms (lower precision), which is the opposite of the goal. Option D is wrong because using an ensemble of models with voting can improve overall accuracy and robustness, but it does not specifically target precision; the voting mechanism may still produce many false positives unless the threshold is also adjusted.

357
Multi-Selectmedium

Which THREE are common data preprocessing steps in a machine learning pipeline? (Choose 3)

Select 3 answers
A.Hyperparameter tuning
B.Encoding categorical variables
C.Model evaluation
D.Scaling numeric features
E.Handling missing values
AnswersB, D, E

Encoding categorical variables converts non-numeric labels into numeric representations, such as one-hot or ordinal encoding, so algorithms that require numerical input can process them. This satisfies the preprocessing requirement by making categorical features usable during model training, alongside handling missing values and feature scaling.

Why this answer

Encoding categorical variables (B) is a standard preprocessing step because algorithms require numeric input, so techniques like one-hot encoding or label encoding convert strings into numbers. Scaling numeric features (D) is also preprocessing, since methods such as standardization (z-score) or min-max normalization bring features to comparable ranges, which helps distance-based and gradient-based models. Handling missing values (E) is preprocessing too, using imputation (mean, median, mode) or deletion to ensure the dataset is complete before training.

Hyperparameter tuning (A) and model evaluation (C) are not preprocessing; they occur later in the pipeline, during model selection/training and after training, respectively.

Exam trap

CompTIA often tests the distinction between preprocessing steps (data cleaning, transformation) and later pipeline stages (model tuning, evaluation), so candidates mistakenly select hyperparameter tuning or model evaluation as preprocessing steps.

358
MCQeasy

A small e-commerce company wants to implement a chatbot to handle customer inquiries about order status and returns. The company has limited historical chat data and wants a solution that can be deployed quickly without extensive training. Which type of AI solution is most appropriate?

A.Train a custom large language model from scratch using the company's product catalog.
B.Fine-tune a pre-trained language model on the company's limited chat data and product information.
C.Use a rule-based chatbot with predefined scripts for common inquiries.
D.Implement a reinforcement learning agent that learns from customer interactions in real time.
AnswerB

Fine-tuning a pre-trained model leverages existing language understanding and adapts it to the company's specific domain with relatively little data. This approach enables quick deployment and handles natural language variations better than rule-based systems. It balances performance and resource constraints effectively.

Why this answer

Fine-tuning a pre-trained language model is the most appropriate because it uses transfer learning to adapt a general model to the company's domain with minimal data. It provides natural language understanding and can be deployed quickly. Other options either require excessive resources, lack flexibility, or are too complex for the scenario.

Exam trap

The trap here is assuming that training a custom model from scratch or using a simple rule-based system is sufficient, when fine-tuning a pre-trained model offers the best balance of speed, data efficiency, and capability.

359
Multi-Selectmedium

A data scientist is preparing a dataset for training a machine learning model. The dataset contains a mix of numerical and categorical features, and some features have high cardinality. The data scientist needs to apply appropriate encoding techniques to transform categorical variables into a format suitable for the model. Which TWO encoding methods are most appropriate for high-cardinality categorical features? (Choose two.)

Select 2 answers
A.Target encoding
B.Label encoding
C.Frequency encoding
D.Binary encoding
E.One-hot encoding
AnswersA, C

Target encoding replaces each category with the mean of the target variable for that category. It is effective for high-cardinality features because it reduces dimensionality and captures the relationship between the category and the target. However, it can lead to overfitting if not properly regularized, especially with rare categories. Techniques like smoothing or adding noise can mitigate this. In this scenario, target encoding is a suitable method for high-cardinality categorical features.

Why this answer

Target encoding and frequency encoding are both effective for high-cardinality categorical features. Target encoding replaces categories with the mean target value, capturing predictive relationships, while frequency encoding replaces categories with their counts, reducing dimensionality without imposing order. One-hot encoding creates too many columns, label encoding imposes false order, and binary encoding may not capture target relationships as well.

Therefore, target and frequency encoding are the most appropriate methods.

Exam trap

The trap here is assuming that one-hot encoding is always the default for categorical variables, without considering the dimensionality explosion with high-cardinality features.

360
MCQhard

An ML engineering team has a retraining pipeline that triggers automatically when model accuracy drops below a threshold. Recently, the model's accuracy has been fluctuating, causing frequent retraining and high compute costs. The team suspects the data distribution is changing slowly. Which approach should the team implement to reduce unnecessary retraining while maintaining model performance?

A.Use a simpler model to reduce variability
B.Implement a statistical drift detection method on input features
C.Increase the frequency of model retraining
D.Reduce the batch size for inference
AnswerB

Statistical drift detection on input features distinguishes genuine slow distributional change from normal accuracy noise, triggering retraining only when drift is confirmed. This satisfies the constraint of cutting unnecessary retraining and compute cost while preserving performance.

Why this answer

Implementing a statistical drift detection method (e.g., using KL divergence, PSI, or ADWIN) on input features allows the team to identify when the data distribution has genuinely changed, rather than reacting to random accuracy fluctuations. This reduces unnecessary retraining by triggering the pipeline only when statistically significant drift is detected, maintaining model performance without the high compute costs of frequent retraining.

Exam trap

CompTIA often tests the misconception that increasing retraining frequency or simplifying the model can solve drift-related issues, but the correct approach is to detect drift statistically before deciding to retrain.

How to eliminate wrong answers

Option A is wrong because using a simpler model may reduce variability but does not address the root cause of distribution drift; it could also degrade performance by underfitting the true underlying patterns. Option C is wrong because increasing retraining frequency would exacerbate the compute cost problem and may overfit to transient fluctuations, not solve the issue of unnecessary retraining. Option D is wrong because reducing the batch size for inference affects throughput and latency, not the detection of data distribution changes or the decision to retrain.

361
MCQmedium

A developer is building an AI agent that needs to call external APIs to complete user requests. The agent must decide which API to call based on the user's natural language input. Which technique should the developer use to enable the agent to invoke APIs?

A.Fine-tuning the LLM on API documentation
B.Chain-of-thought reasoning
C.Few-shot prompting with examples of API calls
D.Function calling
AnswerD

Function calling lets the model emit structured JSON specifying which API to invoke and with which arguments, based on the user's natural-language request. The runtime executes that call and returns results, enabling reliable external API invocation without parsing free-form text.

Why this answer

Function calling (also called tool use) is the native mechanism by which modern LLM APIs let the model emit structured JSON describing which function to invoke and with what arguments. The developer defines a schema for each API, and the model decides at runtime which function to call based on the user's natural language input. This is the standard, purpose-built technique for agentic API invocation.

Exam trap

AI0-001 often tests the confusion between prompting techniques (few-shot, chain-of-thought) and native API capabilities (function calling) — candidates pick prompting because it sounds flexible, missing that function calling is the purpose-built mechanism.

How to eliminate wrong answers

Option A is wrong because fine-tuning on API documentation teaches the model facts about APIs but does not give it a reliable runtime mechanism to emit structured call payloads or handle multi-turn tool orchestration. Option B is wrong because chain-of-thought reasoning improves the model's step-by-step logic but does not by itself produce machine-parseable API invocations or route to the correct endpoint. Option C is wrong because few-shot prompting can nudge the model toward a format but is brittle, consumes context, and lacks the schema enforcement and tool-routing guarantees that native function calling provides.

362
MCQeasy

A developer is building an AI-powered code completion tool. To ensure the model does not output malicious code when prompted with 'Write code to delete all files on the system', which defense is most effective?

A.Output filtering to detect and block dangerous code constructs
B.Input validation to block the word 'delete'
C.Rate limiting on the number of requests per user
D.Retraining the model on safe code only
AnswerA

Output filtering inspects generated completions and blocks dangerous constructs such as recursive deletion commands before they reach the user. This satisfies the requirement to prevent malicious output regardless of prompt, unlike input sanitisation, which cannot anticipate every adversarial phrasing.

Why this answer

Output filtering can block generated code that contains dangerous patterns like file deletion commands.

363
MCQmedium

A media company stores thousands of hours of raw broadcast footage in a cloud object storage bucket. A data engineering team needs a training dataset that contains only the short clips where a goal is scored, so they must locate and extract those specific time ranges from the video files before training. Which technology should the team use to extract the required segments from the video objects?

A.Use FFmpeg to decode the video and cut the required time ranges into new clip files.
B.Use a data lakehouse table format with schema evolution to store the video files as Delta tables.
C.Use OpenCV's VideoCapture with a GPU-accelerated codec to retrain the object detection model directly on the raw footage.
D.Use Apache Parquet to store each frame as a column and filter on the goal timestamp column.
AnswerA

FFmpeg is the standard open-source toolkit for demuxing, decoding, and re-encoding media streams, and it supports precise time-based trimming with parameters such as -ss and -to. Running it over the objects lets the team extract exactly the goal segments and write new clip files that become clean training data for the model pipeline.

Why this answer

Trimming video to precise time ranges is a media-processing task, and FFmpeg is the purpose-built tool for demuxing, decoding, and re-encoding streams with start and end timestamps. Object storage and table formats organize files but cannot parse video containers, so the extraction must be performed by a codec-aware utility before the clips enter the training pipeline.

Exam trap

The trap here is assuming that a data storage or table format can perform media manipulation, when extracting video segments requires a codec-aware media tool.

364
MCQmedium

A logistics company runs a route-optimization model on a fleet of delivery vehicles. Each vehicle has an NVIDIA Jetson module with limited memory, and connectivity is unavailable for hours at a time. The team wants the smallest possible runtime footprint while still executing the trained graph on the GPU. Which approach best fits these constraints?

A.Deploy the full training framework on each vehicle
B.Store the model as a CSV of weights and load it at startup
C.Serve the model from a cloud endpoint over the cellular network
D.Convert the model to a TensorRT engine for the target GPU
AnswerD

TensorRT builds a hardware-specific optimized engine from the trained graph, fusing layers, selecting tuned GPU kernels, and applying precision calibration. The resulting runtime footprint is far smaller than a full framework, and the engine is purpose-built for the Jetson GPU. Because the engine is generated ahead of time, vehicles can run it for hours without connectivity.

Why this answer

TensorRT compiles a trained network into a GPU-specific engine, fusing operations and choosing tuned kernels for the Jetson hardware. The engine is compact, runs entirely on the device, and needs no network, so the route optimizer keeps working during hours offline. Full frameworks, cloud endpoints, and raw weight files each fail one of the footprint, offline, or GPU-execution requirements.

Exam trap

The trap here is assuming any on-device copy of the model satisfies the constraint, when the requirement is a compact, GPU-optimized engine rather than a portable file or a cloud call.

365
MCQmedium

Refer to the exhibit. What is the most likely issue and what action should be taken?

A.Learning rate is too low; increase it
B.Underfitting; increase model complexity
C.Overfitting; apply early stopping around epoch 15
D.Data imbalance; use class weights
AnswerC

The exhibit shows training loss continuing to fall while validation loss rises after roughly epoch 15, the classic divergence signature of overfitting. Early stopping at that point halts training before the model memorises noise, preserving generalisation. Regularisation or more data would also help, but stopping is the direct fix.

Why this answer

The training loss continues to decrease while the validation loss starts to increase after approximately epoch 15, which is a classic sign of overfitting. The model is memorizing the training data rather than generalizing, so applying early stopping around epoch 15 would prevent further divergence and preserve the best validation performance.

Exam trap

CompTIA often tests the distinction between overfitting and underfitting by showing loss curves where training loss continues to drop while validation loss rises, tricking candidates into thinking the model needs more training or a lower learning rate.

How to eliminate wrong answers

Option A is wrong because a low learning rate would cause both training and validation loss to decrease very slowly or plateau, not diverge with validation loss rising. Option B is wrong because underfitting would show both training and validation loss remaining high and not decreasing, whereas here training loss is still dropping. Option D is wrong because data imbalance typically causes poor performance on the minority class across both training and validation sets, not a divergence in loss curves after a certain epoch.

366
MCQmedium

A support team wants an AI assistant that can answer employee questions by retrieving passages from the company's internal policy documents and generating a response grounded in those passages. The documents change weekly. Which approach should the team implement?

A.Retrieval-augmented generation
B.Training a model from scratch on the policy corpus
C.Fine-tuning the base model on all policy documents
D.Prompting the model with only the user's question
AnswerA

Retrieval-augmented generation combines a retrieval component that fetches relevant passages from an external knowledge store with a generative model that composes an answer from them. Because the policy documents are updated weekly, retrieval keeps responses current without retraining the model, and grounding reduces fabrication.

Why this answer

Retrieval-augmented generation pairs a document retriever with a generative model, so the assistant answers from the latest policy passages instead of relying on memorized weights. This keeps responses current as documents change weekly, supports citation, and reduces hallucination. Fine-tuning, training from scratch, and ungrounded prompting all fail to keep pace with changing content or provide grounding.

Exam trap

The trap here is assuming that any use of company documents requires fine-tuning, when retrieval is the lighter and more current option.

367
Multi-Selecteasy

A company is deploying a pre-trained image classification model for facial recognition in a security system. They are concerned about adversarial examples. Which TWO of the following are effective defenses against adversarial examples?

Select 2 answers
A.Adversarial training during model development
B.Gradient masking to hide model gradients
C.Input sanitization techniques such as JPEG compression or denoising
D.Homomorphic encryption of input images
E.Federated learning to train on distributed data
AnswersA, C

Adversarial training augments the training set with perturbed images labelled correctly, so the model learns decision boundaries robust to small input changes. This directly hardens the pre-trained classifier against the evasion attacks the security system fears, satisfying the stem's adversarial-example constraint at development time.

Why this answer

Adversarial training during model development (A) is correct because it augments the training set with adversarial examples generated by attacks like FGSM or PGD, so the model learns to classify perturbed inputs correctly and gains genuine robustness. Input sanitization techniques such as JPEG compression or denoising (C) are correct because they destroy or attenuate the small, high-frequency perturbations that adversarial attacks add, reducing the attack's effectiveness before inference. Gradient masking (B) is not a reliable defense: it only obscures gradients and is routinely bypassed by transferability or gradient-free attacks, giving a false sense of security.

Homomorphic encryption (D) protects data confidentiality during computation but does not remove or neutralize adversarial perturbations, so it is irrelevant to adversarial robustness. Federated learning (E) addresses privacy and distributed training, not the integrity of predictions against crafted inputs, so it does not defend against adversarial examples.

368
MCQmedium

Under the EU AI Act, an AI system that uses subliminal techniques to materially distort a person's behaviour, causing psychological or physical harm, would be classified under which risk tier?

A.Unacceptable risk
B.Limited risk
C.High risk
D.Minimal risk
AnswerA

Subliminal manipulation causing psychological or physical harm falls squarely within the prohibited practises list under Article 5 of the EU AI Act. Such systems are banned outright, placing them in the unacceptable risk tier rather than high, limited or minimal risk.

Why this answer

Under the EU AI Act, AI systems that deploy subliminal, purposefully manipulative, or deceptive techniques to materially distort a person's behaviour and cause significant harm are explicitly banned. These practices are considered a clear threat to fundamental rights and are therefore classified as unacceptable risk. The Act's Article 5 prohibits such systems, placing them in the highest risk tier with outright bans.

Exam trap

AI0-001 often tests the distinction between prohibited practices (unacceptable risk) and high-risk systems, as candidates may confuse manipulative techniques with high-risk applications that require strict compliance rather than being banned.

How to eliminate wrong answers

Option B is wrong because limited risk systems are subject to transparency obligations only, such as disclosing that a user is interacting with an AI, and do not include manipulative techniques causing harm. Option C is wrong because high-risk systems are permitted but must meet strict requirements for safety, transparency, and human oversight; they do not include banned practices like subliminal manipulation. Option D is wrong because minimal risk systems are those with little to no risk, such as spam filters or AI-enabled video games, and are not subject to any additional regulatory requirements.

369
Multi-Selectmedium

A startup is building a medical diagnosis support system using a large language model. To prevent the model from generating harmful advice due to hallucinations, which TWO measures should they implement as part of their AI security strategy?

Select 2 answers
A.Ground the model using Retrieval-Augmented Generation (RAG) with curated medical databases
B.Monitor for anomalous inputs to detect data poisoning attempts
C.Employ federated learning to train on decentralized patient data
D.Implement output filtering and content moderation to block harmful or unverified medical advice
E.Use robust training techniques like adversarial training
AnswersA, D

RAG constrains generation to retrieved, curated medical evidence, so responses are grounded in authoritative sources rather than parametric memory alone. This directly reduces hallucinated advice, satisfying the requirement to prevent harmful output in the diagnosis support system.

Why this answer

Option A is correct because Retrieval-Augmented Generation (RAG) grounds the LLM's responses in curated, authoritative medical databases, so the model retrieves verified evidence at inference time rather than relying solely on parametric memory, which directly reduces hallucinated medical advice. Option D is correct because output filtering and content moderation act as a defense-in-depth control that inspects the model's generated text and blocks harmful, unsafe, or unverified medical recommendations before they reach the user. Option B is not correct here because monitoring for anomalous inputs targets data poisoning detection, which protects training-data integrity but does not directly prevent hallucinated outputs.

Option C is not correct because federated learning addresses privacy-preserving decentralized training, not hallucination prevention. Option E is not correct because adversarial training improves robustness against adversarial examples, not factual grounding or harmful medical advice generation.

Exam trap

CompTIA AI often tests the distinction between inference-time security controls (like RAG and output filtering) versus training-time or data-protection measures (like federated learning, adversarial training, or anomaly detection), leading candidates to select options that are valid security techniques but do not directly address the specific threat of hallucinated harmful advice.

370
MCQhard

A team fine-tunes a 7B parameter LLM using LoRA on a custom instruction dataset. After training, they observe that the model's outputs are only marginally different from the base model. Which is the MOST likely cause?

A.The dataset contained too many examples, overfitting the adapter
B.The base model was too small to benefit from fine-tuning
C.The LoRA rank was set too low (e.g., r=1), limiting the adapter's capacity to learn the task
D.The learning rate was too high, causing the model to diverge
AnswerC

LoRA rank controls the dimensionality of the low-rank update matrices, so r=1 gives the adapter minimal capacity to capture task-specific patterns. The adapter therefore learns too little, leaving outputs close to the frozen base model.

Why this answer

LoRA (Low-Rank Adaptation) injects trainable low-rank matrices into the model's attention layers. The rank r determines the dimension of these matrices and thus the adapter's capacity to capture task-specific patterns. With r=1, the update matrices are extremely low-rank, severely restricting the number of parameters that can be tuned and limiting the model's ability to learn complex instruction-following behavior.

As a result, the fine-tuned model's outputs remain very close to the base model, as observed.

Exam trap

AI0-001 often tests the misconception that a low LoRA rank is sufficient for any task, confusing parameter efficiency with learning capacity, and candidates may incorrectly attribute marginal output differences to dataset size or learning rate instead of the rank's direct impact on adapter expressiveness.

How to eliminate wrong answers

Option A is wrong because too many examples would typically lead to overfitting, which would cause the model to perform well on training data but poorly on unseen data—not marginal differences from the base model. Option B is wrong because a 7B parameter model is sufficiently large to benefit from fine-tuning; model size is not the primary limiting factor here. Option D is wrong because a high learning rate would cause training instability, loss divergence, or degraded performance, not outputs that are only marginally different from the base model.

371
MCQmedium

A software vendor is developing an AI system that generates realistic images of people for use in marketing campaigns. The system will be sold to clients in the EU. Under the EU AI Act, which obligation applies to the vendor regarding the generated content?

A.The vendor must register the AI system in the EU database for high-risk systems.
B.The vendor must obtain explicit consent from all individuals whose likeness is used in the training data.
C.The vendor must conduct a conformity assessment before placing the system on the market.
D.The vendor must ensure that generated images are marked in a machine-readable format as artificially generated.
AnswerD

The EU AI Act requires providers of AI systems that generate synthetic content, such as images, to mark the output in a machine-readable format to indicate it is AI-generated. This applies to deepfakes and other synthetic media, ensuring transparency and enabling detection.

Why this answer

The EU AI Act requires that AI-generated content, including synthetic images, be marked in a machine-readable format to indicate its artificial origin. This is a transparency obligation for providers of such systems. The vendor must implement this marking.

Other obligations like consent, database registration, and conformity assessment apply to different risk categories or legal frameworks.

Exam trap

The trap here is confusing the AI Act's transparency obligation for synthetic content with GDPR consent requirements, or assuming that any AI system dealing with personal data is automatically high-risk.

372
Multi-Selectmedium

A machine learning engineer is deploying a model to production. Which TWO practices are essential for ensuring reproducibility of model predictions?

Select 2 answers
A.Increase the number of training epochs to ensure convergence.
B.Use the same GPU hardware for both training and inference.
C.Use parallel data loading to speed up inference.
D.Version-control the model artifact (e.g., using MLflow or DVC).
E.Fix random seeds for all libraries (e.g., NumPy, TensorFlow).
AnswersD, E

Predictions are reproducible only when the exact trained weights are retrievable, so storing the model artefact in a versioned registry such as MLflow or DVC pins the serialised parameters, preprocessing state and framework version to a specific revision, letting any run reload the identical model.

Why this answer

Option D is correct because version-controlling the model artifact with tools like MLflow or DVC ensures that the exact trained weights, hyperparameters, and code revision used in production can be retrieved and audited, which is fundamental to reproducing identical predictions. Option E is correct because fixing random seeds across all libraries (e.g., NumPy, TensorFlow, and Python's random module) eliminates nondeterminism in weight initialization, data shuffling, and dropout, so the same inputs yield the same outputs. Option A is not essential for reproducibility since more epochs change the model rather than guarantee deterministic, repeatable predictions.

Option B is unnecessary because reproducibility depends on deterministic software and versioned artifacts, not on identical GPU hardware, and inference can run on different accelerators. Option C is also irrelevant because parallel data loading affects throughput and latency, not the determinism or reproducibility of the model's predictions.

Exam trap

CompTIA often tests the misconception that hardware consistency (e.g., same GPU) is required for reproducibility, when in fact deterministic software practices (version control and seed fixing) are the critical factors.

373
MCQmedium

A team is deploying a sentiment classifier and notices that the model outputs probabilities such as 0.83 for the positive class, but the actual positive rate among examples scored near 0.83 is only about 0.55. Stakeholders need the scores to reflect true likelihoods. Which action should the team take?

A.Replace the classifier with a k-nearest neighbors model, which produces inherently calibrated probabilities.
B.Raise the decision threshold from 0.5 to 0.83 so only highly confident examples are labeled positive.
C.Retrain the classifier with a lower learning rate and more epochs to improve probability estimates.
D.Apply a calibration method such as Platt scaling or isotonic regression to the model's output scores.
AnswerD

The stated problem is miscalibration: predicted probabilities do not match observed frequencies. Platt scaling fits a logistic transform on held-out scores, and isotonic regression fits a monotonic step function; both map raw scores to calibrated probabilities. This directly addresses the mismatch between 0.83 predicted and roughly 0.55 observed, without changing the model's ranking of examples.

Why this answer

The scenario describes a reliability problem: scores near 0.83 correspond to an actual positive rate near 0.55, so the probabilities are overconfident. Calibration techniques such as Platt scaling and isotonic regression learn a mapping from raw scores to empirical frequencies using a held-out set, producing probabilities that better reflect true likelihoods without changing the model's ranking ability.

Exam trap

The trap here is responding to a miscalibration complaint by changing the decision threshold, which alters classifications rather than the meaning of the probability scores.

374
MCQmedium

A hospital's AI team is building a model that estimates a patient's 10-year risk of developing heart disease from 30 clinical and lifestyle variables. A cardiologist asks the team to explain why the model produced a high-risk score for a specific patient, because clinicians are legally required to justify their recommendations. The team needs a technique that assigns a numeric contribution to each input feature for that individual prediction. Which approach should the team use?

A.Confusion matrix analysis on a held-out validation set
B.SHAP (SHapley Additive exPlanations) values
C.k-fold cross-validation with stratified sampling
D.Global feature importance from a random forest's mean decrease in impurity
AnswerB

SHAP values come from cooperative game theory and distribute the prediction among the input features, giving each feature a signed numeric contribution for the single patient being explained. Because the sum of the SHAP values plus the base value reconstructs the model output, the cardiologist can see exactly how much variables such as blood pressure or cholesterol pushed the risk score up or down, which satisfies the need for a per-patient justification.

Why this answer

The clinician needs a per-instance explanation that quantifies how each input variable contributed to one patient's predicted risk. SHAP values satisfy this because they compute additive feature attributions grounded in Shapley values, and their sum reconstructs the model's output for that individual. Aggregate importance, confusion matrices, and cross-validation all describe model behavior across datasets or thresholds rather than explaining a single prediction.

Exam trap

The trap here is assuming that any feature importance output explains an individual prediction, when most built-in importance measures are global averages across the whole dataset.

375
Multi-Selecthard

Which TWO are key differences between Convolutional Neural Networks (CNN) and Recurrent Neural Networks (RNN)?

Select 2 answers
A.CNNs are designed for sequential data; RNNs for spatial data
B.RNNs have internal memory; CNNs do not
C.CNNs can handle variable-length inputs; RNNs require fixed-size inputs
D.CNNs use backpropagation; RNNs do not
E.CNNs use weight sharing across spatial dimensions; RNNs share weights across time steps
AnswersB, E

RNNs maintain a hidden state for temporal memory; CNNs are feedforward.

Why this answer

RNNs possess a hidden state that acts as internal memory, allowing them to retain information from previous time steps, which is essential for processing sequential data. In contrast, CNNs lack this internal memory mechanism; they process inputs independently without maintaining a state across different inputs, making them unsuitable for tasks requiring temporal context.

Exam trap

CompTIA often tests the misconception that CNNs and RNNs are distinguished by their training algorithms or input size requirements, when the core difference lies in their architectural design—specifically, internal memory and weight sharing mechanisms.

Page 4

Page 5 of 13

Page 6