What is the difference between zero-shot and few-shot prompting, and when would you add examples to a prompt?

technical-conceptual · Junior level · data-ml

What the interviewer is really asking

Assess whether the candidate understands in-context learning and can decide when worked examples earn their place in the context window versus a plain instruction.

What to say

What to avoid

Example answers

Strong: For a ticket-classification prompt the model kept inventing label names under a zero-shot instruction, so I added four examples — one per category, including a tricky borderline ticket — and it locked onto my exact label set with no extra wording.

Weak: Few-shot prompting means you fine-tune the model on a few examples so it learns your task permanently.

Want questions matched to your role? Paste a job title, job description, or CV and get a personalized set, or go Pro to unlock the full bank.