面试题库
共 328 题,当前筛选 1 题。
课程全部30 天从前端工程师到 Agent 工程师5 天提示词工程零基础Claude 高效使用:从对话到 Claude CodeCodex 与 OpenAI Agents SDK 高效使用7 天 MCP:把工具接进任何 Agent7 天 Agent Skills:把经验做成可复用能力5 天上下文工程14 天 RAG:从检索到可信回答14 天用 Agent 搭一条 AI 短剧生产线
标签
全部#safety1#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#pipeline-design2#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#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
Codex 与 OpenAI Agents SDK 高效使用
D4 OpenAI Agents SDK:agents、handoffs、guardrails、sessions、tracing
guardrail 应该放在输入侧还是输出侧?各自的成本、能拦住什么、拦不住什么?Should guardrails sit on the input side or the output side? What does each cost, what does it catch, and what slips through?
国内高频海外高频深入#agents-sdk#guardrails#safety分析过程 · 先想清楚再作答
- 题眼在「拦不住什么」。只说两边都要放而不说各自的漏网情况,就是没在生产里被漏网案例打过脸。
- 先给分工:输入侧管「该不该做」——话题越界、明显注入、超出服务范围,越早拦越省;输出侧管「能不能说」——泄露敏感信息、格式不合规、违反业务规则,只有模型说完才能查。
- 再说成本:输入护栏与主 Agent 并行跑,警报一响就取消主 Agent 的昂贵运行,所以用便宜小模型做输入护栏是省钱手段;输出护栏必须等主 Agent 跑完,省不了钱,只能防事故。
- 漏网情况:输入侧拦不住「问题正常但回答跑偏」;输出侧拦不住「模型已经调了有副作用的工具」——所以有副作用的工具需要第三层,围着每次函数调用跑的工具级护栏。
- 补一条 SDK 约束:输入护栏只在链条第一个 Agent 上跑,输出护栏只在产出最终回答的 Agent 上跑,挂错位置等于没挂。
- 可预期的追问:护栏最常见的失败模式是什么?太严而不是太松——正则黑名单误拦正常用户;上线前要有正常请求的回归集,误拦率是必看指标。
How to reason about it · think before answering
- The crux is 'what slips through'; saying 'use both' without naming each side's blind spot signals no production incidents survived.
- Division of labor: input guardrails decide whether to act at all (off-topic, obvious injection, out of scope) and are cheapest early; output guardrails decide whether the answer may be said (leaks, format, policy) and can only run after generation.
- Cost: input guardrails run in parallel with the main agent and cancel its expensive run on a tripwire, so a cheap classifier there saves money; output guardrails wait for the full run and only prevent incidents.
- Blind spots: input cannot catch a normal question with a drifting answer; output cannot undo a side-effecting tool already called, hence a third layer of tool-level guardrails around each function call.
- Add the SDK constraint: input guardrails run only on the first agent, output guardrails only on the agent producing the final answer; misplaced guardrails never execute.
- Expect the follow-up: the common failure mode? Too strict, not too loose; regex blocklists over-block real users, so keep a regression set of legitimate requests and watch the false-block rate.
答题要点
- 输入侧管该不该做,越早拦越省;输出侧管能不能说,只能事后查
- 输入护栏与主 Agent 并行、触发即取消,便宜模型在此省钱;输出护栏省不了钱只防事故
- 输入侧漏「回答跑偏」,输出侧漏「已调有副作用的工具」,需工具级护栏补第三层
- 输入护栏只在第一个 Agent 生效;常见失败是太严,需正常请求回归集
Key points
- Input side decides whether to act and is cheapest early; output side decides what may be said and only runs afterwards
- Input guardrails run in parallel and cancel the main run, so cheap models save money there; output guardrails only prevent incidents
- Input misses drifting answers, output misses side effects already taken; tool-level guardrails add the third layer
- Input guardrails run only on the first agent; the common failure is over-blocking, so keep a regression set