AI and LLMs Junior interview questions and answers
75 questions for a AI and LLMs (Junior) interview - with correct answers, explanations and links to the docs.
Take this quiz- 1.What does a large language model (LLM) fundamentally do?
- 2.What is a token in the context of LLMs?
- 3.Why does the same text in Ukrainian often use more tokens than in English?
- 4.What is the context window of a model?
- 5.What does the temperature parameter control?
- 6.Which temperature suits extracting fields from an invoice into JSON?
- 7.What is an LLM hallucination?
- 8.What is a model's knowledge cutoff?
- 9.What is a system prompt?
- 10.Chat APIs are usually stateless. What does that mean for an app?
- 11.What is few-shot prompting?
- 12.Why ask a model to think step by step before answering hard problems?
- 13.How are LLM API calls usually priced?
- 14.Why do chat interfaces often stream the answer token by token?
- 15.What does it mean when a response stopped because it hit the max tokens limit?
- 16.What is an embedding?
- 17.How does semantic search with embeddings differ from keyword search?
- 18.What is retrieval-augmented generation (RAG)?
- 19.Why are documents split into chunks for RAG?
- 20.When is RAG usually a better choice than fine-tuning?
- 21.What is fine-tuning?
- 22.What is tool use (function calling)?
- 23.Who actually executes a tool the model asks to call?
- 24.What is an AI agent in simple terms?
- 25.What is the Model Context Protocol (MCP)?
- 26.Why ask for structured output like JSON from a model?
- 27.Where should the API key for an LLM provider live in a web app?
- 28.What should an app do when the LLM API returns
429? - 29.What is prompt injection?
- 30.Why is indirect prompt injection dangerous?
- 31.What is a safe habit when using public AI chat tools at work?
- 32.Why must code from an AI assistant be reviewed?
- 33.Why is testing an LLM feature harder than testing normal code?
- 34.What is an eval for an LLM feature?
- 35.Which check is reliable for an LLM that must return a category from a fixed list?
- 36.What is a golden dataset in LLM testing?
- 37.What is LLM-as-a-judge?
- 38.Why version prompts like code?
- 39.Does temperature 0 guarantee identical answers every time?
- 40.What does top-p (nucleus sampling) do?
- 41.What is the role of the transformer's attention mechanism?
- 42.What is the difference between pre-training and instruction tuning?
- 43.What is RLHF?
- 44.What is a multimodal model?
- 45.What is a typical trade-off between a large and a small model?
- 46.Why put clear output instructions, like "answer in under 50 words", in prompts?
- 47.What is a guardrail in an LLM application?
- 48.Why should an AI feature show sources when it answers from documents?
- 49.What happens when a conversation grows longer than the context window?
- 50.What does prompt caching help with?
- 51.Why can very long prompts with many documents give worse answers?
- 52.What is bias in AI outputs?
- 53.Why should users be told when they're talking to an AI?
- 54.What is a reasoning or thinking model?
- 55.What should an AI chat do when it doesn't know the answer?
- 56.Why log prompts and outputs of an AI feature in production, with care?
- 57.What does it mean that LLM output is non-deterministic?
- 58.What is a simple automated check for a chatbot answer?
- 59.What is the role of a vector database in RAG?
- 60.Why might an AI feature refuse a harmless request?
- 61.What is red teaming for an AI application?
- 62.What is a jailbreak?
- 63.Why should an AI agent's tools follow least privilege?
- 64.What is "human in the loop" for AI features?
- 65.What does the AI SDK, e.g. Vercel's, help a web developer with?
- 66.Why should prompts separate instructions from user data, e.g. with tags?
- 67.How can you reduce hallucinations in an answer about company policy?
- 68.What does "model drift" mean for an AI feature?
- 69.What is the main risk of trusting AI-generated SQL without checks?
- 70.Why are evals run on many examples instead of one?
- 71.What is a chatbot's "context" made of in a typical app?
- 72.What does "grounded" mean for an AI answer?
- 73.Why do long answers take noticeably longer than long prompts?
- 74.Why give a model a role, like "You are a support agent for X"?
- 75.Which data should never go to a third-party LLM without approval?