面试题库
共 328 题,当前筛选 1 题。
Codex 与 OpenAI Agents SDK 高效使用
D3 Responses API 与内置工具:函数调用、web search / file search / computer use、结构化输出
平台内置的工具(web search、file search、computer use)和自己写的函数工具,各适合什么场景?为什么 computer use 要单独对待?When do you use platform built-in tools (web search, file search, computer use) versus your own function tools, and why does computer use deserve special treatment?
国内高频海外高频进阶#tools#responses-api#security分析过程 · 先想清楚再作答
- 题眼有两个:一是「谁来执行」,二是「副作用有多大」。只答功能对比不谈执行方与风险,就是没做过工程。
- 先给执行方的判据:内置工具由平台在服务端执行,你只声明、不回填、也控制不了它怎么搜;函数工具由你执行,样样自己写,但每一步都在你手里。
- 落到场景:数据在外面且通用(公网、你上传的文档)用内置工具;数据在你系统里(数据库、内部服务、业务逻辑)写函数;生产系统几乎总是混用。
- 再按副作用排一条光谱:web search 只读公网,file search 只读你给的文件,函数调用的副作用由你的代码决定,computer use 由模型直接产生副作用——越往右能力越强,需要的隔离越重。
- computer use 单独对待的原因:它能点任何按钮、输任何文字,还可能被页面内容诱导,所以正确起点是隔离环境、受限账号和站点与动作白名单,不是代码。
- 可预期的追问:内置的 file search 和自己搭 RAG 怎么选?前者是托管版,省掉切分、向量化、检索三步,代价是可控性与可观测性弱,需要自定义切分或重排时才自己搭。
How to reason about it · think before answering
- Two cruxes: who executes the tool, and how large its side effects are; comparing features alone signals no production experience.
- Executor test: built-in tools run server-side, you declare but never fill results and cannot steer the search; function tools run in your code, more work but full control.
- Map to scenarios: external, generic data (the web, your uploaded documents) fits built-ins; data inside your systems (databases, internal services, business logic) needs functions; production mixes both.
- Order by side effects: web search reads the public web, file search reads your files, function calls have whatever side effects your code allows, computer use lets the model act directly; more capability demands heavier isolation.
- Computer use is special because it can click anything, type anything and be steered by on-screen content, so the starting point is an isolated environment, a restricted account and an allow-list, not code.
- Expect the follow-up: built-in file search versus your own RAG? The built-in is a managed pipeline that skips chunking, embedding and retrieval work at the cost of control and observability; build your own when you need custom chunking or reranking.
答题要点
- 内置工具由平台执行、不用回填、不可干预;函数工具由你执行、全部可控
- 外部通用数据用内置工具,系统内数据与业务逻辑写函数,生产混用
- 按副作用排序:web search、file search、函数调用、computer use,能力越强隔离越重
- computer use 的起点是隔离环境与白名单,不是代码
Key points
- Built-ins run on the platform with no result filling and no steering; functions run in your code with full control
- External generic data suits built-ins, in-system data and business logic need functions, production mixes both
- Rank by side effects: web search, file search, function calls, computer use; more power needs more isolation
- Computer use starts with an isolated environment and an allow-list, not with code