Skip to content
RED SAGSkills
easyAI Engineer (LLM & Generative AI) interview question

What is the difference between zero-shot and few-shot prompting, and when would you use each?

What the interviewer wants to hear

  • Zero-shot gives only instructions; few-shot adds worked examples
  • Examples show format, tone and edge cases better than rules
  • Few-shot costs more tokens on every request
  • Examples should be diverse and representative to avoid copying bias
  • Measure both on an eval set rather than guessing

Model answer

Zero-shot prompting gives the model only instructions, like "classify this ticket as billing, technical or other". Few-shot prompting adds a handful of worked examples of input and correct output. I start zero-shot because strong models follow clear instructions well and it keeps prompts short and cheap. I add examples when the output format is unusual, when the boundary between categories is subtle, or when I need a specific tone, because examples often show these better than rules. The examples must be varied and representative; if they all have the same label or length, the model copies that pattern. Since examples add tokens to every call, I compare both versions on a small eval set and keep the cheaper one if quality is equal.

Can you answer it under time pressure?

Take a timed easy round and get scored on every answer.

Start mock interview

More easy AI Engineer (LLM & Generative AI) questions