AI Ultimate AI Engineer 3 — Questions and Answers
Question 1: In LoRA (Low-Rank Adaptation) fine-tuning, what is decomposed into low-rank matrices?
- The attention mask tensors
- The weight update matrices ΔW (Correct answer)
- The positional embeddings
- The tokenizer vocabulary embeddings
Correct answer: The weight update matrices ΔW
LoRA freezes original weights and approximates ΔW = A·B where A and B are low-rank, drastically reducing trainable parameters.
Question 2: Which of the following is an example of few-shot prompting?
- Providing the model with 1,000 labeled examples before inference
- Including 3 example input-output pairs in the prompt before the actual query (Correct answer)
- Training a smaller model to distill a larger one
- Using beam search with k=3 candidates
Correct answer: Including 3 example input-output pairs in the prompt before the actual query
Few-shot prompting embeds a small number of demonstration examples directly in the prompt to guide the model's output format and style.
Question 3: A production LLM application has a P99 latency of 8 seconds. Which optimization most directly addresses time-to-first-token?
- Increasing batch size
- Using speculative decoding
- Applying KV-cache to the prefill step (Correct answer)
- Switching from FP32 to BF16 weights
Correct answer: Applying KV-cache to the prefill step
Caching the KV states during prefill avoids recomputing them for the prompt, directly reducing time-to-first-token latency.
Question 4: What problem does RLHF (Reinforcement Learning from Human Feedback) primarily solve?
- Reducing training compute cost
- Aligning model outputs with human preferences and values (Correct answer)
- Eliminating the need for labeled data
- Improving tokenizer vocabulary coverage
Correct answer: Aligning model outputs with human preferences and values
RLHF trains a reward model on human preference data and uses RL to fine-tune the LLM to maximize that reward, improving alignment.
Question 5: Which evaluation approach detects when a model performs well on a benchmark due to memorizing test data rather than generalizing?
- Perplexity scoring on the training set
- Contamination analysis checking if test data appears in pretraining (Correct answer)
- Ablation studies removing model layers
- Using ROUGE-L on held-out validation set
Correct answer: Contamination analysis checking if test data appears in pretraining
Contamination analysis searches the pretraining corpus for n-gram overlaps with benchmark test sets to detect data leakage.
Question 6: In a multi-agent AI system, what is the role of an 'orchestrator' agent?
- Directly answering all end-user queries
- Decomposing tasks and routing sub-tasks to specialized agents (Correct answer)
- Maintaining the vector database index
- Generating embeddings for retrieval
Correct answer: Decomposing tasks and routing sub-tasks to specialized agents
An orchestrator decomposes complex goals into sub-tasks and coordinates specialized sub-agents to execute them.
Question 7: What does 'context window' limit in a large language model?
- The number of model parameters that can be loaded into GPU memory
- The total tokens (prompt + completion) the model can process in one forward pass (Correct answer)
- The maximum batch size during training
- The number of fine-tuning epochs allowed
Correct answer: The total tokens (prompt + completion) the model can process in one forward pass
The context window defines the maximum sequence length the model can attend to in a single inference call, encompassing both input and output tokens.
In LoRA (Low-Rank Adaptation) fine-tuning, what is decomposed into low-rank matrices?