面试题库
共 328 题,当前筛选 2 题。
课程全部30 天从前端工程师到 Agent 工程师5 天提示词工程零基础Claude 高效使用:从对话到 Claude CodeCodex 与 OpenAI Agents SDK 高效使用7 天 MCP:把工具接进任何 Agent7 天 Agent Skills:把经验做成可复用能力5 天上下文工程14 天 RAG:从检索到可信回答14 天用 Agent 搭一条 AI 短剧生产线
标签
全部#pipeline-design2#evaluation13#cost11#reliability11#agent-skills7#security6#idempotency5#streaming5#system-design5#prompt-injection4#architecture3#observability3
还有 126 个标签收起标签
#agent-loop2#api-design2#chunking2#cost-tradeoff2#debugging2#distributed-systems2#error-handling2#hybrid-search2#llm-as-judge2#multi-agent2#multi-hop2#oauth2#operations2#prompt-caching2#rag2#recall2#retrospective2#retry2#scheduling2#sse2#tool-permissions2#trade-offs2#access-control1#agentic-rag1#agents-sdk1#analytics1#architecture-review1#behavioral1#budget-control1#caching1#cancellation1#checkpointing1#circuit-breaker1#citation-verification1#client1#client-integration1#coding-agent1#compaction1#compliance1#concurrency1#confused-deputy1#context-engineering1#contextual-retrieval1#copyright1#correctness1#cost-control1#customer-support1#data-quality1#database1#deployment1#distribution1#embedding-migration1#error-propagation1#escalation1#evidence1#faithfulness1#fallback1#feedback-loop1#fencing-token1#filter-pushdown1#filtering1#framework-design1#graph-rag1#guardrails1#handoff1#image-generation1#integration1#iterative-scan1#json-parsing1#labeling1#latency1#latency-budget1#least-privilege1#long-context1#long-session1#long-term-memory1#mcp1#message-bus1#methodology1#model-migration1#multi-tenancy1#notifications1#ocr1#offline-testing1#project-storytelling1#protocol-versions1#quality1#query-rewriting1#rate-limiting1#reconnect1#refusal1#replay1#reproducibility1#rerank1#resume1#retrieval1#risk-assessment1#rollout1#routing1#runtime1#safety1#scaling1#self-introduction1#split-brain1#state-management1#state-persistence1#statelessness1#stdio-transport1#storytelling1#subagent1#subagents1#subscriptions1#test-strategy1#thresholds1#timezone1#token-accounting1#tool-design1#tool-schema1#tools1#trust-boundary1#ux1#verification1#versioning1#workflow-design1#workflow-engine1#zero-downtime1
14 天用 Agent 搭一条 AI 短剧生产线
D6 剪辑台:用 ffmpeg 把素材合成一集竖屏成片
如果让大模型直接生成 ffmpeg 命令来合成视频,会有什么风险?你会怎么改造这个设计?What are the risks of letting an LLM generate ffmpeg command lines directly, and how would you redesign it?
国内高频海外高频深入#prompt-injection#pipeline-design#reproducibility分析过程 · 先想清楚再作答
- 这题考的是「Agent 到底能不能碰真实执行」这条边界,区分度在于你会不会主动说出安全之外的两条。只答「有注入风险」是及格线,答不出可复现与可调试就说明没在生产里跑过生成式流水线。
- 推导链很短:模型的输出是不可信输入 → 不可信输入进 shell 就是命令注入 → 而且模型输出天然不确定 → 不确定的命令意味着同样的输入产出不同的文件 → 排查时你还得先猜模型当时为什么那么写。三条风险分别对应安全、可复现、可调试。
- 改造的方向不是「加一层校验就放行」,而是把模型挪到另一个位置:让它只输出结构化的选择项,且每一项都从你定死的枚举里选(转场类型、裁切策略、封面取哪一镜),命令本身由你自己的纯函数从时间轴算出来。
- 补一句更硬的落地细节:调用外部程序不要走 shell 字符串,用参数数组(execFile 而不是 exec),从根上消掉转义问题;再加一层白名单校验,模型给出枚举外的值就退回默认值而不是报错。
- 可预期的追问是「那模型在这一环还有什么用」。答:用在需要审美判断的地方——情绪偏冷还是偏暖、封面选哪一镜、要不要转场。判断交给模型,执行留给程序,这是所有会产生副作用的 Agent 场景的通用分界。
How to reason about it · think before answering
- This probes where you draw the line between model judgment and real execution. Saying 'injection risk' is the passing bar; missing reproducibility and debuggability signals you have not run a generative pipeline in production.
- The chain is short: model output is untrusted input, untrusted input into a shell is command injection, model output is also nondeterministic, nondeterministic commands mean the same input yields different files, and debugging then requires guessing what the model was thinking.
- The fix is not 'validate and forward'. Move the model: let it emit only structured choices drawn from an enum you fixed in advance (transition type, crop strategy, which shot the cover comes from), and compute the command yourself from the timeline with a pure function.
- Add the concrete detail: invoke external binaries with an argument array (execFile, not exec) so escaping stops being a class of bug, then whitelist-validate the model's choices and fall back to a default instead of erroring.
- Expect the follow-up 'so what is the model still good for here'. Answer: taste calls — tone, cover selection, whether to use a transition. Judgment to the model, execution to the program. That boundary generalizes to any agent with side effects.
答题要点
- 三条风险按严重度排:命令注入、结果不可复现、报错不可调试;只说第一条不够。
- 改造成参数填充器:模型输出结构化选择项,取值必须落在预定义枚举里。
- 命令由程序的纯函数从时间轴生成,用参数数组调用而不是拼 shell 字符串。
- 白名单校验兜底,枚举外的值退回默认,而不是把错误抛给用户。
- 分界线一句话:模型负责判断,程序负责执行。
Key points
- Three risks in order: command injection, non-reproducible output, undebuggable failures. Naming only the first is not enough.
- Turn the model into a parameter filler: structured choices constrained to a predefined enum.
- Generate the command from the timeline with a pure function, invoked via an argument array rather than a shell string.
- Whitelist-validate and fall back to defaults for out-of-enum values instead of surfacing an error.
- One-line boundary: the model decides, the program executes.
D7 一集杀青:把六个环节串成端到端流水线并算清第一笔账
把多个已经各自跑通的环节串成一条流水线之后,哪些问题是单独调试时看不见的?After chaining several individually working steps into one pipeline, which problems appear that single-step debugging never shows?
国内高频海外高频深入#integration#pipeline-design#observability分析过程 · 先想清楚再作答
- 这题考的是系统集成的直觉。回答里如果只有「接口对不上」,说明你只集成过同步的纯函数;生成式流水线的集成问题主要出在状态和产物上,不在接口签名上。
- 拆解的角度是:单独调试时,是谁在做衔接?答案是你的脑子。你知道上一个脚本把文件写到哪、知道该拿哪份数据喂下一步。串起来之后这些隐式知识必须搬进代码,而搬漏的地方就是集成问题的来源。
- 由此可以推出三类具体问题。第一类是产物路径与命名:单独跑时随手写一个固定输出路径没问题,串起来跑第二遍就把第一遍覆盖了,失败时也分不清哪些文件属于哪一次。解法是每次运行分配一个运行标识,所有产物挂在它下面。
- 第二类是中间态:某一步的产物不完整但没报错,下一步照单全收,错误一路往下传,最后在离源头很远的地方炸掉。解法是每一步产出后做完整性校验,比如按数量断言。
- 第三类是可观测性:六个环节各打各的日志,几百行滚过去,出了事看不出是哪一环。解法是统一日志规格,终端上只留一张能一眼扫完的进度表,细节压到文件里。
- 可预期的追问是「怎么提前发现这些问题」。答:串联之前先约定三件事——产物目录布局、每一步的输入输出契约、日志规格。这三件事定下来,绝大多数集成问题在写代码时就被挡住了。
How to reason about it · think before answering
- This tests integration instinct. If the answer is only 'interfaces do not line up', you have only integrated synchronous pure functions. In generative pipelines the integration problems live in state and artifacts, not in signatures.
- The framing question is: during single-step debugging, who does the gluing? Your head does. You know where the last script wrote its files and which blob to feed forward. Chaining forces that implicit knowledge into code, and whatever you fail to move becomes an integration bug.
- That yields three concrete classes. First, artifact paths and naming: a fixed output path is fine in isolation, but the second run overwrites the first, and on failure you cannot tell which files belong to which attempt. The fix is a run id that every artifact hangs under.
- Second, partial intermediate state: a step produces incomplete output without erroring, the next step accepts it, and the error propagates until it explodes far from its origin. The fix is a completeness assertion after every step, such as an expected artifact count.
- Third, observability: six stages each log their own way, hundreds of lines scroll past, and you cannot tell which stage failed. The fix is one log contract — a scannable progress table on the terminal, details pushed to files.
- Expect the follow-up 'how do you catch these earlier'. Answer: agree on three things before chaining — the artifact directory layout, each step's input/output contract, and the log format. Fix those and most integration bugs never get written.
答题要点
- 单独调试时是人脑在做衔接,串联的本质是把隐式知识搬进代码。
- 产物路径与命名:每次运行一个运行标识,所有产物挂在它下面,避免覆盖与混淆。
- 中间态不完整却不报错,错误会传到很远的地方才炸;每一步产出后做完整性校验。
- 日志淹没:统一日志规格,终端只留进度表,细节压到文件。
- 预防手段是串联之前先定好目录布局、输入输出契约与日志规格三件事。
Key points
- In isolation a human does the gluing; chaining means moving that implicit knowledge into code.
- Artifact paths and naming: assign a run id and hang every artifact under it to avoid overwrites and confusion.
- Incomplete intermediate state that does not error propagates far before exploding; assert completeness after every step.
- Log flooding: adopt one log contract, keep a progress table on the terminal and push details to files.
- Prevent it by agreeing on directory layout, per-step I/O contracts and log format before chaining anything.