Choose your practice level
Choose experience for the scope of responsibility, then difficulty for the reasoning challenge. Filters narrow the existing questions; they do not change or remove the answers.
Fresher: fundamentals and beginner projects. Intermediate: implementation, debugging and optimization. Senior: architecture, scale, cost and technical decisions. Years are suggested study ranges, not eligibility rules; if you fall between ranges, choose by readiness. Difficulty remains an independent filter. These are editorial practice groupings, not employer ratings.
- Fresher (0–1 year): Inspect the actual chat-formatted token input and distinguish loading, first-token and complete-response time. Validate a small JSON extraction with an unknown field.
- Intermediate (2–5 years): Compare a quantized candidate with a baseline on the same documents. Report peak memory, invalid outputs, critical-field errors and adapter-training data boundaries.
- Senior (5+ years): Design a protected fine-tuning test and a hardware-aware model-selection experiment. Defend batching, concurrency, context limits and the quality/cost decision.
Showing 10 of 10 unique questions.
These are original practice questions, not questions reported from a particular employer. Every scenario below is hypothetical. Use the answers to understand the reasoning, then explain the decision in your own words and connect it to work you actually did.
How to practise
First answer aloud without reading. State the goal, assumptions, proposed approach, checks and trade-offs. Then compare your reasoning with the answer, tackle the follow-up and write down one gap to practise. Aim for a clear two-minute initial explanation; expand when asked. This timing is a practice suggestion, not an interview rule.
Role-based questions and detailed answers
Why do tokenization and chat formatting matter?
Show answerHide answer: Why do tokenization and chat formatting matter?
Answer: Models process token sequences rather than raw words, and token counts vary with language, punctuation and tokenizer. Chat formatting also marks roles and message boundaries according to the model's expected template. Use the correct tokenizer and supported template, inspect the final prompt and budget for both input and output. Word counts alone cannot establish context usage.
Hypothetical scenario: A multilingual document fits a word limit but exceeds the model's token budget after chat formatting.
Follow-up: Which exact input would you count before starting inference?
Common mistake: Assuming a fixed number of characters always equals one token.
Worked example: A request budget must include the system message, user text, role delimiters, tool schemas and reserved output. Count with the selected model's tokenizer and supported chat template, not a word estimate. For an illustrative 8,192-token limit, 6,500 input plus 2,000 output reserve is already over budget even before uncounted wrapper text.
def fits_context(input_tokens, output_reserve, context_limit):
return input_tokens >= 0 and output_reserve >= 0 and input_tokens + output_reserve <= context_limit
assert not fits_context(6500, 2000, 8192)
assert fits_context(6000, 2000, 8192)
# Count the actual model-tokenized chat prompt, including wrappers/tools.
# Character or word counts are not a substitute for tokenization.
What a strong answer demonstrates: Inspect the exact serialized input and calculate remaining output capacity without assuming a universal words-to-tokens ratio.
Why does a model need more memory than its weights?
Show answerHide answer: Why does a model need more memory than its weights?
Answer: Runtime memory also includes activations, attention caches, temporary buffers and framework overhead. Context length, batching and implementation choices can change these costs. Estimate weight storage separately from measured peak memory, leave operating-system headroom and test representative long inputs. A file that fits in RAM does not guarantee inference fits or avoids slow swapping.
Hypothetical scenario: A quantized model loads successfully, but a long request causes heavy paging and poor responsiveness.
Follow-up: Which settings would you measure before buying more memory?
Common mistake: Treating downloaded model size as total runtime memory consumption.
Worked example: A rough 4-billion-parameter, 4-bit weight payload is 2 billion bytes (about 1.86 GiB), excluding quantization metadata. KV cache, activations, buffers and the runtime add memory, depending on architecture and workload. Measure peak resident memory with long inputs and target concurrency; leave OS headroom and watch paging, not just the download size.
parameters, bits = 4_000_000_000, 4
weight_gib = parameters * bits / 8 / 1024 ** 3
assert 1.86 < weight_gib < 1.87
# Not total inference RAM: runtime, KV cache and buffers are additional.
What a strong answer demonstrates: Give a units-correct estimate and separate weight storage from measured runtime peak.
How do loading time, first-token latency and completion time differ?
Show answerHide answer: How do loading time, first-token latency and completion time differ?
Answer: Loading measures preparing the model for use; first-token latency includes work before the first generated token; completion time includes generating the full answer and any validation. Streaming changes when users see progress, not necessarily total inference work. Measure cold and warm runs separately and report the metric relevant to the task, especially when publication needs the complete JSON.
Hypothetical scenario: A streaming answer begins quickly, but a downstream parser waits until the full object is generated.
Follow-up: Does disabling streaming guarantee a faster completed response?
Common mistake: Claiming an instant first token means the complete extraction finished instantly.
Worked example: A cold request takes 8 seconds loading, then 2 before its first token and 10 more to finish. User-observed first token is roughly 10 seconds and completed output roughly 20, excluding other overhead. A warm request avoids loading. Record timer boundaries explicitly; a streaming UI shows partial progress but a JSON consumer may still wait for completion.
What a strong answer demonstrates: Report cold/warm timing with explicit boundaries and avoid counting model loading twice.
What should you test when quantizing a model?
Show answerHide answer: What should you test when quantizing a model?
Answer: Quantization reduces numerical precision and can lower weight memory, but speed and quality depend on hardware, kernels and workload. Compare the specific quantized candidate with a suitable baseline on representative tasks. Measure critical-field errors, malformed output, peak memory and completed latency. Do not assume a smaller file is automatically faster or equally accurate on your application.
Hypothetical scenario: A lower-bit model saves memory but mishandles uncommon numeric salary formats more often.
Follow-up: Which quality regression would outweigh its memory saving?
Common mistake: Selecting quantization solely by file size or a generic benchmark.
Worked example: Use the same source documents, tokenizer, prompt and output limit for full/quantized candidates. Include numeric edge cases such as ‘₹12–18 lakh annually’ and an absent salary. Count wrong currency, range and unknown handling, then compare peak RAM and warm completion latency. Fewer bits may save memory but be slower on unsupported kernels.
What a strong answer demonstrates: Define a task-specific quality regression and benchmark on the intended hardware instead of extrapolating from file size.
When is adapter fine-tuning a reasonable choice?
Show answerHide answer: When is adapter fine-tuning a reasonable choice?
Answer: Consider it when a repeatable task or behaviour gap persists after simpler prompt and data improvements, and suitable examples exist. Define the target behaviour, training permissions and held-out evaluation before training. Adapters reduce the parameters being updated but still require resources and careful evaluation. They do not automatically fix missing facts or make a base model safe.
Hypothetical scenario: A model repeatedly fails a domain-specific extraction convention despite clear examples and a stable output contract.
Follow-up: How would you show that training improved generalization rather than memorization?
Common mistake: Assuming fewer trainable parameters remove data-quality and evaluation requirements.
Worked example: If clear examples still fail a stable entity-labeling convention, train an adapter on permitted examples and compare against the same base model plus a few-shot prompt. Hold out document families and include no-entity cases. Track regressions in unrelated supported formats. Adapter parameter efficiency does not guarantee low activation memory or factual correctness.
What a strong answer demonstrates: Show the residual behaviour gap, an inexpensive baseline and evidence of generalization beyond training templates.
How would you construct a fine-tuning evaluation set?
Show answerHide answer: How would you construct a fine-tuning evaluation set?
Answer: Separate examples by the real source of dependence, such as document template, organization or time, rather than only by row. Remove duplicates and near-duplicates across partitions. Keep a protected test set out of prompt, training and checkpoint selection. Include unsupported and difficult inputs so improvements reflect the intended deployment conditions rather than repeated wording.
Hypothetical scenario: Several paraphrases of the same employer posting appear in both training and evaluation data.
Follow-up: How would you group examples before splitting?
Common mistake: Calling paraphrased duplicates independent evidence of generalization.
Worked example: Group postings and their paraphrases by original requisition/template before splitting. Keep a later or different-organization holdout if that matches deployment. Use validation for prompt/checkpoint choice and leave the final test untouched. A data manifest should let an auditor find a near-duplicate crossing partitions without needing private raw text in logs.
What a strong answer demonstrates: Define the independence unit, leakage audit and protected-test policy, including what happens after repeated test exposure.
What can decoding settings control, and what can they not?
Show answerHide answer: What can decoding settings control, and what can they not?
Answer: Decoding settings influence how candidate tokens are selected and how much text can be produced. They can affect variation, repetition and task performance, so test them systematically. They cannot establish that a statement is supported by a source. Preserve factual and contract checks independently, and avoid tuning settings against the final test set until the result looks favourable.
Hypothetical scenario: Lower randomness makes a wrong experience requirement appear consistently across repeated runs.
Follow-up: Which source-backed evaluation separates output consistency from factual correctness?
Common mistake: Using deterministic generation as a replacement for factual validation.
Worked example: A short output cap can end halfway through a valid JSON object; a low-temperature run can repeatedly invent a salary. Track finish reason, parse result and source support separately. Vary one setting on validation examples and retain the chosen configuration; a seed may aid comparison but is not a universal reproducibility guarantee across hardware or runtimes.
What a strong answer demonstrates: Distinguish sampling, truncation and factual errors and propose a separate check for each.
How should structured generation be validated?
Show answerHide answer: How should structured generation be validated?
Answer: Parse the result, validate types and required fields, then enforce semantic constraints such as valid ranges, supported locations and source-backed claims. Use explicit unknown states instead of fabricated defaults. Keep the raw source and validation errors available for diagnosis. Even constrained generation can produce structurally acceptable content that is unsuitable for the business action.
Hypothetical scenario: An output has valid integer fields but gives a minimum experience greater than the maximum.
Follow-up: Which checks belong in the schema and which require application logic?
Common mistake: Stopping validation once the JSON parser accepts the output.
Worked example: For experience_min = 5 and experience_max = 2, parsing succeeds but the business constraint fails. Check numeric types, ranges, ordering and the source before publication; reject bool values if strict integers are required in Python. Keep ‘not stated’ separate from zero. This local check is one layer, not a complete extraction schema.
def valid_experience(low, high):
return (type(low) is int and type(high) is int
and 0 <= low <= high)
assert valid_experience(2, 5)
assert not valid_experience(5, 2)
assert not valid_experience(True, 5)
What a strong answer demonstrates: Explain syntactic, structural and semantic validation, including explicit unknowns and source-backed checks.
Why might a benchmark leader be worse for your product?
Show answerHide answer: Why might a benchmark leader be worse for your product?
Answer: A benchmark measures particular tasks under particular conditions, which may differ from your documents, languages, hardware and error costs. Build an application evaluation with representative and challenging cases, then compare complete outcomes. Include resource constraints and recovery behaviour. General scores can inform candidate selection, but they cannot substitute for evidence that a model works in your workflow.
Hypothetical scenario: A high-scoring model produces verbose prose where the application requires concise, source-supported structured fields.
Follow-up: Which application metric would reveal the mismatch?
Common mistake: Treating an overall leaderboard position as a deployment decision.
Worked example: A high leaderboard score is irrelevant if your batch requires exact employer fields within a memory limit. Define acceptance per document, allowed latency and critical-field error limits, then compare candidates with equal repair budgets. Include failures and review cost. Select the candidate on a quality/resource frontier rather than assuming one public score dominates your workload.
What a strong answer demonstrates: State workload-specific constraints and defend the chosen trade-off with comparable end-to-end evidence.
How would you tune a CPU-only local model?
Show answerHide answer: How would you tune a CPU-only local model?
Answer: Hold the model and input set fixed while varying one configuration at a time, such as thread count or context size. Record processor topology, warm-up, background load, memory and repeated completion times. More threads can add contention rather than speed. Choose the setting that meets the quality and responsiveness budget, not simply the maximum available thread count.
Hypothetical scenario: A laptop has twelve logical threads, but full-thread inference makes other applications unresponsive without improving throughput.
Follow-up: How would you compare eight and twelve threads fairly?
Common mistake: Assuming full CPU utilization always means the fastest useful configuration.
Worked example: Compare 4, 8 and 12 threads with a fixed context, model and prompt set, after warm-up. Alternate run order, repeat runs and record wall time, RAM, paging and laptop responsiveness. Start at concurrency one; only test batching/concurrency separately after a baseline. More logical threads may saturate memory bandwidth without improving completion time.
What a strong answer demonstrates: Design a controlled experiment, report variability and choose useful throughput under resource constraints rather than maximum CPU percentage.
Turn practice into evidence
Benchmark a local document extractor on the same fixed inputs under two configurations. Record loading time separately from generation, completed-output latency, memory use, output validity and factual errors. Keep hardware and settings in a manifest and explain the quality-versus-resource decision without claiming unmeasured speed gains.
Score each response informally: 0 if you cannot explain it, 1 for a definition, 2 for an approach with checks, and 3 for justified trade-offs plus a failure-recovery plan. This is a self-study rubric, not a validated hiring assessment. Revisit weak answers and never invent project outcomes or experience.
Career roadmap and related jobs
Build the underlying skills with the LLM Engineer career guide. For a shorter starting point, read AI interview answer frameworks.
Explore relevant live jobs. Listings are filtered by Large Language Models (LLMs) and can include adjacent roles. Read the employer's requirements and original posting before applying. Use one listing to select the questions most relevant to its responsibilities.
Methodology
Editorial synthesis of cited sourcesAI-assisted original educational practice material. These are not actual employer interview questions, reported interview experiences or hiring guarantees. Answers, hypothetical scenarios, follow-ups and self-assessment advice are original editorial synthesis. Official Google references support background concepts, not endorsements of these answers. Related job recommendations use role-title aliases and, for specialist roles, primary specialization checks. Recommendations are a limited sample; adjacent roles may appear and availability changes. References checked 17 October 2026.
Read our editorial and research policy →Worked examples are original, hypothetical learning exercises, not employer results or production-ready implementations. Code uses the Python standard library; test and adapt it before real use.
Sources
- Machine Learning Crash Course
Google for Developers · Checked 17 October 2026
- Structured outputs
Google AI for Developers · Checked 17 October 2026
- MLOps: continuous delivery and automation pipelines
Google Cloud · Checked 17 October 2026