Back to all tracks

AI & GenAI interview questions (2026)

AI and GenAI interviews look for practical judgement: how you write and test prompts, evaluate a RAG system or chatbot, catch hallucinations and prompt injection, and use AI safely with real data.

7 technical + 3 behavioural questions with model answersLast updated Roles: AI Engineer (junior), Prompt Engineer, AI Analyst, AI / LLM Tester

Technical questions

Try each one out loud first, then open the model answer and compare: did you cover the same points, in a clear order?

What is a large language model (LLM), and how does it generate text?

An LLM is a neural network (almost always a transformer) trained on very large amounts of text to predict the next token given the tokens before it. - Pre-training: it learns language, facts and patterns by predicting the next token across trillions of tokens. - Post-training: instruction tuning and preference training (e.g., RLHF) make it follow instructions and behave helpfully and safely. - Generation: at each step it outputs a probability distribution over its vocabulary, a token is chosen (sampling controlled by temperature/top-p), appended, and the process repeats until a stop condition. Key implication for practitioners: the model produces plausible text, not verified truth — which is why grounding (RAG), evaluation and guardrails matter.

What are tokens and what is a context window? Why do they matter in real projects?

A token is the unit of text the model processes — often a word piece. In English, 1 token is roughly 3/4 of a word (about 4 characters), so 1,000 tokens ≈ 750 words; other languages and code can use more tokens. The context window is the maximum number of tokens the model can consider at once: system prompt + conversation history + retrieved documents + the output. Why it matters: - Cost: APIs charge per input and output token. - Latency: more tokens = slower responses, especially output tokens. - Truncation: if you exceed the window, content is cut or the request fails; older chat turns may be dropped. - Quality: models can miss details buried in very long contexts ('lost in the middle'), so retrieving a few relevant chunks often beats stuffing everything in.

What do temperature and top-p control? What settings would you use for a customer-support bot vs a marketing copy generator?

Both control randomness in token selection. - Temperature scales the probability distribution: low (0–0.3) makes the model pick the most likely tokens — more deterministic and consistent; high (0.8–1.2) flattens the distribution — more varied and creative, but more error-prone. - Top-p (nucleus sampling) limits choices to the smallest set of tokens whose cumulative probability is p (e.g., 0.9). Support bot: low temperature (≈0–0.3) for consistent, factual, policy-aligned answers. Marketing copy: higher temperature (≈0.7–1.0) for variety, with human review. Testing note: even at temperature 0, outputs aren't always perfectly identical across runs or model versions, so run critical tests multiple times and record settings. Usually tune temperature OR top-p, not both.

What are embeddings and how are they used in AI applications?

An embedding is a vector (list of numbers, e.g., 768–3,072 dimensions) that represents the meaning of text (or images). Texts with similar meaning get vectors that are close together, measured with cosine similarity or dot product. Uses: - Semantic search and RAG retrieval: 'How do I get my money back?' matches a 'Refund policy' chunk even with no shared keywords. - Clustering and topic discovery (e.g., grouping support tickets). - Classification, deduplication, recommendations, anomaly detection. Practical points: use the same embedding model for documents and queries; changing the model means re-embedding everything; domain-specific jargon may need hybrid (keyword + vector) search.

Explain Retrieval-Augmented Generation (RAG) and walk through its main components.

RAG grounds an LLM's answer in your own documents by retrieving relevant content at query time and adding it to the prompt. Indexing (offline): - Load documents (PDFs, web pages, policies) → clean → split into chunks (e.g., 300–800 tokens with overlap) → embed each chunk → store in a vector database with metadata (source, section, date). Query time: - Embed the user question → retrieve top-k similar chunks (optionally hybrid search + re-ranking) → build a prompt: instructions ('answer only from the context, cite sources, say if you don't know') + context + question → LLM generates the answer → post-checks (citations, PII, safety). Benefits: up-to-date and private knowledge without retraining, citations for traceability, fewer hallucinations. Common failure points: bad chunking, wrong chunks retrieved, model ignoring context, and stale documents.

What prompt engineering techniques do you use to get reliable outputs?

- Clear role and task: 'You are a support assistant for a Canadian retailer…'. - Context: audience, goal, source material. - Constraints: length, tone, scope, what not to do ('don't invent policies'). - Output format: JSON schema, table, bullet count, fixed final line — makes output parseable and testable. - Few-shot examples: 2–5 input/output pairs showing exactly what you want. - Delimiters: XML tags, triple quotes or fences to separate instructions from data (also helps against injection). - Ask for step-by-step reasoning on complex tasks (or use a reasoning model), and break big tasks into smaller chained prompts. - Iterate with a test set: change one thing at a time and measure, and version prompts like code.

What is the difference between a foundation model, a fine-tuned model and an AI application?

- A foundation model is a large model trained on broad data that can do many tasks (for example GPT, Claude, Llama, Gemini). - A fine-tuned model is a foundation model further trained on specific examples to change its style or improve a narrow task. - An AI application wraps a model with everything else a real product needs: prompts, retrieval (RAG), tools, user interface, guardrails, logging, evaluation and monitoring. Most business value and most failures come from the application layer, which is why testers and engineers focus on it.

Behavioural questions (STAR)

How to structure your answer: use STAR, Situation, Task, Action and Result. Keep the situation short, spend most of the time on what you did (say “I”, not “we”), and finish with the result. Keep it focused: one example, told clearly.

For AI roles: Situation: the AI feature or experiment. Task: what you needed it to do safely. Action: how you tested, measured or put guardrails on it. Result: what you found and what the team changed because of it.

Tell me about a time you had to manage a stakeholder's unrealistic expectations of AI.

Situation: A customer service manager expected a new AI chatbot to answer every customer question correctly from day one and replace half of the support team. Task: I needed to set realistic expectations without losing support for the project. Action: I ran the chatbot against 200 real past questions and showed the results: 78% answered well, 15% partly right, and 7% wrong, mostly on refunds and account changes. I explained the risks of wrong answers in business terms and proposed a plan: launch on the top 20 question types, hand everything else to a person, and review results weekly. Result: The manager agreed to the phased plan. After two months the chatbot handled about 35% of chats on its own, with customer satisfaction unchanged. What the interviewer is looking for: Evidence-based expectation setting, business language, and a practical plan that still delivers value.

Tell me about a time you had a conflict with a teammate. How did you resolve it?

Situation: On a project team, a colleague and I disagreed about how to split the work. He kept changing parts of my tasks without telling me, which caused duplicate work. Task: I needed to fix the working relationship so we could meet our deadline. Action: I asked him for a short one-to-one coffee instead of arguing in the team chat. I explained the impact calmly, using facts ('we both rewrote the same report section last week') rather than blame, and asked how he saw it. He said he was worried about the deadline. We agreed a simple task board so we could both see who owned what, and we checked in for five minutes each morning. Result: We finished on time, and the task board was adopted by the whole team. He and I worked together again on the next project. What the interviewer is looking for: That you address conflict early and privately, focus on the problem, not the person, and find a practical solution.

Describe a time you had to deliver something under a very tight deadline.

Situation: On a Thursday afternoon my manager asked me to prepare a summary report for a senior leadership meeting on Friday morning, a task that normally takes three days. Task: I had to deliver something accurate and useful in less than a day. Action: I asked my manager which three questions leadership most needed answered, so I could focus. I reused existing data and templates instead of starting from scratch, blocked my calendar, and asked a colleague to check my figures for 20 minutes before I sent it. I listed clearly what was not covered and when it would follow. Result: The report was ready by 8 a.m. Friday, leadership made their decision in the meeting, and the full version followed on Tuesday. What the interviewer is looking for: That you clarify priorities, focus on what matters most, protect quality and communicate what is left out.

Want the full question bank? These are the free samples. A AI & GenAI package includes 84 more questions with model answers, from fresher to experienced level, plus practice projects you can talk about in interviews.

Practise these out loud with the free AI mock interview

Reading a model answer isn't the same as saying it. Answer AI questions out loud or in writing and get a score, what you did well, what to improve and the follow-up question an interviewer would likely ask. A free account includes 3 scored answers to try it.

Keep preparing

Related guides

Other tracks

QA & Test Automation · Data Analytics · Business Analysis · Cybersecurity · Cloud & DevOps · AI Automation & Agents · IT Support & Service Desk · Fraud, Risk & Compliance