大模型 · Agent 学习站

English-language LLM / AI Agent interview questions (collected)

采集说明:题目均为英文原文(保留原始措辞),未做改写。What they're probing 为中文标注,说明该题在考察什么。 主要来源:面试题库站(Interview Coder 分主题题库;MeetAssist 为真实面试转写统计,每题带「Asked in N of M interviews」频次)、面试场景复盘(InterviewStack)、公司级 loop 拆解(OpenAI 流程)。 限制说明:GitHub 域名在本环境不可达,alexeygrigorev/ai-engineering-field-guide、AdilShamim8/AI-Engineering、frontierloop 三处仅能读取搜索引擎返回的摘要片段,相关条目均在来源处注明,未做任何推测性补全。

By topic

A. LLM fundamentals & inference

  • Explain self-attention and write its formula.|考察能否不看书推导 softmax(QKᵀ/√d_k)V,并解释 √d_k 的作用|Source: Interview Coder — LLM Engineer
  • What is GQA, and why did models move to it?|能把架构选择和服务端约束挂钩(长上下文/大 batch 下 KV cache 才是瓶颈)|Source: Interview Coder — LLM Engineer
  • Explain RoPE and why it beats learned positional embeddings.|位置编码不止"加个向量",还涉及相对位置、长度外推(NTK/YaRN)|Source: Interview Coder — LLM Engineer
  • Why is attention O(n²), and what breaks because of it?|长上下文服务的成本上限从哪来,以及 FlashAttention 在绕开什么|Source: Interview Coder — LLM Engineer
  • How does tokenization affect cost and behavior?|是否做过真实 unit economics(同一内容泰语/韩语/代码可能贵 3–5 倍)|Source: Interview Coder — LLM Engineer
  • Walk me through one decode step end to end.|能否完整追踪一次前向:embedding → block → unembedding → 采样 → 追加 KV,这题是后面所有推理题的地基|Source: Interview Coder — LLM Engineer
  • What is the KV cache, and how do you compute its size?|面试官要看白板上算出 GB 级显存:2 × layers × kv_heads × head_dim × seq × batch × bytes|Source: Interview Coder — LLM Engineer
  • Prefill vs decode, and why the distinction matters.|两阶段瓶颈相反(compute-bound vs bandwidth-bound),调度策略因此不同|Source: Interview Coder — LLM Engineer
  • Compare quantization methods: GPTQ, AWQ, INT8, INT4, FP8.|不能只说"我们做了量化",要能给精度保持数字(INT8≈99%、INT4≈95–99%、FP8 近无损)|Source: Interview Coder — LLM Engineer
  • Explain PagedAttention and what vLLM solves.|是否理解 vLLM 真正解决的是 KV cache 碎片化,而不是 FLOPs|Source: Interview Coder — LLM Engineer
  • What is speculative decoding, and what speedup does it give?|无损加速的机制与 2–3× 上限,以及它取决于 draft 接受率|Source: Interview Coder — LLM Engineer
  • What does FlashAttention do, and why does FlashAttention-3 matter?|tiling / SRAM / 不落地 n×n 矩阵,是长上下文训练与服务可行的前提|Source: Interview Coder — LLM Engineer
  • How does MoE routing affect inference?|MoE 省算力但不省显存,路由不均会导致 GPU 负载失衡|Source: Interview Coder — LLM Engineer
  • Your decode is memory-bandwidth-bound. What do you do?|能否把瓶颈映射到正确的一组手段(量化 / GQA / 加大 batch / 投机解码)|Source: Interview Coder — LLM Engineer
  • What does continuous batching actually do, and what did we have before it?|是否知道这是单点收益最高的服务端优化,及 static batching 的缺陷|Source: MeetAssist — LLM Inference Optimization
  • What happens to the KV cache of the previous user when a new user starts?|前缀复用 / 淘汰 / 隔离,考察是否真跑过多租户推理|Source: MeetAssist — LLM Inference Optimization
  • What implications does it have if you suddenly have two racks in your data center, one doing prefill and one doing decode? What problems might you run into?|PD 分离后的跨机 KV 传输、带宽与尾延迟问题|Source: MeetAssist — LLM Inference Optimization

B. RAG & retrieval

  • How would you build a RAG pipeline?|该站统计中最高频题(22/258 场);七成答案漏掉"检索到的段落必须被放进 prompt"这一步|Source: MeetAssist — AI Engineer
  • How would you choose a chunking strategy and chunk size for a RAG system?|10/258 场;考的是"没有唯一最优 size,要用真实问题测"的实验意识|Source: MeetAssist — AI Engineer
  • Pinecone vs Weaviate vs Chroma vs pgvector. Walk me through the tradeoffs.|要给出真实推荐而非功能清单,含 lock-in 与运维成本|Source: Interview Coder — RAG
  • What is HNSW, and why is it the standard index for ANN search?|图索引 vs 树索引,以及为何在多数负载下优于 IVF|Source: Interview Coder — RAG
  • Explain hybrid search. Why combine BM25 with dense vectors?|纯向量检索在 SKU、错误码、条款编号上会失效|Source: Interview Coder — RAG
  • What is reciprocal rank fusion, and how does it work?|要能写出 1/(k+rank)、k≈60,并解释为何不能直接相加分数|Source: Interview Coder — RAG
  • How does reranking improve RAG, and what reranker would you pick?|cross-encoder vs bi-encoder 的区别必须脱口而出;recall 与 precision 两阶段分工|Source: Interview Coder — RAG
  • What is query rewriting, and when is it worth the latency?|HyDE / multi-query / decomposition 三种模式的取舍|Source: Interview Coder — RAG
  • Why does a 200K-token long context window not eliminate the need for RAG?|考察成本、延迟、lost-in-the-middle、引用需求四个方面|Source: MeetAssist — Generative AI & LLM
  • What is agentic RAG, and when is it worth the complexity?|只有多跳问题才值得,简单查询应路由回标准 RAG|Source: Interview Coder — RAG
  • What is GraphRAG, and what does it solve that vector RAG cannot?|多跳关系型问题;代价是约 10× 的 ingest 成本|Source: Interview Coder — RAG
  • Top three failure modes of a RAG pipeline?|「检索错块 / 块对但模型忽略 / 查询超出索引分布」三分法|Source: Interview Coder — AI Engineer
  • How do you handle citations and avoid the model fabricating sources?|把"引用幻觉"当成一类 bug 来防,而不是 LLM 无解怪癖|Source: Interview Coder — AI Engineer

C. Agents, tool use, function calling

  • Walk me through ReAct. Why does it work?|要讲清"observation 把下一步 grounding 在真实数据上",以及每轮循环的 token 成本|Source: Interview Coder — Agentic AI
  • Plan-and-execute vs ReAct. When do you pick which?|根据任务结构选架构,而不是个人偏好|Source: Interview Coder — Agentic AI
  • What's reflection in an agent loop?|只有真做过的人才知道 reflection 大约让成本翻倍|Source: Interview Coder — Agentic AI
  • Autonomous vs assisted agents. Where's the line?|按 blast radius 划线:花钱、外发、写生产库必须 human-gate|Source: Interview Coder — Agentic AI
  • Why do agents loop forever, and how do you stop it?|三种死循环成因 + 步数上限 / 预算上限 / 重复状态检测|Source: Interview Coder — Agentic AI
  • How would you build an AI agent, and where would frameworks like LangGraph or MCP fit?|真实面试最高频(12/284 场);核心是"编排"与"工具接入"是两件事|Source: MeetAssist — Agentic AI
  • LangGraph vs CrewAI vs AutoGen vs custom. How do you choose?|框架题是陷阱:要讲权衡(state graph vs message bus、durable vs in-memory checkpoint),不能靠点名|Source: Interview Coder — Agentic AI
  • When would you use a fixed workflow, a single agent, or a multi-agent system?|考察"最小够用自主性"的克制|Source: MeetAssist — Agentic AI
  • How do you design a tool schema the model will call correctly?|参数命名、描述里放示例、严格类型、enum、schema 别太长|Source: Interview Coder — Agentic AI
  • The model calls a tool and gets an error. What do you feed back?|错误反馈的形状决定下一轮能否自愈;别塞 stack trace,也别吞掉返回成功|Source: Interview Coder — Agentic AI
  • The model is making up tool names. Why?|按"工具没传 / 提示词承诺了不存在的能力 / 模型对该 schema 弱"顺序系统排查|Source: Interview Coder — Agentic AI
  • What is the Model Context Protocol (MCP), and how is it used in software development?|2026 高频(52/284 场涉及 tool calling/MCP);client-server、tools/resources/prompts 三件套|Source: MeetAssist — Agentic AI
  • What is the difference between MCP and function calling? Are they competing or complementary?|能否区分"模型发起调用"与"工具连接协议"|Source: MeetAssist — Agentic AI
  • How would you design an MCP server, and what components would it include?|含 stdio vs Streamable HTTP、鉴权、输入校验(真实有 1 场要求用 TypeScript 现场写 MCP server)|Source: MeetAssist — Agentic AI
  • What happens when an agent reads an email containing hidden instructions?|间接 prompt injection;"外部内容是数据,不是授权指令"(5/440 场)|Source: MeetAssist — Generative AI & LLM
  • Where should guardrails live—in the prompt, the model, or the platform—and how would you test that they actually work?|权限必须在模型之外强制执行,prompt 不是安全控制(6/440 场)|Source: MeetAssist — Generative AI & LLM
  • When agents are in production, how do you decide what is reliable enough to give them autonomy?|"自主权要靠证据赚来":先低风险可逆动作,按生产指标逐级放开(6/440 场)|Source: MeetAssist — Generative AI & LLM

D. Fine-tuning & training

E. Production: eval, observability, cost & latency

  • How do you build a golden set?|把 eval 当版本化工程资产管理,每个 bug 都变成一条测试用例|Source: Interview Coder — LLM Engineer
  • Explain LLM-as-judge and its failure modes.|position bias / verbosity bias / self-preference / rubric drift,以及如何校准|Source: Interview Coder — LLM Engineer
  • How do you measure faithfulness and groundedness in RAG?|把答案拆成原子 claim 逐条核验,把幻觉从"眼估"变成"可量化"|Source: Interview Coder — LLM Engineer
  • How do you catch regressions before they hit production?|eval 是否作为 deploy-blocking 信号接进 CI,而非季度报告|Source: Interview Coder — LLM Engineer
  • How do you evaluate an agent vs a single-LLM app?|评测对象从 output 变成 trajectory(调了哪些工具、顺序、中间步骤对不对)|Source: Interview Coder — Agentic AI
  • What's a golden trajectory?|参考轨迹 + 步级匹配,是唯一可靠回归信号;能抓住"答案对但过程错"的 agent|Source: Interview Coder — Agentic AI
  • How do you track cost per task?|是否真的背过 cost line item:按 run_id 聚合,看 p50/p95 与「每次成功任务成本」(失败也烧钱)|Source: Interview Coder — Agentic AI
  • Agent passes eval in dev but fails in prod. Where do you look?|分布漂移 → 工具可靠性 → 模型被静默升级 → 长尾 prompt|Source: Interview Coder — Agentic AI
  • How would you design an evaluation and observability framework for this assistant so the team can measure quality, catch regressions, and debug failures in production?|完整 30 分钟场景题:多租户 RAG 助手、每天百万级请求、现有仪表盘只有延迟和错误率|Source: InterviewStack — LLM Eval interview walkthrough
  • Suppose a new model has better average helpfulness but slightly worse hallucination rate on policy questions. How would you make the rollout decision?|考察能否抵抗"用一个聚合均值做上线决策",改为按风险分层设独立门禁|Source: InterviewStack — LLM Eval interview walkthrough
  • If human labeling capacity is very limited, how would you use model-graded or automated evaluation without overtrusting it?|judge 必须先用人工标签校准,量出一致率后再外推到全量流量|Source: InterviewStack — LLM Eval interview walkthrough
  • What would you log and trace for each request so that support engineers and ML engineers can investigate failures efficiently while respecting privacy constraints?|请求级 tracing 字段清单 + 脱敏/哈希,既要可查又要合规|Source: InterviewStack — LLM Eval interview walkthrough
  • Suppose Goodhart's law takes effect and agents start optimizing for rubric artifacts, such as formatting and verbosity, without real task success. How would you redesign the rubric and success criteria to resist gaming?|对"刷指标"的反脆弱设计,senior 区分度很高的一题|Source: MeetAssist — LLM Evaluation
  • Compute cost per million tokens for self-hosted serving.|现场算数:GPU 时价 ÷ 吞吐 → 每百万 token 成本,再与 API 价比决定 build vs buy|Source: Interview Coder — LLM Engineer
  • Your p95 latency is 4 seconds and target is 1 second. What do you change?|先流式把 TTFT 压到 200–400ms,再拆预算表打最大那块|Source: Interview Coder — AI Engineer
  • How would you contain costs when an agent goes off the rails?|五层防护:步数上限、token 预算、金额预算、重复状态检测、工具熔断 + p95 成本告警|Source: Interview Coder — Agentic AI

F. System design scenarios

  • Design a research agent that handles 10k requests per day.|队列 + worker、每 worker 预算上限、容量数学(约 3.5 并发、$1000/天模型成本)|Source: Interview Coder — Agentic AI
  • Design a multi-tenant RAG system for 10,000 enterprise customers.|隔离 vs 成本的显式取舍:独立索引 / 共享索引 + tenant 过滤 / 高价值客户独立索引|Source: Interview Coder — RAG
  • Walk me through a latency budget for a 2-second RAG response.|逐项拆 50–800ms,并说明哪一步可以并行、哪一步可以跳过 rerank|Source: Interview Coder — RAG
  • Design an inference serving system for GPT-class models with strict latency budgets.|OpenAI onsite 被公开报告过的 system design 题|Source: Interview Coder — OpenAI interview process
  • Design an evaluation pipeline that runs against 100k prompts nightly.|批量 eval 的调度、成本与结果存储|Source: Interview Coder — OpenAI interview process
  • Design a multi-agent coordination layer with retry and failure handling.|幂等键、重试、部分副作用;本质是分布式系统题|Source: Interview Coder — OpenAI interview process
  • Design a customer support agent.|分诊路由:文档可答走 RAG,需动作走 agent,N 次失败或低置信转人工|Source: Interview Coder — AI Engineer
  • How would you design an LLM inference platform, and what happens between receiving a request and returning tokens?|端到端请求生命周期,并点名 GPU 在哪一环节成为瓶颈|Source: MeetAssist — LLM Inference Optimization
  • If a customer needs a RAG system for about 1,000–2,000 users, with 100 concurrent users, how would you determine the LLM's tokens-per-minute configuration?|容量规划:并发 × 每请求 token × 时长 → TPM,再反推配额|Source: MeetAssist — LLM Inference Optimization
  • The team is self-hosting an open-weight model and experiencing unacceptable time to first token and throughput bottlenecks during traffic spikes. What inference optimization strategies would you suggest?|真实故障场景:TTFT 与吞吐同时告警时先动哪一层|Source: MeetAssist — LLM Inference Optimization

G. Behavioral / project deep-dive

  • Can you explain your agent design choices?|69% 标为 senior;要能讲一个完整用例的设计,而不只是点名框架|Source: MeetAssist — Agentic AI
  • Tell me about a project you owned end to end.|ownership 与可量化结果;"做了个东西"会被直接筛掉|Source: Interview Coder — OpenAI interview process
  • Tell me about a time you disagreed with a senior engineer.|需要具体情境、你的推理、结果;"我们达成了共识"算空答|Source: Interview Coder — OpenAI interview process
  • Why OpenAI over Anthropic, DeepMind, xAI, Meta FAIR?|"为什么是这家"从 recruiter 关就开始计分,泛泛而谈是红旗|Source: Interview Coder — OpenAI interview process
  • How would you handle being asked to ship something you thought was unsafe?|values/safety 轮常是真正的 gating 关|Source: Interview Coder — OpenAI interview process
  • What would you say to someone who thinks OpenAI's mission is contradictory?|能否在压力下守住一个自洽且可辩护的立场|Source: Interview Coder — OpenAI interview process
  • Tell me about a work task where an AI tool produced useful output end to end. What input did you provide, and how did you validate and use the output?|验证环节(逐条核对来源)比"用了什么工具"更重要|Source: MeetAssist — Generative AI & LLM
  • Can you share a specific example from your AI evaluation work where you found a significant issue or inconsistency? How did you pinpoint it, and what impact did it have on the broader project?|eval 岗行为题:从发现问题到落地修复的闭环,要求具体案例而非方法论|Source: MeetAssist — LLM Evaluation

Interview process observations (US/EU, 2025-2026)

Rounds(轮次结构)

  • AI 岗位典型 loop 为 3–6 轮、2–6 周:recruiter screen → 技术 phone screen → system design(AI 味道很重)→ 模型观点轮 → values/mission 轮;startup 更快更偏实操,big tech 与 lab 更慢更严 (alexeygrigorev field guide,摘要)。
  • 前沿 lab 的 5 个阶段高度同构:recruiter screen、practical coding、domain-specific system design、ML/model-opinion、mission-and-values。名字不同,形状重复 (Interview Coder)。
  • OpenAI 具体为 6 阶段:recruiter(30min) → phone screen(60min) → 48 小时付费 take-home(约 $1k)→ onsite 3–4 轮 → behavioral/mission 2–3 轮 → offer,全程 4–8 周 (Interview Coder)。
  • Anthropic 一侧:先过 CodeSignal(公开报告称需 520+/600),随后 safety-focused behavioral 轮淘汰的技术合格者比其他任何环节都多 (frontierloop,摘要)。
  • coding 轮不是纯 LeetCode:解析真实日志/JSONL、写小型基础设施(token-bucket rate limiter、LRU cache、streaming handler、retry-with-backoff)、按 spec 写 tiny tokenizer 或 sampling loop。 2026 新形态是 agent-driving round——给你一个 coding agent 和非平凡任务,评分看你如何拆解、下指令、审阅并纠正它 (Interview Coder)。
  • system design 不再问"设计 URL shortener",而是 inference serving、KV-cache、GPU batching、multi-tenant serving、cost-per-token; 评分要具体数字:QPS 预算、cache 命中率要求、miss 时怎么办。含糊会被判 junior (Interview Coder)。
  • 被低估的一轮是 debugging round:丢进近似真实的代码库、限时 45 分钟修 bug,看你怎么读日志、git blame、做假设驱动排查(只盯着代码猜的人在这里挂)(Interview Coder)。

Take-homes(作业 / 工作试用)

  • 付费 work trial 正在替代部分 onsite:48 小时、按约 $1k 付费,因为公司要 production-quality 产出而不是面试表演;多份 Glassdoor 复核把它列为"决定能否进 onsite"的一轮 (Interview Coder)。
  • 按团队分化的作业形态:applied engineering 做小型 eval harness 或 LLM API 功能;infrastructure 优化训练/推理管线或修 perf bug;research engineering 复现论文或扩展 baseline;product 交付含前后端的可用原型 (Interview Coder)。
  • 评分四件套:shipping speed(能否 scope down 但交付完整)、code quality(tests / type hints / 结构,按真实 PR 读)、README + decision log、eval discipline(涉及 LLM 就必须真的量化质量)(Interview Coder)。
  • 最稳的交付顺序:一页设计文档 → 端到端最小可运行切片 → 边界情形 → 测试 → README → 显式声明 scope 边界。 真实案例:两人做同一个 48 小时 batching service,代码更漂亮的那位落选,评审只写了一句 "I'd merge this" 给了另一位 (Interview Coder)。
  • 作业题原文示例(以下 prompt 来自搜索摘要,仓库本身不可达):
    • "Build a RAG system that answers questions about a set of medical research papers. Include citations, handle out-of-domain questions gracefully, and implement at least one evaluation metric." (AdilShamim8/AI-Engineering)
    • "Build a research agent that can search the web, read papers, and synthesize findings into a report. The agent should handle tool failures gracefully and know when to stop…"(同上)
    • "Build an agent that can [task requiring multiple steps and tool use]. The agent should plan, execute, and verify its work." —— 该类 "agent system" 作业占 28% (AdilShamim8/AI-Engineering)
    • 文档类作业的硬性要求:ingest 要作为独立可测模块(connector → parse → clean → chunk → embed → index)并带 CLI 入口;答案不可得时必须明确输出 "I don't have that information" (alexeygrigorev field guide,摘要)。

What gets candidates rejected(常见淘汰原因)

  • 能背 attention 公式却算不出 KV cache 显存;能说"量化"却比不了 INT4 与 FP8 的精度;从没算过 cost-per-million-token——这三条是最典型的丢 offer 原因 (Interview Coder)。
  • eval 轮是"筛掉 senior 的轮次":讲不出 golden trajectory、步级准确率、cost-per-task 预算,即使 coding 干净也会被过滤 (Interview Coder)。
  • 框架题点名不权衡("因为我用过 LangGraph")几乎必扣分;能讲清 state graph vs message bus、durable vs in-memory checkpoint 才加分 (Interview Coder)。
  • values/mission 轮:给"安全实验室想听的话"会被读成表演;完全不谈安全则直接出局。最优解是有据可依的观点 + 一处有理有据的异议 (Interview Coder)。
  • RAG 题最基础的失分点:讲完检索就结束,忘了"检索结果必须被塞进 prompt"(10 份被复审答案里有 6 份犯此错)(MeetAssist — AI Engineer)。
  • 反复出现的"单数字陷阱":用一个人均 helpfulness 分做上线决策、把 LLM judge 当 ground truth、无限期裸存用户 query 与回复——在 eval 场景题里会一分一分被扣 (InterviewStack)。
  • 流程侧的两个硬信号:take-home 提交后 2 周仍沉默基本等于拒;onsite 后 5 个工作日内无消息通常也是拒 (Interview Coder)。
  • 多日 take-home 后不给任何反馈即拒("rejection without feedback"),是候选人 2025–2026 报告中反复抱怨的模式 (alexeygrigorev field guide,摘要)。