Interview Q&A / AI & Generative AI
AI & Generative AI interview questions
LLMs, tokens, embeddings, RAG and prompt engineering, the questions every AI role now asks.
Prefer rapid revision? Practise AI & Generative AI short interview answers →
- Does telling the model to act as an expert actually improve answers?
A role such as "you are a senior data analyst" can shift tone, vocabulary and the level of detail, but it does not add knowledge the model lacks. Clear task instructions, context and constraints usually matter more than the persona line.
BeginnerQuick answer1 min read - What is the difference between a system prompt and a user prompt?
The system prompt holds standing instructions from the developer, such as role, tone, rules and format, and applies to the whole conversation. The user prompt is the per-turn request. Models give system instructions higher priority, but that is not a security guarantee.
BeginnerQuick answer1 min read - What is the difference between zero-shot and few-shot prompting?
Zero-shot gives only the instruction. Few-shot adds a handful of worked input and output examples in the prompt so the model copies the format and style. Few-shot often improves consistency without any training.
BeginnerQuick answer1 min read - How would you get reliably structured JSON output from an LLM?
Describe the exact schema in the prompt with an example, use the provider's structured output or JSON mode if available, set a low temperature, then parse and validate against a schema in code, retrying or repairing when it fails.
IntermediateQuick answer1 min read - What is chain-of-thought prompting, and when does it help?
Chain-of-thought prompting asks the model to work through intermediate steps before giving the final answer. It tends to help on multi-step maths, logic and planning problems, but adds tokens, and the shown reasoning is not always a faithful account of how the answer was produced.
IntermediateQuick answer1 min read - What is self-consistency in prompting?
Self-consistency samples several independent reasoning answers to the same question at a non-zero temperature and picks the most common final answer. It improves accuracy on reasoning tasks at the price of multiplying token cost and latency.
AdvancedQuick answer1 min read