Practiced one out loud? Paste your answer into the free self-check and get a score in 30 seconds
What the interviewer is testing
Whether you know when zero-shot is enough, can identify cases that need few-shot examples, and can design balanced examples without copying surface patterns into the output.
Answer framework
- Zero-shot prompting: give the instruction and any needed context without demonstrations.
- Few-shot prompting: include several labeled input and output examples in the prompt.
- Use zero-shot for common tasks with simple formats and little ambiguity.
- Use few-shot for unusual formats, subtle labels, or strict style and output consistency.
- Choose balanced, varied examples that cover hard cases, since models can copy their surface patterns.
Sample answer
I start by thinking about how much structure the task needs. For a common task with a simple format, I use zero-shot prompting: I describe the task and give any necessary context, but no demonstrations. That is quicker to maintain and avoids spending context window space on examples. If the model already understands the labels and the expected output is easy to recognize, zero-shot is usually the cleaner choice.
I switch to few-shot prompting when the format is unusual, the labels are subtle, or I need consistent style. I put a few input and output examples directly in the prompt, usually with a clear separation between examples and the final query. I select examples that cover the hard cases, vary the inputs, and make the labels balanced. I also test whether the examples are actually changing behavior, rather than assuming that more examples always help.
I see one failure mode as surface-pattern copying. If every example has a positive label, the model may treat positive as the default, even when the input calls for another label. I would catch that with a small set of edge cases, including examples with the opposite label, and adjust the examples if needed. In short, I use zero-shot for straightforward tasks and few-shot when examples communicate the missing pattern. I also treat examples as data that needs evaluation, not as decoration.
Likely follow-ups
Common mistakes
- Using zero-shot for an unusual format or subtle labels without testing the model first.
- Using unbalanced labels, which can make one class the default.
- Choosing examples only from easy cases instead of covering hard cases.
- Assuming more examples always help instead of testing whether they change behavior.
The 0 to 1 AI Engineer Interview Playbook covers the answer frameworks, system-design walkthroughs and an 8-week plan.
Get the playbookSmaller start: Score your answers against 50 rubrics, $9. 50 AI engineer questions, one rubric each, PDF on Gumroad.
Interviewing for PM or TPM? See the full PM package, $59 on Gumroad: a resume system, a PM, TPM and PGM interview handbook, a 1:1 cheat sheet and a PM playbook. PM and TPM content, not AI engineer prep.
Related questions
Based on question #17 in the full question bank.