Interview questions with answers
Agentic AI terms interview questions and answers
The most popular terms and topics: MCP, RAG, ReAct, A2A and more. Open any question to read its model answer; the multiple-choice set marks the right option and explains it.
- Subjective
- 30
- Objective
- 30
Subjective questions 30
1What is RAG?Asked almost every time
Retrieval-augmented generation: before the model answers, relevant passages are retrieved from your own data (usually by embedding similarity) and added to the prompt, so the answer is grounded in current, citable information rather than only the model's training data.
2What is tool calling (function calling)?Asked almost every time
The model is given tool definitions (name, description, JSON-schema arguments) and can respond with a structured request to call one. Your code runs the tool and returns the result as a message, and the model continues. It is the basic mechanism behind agents.
3What are tokens and the context window?Asked almost every time
Models read and write tokens, pieces of words (roughly 3–4 characters of English each). The context window is the maximum number of tokens the model can consider at once, covering the prompt, history, retrieved documents, tool results and the answer. Cost and latency grow with tokens.
4What is hallucination and how do you reduce it?Asked almost every time
Confident but false output. Reduce it by grounding answers in retrieved sources and asking for citations, allowing 'I don't know', using tools for facts and calculations, constraining output formats, lowering temperature for factual tasks, and evaluating faithfulness.
5What is an LLM agent loop?Asked almost every time
The cycle of model call, optional tool calls, observing results and calling the model again until it produces a final answer or hits a limit. It is the core of almost every agent framework, whatever name it uses.
6What is a system prompt?Asked almost every time
Instructions placed before the conversation that set the model's role, rules, tone and available context. It shapes every answer, and it should be stable, specific and tested, because small wording changes can change behaviour.
7What is grounding?Asked almost every time
Making a model's answers rely on supplied, verifiable sources (retrieved documents, tool results, databases) rather than only its training data, usually with citations. It reduces hallucinations and makes answers checkable.
8What are embeddings and vector databases?Very often asked
An embedding is a vector representing the meaning of text (or images). Similar meanings are close in vector space. Vector databases (pgvector, Pinecone, Qdrant, Weaviate) store embeddings and find the nearest ones quickly with approximate nearest-neighbour indexes such as HNSW.
9What is MCP, in one minute?Very often asked
The Model Context Protocol is an open standard from Anthropic for connecting AI applications to external tools and data. Servers expose tools, resources and prompts; clients such as Claude, ChatGPT, IDEs and agent frameworks connect to them over stdio or Streamable HTTP. Write a server once, use it everywhere.
10What is chain-of-thought and what are reasoning models?Very often asked
Chain-of-thought is asking a model to work through intermediate steps before answering, which improves multi-step reasoning. Reasoning (or 'thinking') models are trained to do this internally, spending extra tokens on reasoning before the final answer, trading latency and cost for accuracy on hard problems.
11What is LLM-as-a-judge?Very often asked
Using a language model to grade outputs against a rubric or a reference answer, or to choose the better of two outputs. It scales evaluation but must be calibrated against human judgements and watched for bias.
12What are guardrails?Very often asked
Checks around a model or agent: input filters (prompt injection, disallowed topics), output filters (PII, toxicity, format validation), tool permission limits and policies that block or escalate actions. They can be rules, classifiers or other models.
13What is a reranker?Very often asked
A model, often a cross-encoder, that scores each candidate passage against the query together and reorders retrieved results. It is slower than vector search but more accurate, so it runs on the top results only.
14What is hybrid search?Very often asked
Combining keyword search (such as BM25) with vector similarity search and merging the results, for example with reciprocal rank fusion. It catches both exact terms and semantic matches.
15What is an eval (evaluation) in AI engineering?Very often asked
A repeatable test that measures model or system quality on a set of examples with scoring rules: exact match, code checks, human labels or LLM judges. Evals replace 'it looks fine' with numbers you can track across changes.
16What is a multi-agent system?Very often asked
Several specialised agents that collaborate, through a supervisor, handoffs or a shared workspace, each with its own role, tools and context. It helps with complex, parallelisable tasks but adds coordination cost.
17What is prompt injection, directly and indirectly?Very often asked
Direct injection is a user typing instructions to override the system prompt. Indirect injection hides instructions in content the model reads, such as web pages, emails or documents, which can make an agent take unintended actions.
18What is semantic caching?Very often asked
Storing previous answers keyed by the meaning of the question (an embedding), so a new question that is similar enough reuses the answer. It cuts cost and latency but needs a careful similarity threshold to avoid wrong matches.
19Fine-tuning vs. prompting vs. RAG?Often asked
Prompting changes behaviour through instructions and examples, cheaply and instantly. RAG adds up-to-date knowledge at query time. Fine-tuning changes the model's weights to learn a style, format or task reliably; it costs more and is poor at injecting changing facts. Most applications start with prompting and RAG.
20What is temperature?Often asked
A sampling setting controlling randomness. Low temperature makes outputs more deterministic and focused; higher temperature makes them more varied and creative. Factual extraction uses low values; brainstorming higher ones.
21What are structured outputs?Often asked
Constraining a model to return data matching a schema (JSON Schema, Pydantic), using provider features or tool calling, so programs can parse results reliably instead of scraping free text.
22What is human-in-the-loop (HITL)?Often asked
Designing an AI workflow so a person reviews, approves, edits or rejects certain steps, typically risky actions or uncertain outputs, before the system continues.
23What are reasoning tokens or thinking budgets?Often asked
Reasoning models spend extra tokens thinking before answering; a budget sets how many. More thinking improves hard tasks like maths and coding at the cost of latency and price.
24What is distillation?Often asked
Training a smaller student model to imitate a larger teacher's outputs, giving a cheaper, faster model that keeps much of the teacher's quality for a specific task.
25What is LoRA?Often asked
Low-rank adaptation: fine-tuning by training small extra matrices added to a model's layers instead of all its weights. It is far cheaper in memory and storage, and adapters can be swapped per task.
26What is a token limit vs. a rate limit?Often asked
A token limit is how much text fits in one request (context window) or one response (max output tokens). A rate limit caps requests or tokens per minute for your account. Exceeding either causes errors that apps must handle.
27What is agent memory, in terms of short-term and long-term?Often asked
Short-term memory is the current conversation or task state in the context window. Long-term memory persists across sessions in a store (facts, preferences, past outcomes) and is retrieved when relevant.
28What is an AI gateway?Often asked
A proxy between apps and model providers that adds a single API, routing and fallbacks between models, caching, rate limiting, cost tracking, logging and key management.
29What is prompt caching?Sometimes asked
Providers can cache a long, repeated prompt prefix (system prompt, documents, tool definitions) so later requests reuse it at lower cost and latency. Put stable content first and changing content last to benefit.
30What are multimodal models?Sometimes asked
Models that accept or produce more than text, such as images, audio, video or documents, so they can read screenshots, describe charts, transcribe speech or generate images.
Objective questions 30
1What does RAG add to a prompt?Asked almost every time
Why: Retrieval supplies grounding context.
2A context window measures…Asked almost every time
Why: Input and output tokens share it.
3What is a hallucination?Asked almost every time
Why: Models can produce plausible but wrong statements.
4An agent loop repeats until…Asked almost every time
Why: Model, tools, observe, repeat.
5Grounding means answers rely on…Asked almost every time
Why: Often with citations.
6Indirect prompt injection hides instructions in…Asked almost every time
Why: Agents reading data are exposed.
7Which index type is common in vector databases?Very often asked
Why: HNSW graphs enable fast approximate nearest-neighbour search.
8Which standard connects AI apps to tools through servers?Very often asked
Why: MCP defines servers exposing tools, resources and prompts.
9Lower temperature makes outputs…Very often asked
Why: Less randomness in sampling.
10Which is best for adding frequently changing knowledge?Very often asked
Why: Retrieval reads current data at query time.
11A reranker…Very often asked
Why: Usually a cross-encoder.
12Hybrid search combines…Very often asked
Why: Merged with rank fusion.
13What does LoRA train?Very often asked
Why: Cheap fine-tuning.
14Distillation produces…Very often asked
Why: Student and teacher.
15A semantic cache matches questions by…Very often asked
Why: Needs a similarity threshold.
16Roughly how many characters is one English token?Often asked
Why: A rule of thumb is ~4 characters or ~¾ of a word.
17What does an embedding represent?Often asked
Why: Similar meanings are close in vector space.
18Structured output means the model returns…Often asked
Why: Programs can parse it reliably.
19Which technique asks a model to show intermediate steps?Often asked
Why: Stepwise reasoning improves multi-step problems.
20A rate limit restricts…Often asked
Why: Handle 429 errors.
21An AI gateway provides…Often asked
Why: Sits between apps and providers.
22Thinking budgets control…Often asked
Why: More thinking, more latency.
23An eval is…Often asked
Why: Track quality over changes.
24A system prompt…Often asked
Why: Placed before the conversation.
25Long-term agent memory persists…Often asked
Why: Retrieved when relevant.
26Prompt caching works best when…Sometimes asked
Why: Only a repeated prefix can be reused.
27Quantisation of a model mainly…Sometimes asked
Why: Smaller numbers make models cheaper to run.
28Few-shot prompting means…Sometimes asked
Why: Examples show the model the expected pattern.
29A multimodal model can…Sometimes asked
Why: More than text.
30Reciprocal rank fusion is used to…Sometimes asked
Why: Common in hybrid search.
Track what you have practised and search every bank in your dashboard.
Start learning