Home / NVIDIA Certified Professional: Generative AI LLMs (NCP-GENL) / Mock exam
NVIDIA Certified Professional: Generative AI LLMs (NCP-GENL) Exam-style mock test

NVIDIA Certified Professional: Generative AI LLMs (NCP-GENL) Practice Exams|Practice test

Full explanations Exam format Pass line 70%
33 USD One-time · lifetime access
Enroll →

Sample questions

Example1 · LLM Fundamentals & Transformer Architecture
A B2B SaaS company is onboarding its support team to the concepts behind the transformer LLM that powers its ticket-summarization feature. An engineer asks why self-attention is considered the core innovation of the architecture. Which explanation best captures the primary function of self-attention?
✓It lets each token weigh and incorporate information from all other tokens in the sequence, modeling their contextual relationships in parallel.
Correct. Self-attention computes relevance weights between every pair of tokens, allowing each token's representation to be enriched by context from the whole sequence, and it does so in parallel.
・It compresses the input embeddings into a single fixed-size vector so that the decoder can regenerate the original sequence step by step.
Incorrect. Collapsing the sequence into one fixed vector describes older RNN encoder-decoder bottlenecks, which attention was specifically designed to overcome.
・It replaces the need for token embeddings by directly converting raw characters into probability distributions over the vocabulary.
Incorrect. Self-attention operates on embeddings; it does not replace embeddings or map raw characters straight to vocabulary distributions.
・It applies a fixed convolutional filter across adjacent tokens to capture only local n-gram patterns within a short window.
Incorrect. A fixed local convolutional window captures only nearby patterns, whereas self-attention models dependencies across the entire sequence regardless of distance.
Explanation
Self-attention's defining capability is relating all tokens to one another in parallel to build context-aware representations, which distinguishes transformers from RNNs and CNNs.
Example2 · Data Preparation & Tokenization
A B2B SaaS company is assembling a pretraining corpus from scraped help-center HTML pages to adapt an LLM to their product. The raw text contains boilerplate navigation menus, cookie banners, and duplicated footer blocks on every page. Which preprocessing step most directly improves the quality of the resulting language model?
・Lowercasing every token so the model treats brand names and ordinary words identically across the corpus
Incorrect. Aggressive lowercasing destroys casing signal that models often rely on and does not address the duplicated boilerplate problem described.
✓Removing boilerplate and deduplicating near-identical blocks so repeated non-informative text does not dominate
Correct. Stripping boilerplate and deduplicating repeated blocks prevents low-value text from being over-represented, which is a primary driver of corpus quality for pretraining.
・Replacing all numeric values with a single placeholder token to shrink the overall vocabulary size considerably
Incorrect. Collapsing all numbers to one token discards meaningful quantitative information and still leaves the repeated boilerplate untouched.
・Truncating each document to its first 128 tokens so that batches stay uniform and are simpler to pad
Incorrect. Hard-truncating documents to 128 tokens throws away most of the content and does nothing to remove the duplicated navigation and footer text.
Explanation
Deduplication and boilerplate removal are core corpus-cleaning steps because over-represented repeated text degrades learned distributions; the other options either lose useful signal or ignore the stated problem.
Example3 · Model Training, Fine-Tuning & PEFT
A B2B SaaS company wants to adapt a 13B-parameter base LLM to its support-ticket style on a single GPU that cannot hold the full model and its optimizer states for full fine-tuning. The ML engineer must keep trainable parameters very small while leaving base weights frozen. Which approach best fits this constraint?
・Train all base-model weights end to end at a reduced learning rate so the full network gradually absorbs the ticket style without needing any adapters
Incorrect. Full fine-tuning updates every weight and requires holding all parameters plus optimizer states, which is exactly what the memory constraint rules out.
✓Apply LoRA so only small low-rank adapter matrices are trained while the original base weights stay frozen and reused
Correct. LoRA injects small trainable low-rank matrices and freezes the base weights, so only a tiny parameter count is updated, matching the single-GPU constraint.
・Pretrain a brand-new model from random initialization on the ticket corpus, then distill it into the deployed inference endpoint
Incorrect. Pretraining from scratch demands far more data and compute than adapting an existing base model and ignores the constraint.
・Run continued pretraining on the full base model using the entire public web corpus plus the company tickets for several epochs
Incorrect. Continued pretraining on a huge corpus updates the full model and is heavier than the available single GPU can support.
Explanation
LoRA is a PEFT technique that trains small low-rank adapters while freezing base weights, drastically cutting memory versus full fine-tuning.
Example4 · Inference, Optimization & Deployment
A healthcare services firm must serve a 13B-parameter clinical summarization LLM on a single GPU that cannot hold the model in FP16. The MLOps team wants the largest memory reduction while keeping accuracy degradation acceptable for drafting summaries. Which optimization should they apply first?
・Enable FP32 full-precision weights so that every clinical token is scored with maximum numerical fidelity on the available GPU
Incorrect. FP32 doubles memory versus FP16 instead of reducing it, so the model still will not fit on the single GPU.
✓Apply INT8 post-training quantization to the model weights to roughly halve the memory footprint relative to FP16
Correct. INT8 post-training quantization reduces weight memory relative to FP16 with modest accuracy impact, letting the 13B model fit on one GPU.
・Increase the maximum sequence length so longer patient notes fit in a single pass through the summarization model
Incorrect. Increasing sequence length raises activation memory and does nothing to shrink the weights that exceed GPU capacity.
・Switch the deployment from GPU to CPU so the firm can rely on larger host system memory for the weights
Incorrect. Moving to CPU abandons GPU acceleration and causes unacceptable latency rather than solving the memory-fit problem efficiently.
Explanation
Quantizing weights to INT8 is the standard first step to cut the memory footprint when a model does not fit at FP16, with only minor accuracy loss acceptable for drafting.
Example5 · Prompt Engineering, RAG & Evaluation
A healthcare services firm builds an LLM assistant that drafts patient discharge summaries. Clinicians complain the model sometimes invents follow-up instructions that were never in the source notes. Which prompt engineering technique most directly reduces this behavior?
・Raise the sampling temperature so the model explores more varied phrasings and settles on the most fluent discharge wording
Incorrect. Raising temperature increases randomness and makes fabrication more likely, not less, so it worsens the invented-instruction problem.
✓Instruct the model to answer only from the supplied clinical notes and to state 'not documented' when the information is absent
Correct. Grounding the prompt in the supplied notes and giving an explicit abstention phrase for missing data directly curbs fabricated follow-up instructions.
・Append several unrelated discharge summaries from other patients so the model has broad reference examples to imitate
Incorrect. Injecting unrelated patients' summaries invites the model to copy content that does not belong to the current patient, raising fabrication risk.
・Switch the system message to a terse persona that tells the model to be an experienced hospital discharge coordinator
Incorrect. A persona changes tone but gives the model no factual boundary, so it does not stop invented instructions.
Explanation
Constraining the model to the provided source and giving an explicit 'not documented' fallback is the core prompt technique for reducing hallucinated content.
Example6 · LLM Fundamentals & Transformer Architecture
A healthcare services firm is training an LLM on clinical discharge summaries where a diagnosis mentioned early in a note must inform the interpretation of a medication listed much later. An engineer explains why the self-attention mechanism is well suited to this clinical text. Which explanation is correct?
・It processes tokens strictly one at a time in sequence, passing a compressed hidden state forward so that later tokens inherit earlier context without any direct token comparison.
Incorrect. Sequential processing with a single compressed state describes recurrent networks, which struggle with long-range dependencies, not self-attention.
✓It lets each token weigh the relevance of every other token in the sequence directly, so distant terms like the diagnosis and medication can influence each other regardless of separation.
Correct. Self-attention computes pairwise relevance between all tokens, letting distant terms directly influence one another regardless of their positional distance.
・It applies a fixed sliding window of three neighboring tokens so that only immediately adjacent clinical terms are ever compared during the forward pass computation.
Incorrect. A fixed three-token window describes a narrow convolution-like receptive field, not self-attention, which spans the entire sequence.
・It relies on recurrence to carry information, re-reading the full note repeatedly for every output token so that long clinical dependencies are gradually reinforced over time.
Incorrect. Self-attention does not use recurrence or repeated re-reading; all token interactions are computed in parallel within a layer.
Explanation
Self-attention's defining strength is directly relating every token to every other token, which captures long-range dependencies like a distant diagnosis and medication.
Example7 · LLM Fundamentals & Transformer Architecture
The AI team at UrbanThread, an online apparel retailer, is explaining to new engineers why the self-attention mechanism matters in the Transformer encoder that powers their product-description generator. Which statement best captures the primary function that self-attention provides?
・It compresses the entire input sequence into a single fixed-length state vector passed forward to subsequent layers
Incorrect. Collapsing the sequence into one fixed-length vector describes an older RNN encoder bottleneck, which attention was designed specifically to avoid.
✓It lets each token weigh and incorporate information from every other token in the sequence according to learned relevance
Correct. Self-attention computes relevance-weighted combinations so every token can attend to every other token, capturing long-range dependencies in parallel.
・It applies a sliding convolutional filter across adjacent tokens to capture only short local n-gram patterns
Incorrect. Convolutional filtering over adjacent tokens captures only local windows and is characteristic of CNN-based models, not Transformer self-attention.
・It routes each token through a gated recurrent cell so hidden state flows sequentially from left to right
Incorrect. Sequential left-to-right hidden-state flow through gated cells describes recurrent networks, which process tokens serially rather than in parallel.
Explanation
Self-attention's defining contribution is letting each token dynamically aggregate information from all other tokens via learned weights, enabling parallel modeling of long-range dependencies.
Example8 · LLM Fundamentals & Transformer Architecture
While reviewing the architecture of UrbanThread's review-summarization model, an engineer asks why positional encodings are added to the token embeddings before the first Transformer layer. What is the correct rationale?
✓Because self-attention is permutation-invariant and would otherwise ignore the order in which tokens appear
Correct. Self-attention treats inputs as an unordered set, so positional encodings inject order information the model would otherwise lack.
・Because they normalize embedding magnitudes so that gradients remain stable throughout the deep stack of layers
Incorrect. Stabilizing gradient magnitudes across layers is the job of layer normalization and residual connections, not positional encodings.
・Because they reduce the vocabulary size by mapping rare tokens onto shared positional buckets during tokenization
Incorrect. Vocabulary size and rare-token handling are decided by the tokenizer, and positional encodings play no role in that mapping.
・Because they mask future tokens so the decoder cannot attend to positions that come later in the sequence
Incorrect. Preventing attention to future positions is performed by causal masking in the decoder, which is a separate mechanism from positional encoding.
Explanation
Attention has no inherent notion of sequence order, so positional encodings supply the token-position information required to distinguish word arrangements.
Example9 · LLM Fundamentals & Transformer Architecture
UrbanThread wants a model that generates fluent, open-ended marketing copy by predicting each next token conditioned only on the tokens already written. Which Transformer architecture family is the most appropriate choice for this autoregressive generation task?
・An encoder-only architecture with bidirectional attention, well suited to classification and span extraction tasks
Incorrect. Encoder-only bidirectional models excel at understanding tasks like classification but are not built for free-form autoregressive generation.
✓A decoder-only architecture that uses causal masking to generate text one token at a time
Correct. Decoder-only models with causal masking predict each next token from prior context, which matches open-ended autoregressive copy generation.
・An encoder-decoder architecture that first encodes a full source then conditionally decodes a target sequence
Incorrect. Encoder-decoder models shine for sequence-to-sequence tasks like translation where a distinct source is transformed into a target output.
・A retrieval-only architecture that ranks stored passages and returns the highest-scoring candidate verbatim
Incorrect. A retrieval ranker returns existing passages rather than generating novel text token by token, so it does not fit the requirement.
Explanation
Open-ended, next-token text generation is the hallmark use case for decoder-only architectures that apply causal masking during autoregressive decoding.
Example10 · LLM Fundamentals & Transformer Architecture
A machine learning team at a financial services firm is explaining to compliance officers why their fraud-narrative LLM can connect a customer name mentioned early in a transaction report to a pronoun appearing many sentences later. Which property of the self-attention mechanism best accounts for this capability?
・It processes tokens strictly left to right and carries a fixed-size hidden state forward across the sequence over time
Incorrect. Carrying a fixed-size state forward token by token describes recurrent networks, whose state bottleneck is exactly what attention avoids.
✓It lets every token compute weighted relationships directly with every other token in the input sequence regardless of distance
Correct. Self-attention computes pairwise weights between all tokens, so distant tokens can influence each other directly in a single layer without a recurrence bottleneck.
・It applies a sliding convolutional filter that aggregates only a small fixed window of neighboring tokens at each layer
Incorrect. A fixed local window describes convolution; attention is not limited to nearby neighbors and can span the whole sequence.
・It compresses the entire input into one pooled vector first, then expands that vector back into the output tokens
Incorrect. Collapsing the input to a single pooled vector loses positional detail and is not how attention links specific distant tokens.
Explanation
Self-attention scores every token against every other token, enabling direct long-range dependencies that recurrent and convolutional approaches struggle with.
Example11 · LLM Fundamentals & Transformer Architecture
A bank wants a model that reads an English regulatory disclosure and produces a Spanish translation of the full document for its Latin American subsidiaries. Which Transformer architecture family is the most natural fit for this sequence-to-sequence translation task?
・A decoder-only model, because autoregressive next-token prediction alone is sufficient for every sequence transformation task
Incorrect. Decoder-only models can be prompted to translate, but the encoder-decoder design is purpose-built for conditioning a target sequence on a separately encoded source.
・An encoder-only model, since bidirectional encoding produces the richest contextual embeddings for understanding the source text
Incorrect. Encoder-only models produce embeddings but have no generative decoder to emit the translated output sequence.
✓An encoder-decoder model, where the encoder represents the source and the decoder generates the target conditioned on it
Correct. Encoder-decoder (seq2seq) architectures encode the source language and let the decoder generate the target language conditioned on that encoding, which is the classic translation setup.
・A retrieval-augmented classifier, which ranks candidate pre-translated passages and returns the single highest-scoring match
Incorrect. Retrieving a pre-translated passage is not generative translation and fails on any sentence not already in the corpus.
Explanation
Translation maps one sequence to another, which is exactly what the encoder-decoder architecture was designed to do.
Example12 · LLM Fundamentals & Transformer Architecture
A manufacturing distributor builds an LLM assistant to answer questions about long multi-paragraph supplier contracts. An engineer asks why the transformer's self-attention mechanism is well suited to this workload. Which explanation is most accurate?
✓It lets every token weigh its relevance to every other token in the sequence, capturing long-range dependencies across the contract directly.
Correct. Self-attention computes pairwise relevance scores so each token can attend to any other token regardless of distance, which captures long-range dependencies across the whole document.
・It processes tokens strictly one after another and stores a running hidden state, so earlier contract clauses are compressed before later ones.
Incorrect. Sequential processing with a compressed running state describes recurrent networks, not self-attention, and it tends to lose distant clause information.
・It assigns a fixed static weight to each word based on how frequently that word appears in the vocabulary across the corpus.
Incorrect. Attention weights are dynamic and context-dependent, not fixed values derived from corpus word frequency.
・It converts the entire contract into a single averaged vector first and then applies a shallow classifier on top of that pooled representation.
Incorrect. Collapsing the document to one averaged vector discards positional and token-level detail, which is the opposite of what attention preserves.
Explanation
Self-attention's defining strength is dynamically relating every token to every other token, enabling direct modeling of long-range dependencies in long documents.
Example13 · LLM Fundamentals & Transformer Architecture
While reviewing a transformer that summarizes the distributor's warehouse picking instructions, a new team member notes that self-attention itself is order-agnostic. What problem does positional encoding solve in this architecture?
・It compresses the vocabulary into a smaller set of subword tokens so that rare part numbers can be represented efficiently in the embedding table.
Incorrect. Subword tokenization, not positional encoding, handles vocabulary compression and rare-term representation.
✓It supplies information about token order so the model can distinguish sequences that contain the same words arranged differently.
Correct. Because self-attention treats inputs as a set, positional encodings inject order information so the model can tell apart different arrangements of the same tokens.
・It normalizes the scale of attention scores so that very long picking instructions do not overflow the softmax computation during inference.
Incorrect. Scaling attention logits is handled by the scaled dot-product factor, not by positional encoding.
・It masks future tokens during training so the decoder cannot look ahead when predicting the next step in a picking sequence.
Incorrect. Preventing a decoder from attending to future tokens is the job of causal masking, which is separate from positional encoding.
Explanation
Self-attention is permutation-invariant, so positional encodings are added to give the model a sense of token order.
Example14 · LLM Fundamentals & Transformer Architecture
A telecom operator's NLP team is reviewing why their transformer-based LLM handles long customer-support transcripts better than their old recurrent model. An engineer asks what the self-attention mechanism fundamentally contributes to processing a sequence of tokens. Which description is most accurate?
✓It lets each token compute weighted relationships with every other token in the sequence, capturing context regardless of distance
Correct. Self-attention computes pairwise weighted relationships between all tokens, so any token can attend directly to any other and capture long-range context in parallel.
・It compresses the entire input sequence into one fixed-size vector before any downstream prediction is produced
Incorrect. Collapsing the sequence into a single fixed vector describes an older encoder bottleneck, not self-attention, which preserves per-token representations.
・It processes tokens strictly left to right, passing a hidden state forward one position at a time
Incorrect. Sequential left-to-right hidden-state passing describes recurrent networks; self-attention is explicitly non-recurrent and parallel.
・It replaces learned embeddings with sparse one-hot vectors to reduce the memory footprint of the attention layer
Incorrect. Self-attention operates over dense learned embeddings; it does not swap them for sparse one-hot vectors to save memory.
Explanation
Self-attention's core contribution is letting every token directly weigh its relationship to every other token, enabling long-range context capture in parallel rather than through sequential recurrence.
Example15 · LLM Fundamentals & Transformer Architecture
While debugging a transformer model that summarizes network-outage tickets, a telecom engineer notices the architecture has no recurrence or convolution. A colleague asks why positional encodings are added to the token embeddings at the input stage. What is the primary reason?
・To normalize each embedding vector so that all token magnitudes fall within a bounded numerical range
Incorrect. Bounding vector magnitudes is a normalization concern handled elsewhere, not the function of positional encodings.
✓To inject information about each token's order so the otherwise permutation-invariant attention can use sequence position
Correct. Self-attention is permutation-invariant, so positional encodings add order information that lets the model distinguish token positions in the sequence.
・To mask out future tokens so the decoder cannot attend to positions that have not yet been generated during inference
Incorrect. Preventing attention to future tokens is done by causal masking in the decoder, which is a separate mechanism from positional encoding.
・To reduce the embedding dimension so attention scores can be computed with fewer floating-point operations
Incorrect. Positional encodings do not shrink the embedding dimension or primarily exist to cut computation.
Explanation
Attention alone has no notion of order, so positional encodings supply sequence-position information, letting the model account for where each token appears.
▶ Try 10 free questions (graded)
Measure your readiness with a full mock exam
All questions · full explanations · lifetime access
Enroll(33 USD)