Interview Questions
Detailed, plain-language answers to real AI engineering interview questions. Each one is explained the way a friendly teacher would, with the intuition, a worked example, and what the interviewer is really testing.
106 questions
- Mediumfine tuningWhat is adapter-based fine-tuning?
Adapter-based fine-tuning is a parameter-efficient way to adapt pretrained models by inserting small trainable modules called adapters while keeping the main weights frozen. It reduces storage per task and speeds up multi-task deployment at the cost of some representational flexibility compared with full fine-tuning.
- MediumevaluationWhat is adversarial testing for AI systems?
Adversarial testing for AI systems explains how controlled hostile inputs and tests reveal model weaknesses and robustness limits. Learn what adversarial tests try, common attack types, metrics to measure failure, and practical steps to design useful adversarial evaluations.
- MediumagentsWhat is an agent loop, and how does it decide when to stop?
Agent loop explained: what an agent loop is and how it decides when to stop, covering observation, decision, action, memory updates, and stopping criteria. Learn common termination rules, safety checks, and practical tradeoffs for designing reliable agent loops.
- MediumagentsHow does an AI agent decide which tool to call?
An agent picks a tool by reasoning over the task, the available tool descriptions, and the current state, then emitting a structured tool call. Here is how the loop works and what interviewers probe for.
- HardragExplain Agentic RAG.
Agentic RAG explains how retrieval-augmented generation combined with agentic control uses retrievers, tools, and a controller to fetch relevant context and act. The page gives a clear architecture, a worked example, and tradeoffs you will need to explain in an interview.
- MediumagentsWhat is an AI agent, and how does it differ from a simple LLM call?
AI agent vs LLM call: an AI agent composes an LLM, tools, memory, and a control loop to complete multi step tasks, while a simple LLM call is a single prompt-response interaction. This page explains the structural differences, typical architectures, and when you should pick an agent over a one-off LLM call.
- MediumagentsHow AI Agents Communicate?
How AI Agents Communicate: common patterns and tradeoffs when multiple agents exchange messages, use shared memory, or rely on a mediator. This page explains message formats, coordination protocols, and common failure modes so you can reason about design choices in interviews.
- MediumllmopsExplain the AI product lifecycle from ideation to production.
AI product lifecycle from ideation to production explains the stages of ideation, model development, deployment, and monitoring for LLM-driven products. This summary helps you reason through design choices, tradeoffs, and operational steps when moving an LLM feature from prototype to production.
- MediumagentsWhat are AI SubAgents?
What are AI SubAgents? Learn what AI subagents are, how they decompose work inside an agent system, and when to use them. This page explains design patterns, a concrete example, tradeoffs, and likely interview questions.
- Mediumvector dbHow does Approximate Nearest Neighbor (ANN) search work?
Approximate Nearest Neighbor (ANN) search finds similar vectors quickly by trading a little accuracy for large speedups in high dimensional vector-db queries. This question asks how ANN indexing and search structures like HNSW, IVF, PQ, and LSH work and when to use each.
- MediumragExplain the architecture of a basic RAG system.
RAG system architecture explained: how a retriever, vector index, and generator work together to answer queries by augmenting a language model with retrieved documents. Learn the main components, a concrete example, and the tradeoffs between dense retrieval and sparse retrieval in a basic RAG pipeline.
- MediumevaluationExplain BLEU, ROUGE, and BERTScore. When would you use each?
BLEU, ROUGE, BERTScore: explain differences and practical use cases for these automatic text-evaluation metrics. Learn when to prefer precision, recall, or semantic matching and the main tradeoffs for machine translation, summarization, and semantic evaluation.
- MediumllmExplain BPE (Byte Pair Encoding).
BPE (Byte Pair Encoding) explains subword tokenization that merges frequent byte or character pairs into tokens to build a compact vocabulary. Learn how BPE trains merges, how it tokenizes new text, and the tradeoffs between vocabulary size and token length.
- EasypromptingWhat is chain-of-thought prompting and when should you use it?
Chain-of-thought prompting asks the model to show intermediate reasoning steps before the final answer, which improves multi-step tasks. Here is how it works, when it helps, and what interviewers probe for.
- MediumpromptingWhat is chain-of-thought (CoT) prompting, and when should you use it?
Chain-of-thought (CoT) prompting explains step-by-step reasoning to elicit multi-step answers from large language models. Use CoT when the task needs intermediate steps, arithmetic or logical reasoning, or when you want interpretable chains of reasoning to debug model errors.
- MediumpromptingHow does Chain-of-Thought (CoT) Prompting work?
Chain-of-Thought (CoT) Prompting explains how to get language models to produce intermediate reasoning steps to solve multi-step tasks. This page shows what CoT does, common patterns like few-shot CoT and self-consistency, and practical tradeoffs for interview answers.
- MediumragHow do you choose an embedding model for your RAG system?
How do you choose an embedding model for your RAG system? This question asks how to pick embeddings by weighing embedding quality, dimensionality, cost, latency, and index compatibility for your retrieval augmented generation pipeline. It helps you explain practical tradeoffs and an evaluation plan for real data and constraints.
- MediumragWhat are chunking strategies, and how do you choose the right chunk size?
Chunking strategies and chunk size for RAG: choose how to split documents for retrieval-augmented generation, balancing context, retrieval accuracy, and cost. Learn rules of thumb, overlap choices, and a worked example for token-based chunking so you can pick the right size for your use case.
- Hardsystem designHow does Claude Code work? and How does Cursor work?
Claude Code and Cursor system-design: explain how Claude Code models are specialized for coding tasks and how Cursor ties a code-aware editor to model inference and retrieval. Compare their architectures, retrieval and execution flows, and tradeoffs for latency, security, and accuracy.
- MediumragCompare fixed-size chunking, semantic chunking, and recursive chunking.
Compare fixed-size chunking, semantic chunking, and recursive chunking. This question asks you to explain how each chunking strategy works, when to use it in a RAG pipeline, and the practical tradeoffs in retrieval cost, context quality, and hallucination risk. Expect a focus on how chunk boundaries affect embeddings, search, and downstream generation.
- HardevaluationHow do you conduct human evaluation for AI systems?
Human evaluation for AI systems: how to design, run, and analyze studies that measure quality, preferences, and safety. Learn practical steps for task design, rater instructions, sample size, and statistical checks so your claims stand up in interviews and reviews.
- MediumagentsHow does context compaction work?
Context compaction explains how agents reduce long contexts to essential information so models stay within token limits and retain task-relevant facts. This question explores common compaction techniques, tradeoffs between fidelity and length, and practical design patterns for agents.
- Mediumvector dbExplain cosine similarity, dot product, and Euclidean distance for vector search.
Cosine similarity, dot product, Euclidean distance explained for vector search and retrieval. We compare formulas, scale effects, and when to normalize. Practical tips for indexing, performance, and failure modes.
- MediumllmWhat is Cross Attention in Transformers?
Cross Attention in Transformers explains how a query sequence attends to a different context sequence, such as decoder queries attending to encoder keys and values. Learn the key formula, a small numeric example, and when cross attention matters for encoder-decoder and multimodal models.
- Hardsystem designHow do you design an AI system for high availability and fault tolerance?
How do you design an AI system for high availability and fault tolerance? This question asks you to design redundancy, failover, and operational practices for an AI service so it stays available under failures. Focus on redundancy patterns, state handling, and observable recovery paths.
- Hardsystem designHow do you design an AI system that gracefully degrades when the model is unavailable?
How do you design an AI system that gracefully degrades when the model is unavailable? This page walks through patterns like fallbacks, caching, circuit breakers, and monitoring so your user experience and safety stay acceptable when models fail. You will get a practical architecture, a worked example, and interviewer-style questions.
- HardagentsHow do you design and define tools for an AI agent?
How do you design and define tools for an AI agent? This question asks how to specify tool capabilities, inputs and outputs, failure modes, and runtime controls for agents that call external tools. You will outline interfaces, safety checks, cost and latency considerations, and examples of tool contracts.
- Hardsystem designHow do you design for latency vs quality trade-offs in AI systems?
How do you design for latency vs quality trade-offs in AI systems? This question asks how you balance model accuracy, response time, batching, and infrastructure to meet latency budgets. It covers measurement, architecture patterns, and practical knobs to tune in production AI services.
- Hardsystem designHow do you design rate limiting and cost management for AI APIs?
Rate limiting and cost management for AI APIs requires controlling request rates and usage costs while preserving latency and fairness. This question asks you to design token-aware throttles, per-customer budgets, and a billing pipeline with monitoring, automatic backoff, and emergency overrides. Explain architecture, policies, and tradeoffs for protecting both your users and your bill.
- HardevaluationHow do you detect and measure hallucinations in LLM outputs?
Detect and measure hallucinations in LLM outputs with practical metrics, human checks, and automated signals. This page explains clear procedures, sample calculations, and tradeoffs so you can design an evaluation that separates factual errors from acceptable creativity.
- EasyagentsWhat is the difference between single-agent and multi-agent systems?
Single-agent and multi-agent systems: explain how a single decision maker differs from multiple interacting agents, and why coordination, communication, and scaling matter. Learn the tradeoffs between centralized simplicity and decentralized robustness so you can design the right architecture.
- Mediumvector dbWhat is the difference between sparse and dense embeddings?
Sparse and dense embeddings explained: what each representation is, how they differ in dimensionality, sparsity, indexing, and common use cases. Learn practical tradeoffs for search, storage, and interpretability so you can choose the right embedding type for a vector database problem.
- MediumagentsWhat are the different types of agent memory (short-term, long-term, episodic)?
Agent memory (short-term, long-term, episodic): learn the differences between short-term, episodic, and long-term memory for agents and how to design retrieval, storage, and consolidation. This question focuses on memory roles, tradeoffs, and when to choose each memory type for agent behavior.
- Mediumvector dbWhat is embedding dimensionality, and how does it affect performance and cost?
Embedding dimensionality for vector-db affects similarity quality, search speed, and storage cost. This page explains what embedding dimensionality is, how it changes accuracy and compute, and practical rules for choosing $d$ in vector databases.
- Mediumvector dbHow do embedding models convert text to vectors?
Embedding models convert text to vectors by mapping tokens or passages into fixed-length numerical vectors that capture semantic similarity. This question asks you to explain the pipeline from tokenization to encoder, pooling, normalization, and how similarity is computed, with a concrete toy example. You will also get tradeoffs and common failure modes to discuss in an interview.
- MediumragWhat are embedding models, and how do they convert text to vectors?
Embedding models, convert text to vectors: explain what embedding models are and how they convert text to numeric vectors for semantic search and RAG. Covers tokenization, encoder architectures, training objectives, and a worked cosine similarity example to make the process concrete.
- Mediumvector dbWhat are embeddings in the context of AI engineering?
Embeddings are vector representations used in AI engineering to map text, images, or other data into a continuous vector space for similarity and retrieval in vector-db systems. This question asks you to explain what embeddings are, how they are produced, and how they are used with vector databases for search and downstream tasks.
- MediumllmWhat are embeddings?
What are embeddings? Learn what embeddings are, how embeddings convert words and documents into dense vectors, and why we use them for similarity and retrieval. This page explains intuition, mechanics, a worked cosine similarity example, and common tradeoffs.
- MediumllmopsHow do you estimate the cost of running an AI-powered feature in production?
Estimate the cost of running an AI-powered feature in production by modeling per-request compute, storage, and operational overhead. Learn a practical formula, worked example, and common optimizations to forecast monthly spend and control surprises.
- MediumevaluationHow do you evaluate LLM outputs? What metrics do you use?
LLM outputs evaluation: How do you evaluate LLM outputs? What metrics do you use? This page explains common automatic metrics, embedding and calibration checks, and how to combine them with human evaluation for practical decisions.
- MediumevaluationWhat is evaluation-driven development for AI applications?
Evaluation-driven development for AI applications focuses on iterating models and features based on measurable evaluation metrics and deployment feedback. It asks how you choose metrics, run experiments, and close the loop from evaluation to shipped behavior for reliable AI products.
- Mediumfine tuningWhat is fine-tuning, and when should you fine-tune an LLM?
Fine-tuning, and when to fine-tune an LLM, asks when you should adapt a pretrained model to a new task, domain, or constraint. The question covers definitions, methods like full-parameter and parameter-efficient tuning, the data and cost signals that push toward fine-tuning, and tradeoffs you must weigh before committing to it.
- Mediumfine tuningHow does fine-tuning work?
Fine-tuning: how pretrained models are adapted to new tasks by updating parameters or adding small modules. Learn common strategies, practical hyperparameters, and tradeoffs between full fine-tuning, head-only, and parameter-efficient methods.
- MediumllmopsWhat are guardrails for LLMs, and how do you implement them?
Guardrails for LLMs: what they are and how to implement them. Learn practical guardrail types, an implementation checklist, and tradeoffs to balance safety, usefulness, and latency. Includes a worked example and common interviewer follow ups.
- MediumagentsHow do you handle agent failures and implement error recovery?
Agent failures and error recovery: strategies to detect, contain, and recover agents safely. Learn practical patterns like retries with backoff, checkpointing, idempotency, and failover with tradeoffs for availability and consistency.
- Mediumvector dbHow do you handle embedding drift when the embedding model is updated?
Embedding drift when the embedding model is updated is about what happens to your vector index and retrieval quality after you change the encoder. This question asks how you would migrate or mitigate drift with minimal downtime and cost while preserving search quality. It focuses on operational strategies and technical tradeoffs.
- Hardsystem designHow do you handle failover and fallback strategies for AI systems?
Failover and fallback strategies for AI systems: how to keep ML services available, meet latency and accuracy SLOs, and recover safely when models or infra fail. This question focuses on monitoring, graceful degradation, circuit breakers, retries, and fallback models with clear tradeoffs between cost, accuracy, and user experience.
- MediumragHow do you handle multi-document and multi-hop questions in RAG?
Multi-document multi-hop questions RAG: strategies for retrieving and composing facts across several documents to answer questions that require multiple reasoning steps. Learn practical workflows, a worked example, and tradeoffs for rerankers, hop-by-hop retrieval, and chained generation.
- MediumtransformersHow does attention work in a transformer?
Attention lets each token look up relevant information from every other token using query and key similarity, then return a weighted mix of value vectors. Here is the intuition, a worked numeric example, and what interviewers probe for.
- MediumragWhat is hybrid search, and why is it better than pure vector search?
Hybrid search and vector search: explain what hybrid search is, how it combines vector similarity and lexical matching, and why it often outperforms pure vector search for retrieval-augmented-generation and QA. Learn the scoring tradeoffs and when to tune hybrid weights for precision, recall, and latency.
- MediumragHow does Hybrid Search work?
Hybrid Search explains how we combine vector-based semantic retrieval and lexical search for RAG. This page shows the core mechanics, a numeric worked example, and when to prefer each component for retrieval-augmented generation.
- MediumretrievalWhat is hybrid search and why is it better than pure vector search?
Hybrid search combines keyword (lexical) retrieval with vector (semantic) retrieval so you catch both exact matches and meaning. Here is how the fusion works, why it beats pure vector search, and what interviewers probe for.
- Mediumsystem designHow do you implement caching strategies for LLM applications?
Caching strategies for LLM applications speed up responses and reduce API cost by storing embeddings, partial outputs, or full answers. This question asks how to choose cache tiers, design keys and invalidation, and measure tradeoffs between latency, cost, and freshness.
- HardllmopsHow do you implement content filtering for AI outputs?
Content filtering for AI outputs: implement a reliable pipeline that detects and blocks harmful or disallowed content before it reaches users. Learn practical architectures, metrics, threshold math, and operational steps to balance safety, utility, and latency for llmops production systems.
- Mediumfine tuningWhat is instruction tuning, and why is it important for chat models?
Instruction tuning explains how instruction tuning adapts a pretrained model to follow user instructions and why it matters for chat models, improving helpfulness, safety, and consistent behavior. Learn the basic pipelines, a worked example, tradeoffs, and likely interviewer questions.
- MediumpromptingWhat is jailbreaking in LLMs, and what are common jailbreak techniques?
Jailbreaking in LLMs, common jailbreak techniques and how attackers bypass model guardrails. Learn what jailbreaks look like, typical prompt tricks like role-play and instruction injection, and how defenders trade off safety and utility.
- MediumragWhat are the key components of a RAG pipeline?
RAG pipeline key components: retriever, vector store, encoder, reranker, and generator and how they fit together. Learn what each piece does, a worked similarity example, common tradeoffs and what interviewers expect.
- MediumllmWhat are the key components of the Transformer architecture?
Transformer architecture key components: attention, multi-head attention, positional encoding, feed-forward layers, residual connections, and layer normalization. This question asks you to name and explain each component and how they fit together in encoder and decoder stacks for large language models.
- Hardsystem designWhat are the key considerations for multi-region deployment of AI systems?
Multi-region deployment of AI systems requires balancing latency, consistency, cost, and compliance. Learn the operational, data, and architectural considerations you must weigh when running models across regions.
- MediumllmWhat is a Large Language Model (LLM), and how does it work?
What is a Large Language Model (LLM) and how does it work? Learn core LLM keywords like transformer, self-attention, tokenization, and next-token prediction in plain terms. This page explains components, training, inference, and practical tradeoffs for interview answers.
- MediumevaluationWhat is LLM-as-a-judge evaluation, and what are its limitations?
LLM-as-a-judge evaluation uses a language model to score, rank, or critique outputs from models or people. This page explains how LLM-as-a-judge evaluation works, common protocols, and its main limitations such as bias, calibration, and reproducibility.
- MediumllmopsHow do LLM guardrails work?
How do LLM guardrails work? This page explains how LLM guardrails operate at design time and runtime, covering classifiers, prompts, tooling, and orchestration. You will get a concise technical picture of patterns, a worked example with simple math, and the common tradeoffs.
- MediumllmopsWhat is LLM observability?
LLM observability explains how to instrument and monitor an LLM pipeline to detect drift, failures, and performance regressions. Learn core signals, a simple drift detector example, and practical tradeoffs for production monitoring.
- MediumllmopsWhat is LLMOps, and how does it differ from traditional MLOps?
LLMOps explains how to operate large language models in production, focusing on prompts, token costs, streaming, and runtime orchestration. This question asks you to define LLMOps and contrast it with traditional MLOps across infrastructure, monitoring, and lifecycle practices.
- Mediumfine tuningWhat is LoRA (Low-Rank Adaptation), and how does it work?
LoRA (Low-Rank Adaptation) explains a parameter-efficient fine-tuning method that adds small low-rank update matrices to frozen model layers. The description shows how LoRA represents updates as a product of two small matrices, how that reduces stored parameters and GPU memory, and the tradeoffs when choosing the rank.
- MediumagentsWhat is Model Context Protocol (MCP), and how does it standardize tool integration?
Model Context Protocol (MCP) defines a standardized contract for model, agent, and tool interactions so tools can be discovered, invoked, and returned results in a predictable way. It explains how to package context, declare capabilities, and handle responses so tool integration is reusable across agents and models.
- MediuminferenceWhat is model quantization and how does it reduce LLM cost?
Quantization stores model weights and activations in fewer bits, which shrinks memory and speeds up inference at some accuracy cost. Here is how it works, the main schemes, and what interviewers probe for.
- HardllmopsHow do you monitor LLM applications in production?
Monitor LLM applications in production by tracking latency, quality, cost, and safety metrics to keep models reliable and safe. This question focuses on practical observability patterns, alerting, and instrumentation you would implement for a live LLM system.
- HardllmopsHow do you optimize LLM inference costs in production?
Optimize LLM inference costs in production by combining model choice, serving patterns, and engineering controls to reduce spend while meeting latency and quality SLOs. This question focuses on practical levers like model selection, batching, quantization, caching, and routing and how to measure tradeoffs.
- MediumpromptingHow do you optimize prompts for cost and latency?
How do you optimize prompts for cost and latency? This question focuses on prompt engineering techniques to reduce token usage, model selection, and round trips so you save money and improve response time. You will explain tradeoffs between brevity, model capability, and orchestration choices.
- MediumagentsWhat is the Plan-and-Execute agent pattern?
Plan-and-Execute agent pattern splits an agent into a planner that generates a high-level plan and an executor that performs and monitors steps. It clarifies error handling, enables targeted replanning, and balances deliberation with responsiveness for multi-step tasks.
- MediumllmWhat is positional encoding, and why is it needed in Transformers?
Positional encoding and Transformers: explain how Transformers represent token order and why that order information is needed. Learn the difference between sinusoidal, learned, and relative encodings and practical tradeoffs for language models.
- Mediumfine tuningExplain Prefix Tuning and Prompt Tuning. How are they different from LoRA?
Prefix Tuning and Prompt Tuning focus on parameter-efficient fine-tuning by adding tunable virtual tokens to a frozen model. This question asks how those methods work, how they compare to LoRA, and when you would pick each approach.
- Mediumfine tuningHow do you prepare a dataset for fine-tuning an LLM?
Prepare a dataset for fine-tuning an LLM: practical steps to clean, format, and split training data for instruction, classification, or generation tasks. Learn how to choose file formats, remove leakage and duplicates, compute token budgets, and set validation checks so fine-tuning is effective and safe.
- MediumllmopsHow does Prompt Caching work?
How does Prompt Caching work? Learn how prompt caching reduces repeated LLM calls by reusing prior outputs for identical or equivalent prompts, and what tradeoffs to manage around freshness, keying, and privacy. This covers practical strategies, a worked example, and common failure modes.
- MediumpromptingWhat is prompt engineering, and why is it critical for AI applications?
Prompt engineering explains prompt engineering and why it matters for AI applications, focusing on how wording, context, and examples shape model outputs. Learn the practical tradeoffs between clarity, cost, and robustness when designing prompts for large language models.
- MediumpromptingWhat is prompt injection, and how do you defend against it?
Prompt injection is when an attacker crafts input that causes a language model to ignore intended instructions and do something dangerous or unintended. This question asks you to define prompt injection, show how it happens, and explain concrete defenses and system patterns to reduce risk.
- Hardfine tuningWhat is QLoRA, and how does it enable fine-tuning on consumer hardware?
QLoRA enables fine-tuning large language models on consumer hardware by combining 4-bit quantization with low rank adapters and memory efficient optimizers. QLoRA reduces the memory footprint by quantizing model weights to 4 bits while keeping low rank parameter updates in higher precision so you can fine-tune models on a single GPU.
- EasyllmExplain the Query(Q), Key(K), and Value(V) in attention.
Query, Key, and Value in attention explain how a transformer decides what to focus on by scoring queries against keys and using those scores to mix values. This question covers the math, a small numerical example, intuitive analogies, and common interviewer follow ups so you can answer clearly and concisely.
- MediumretrievalWhen should you use RAG instead of fine-tuning?
RAG retrieves fresh knowledge at query time, while fine-tuning bakes behavior into the weights. Here is a clear framework for when to use each, with tradeoffs and what interviewers probe for.
- MediumagentsExplain the ReAct (Reasoning + Acting) agent architecture.
Explain the ReAct (Reasoning + Acting) agent architecture and how it interleaves explicit reasoning traces with actions. Learn the pattern of Thought, Action, Observation and when to apply ReAct for tool-enabled multi-step tasks.
- HardevaluationWhat is red teaming, and how do you red team an LLM application?
Red teaming LLM application: what red teaming is and how to red team an LLM application, including probe design, metrics, and mitigation steps for jailbreaks, data exfiltration, and hallucination risks. Practical process, example probes, and tradeoffs for building realistic adversarial evaluations and improving model safety.
- MediumragHow does a Reranker work?
Reranker: how does a reranker work in a RAG pipeline and why do we add a second-stage model? This page explains reranker roles, scoring, and a concrete worked example showing how reranking changes final selection. It also covers when to use a reranker and common tradeoffs.
- MediumragWhat is Retrieval-Augmented Generation (RAG), and why is it important?
Retrieval-Augmented Generation (RAG) explains how retrieval plus an LLM produce grounded answers. This page defines RAG, shows the retrieval and generation steps, and gives a worked example and interviewer-ready talking points.
- Mediumfine tuningWhat is RLHF (Reinforcement Learning from Human Feedback), and how is it used to align LLMs?
RLHF (Reinforcement Learning from Human Feedback) explains how we fine-tune LLMs by turning human judgments into a reward signal and optimizing the model policy to match human preferences. This question covers the RLHF pipeline, math of the objective, practical recipe, and common failure modes when aligning LLMs.
- MediumllmWhat is self-attention, and how does it work in Transformers?
Self-attention, Transformers explain what self-attention is and how it works in Transformers in clear steps and a concrete worked example. We cover queries, keys, values, scaled dot product attention, multihead attention, complexity and common failure modes.
- HardllmopsHow do you serve LLMs in production?
How do you serve LLMs in production? This question asks how to design reliable, low-latency, and cost-effective LLM serving pipelines including batching, hardware choices, caching, and autoscaling. Expect systems tradeoffs between throughput, latency, and cost when moving an LLM into production.
- MediumpromptingHow do you structure prompts for consistent structured output (JSON, XML)?
Structure prompts for consistent structured output (JSON, XML) by specifying schemas, examples, and validators. Learn explicit instructions, canonical examples, and validation loops to get reliable machine-readable output for APIs and downstream code.
- MediumpromptingWhat is a system prompt, and how does it influence model behavior?
System prompt: what it is and how it influences model behavior, including role, persistence, and examples. Learn how the system prompt sets global priorities and interacts with user prompts to shape tone, constraints, and factual framing.
- EasyllmWhat is tokenization in LLMs?
What is tokenization in LLMs explains how raw text is converted into tokens that a language model processes. This question covers types of tokenization, practical examples, and tradeoffs between vocabulary size, token length, and handling rare text.
- MediumagentsWhat is tool use (function calling) in LLMs, and how does it enable agents?
Tool use (function calling) in LLMs explains how models call external functions and APIs to extend capabilities, and how that mechanism enables agents to act, fetch, and compute reliably. This question covers the mechanics, a concrete example, design patterns, and common tradeoffs when you build tool-enabled agents.
- HardllmWhat is the Transformer architecture and how does it work?
Transformer architecture is the neural-network design built around self-attention, multihead attention, residual connections, and feed-forward blocks used in LLMs. Explain how attention computes context, how layers stack, and why scaling, positional encoding, and complexity matter for model behavior and performance.
- HardpromptingWhat is tree-of-thought prompting?
Tree-of-thought prompting explains a search-based prompting method that expands reasoning into a branching tree of partial solutions. It shows how we ask a model to propose branches, evaluate them, and backtrack so it can solve multi-step logical, mathematical, or planning problems more reliably than a single chain-of-thought.
- Mediumvector dbWhat is a vector database, and how does it differ from a traditional database?
What is a vector database, and how does it differ from a traditional database? This question compares vector databases for similarity search with row/column stores, showing key differences in indexing, query patterns, and when to use each. Learn the practical tradeoffs for retrieval accuracy, latency, and storage.
- Mediumvector dbHow does a Vector Database work?
How does a Vector Database work? A vector database stores and indexes high dimensional embeddings to enable fast similarity search over vectors. This page explains embeddings, indexing strategies, distance metrics, and practical tradeoffs for speed, recall, and storage.
- MediumllmWhy do we scale the dot product attention by √dₖ in the Transformer architecture?
Scale the dot product attention by √dₖ in the Transformer architecture explains why Transformer attention divides the query key dot product by the square root of the key dimension $\sqrt{d_k}$. This keeps logits at a stable scale so softmax gradients behave and training is stable across different head sizes. Learn the variance argument, a worked numeric example, and practical implications for multi head design and initialization.
- MediumllmExplain WordPiece and SentencePiece.
WordPiece and SentencePiece explained: how subword tokenizers build vocabularies, split words, and affect LLM inputs. Learn the core algorithms, key differences, and practical tradeoffs for training and inference.
- MediumpromptingExplain zero-shot, one-shot, and few-shot prompting with examples.
Zero-shot, one-shot, and few-shot prompting explained with clear examples and when to use each. Learn the difference between asking the model directly, giving a single example, and providing a small set of examples so you can pick the right prompting pattern.
- Mediumvector dbHow do you choose the right embedding model for your use case?
Choose the right embedding model for your vector-db use case by matching model capacity, embedding dimension, cost, and latency to your task. This page explains practical criteria, a worked storage and quality example, and a checklist to pick the best embedding model for retrieval and similarity search.
- Mediumfine tuningExplain the difference between full fine-tuning and parameter-efficient fine-tuning (PEFT).
Full fine-tuning and parameter-efficient fine-tuning (PEFT) compare two ways to adapt pretrained models to new tasks. This page explains the practical differences, common PEFT methods, and when to prefer full tuning versus PEFT. You will get a concrete example and tradeoffs to discuss in an interview.
- MediumllmWhat are foundation models, and how have they changed AI engineering?
Foundation models are large pretrained models such as large language models that serve as a reusable base for many tasks. This question asks what foundation models are and how they changed AI engineering, covering adaptation methods, deployment patterns, and the operational tradeoffs you will explain in an interview.
- MediumevaluationWhat is G-Eval, and how does it use LLMs for evaluation?
G-Eval, LLMs for evaluation describe a model-based evaluation approach that uses large language models to score and critique model outputs. This question asks what G-Eval is, how it uses prompts, criteria, and aggregation to produce automatic judgments, and when it works well or fails. You'll explain mechanics, a worked example, and practical tradeoffs.
- MediumllmInside ChatGPT: What Happens After You Hit Enter?
Inside ChatGPT: What Happens After You Hit Enter? This question walks through the inference pipeline inside ChatGPT after you submit a message, covering tokenization, transformer inference, decoding, and post-processing. You will explain the stages, costs, and common tradeoffs so you can answer clearly in an interview.
- MediumragWhat is re-ranking, and how does it improve RAG retrieval quality?
Re-ranking and RAG retrieval quality: explain what re-ranking is, why it is used in retrieval-augmented generation, and how combining cheap retrievers with expensive re-rankers improves final answers. Practical examples, a scoring formula, and tradeoffs are included to help you answer interview questions clearly.
- MediumpromptingWhat is ReAct (Reasoning + Acting) prompting, and how does it work?
ReAct (Reasoning + Acting) prompting explains how to interleave explicit chain-of-thought style reasoning with external actions like tool calls or searches. This page shows how ReAct works, a concrete step example, tradeoffs, and common interviewer questions.
- MediumpromptingExplain self-consistency prompting and how it improves reasoning.
Self-consistency prompting explains how sampling multiple chain-of-thought answers and aggregating them improves reasoning and robustness. Learn what self-consistency is, why multiple sampled rationales help, and when to use it in prompts.