面试题库
共 328 题,当前筛选 1 题。
课程全部30 天从前端工程师到 Agent 工程师5 天提示词工程零基础Claude 高效使用:从对话到 Claude CodeCodex 与 OpenAI Agents SDK 高效使用7 天 MCP:把工具接进任何 Agent7 天 Agent Skills:把经验做成可复用能力5 天上下文工程14 天 RAG:从检索到可信回答14 天用 Agent 搭一条 AI 短剧生产线
标签
全部#task-graph1#pipeline-design7#consistency4#cost4#error-handling4#image-generation3#observability3#timeline3#workflow-engine3#architecture2#async-task2#caching2
还有 59 个标签收起标签
#ffmpeg2#idempotency2#media-pipeline2#provider-abstraction2#rate-limiting2#reproducibility2#retry2#scheduling2#tts2#agent-loop1#analytics1#architecture-review1#av-sync1#backoff1#budget-control1#build-vs-buy1#candidate-selection1#circuit-breaker1#compliance1#concurrency1#content-safety1#copyright1#cost-accounting1#cost-analysis1#cost-control1#dag1#data-modeling1#debugging1#degradation1#encoding1#evaluation1#fairness1#feedback-loop1#human-in-the-loop1#incremental-recompute1#integration1#labeling1#llm-output-quality1#moderation1#multimodal1#offline-testing1#pipeline-reliability1#priority-queue1#project-storytelling1#prompt-assembly1#prompt-injection1#quality-check1#resume1#retry-strategy1#rollback1#schema-validation1#state-management1#state-persistence1#structured-output1#subtitles1#system-design1#test-strategy1#trade-offs1#versioning1
14 天用 Agent 搭一条 AI 短剧生产线
D1 一条 AI 短剧生产线长什么样:工序拆解、任务图架构与四类生成模型选型
把一条多步生成流程建成任务图,比一串顺序 await 多拿到了什么?代价是什么?What does modeling a multi-step generation pipeline as a task graph buy you over a chain of sequential awaits, and what does it cost?
国内高频海外高频进阶#task-graph#pipeline-design分析过程 · 先想清楚再作答
- 这题的题眼在「多拿到了什么」,不在「什么是 DAG」。背出有向无环图定义的人拿不到分,答对的人会给出三样顺序版拿不到的能力,并各配一个具体场景。
- 怎么拆:把顺序版的三个痛点倒过来说。第一,并行的可能性被图结构直接表达——配音只依赖台词、和画面无关,顺序版里它却要排在四十次视频生成后面。第二,有断点——每个节点的产物落在磁盘固定位置,第三十七个镜头失败时前三十六个还在。第三,可观测——你能回答「现在卡在哪个节点」,顺序版只能回答「卡在某个 await」。
- 补一条区分度更高的:环检测。拓扑排序在发现依赖成环时抛错,这是「无环」两个字唯一的执行者;没有它,依赖写错只会表现成漏跑一步或者顺序错乱,非常难查。
- 结论与代价:任务图不是免费的,你必须为每个节点定义清楚输入产物与输出产物,否则它只是一张漂亮的依赖声明。这份产物契约同时也是后面做幂等与断点续跑的前提。
- 可预期的追问:那是不是应该直接上工作流引擎?判据是节点数与失败率——十几个节点、失败率高、需要人工介入时才值得;三五个节点的流程用一张手写的图加拓扑排序就够,引入引擎反而多一套要运维的东西。
How to reason about it · think before answering
- The question is what you gain, not what a DAG is. Reciting the definition scores nothing; name three capabilities the sequential version cannot have, each with a concrete scenario.
- Break it down by inverting the three pains of sequential code. First, parallelism is expressed by the graph itself — voice-over depends only on the lines, yet a sequential run queues it behind forty video jobs. Second, resumability — each node writes artifacts to a fixed path, so shot 37 failing does not destroy the first 36. Third, observability — you can say which node is stuck, not merely that some await is pending.
- Add the higher-signal point: cycle detection. Topological sort throws when dependencies form a cycle, and that is the only thing enforcing the acyclic part. Without it, a wrong dependency silently skips a step or reorders execution, which is painful to debug.
- Conclusion and cost: a task graph is not free. Every node needs a declared input and output artifact set, otherwise the graph is decorative. That artifact contract is also the precondition for idempotency and resume later on.
- Likely follow-up: should you adopt a workflow engine instead? Judge by node count and failure rate — worth it at a dozen-plus nodes with high failure and human review; for three to five nodes a hand-written graph plus topological sort is cheaper than another system to operate.
答题要点
- 三样顺序版拿不到的:并行由图结构表达、失败后有断点、能说清卡在哪个节点
- 拓扑排序顺带做环检测,这是「有向无环」里「无环」的唯一执行者
- 代价是必须为每个节点声明输入产物与输出产物,否则图只是装饰
- 这份产物契约同时是后续做幂等与断点续跑的前提
- 上不上工作流引擎按节点数与失败率判断,三五个节点手写图更划算
Key points
- Three things sequential code cannot give: parallelism expressed by structure, resumability after failure, and knowing which node is stuck
- Topological sort also detects cycles, the only mechanism enforcing the acyclic property
- The cost is declaring input and output artifacts per node; without that the graph is decorative
- That artifact contract is the precondition for idempotency and resume
- Adopt a workflow engine based on node count and failure rate; a hand-written graph wins for three to five nodes