Learn. Practice. Feel prepared.
GenAI & LLM Engineering Objective Questions and Answers - Set 2
This GenAI & LLM engineering quiz contains carefully curated objective questions with correct answers and clear explanations. It is designed for developers and ML engineers to test your skills in building, optimizing, evaluating, and deploying LLM-powered applications. This is part 2 of the series.
Practice GenAI & LLM Engineering MCQs with Detailed Explanations
Answer at least 12 questions to submit and verify answers.
16 What is the primary benefit of using caching in LLM APIs? Medium
Correct answer:
Reduces repeated inference cost and latency
Caching prevents recomputation for repeated prompts, reducing latency and cost.
17 Which approach is best for grounding LLM responses in real-time data? Medium
Correct answer:
RAG with live data sources
RAG with live retrieval ensures responses are grounded in the most recent data.
18 What is a major challenge when deploying LLM agents in production? Hard
Correct answer:
Tool misuse and uncontrolled actions
Agents can take unintended actions or misuse tools if guardrails and permissions are not enforced.
19 Which evaluation method best measures factual consistency of LLM outputs? Hard
Correct answer:
Human evaluation
Human evaluation is often required to accurately judge factual consistency and usefulness.
20 What does top-k sampling control? Medium
Correct answer:
Vocabulary size considered at each step
Top-k limits token choices to the k most probable tokens at each generation step.
21 Which technique helps align LLM outputs with human preferences? Medium
Correct answer:
RLHF
RLHF aligns model outputs with human preferences using feedback-based optimization.
22 What is the main benefit of using streaming responses in chat applications? Medium
Correct answer:
Improved perceived latency
Streaming improves user experience by showing partial outputs sooner, reducing perceived latency.
23 Which risk increases when using very large overlapping chunks in RAG? Hard
Correct answer:
Higher retrieval noise and redundancy
Large overlaps introduce redundancy, increasing noise and retrieval inefficiency.
24 What is the main purpose of prompt templates? Medium
Correct answer:
Standardize instructions and structure inputs
Prompt templates enforce consistent structure and instructions across requests.
25 Which failure is most likely if the retriever returns irrelevant documents? Hard
Correct answer:
Grounded hallucination
The LLM may generate incorrect but grounded responses based on irrelevant retrieved context.
26 What is the role of temperature = 0 in decoding? Easy
Correct answer:
Deterministic output
Temperature zero leads to deterministic token selection.
27 Which component is critical for semantic search at scale? Medium
Correct answer:
Vector database
Vector databases enable efficient similarity search over large embedding collections.
28 What is the key advantage of hybrid search (keyword + vector)? Hard
Correct answer:
Better recall and precision across diverse queries
Hybrid search combines lexical and semantic signals to improve retrieval quality.
29 Which is a common cause of prompt overfitting in production? Hard
Correct answer:
Highly rigid templates that fail on edge cases
Overly rigid prompts can fail when user inputs vary, reducing robustness.
30 What is the main goal of model distillation for LLMs? Medium
Correct answer:
Transfer knowledge to a smaller model
Distillation transfers knowledge from a large teacher model to a smaller, more efficient student model.