Review Questions: Enterprise and Agentic AI

Over 100 review questions with concise answers across LLM fundamentals, model selection, the enterprise AI stack, RAG, vector databases, GraphRAG, evaluation, agents, MCP, multi-agent systems, Spring AI, AI security and governance, agent frameworks and protocols — plus scenario and reflection questions.

On this page

Answers are deliberately short — enough to check your understanding. Each section links to the article with the full explanation.

1. LLM fundamentals#

Full explanations: How LLMs work, Inference & cost, Prompt engineering.

What is an LLM, in one sentence? A transformer neural network trained on huge text corpora to predict the next token, which — repeated — generates text, code and structured output.

What is a token and why do architects care? A sub-word unit (~4 characters of English). Cost, latency, rate limits and context limits are all measured in tokens.

Explain self-attention simply. Each token compares its query vector with the key vectors of other tokens to decide how much to use each one’s value vector. It lets tokens draw on relevant context anywhere in the sequence; cost grows quadratically with length.

What is the context window? Does a 1M-token window remove the need for RAG? The maximum tokens per call, input plus output. No: long prompts are costly and slow, models use the middle of long contexts less reliably, and corpora are much bigger — retrieval still selects the right context.

What do temperature and top-p do? Temperature sharpens or flattens the next-token distribution (low = focused, high = varied). Top-p samples only from the smallest set of tokens whose probability sums to p.

Why do LLMs hallucinate? How do you reduce it? They generate plausible text even without the facts. Ground with RAG, require citations, allow “I don’t know”, lower temperature, use tools for facts and maths, and check faithfulness automatically.

Base vs instruction-tuned vs reasoning model? Base: next-token predictor only. Instruction-tuned: SFT and preference tuning to follow instructions safely. Reasoning: further RL training to think step by step before answering — better on hard multi-step tasks, slower and costlier.

What are prefill and decode? Prefill processes the prompt in parallel and determines time to first token; decode generates one token at a time and determines total generation time.

What is the KV cache? Stored attention keys and values of processed tokens, so decode does not recompute them; it consumes GPU memory and limits concurrency.

How does prompt caching work and how do you design for it? The provider reuses computation for an identical prompt prefix, cutting cost and TTFT. Put stable content (system prompt, tools, documents) first and variable content last.

How do you estimate LLM cost? Requests × (input tokens × input price + output tokens × output price), with realistic token counts including system prompt, retrieved context and history.

How do you get reliable structured output? Schema-constrained structured output from a typed class, parse into the type, validate business rules, retry or escalate on failure.

2. Model selection and customisation#

Full explanations: Model selection, Prompting vs RAG vs fine-tuning.

How do you choose a model for a use case? Define metrics; apply hard filters (data residency, licence, capabilities, context); shortlist via benchmarks and price; evaluate on our own dataset for quality, latency and cost; weighted scoring; choose primary and fallback; re-evaluate on new releases.

Open-weight or proprietary? Proprietary: top quality, no ops, data leaves your network under contract. Open-weight: full control and customisation, cheaper at high steady volume, but you operate it. Many enterprises use both.

What is model routing? Sending each request to the cheapest model that can handle it, via rules or a classifier, sometimes with escalation on low confidence.

RAG or fine-tuning? RAG for knowledge — private, changing, citable, permissioned. Fine-tuning for behaviour — format, style, domain language, or making a small model good at one high-volume task. Start with prompting.

What is LoRA? Parameter-efficient fine-tuning: freeze the base model and train small low-rank adapter matrices; cheap to train and swap.

What is distillation? Training a small model on a large model’s outputs to get most of its quality on a narrow task at lower cost and latency.

How do you avoid vendor lock-in? Abstraction layer or AI gateway, model-agnostic prompts and tool schemas, a reusable evaluation suite, a tested fallback provider.

3. Enterprise AI stack and LLMOps#

Full explanations: Enterprise AI stack, LLMOps.

Describe an enterprise AI reference architecture. Infrastructure and models; an AI gateway; a knowledge layer (ingestion, hybrid search, graphs); orchestration and agents with a tool/MCP registry; applications; cross-cutting LLMOps and governance.

What does an AI gateway do? Central entry to all models: authentication, quotas, guardrails, caching, routing and fallback, logging, cost metering and chargeback.

What is LLMOps and how is it different from MLOps? Operating LLM apps: versioned prompts, evaluation of non-deterministic output, token cost control, safety guardrails, tracing of chains and agents, and handling provider model changes.

What would you put on an LLM dashboard? Requests, errors, 429s; p95 TTFT and latency; tokens and cost per feature/user; retrieval empty-rate; online faithfulness and relevance; guardrail triggers; user feedback.

How do you release a prompt change safely? Version it, run the evaluation suite in CI against the baseline, review, canary or A/B with feature flags, monitor, keep rollback.

What resilience patterns apply to LLM calls? Timeouts, retries with backoff and jitter, circuit breakers, bulkheads, fallback models/providers, queues for batch, degraded mode.

3a. Adoption, deployment and financial services#

Full explanations: GenAI adoption strategy, On-prem & hybrid deployment, Hybrid AI in financial services.

What are the stages of GenAI adoption maturity? Explore (policy, approved tools, literacy), experiment (measured pilots), formalise (platform, gateway, governance tiers), scale (portfolio, reuse, chargeback), transform (processes redesigned around AI and agents).

Why do GenAI pilots fail to reach production? No shared platform, evaluation or governance path; no business owner or baseline; data not ready; risk processes not tiered.

When would you deploy an LLM on-premise? When data class or regulation forbids the cloud route, volume is high and steady enough to keep GPUs busy, the environment is offline or latency-critical, or a fine-tuned model must be pinned — and the organisation can operate GPUs.

How does a hybrid platform decide where a request goes? An AI gateway classifies the assembled prompt (caller’s registered class, chunk and tool-result classification, DLP as a safety net) and routes to the targets the policy allows for that class.

What security duties move to you when you self-host? Model supply chain (verified safe-format weights, AI-BOM), serving-stack patching, network isolation and egress control, GPU and cache isolation, encryption of weights, indexes and logs.

How do you compare on-prem and API inference cost? Tokens × price versus amortised hardware, power, space, staff, on-call and redundancy at expected utilisation. On-prem wins only at high, predictable utilisation.

Where would a bank place AML, research and customer-service AI? AML on-prem with a tuned open-weight model; investment research on in-region cloud frontier models for public content, walled on-prem for MNPI; customer service in-region cloud with redaction plus small on-prem guardrail models.

Why does model-weight ownership matter in regulated firms? It decides whether you can pin and re-validate on your schedule, run in your network and keep a credible exit plan if a provider fails or changes terms.

4. RAG#

Full explanations: RAG fundamentals, Chunking & embeddings, Advanced retrieval.

Walk through a RAG pipeline. Offline: load, parse, chunk, enrich with metadata and ACLs, embed, index. Online: rewrite query, embed, hybrid retrieve with filters, rerank, build prompt with numbered sources, generate with citations, validate, log.

How do you choose chunk size? Follow document structure, typically 300–800 tokens with 10–20% overlap and heading context; tune on retrieval recall.

What is parent-child retrieval? Search small chunks for precision; send their larger parent sections to the LLM for context.

What is hybrid search and RRF? Combining vector and BM25 results; Reciprocal Rank Fusion scores each document by Σ 1/(k + rank) across result lists, so it fuses different score scales.

Why rerank? Cross-encoders score query and document together — far more accurate than embedding similarity — but are too slow for the whole corpus, so they reorder the top candidates.

What is HyDE? Embed an LLM-generated hypothetical answer instead of the short question, because it resembles documents more closely.

What is contextual retrieval? Prepend an LLM-written sentence situating each chunk within its document before embedding and BM25 indexing; improves retrieval considerably.

How do you enforce permissions in RAG? ACL metadata on every chunk at ingestion; filter by the user’s identity inside the retrieval query.

How do you keep a RAG index fresh? Event-driven or delta-sync connectors, idempotent upserts per document version, deletion handling, ACL-only updates without re-embedding, periodic reconciliation.

Your RAG answers are wrong. How do you debug? Check retrieval first (was the right chunk retrieved, at what rank?), then generation (faithfulness, prompt, conflicts, ordering). Fix the stage that fails.

What is agentic RAG? An agent uses retrieval as a tool, deciding which sources to query and iterating — for multi-hop and analytical questions.

What is corrective RAG? Grade retrieved documents; if poor, rewrite the query or use another source before generating; verify grounding afterwards.

5. Vector databases and GraphRAG#

Full explanations: Vector databases, GraphRAG.

What is an embedding? A vector representing meaning; similar meanings are close under cosine similarity.

Exact vs approximate nearest-neighbour search? Exact compares with every vector — perfect recall, slow at scale. ANN (HNSW, IVF) searches a subset with high recall and low latency.

Explain HNSW. A multi-layer proximity graph searched greedily from sparse top layers to the dense bottom layer; high recall and speed, high memory.

HNSW vs IVF-PQ? HNSW: best recall/latency, memory-heavy. IVF-PQ: clusters plus compression; far less memory for huge scale, lower recall.

pgvector or a dedicated vector DB? pgvector if you run PostgreSQL and have up to tens of millions of vectors — one fewer system, SQL filters, transactions. Dedicated or managed stores for very large scale, high QPS or special features.

How do you do multi-tenancy in a vector store? Tenant filter on every query, partitions/namespaces per tenant, or separate indexes — by isolation need and scale.

What is GraphRAG? Build a knowledge graph of entities and relationships from documents (via LLM extraction), cluster into communities with summaries, and retrieve neighbourhoods or summaries for multi-hop and global questions.

Local vs global search in GraphRAG? Local: start from entities in the question and expand their neighbourhood. Global: map-reduce over community summaries for corpus-wide questions.

When is GraphRAG not worth it? When questions are mostly single-fact lookups, the corpus changes constantly, or the indexing cost is unjustified — vector/hybrid RAG is enough.

6. Evaluation#

Full explanation: RAG evaluation, Agent evaluation.

How do you evaluate a RAG system? Golden dataset; retrieval metrics (recall@k, MRR, nDCG) and generation metrics (faithfulness, answer relevance, correctness, citation accuracy); LLM-as-judge calibrated with humans; CI gates; online sampling and feedback.

Faithfulness vs answer relevance? Faithfulness: are all claims supported by the retrieved context? Relevance: does the answer address the question?

What is MRR? Mean of 1/rank of the first relevant result across queries.

What are LLM-as-judge pitfalls? Position, verbosity and self-preference bias; inconsistency with vague rubrics. Use binary specific rubrics, explanations, order swaps, a different model family and human calibration.

How do you build a golden dataset? Real user questions and expert input, coverage of types and difficulty, no-answer and adversarial cases, synthetic expansion reviewed by experts, versioned, grown from production failures.

How do you evaluate an agent? Outcome (task success, final system state), trajectory (tools and order, forbidden actions), step accuracy, safety, efficiency, and consistency with pass^k — using sandboxed tools and simulated users.

7. Agents and agentic patterns#

Full explanations: What is an agent, Tool calling, Patterns, Memory.

What is an AI agent? An LLM-driven system that loops — reason, act via tools, observe — until the goal is met or it must stop.

Workflow vs agent? Workflow: code defines the path. Agent: the LLM decides the path. Prefer workflows when the path is known.

Explain ReAct. Interleaved reasoning, actions (tool calls) and observations in a loop, until a final answer.

How does function calling work? The app sends tool schemas; the model returns structured tool calls; the app validates, authorises and executes them, returns results, and loops.

What makes a good tool? Task-level purpose, clear description of when to use it, minimal typed parameters, compact results, helpful errors, idempotent writes.

Name the main agentic workflow patterns. Prompt chaining, routing, parallelization (sectioning and voting), orchestrator–workers, evaluator–optimizer, plus plan-and-execute, reflection and human-in-the-loop.

What types of agent memory exist? Short-term working memory; long-term semantic (facts), episodic (past events) and procedural (skills/instructions).

How do you manage long conversations? Recent turns verbatim, summary of older turns, pinned key facts, trimmed tool results, optional retrieval of past turns.

How do you make long-running agents reliable? Checkpoint state after each step or use durable execution (Temporal, Step Functions), idempotent tools, pause/resume for approvals, tracing.

Why do agents fail on long tasks? Errors compound (0.95¹⁰ ≈ 60%), context gets noisy, loops and goal drift. Use fewer steps, verification, budgets and checkpoints.

How do you decide an agent’s autonomy? Per action, by impact and reversibility: autonomous reads; limited automatic writes; approval for high-value or irreversible actions.

8. MCP and multi-agent systems#

Full explanations: MCP, Multi-agent systems.

What is MCP? An open protocol standardising how AI applications connect to tools and data — N+M integrations instead of N×M.

Host, client, server? Host: the AI app with the LLM. Client: one connector per server inside the host. Server: exposes tools, resources and prompts.

Tools vs resources vs prompts? Tools: model-invoked functions. Resources: application-controlled read-only data by URI. Prompts: user-selected templates.

What are sampling, roots and elicitation? Client capabilities: servers can request LLM completions from the host (sampling), learn allowed directories/URIs (roots), and ask the user for input (elicitation).

MCP transports? stdio for local subprocess servers; Streamable HTTP for remote servers. HTTP+SSE is deprecated.

How is MCP secured? OAuth 2.1 with PKCE, audience-bound tokens, no token passthrough; in enterprises add an MCP gateway, an approved-server registry, least-privilege scopes, approvals for destructive tools and audit.

What is tool poisoning? Malicious instructions hidden in a tool’s description or metadata that the model reads and follows.

MCP vs A2A? MCP connects an agent to tools and data; A2A lets agents discover each other (agent cards) and delegate tasks.

When should you use multiple agents? When parallelism, context isolation, distinct tool sets, security boundaries or team ownership justify the extra cost and complexity.

Supervisor vs handoff? Supervisor keeps control and calls sub-agents; handoff transfers control to a peer agent that then talks to the user.

9. Spring AI#

Full explanations: Fundamentals, RAG, Tools, MCP & memory, Production.

What is Spring AI? The Spring project providing portable model and vector-store APIs plus ChatClient, advisors, RAG, tools, MCP, memory, structured output and observability for Java.

ChatModel vs ChatClient? ChatModel: low-level portable provider interface. ChatClient: fluent high-level API with templates, options, advisors, tools and .entity().

What are advisors? Interceptors around model calls — memory, RAG, logging, safeguards, tool-calling loop, custom concerns.

How do you implement RAG in Spring AI? ETL: DocumentReader → TokenTextSplitter → metadata → VectorStore. Query: QuestionAnswerAdvisor or modular RetrievalAugmentationAdvisor with query transformers, VectorStoreDocumentRetriever and filters.

How do you pass the user’s identity to a tool safely? ToolContext from the authenticated session — it reaches the tool without going through the model.

How do you use MCP in Spring AI? Client starter exposes remote tools as a ToolCallbackProvider; server starter plus @McpTool exposes your methods as an MCP server.

How does chat memory work in Spring AI? ChatMemory (e.g. MessageWindowChatMemory) backed by a repository (JDBC, Redis…) used through MessageChatMemoryAdvisor, with ChatMemory.CONVERSATION_ID on every call.

How do you observe and test Spring AI apps? Micrometer observations exported via OpenTelemetry (token usage, latency, spans per advisor/tool); evaluation tests with RelevancyEvaluator and FactCheckingEvaluator; Testcontainers.

10. Security and governance#

Full explanations: AI security, AI governance.

What is prompt injection? Input that makes the model follow attacker instructions; indirect injection arrives via content the system reads on an innocent user’s behalf.

How do you defend against it? Architecture first: least privilege, isolate untrusted content (dual LLM), break the lethal trifecta, gate tools, approvals, output sanitisation; plus classifiers and monitoring.

What is excessive agency? An LLM system with more tools, permissions or autonomy than needed, so manipulation or error causes damage.

What is the lethal trifecta? Private data + untrusted content + external communication in one agent → exfiltration risk.

Name five OWASP LLM Top 10 risks. Prompt injection, sensitive information disclosure, supply chain, data/model poisoning, improper output handling, excessive agency, system prompt leakage, vector/embedding weaknesses, misinformation, unbounded consumption.

EU AI Act risk tiers? Unacceptable (prohibited), high (strict obligations), limited (transparency), minimal (none) — plus GPAI model obligations.

NIST AI RMF functions? Govern, Map, Measure, Manage.

What is ISO/IEC 42001? A certifiable standard for an AI management system.

How do you govern AI at enterprise scale? Governance council, policies and risk tiers, AI inventory, proportionate lifecycle gates, platform paved roads with built-in controls, continuous monitoring and audit.

11. Agent protocols, harnesses and identity#

Full explanations: Protocol stack, Harnesses & skills, Computer-use agents, Agent identity.

Which open standard connects an agent to a user interface? AG-UI: a stream of typed events (lifecycle, text, tool calls, state) between an agent back end and a front end.

What is the lifecycle of an A2A task? Submitted → working → (input-required / auth-required) → completed, failed, canceled or rejected; long tasks stream updates or use push notifications.

What is an Agent Skill? A folder with a SKILL.md (name, description, instructions) and optional scripts and resources; only the description is in context until the agent loads the skill (progressive disclosure).

What is AGENTS.md? A Markdown file in a repository that tells coding agents how to build, test and follow conventions.

What is an agent harness? Everything around the model that makes an agent work reliably: loop, tools, permissions, context management, file-based memory, sub-agents, skills, checkpoints and verification.

How do long-running agents survive context limits and restarts? Compaction and tool-result clearing, notes and progress files on disk, sub-agents with fresh contexts, checkpoints after every step, idempotent tools, and sessions that resume from saved state.

When should you use a computer-use agent? When a system has no API and tasks vary too much for RPA — in a disposable sandbox with egress allow-lists, injected credentials, recordings and human confirmation of irreversible steps.

What is the effective permission of an agent action? The intersection of the user’s permissions, the agent’s permissions and the task’s scope.

How does an agent act on behalf of a user securely? OAuth token exchange for short-lived, audience-bound, narrowly scoped tokens carrying both identities; no token passthrough; authorisation at every hop.

12. Agent frameworks and platforms#

Full explanations: Landscape, Python & TypeScript, JVM & .NET, Managed platforms.

What does an agent framework provide? The agent loop, tool schemas and execution, state and checkpoints, multi-agent coordination, human-in-the-loop, guardrails, tracing and protocol adapters.

Name the main categories of agent frameworks. Graph/workflow runtimes, agent SDKs, agent harnesses, JVM/.NET frameworks, managed agent platforms and low-code builders.

How do LangChain, LangGraph and Deep Agents relate? Framework (create_agent + middleware), runtime (state graphs, checkpoints, interrupts) and batteries-included harness on top.

What are the core primitives of the OpenAI Agents SDK? Agents, tools, handoffs, guardrails, sessions and tracing.

What are Google ADK workflow agents? SequentialAgent, ParallelAgent and LoopAgent — deterministic orchestration of sub-agents.

What replaced AutoGen and Semantic Kernel? Microsoft Agent Framework (1.0 in April 2026) for .NET and Python.

How does Embabel plan? A deterministic GOAP planner chains typed @Action methods toward an @AchievesGoal action using the types they consume and produce and declared conditions; LLMs work inside actions.

What does a managed agent platform add to a framework? Session-isolated runtime, memory, agent identity, a tool gateway exposing APIs as MCP tools, sandboxed browser and code tools, observability and evaluation.

How do you avoid framework lock-in? Tools as MCP servers, A2A between agents, prompts and evaluation sets in Git, OpenTelemetry tracing, thin adapters.

Which framework for a Spring Boot enterprise? Spring AI as the standard; Embabel for goal-driven planning; expose domain capabilities as MCP servers.

13. Agentic AI strategy#

Full explanation: Agentic AI strategy.

Describe an agentic AI maturity model. Assist → automate steps → act with oversight → orchestrate across domains → autonomous operations.

How do you measure an agent’s value? Total cost per successfully completed task (including retries, review and failures) against the current process, plus quality, risk and adoption metrics.

What is AgentOps? Running agents like production services: SLOs, monitoring, incident response, cost management and continuous evaluation.

13a. Claude for engineering and the SDLC#

Full explanations: Claude models, Claude API, Claude Code, Claude across the SDLC, Using Claude intelligently.

Name the current Claude tiers and when to use each. Fable 5.1 for the hardest reasoning and long autonomous work; Opus 5.5 as the default for complex coding, agents and analysis; Sonnet 5.5 for everyday coding and enterprise workloads; Haiku 5.5 for high-volume, latency-sensitive tasks and sub-agents.

What does the effort parameter control? How thoroughly the model thinks, how many tool calls it makes and how much it writes — the quality-versus-cost dial within one model, from low to max.

What is the single biggest free cost lever on the Claude API? Prompt caching of stable prefixes (tools, system prompt, documents), verified with cache_read_input_tokens.

Tool runner, Agent SDK or Managed Agents? Tool runner loops over your own tools; the Agent SDK embeds the full Claude Code harness in your process; Managed Agents adds Anthropic-hosted loop, sandbox, versioned configs, vaults and schedules.

What belongs in CLAUDE.md, and what belongs in hooks? CLAUDE.md: short project context — commands, architecture rules, conventions. Hooks and permission rules: anything that must always happen or never happen, because they are enforced, not advisory.

Where should humans stay in an AI-assisted SDLC? Scope sign-off, design decisions, PR approval, release go/no-go, incident command and every production change.

How do you measure whether Claude improves delivery? With delivery outcomes — lead time, change failure rate, time to restore, escaped defects, review time — plus developer experience, not lines generated or suggestions accepted.

14. Scenario questions#

The CFO says the AI bill tripled last month. What do you do? Break cost down by feature, model and tenant from gateway metrics; look for prompt growth (history not trimmed, too much retrieved context), a model change, missing caching, runaway agents or abuse. Fix with context trimming, prompt caching, routing, output limits, quotas and budgets; add cost alerts.

Users say the assistant “got worse” after nothing changed. Check provider model version changes, data/index changes (new documents, failed ingestion), retrieval metrics, prompt or config drift; compare online eval scores over time; pin model versions; re-run the golden set.

Legal asks whether you can guarantee the bot never gives wrong policy answers. No probabilistic system can guarantee that. Explain controls: grounding with citations, abstaining when unsure, evaluation thresholds, human escalation, disclaimers, monitoring and review — and use rules or forms for decisions that must be exact.

A team wants to give an agent write access to production databases. Ask for the use case; offer task-level tools with validation instead of raw SQL; read-only by default; scoped writes through services with limits; approvals; audit; sandbox testing; progressive rollout.

How would you introduce GenAI into a bank with strict regulation? Start with internal, lower-risk use cases (knowledge assistants, developer productivity, document summarisation) on a governed platform (gateway, approved models in-region, logging, evaluation); establish governance and model-risk processes; build skills; then move to customer-facing and decision-support use cases with human oversight.

15. Reflection prompts#

Explain each of these to a colleague in two minutes, with an example from your own work:

  • Where would you choose a workflow over an agent, and why?
  • How would you prove an AI feature is good enough to release?
  • Which controls would you put in code rather than in prompts?
  • How would you design permissions for an agent acting on behalf of employees?
  • Which framework would you standardise on for your organisation, and what would make you change your mind?

Summary#

Know the definitions, but practise connecting each concept to a design decision, a metric and a risk. That connection is what turns knowledge into good architecture.