NCP-GENL sample questions with answers

10 free practice questions for the NVIDIA-Certified Professional: Generative AI LLMs exam. Try each one, then open the answer to see why the right option wins and every other option loses.

Question 1LLM Architecture

Farrow AI is converting an open decoder-only LLM into a text-embedding model by contrastive fine-tuning on query-passage pairs. Early experiments show that information near the start of long passages is weakly represented in the pooled vectors. The team can change the attention pattern during training and wants the change best supported by published results for turning decoders into embedding models. What should it do?

  1. A.

    Keep the causal mask and pool from the first token instead of the last, because the first token has the earliest view of the passage

  2. B.

    Keep the causal mask and increase the number of contrastive negatives, since the weakness comes from too few negatives rather than attention

  3. C.

    Keep the causal mask and reverse the passage order during training so that early content sits next to the pooled final token

  4. D.

    Remove the causal attention mask during contrastive training so every token can attend to the whole passage before pooling

Show answer

Answer: D

Removing the causal mask during contrastive training lets every token see the whole passage, which NV-Embed found consistently better than keeping it.

  • A. Under a causal mask the first token sees only itself, so it has no view of the passage at all.
  • B. More negatives can sharpen a contrastive objective, but they do not change the one-directional information flow that limits the representation.
  • C. Reversing text would help early content only by hurting late content, and it produces vectors unlike those of normal-order inputs at inference.
  • D. Correct: NV-Embed reports that removing the causal mask during contrastive training, making attention bidirectional, consistently outperformed the causal mask for all pooling types.
Question 2LLM Architecture

Orrin Analytics continues pretraining a T5-style encoder-decoder model on its own engineering documents before fine-tuning. A data engineer builds the training examples by corrupting the input text and must decide what the decoder's target sequence should contain so that it matches the model's original span-corruption objective. What should each example's target contain?

  1. A.

    A binary label stating whether the corrupted input is a real passage or a shuffled one, predicted from the first decoder token

  2. B.

    The next sentence after the input passage, so that the decoder learns to continue documents as a causal language model

  3. C.

    The complete original document, so that the decoder learns to reconstruct every token of the uncorrupted text

  4. D.

    Only the dropped-out spans, each preceded by the sentinel token that replaced it in the input, followed by a final sentinel

Show answer

Answer: D

T5 span corruption targets are the dropped spans, each delimited by the sentinel that replaced it, plus a final sentinel.

  • A. A real-versus-shuffled label is a discriminative objective in the style of next sentence prediction, which T5 does not use.
  • B. Continuing to the next sentence is a causal language-modelling or prefix objective, not the span-corruption objective the model was pretrained with.
  • C. Reconstructing the full document is a valid denoising variant, but it is not T5's span-corruption target and it makes targets much longer than necessary.
  • D. Correct: the T5 objective replaces each corrupted span with a unique sentinel in the input, and the target lists only the dropped spans delimited by those sentinels.
Question 3LLM Architecture

A modelling team at Ivel Research is comparing ways to give a decoder information about token order. One proposal adds no positional vectors to the token embeddings at all; instead, it subtracts from each query-key attention score a penalty proportional to the distance between the two tokens. Which technique does this proposal describe?

  1. A.

    Learned absolute position embeddings

  2. B.

    Sinusoidal absolute positional encoding

  3. C.

    ALiBi, attention with linear biases

  4. D.

    Rotary position embeddings (RoPE)

Show answer

Answer: C

Adding a distance-proportional penalty to attention scores instead of adding position vectors is ALiBi.

  • A. Learned absolute embeddings add a trained vector per position to the token embeddings, which the proposal does not do.
  • B. Sinusoidal encoding adds position-dependent vectors to the token embeddings, which the proposal explicitly avoids.
  • C. Correct: ALiBi adds no positional embeddings and instead biases query-key scores with a penalty proportional to their distance.
  • D. RoPE rotates query and key vectors by position-dependent angles; it does not subtract a distance penalty from the scores.
Question 4LLM Architecture

A researcher at Norrland Labs writes a custom attention kernel for a decoder with a large per-head dimension. Compared with the reference implementation, training stalls early: attention distributions are almost one-hot from the first steps and gradients through the attention layers are tiny. A diff shows the new kernel computes the query-key dot products and applies the softmax directly. What change restores the reference behaviour?

  1. A.

    Divide the query-key dot products by the square root of the key dimension before the softmax, so large dot products do not saturate it

  2. B.

    Divide the attention output by the number of heads after concatenation, so the combined heads keep the same scale as a single head

  3. C.

    Apply the softmax over the query dimension instead of the key dimension, so each key distributes its attention across all of the queries

  4. D.

    Multiply the dot products by the square root of the key dimension, so small scores are amplified enough for the softmax to separate them

Show answer

Answer: A

Scaled dot-product attention divides by the square root of the key dimension to keep the softmax out of its saturated, tiny-gradient regime.

  • A. Correct: scaled dot-product attention divides by the square root of d_k because for large d_k the dot products grow in magnitude and push the softmax into regions with extremely small gradients.
  • B. Rescaling after concatenation does nothing about saturation inside each head's softmax, which is where the tiny gradients come from.
  • C. Each query's weights must sum to one over the keys; normalising across queries changes the operation rather than fixing its scale.
  • D. Multiplying makes the logits larger still, which sharpens the softmax further and worsens the saturation.
Question 5LLM Architecture

Harrier Legal will train a lightweight tagger on frozen token features from a BERT-base encoder because it cannot fine-tune the encoder. It wants the extraction scheme that the BERT authors found closest to full fine-tuning on a named-entity task. Candidate schemes use the embedding layer, the last hidden layer, the second-to-last layer, or all of the last four hidden layers. Which should the team extract?

  1. A.

    Use the token's vector from the input embedding layer

  2. B.

    Use the token's vector from the second-to-last hidden layer

  3. C.

    Use the token's vector from the last hidden layer alone, since it is the most contextual layer

  4. D.

    Concatenate the token's vectors from the last four hidden layers

Show answer

Answer: D

BERT's feature-based study found concatenating the last four hidden layers the best frozen-feature scheme, close to fine-tuning.

  • A. The embedding layer is context-free and was by far the weakest scheme in the comparison.
  • B. The second-to-last layer did slightly better than the last layer, but still trailed concatenating the top four layers.
  • C. The last layer alone was clearly behind the concatenation; it is the natural first guess but not the best-performing scheme.
  • D. Correct: in BERT's feature-based comparison on CoNLL-2003 NER, concatenating the last four hidden layers gave the best frozen-feature result, close to fine-tuning.
Question 6LLM Architecture

Sable News shows editors five alternative headlines per article. The current implementation runs beam search with a beam width of 5 and returns all five final beams. Editors complain that the five headlines are nearly identical, usually differing by a single word near the end. The team wants genuinely varied alternatives at similar quality. What should it change?

  1. A.

    Increase the beam width to 20 and return the top five beams, so that the search explores a much larger space of headlines

  2. B.

    Generate five independent sampled completions at a moderate temperature with top-p truncation, instead of returning the final beams

  3. C.

    Add a length penalty so that beams of different lengths are compared fairly, which will spread the five headlines apart

  4. D.

    Keep the beam width at 5 and lower the temperature, so that each beam commits more strongly to its own distinct wording

Show answer

Answer: B

Beams are near-duplicate high-likelihood variants; for genuinely different alternatives, draw several independent samples with truncation.

  • A. A wider beam finds more high-likelihood hypotheses, which are still mostly variants of the same headline and share prefixes.
  • B. Correct: independent samples explore different continuations from the first token onward, whereas beams are high-likelihood variants that tend to share long prefixes.
  • C. Length normalisation changes how hypotheses of different lengths are ranked, not how similar their wording is.
  • D. Standard beam search does not sample, so temperature does not separate the beams; lowering it would only sharpen them further.
Question 7LLM Architecture

Rowan Retail generates long product guides and requires decoding to be deterministic so that the same input always yields the same text for regulatory review. Greedy and beam search are deterministic but produce repetitive passages in long outputs. The team wants a deterministic method that discourages candidate tokens that would make the new text too similar to what has already been generated. Which method fits?

  1. A.

    Contrastive search, which scores candidates by model confidence minus a penalty for similarity to the previous context

  2. B.

    Temperature 0, which removes randomness and makes greedy decoding avoid repeating earlier phrases

  3. C.

    Nucleus sampling with top-p 0.9, which truncates the unreliable tail and avoids the repetition of maximisation-based decoding

  4. D.

    A wider beam, which explores more candidate sequences and therefore finds less repetitive continuations

Show answer

Answer: A

Contrastive search reduces degeneration deterministically by penalising candidates that are too similar to the preceding context.

  • A. Correct: contrastive search is a deterministic decoding method that encourages diversity while keeping coherence by penalising candidates whose representations resemble the prior context.
  • B. Temperature 0 is greedy decoding, which is exactly the repetitive baseline the team wants to move away from.
  • C. Nucleus sampling does reduce degeneration, but it is stochastic, which breaks the determinism requirement.
  • D. Beam search maximises likelihood and is itself prone to degenerate, repetitive text in long outputs.
Question 8LLM Architecture

Juniper Hotels reuses its retrieval embedding model to find guest reviews with the same sentiment as a given review. Results are on the right topic but often have opposite sentiment: a glowing review about the spa retrieves complaints about the spa. The team concludes the embedding model is broken. The model performs well on its retrieval benchmark. What is the better explanation?

  1. A.

    The model places texts close together according to what its training objective rewarded, topical relevance here, so sentiment is not what its distances primarily measure

  2. B.

    The model is broken, because a correctly working embedding model always places texts with opposite sentiment far apart in the vector space

  3. C.

    Cosine similarity ignores negation words, so any embedding model will match positive and negative reviews on the same topic

  4. D.

    The reviews are too short for the model to encode sentiment, so longer reviews would retrieve matches with the same sentiment

Show answer

Answer: A

Embedding distance measures what the training objective defined as similar; a retrieval model groups by topical relevance, not sentiment.

  • A. Correct: embedding geometry reflects the training objective; a retrieval model is trained to bring queries near relevant passages, and a complaint about the spa is highly relevant to a spa query.
  • B. There is no universal notion of similarity; a model trained for topical relevance behaves correctly when it groups by topic.
  • C. The metric only compares vectors; whether negation moves a vector depends on the model and its training, not on cosine similarity.
  • D. Length is not the issue; the model encodes what it was trained to encode, whatever the review length.
Question 9LLM Architecture

Vesper Publishing runs two generation workloads on the same decoder: translating book blurbs between languages, and writing short original story openings from a one-line premise. It currently uses beam search for both because it scored better on its translation test set. Editors now say the story openings are generic and formulaic, while translations are good. What is the best decoding decision?

  1. A.

    Keep beam search for translation, and use truncated sampling such as top-p for the story openings

  2. B.

    Keep beam search for both, and widen the beam for the stories so the search finds more creative openings

  3. C.

    Switch both workloads to greedy decoding, which avoids beam search's blandness at lower compute

  4. D.

    Switch both workloads to high-temperature sampling without truncation, which maximises variety everywhere

Show answer

Answer: A

Beam search fits input-grounded tasks like translation; open-ended writing needs truncated sampling to avoid bland, high-likelihood text.

  • A. Correct: beam search suits input-grounded tasks where one best output exists, while likelihood-maximising decoding makes open-ended text bland; truncated sampling adds diversity while cutting the unreliable tail.
  • B. A wider beam finds even higher-likelihood continuations, which are the generic ones the editors dislike.
  • C. Greedy decoding is also maximisation-based and tends toward the same blandness and repetition, and it would lose beam search's gain on translation.
  • D. Untruncated high-temperature sampling risks incoherence and would degrade the translations that already work.
Question 10LLM Architecture

A lead engineer at Moss Linguistics is explaining to a product manager why the company replaced its recurrent sequence model with a transformer for long legal documents, where a clause on one page often depends on a definition several pages earlier. Which property of self-attention is most relevant to learning such long-range dependencies?

  1. A.

    Self-attention layers have far fewer parameters than recurrent layers, which prevents the model from forgetting earlier pages

  2. B.

    Self-attention's cost grows only linearly with sequence length, so long documents are cheaper to process than with recurrence

  3. C.

    Any two positions are connected by a constant number of sequential operations, so the path between distant tokens stays short

  4. D.

    Positional encodings store the full history of earlier tokens, so the model can recall definitions without attending to them

Show answer

Answer: C

Self-attention links any two positions in a constant number of steps, so long-range dependencies do not have to pass through many recurrent steps.

  • A. Parameter count is not what shortens the path between distant tokens; the connectivity of attention is.
  • B. Self-attention's per-layer cost grows quadratically with sequence length; its advantage for long-range dependencies is path length, not lower cost.
  • C. Correct: a self-attention layer connects all positions with a constant number of sequential operations and a constant maximum path length, whereas a recurrent layer needs a number proportional to the distance.
  • D. Positional encodings carry order information only; the content of earlier tokens is reached through attention.

Keep going with 625 more NCP-GENL questions

Free papers every day, in the real exam formats, with progress by exam domain. Unlock every paper and timed mock exam when you are ready.

NCP-GENL sample questions with answers (10 free) · CertifyAIx