GPT WORLD / INDEPENDENT CODEX FIELD MANUAL 來源檢視 · 2026-07-31

回顧期號 / TOOLS

把 code execution 當成可丟棄 compute cell

送入 bounded input、定義 expected artifact,並在 sandbox 外驗證 output 後才進入 business workflow。

01 / DECIDE

架構決策

適合 calculation、data transformation、chart 與 file inspection,讓 deterministic code 改善答案。

送入 bounded input、定義 expected artifact,並在 sandbox 外驗證 output 後才進入 business workflow。 先把 input、output、state 與 side effect 畫成一條可觀察路徑,再決定 把 code execution 當成可丟棄 compute cell 要放在哪一層。

02 / BUILD

三步實作

  1. 01

    框定合約

    先寫下 caller、資料分類、成功條件、timeout、取消與 ownership。適合 calculation、data transformation、chart 與 file inspection,讓 deterministic code 改善答案。

  2. 02

    建立單一路徑

    只實作一條 end-to-end path,保留 request correlation、typed state 與可逆 failure handling。送入 bounded input、定義 expected artifact,並在 sandbox 外驗證 output 後才進入 business workflow。

  3. 03

    證明結果

    把驗收寫成可重跑的 fixture、contract test 或 browser test。Fixture 獨立驗證 calculation,並拒絕 missing、oversized、malformed 或 unexpected artifact。

03 / BOUND

Production 邊界

Sandbox 不會讓未知 code 自動可信;需限制 input、output type、size、runtime 與 downstream effect。

04 / PROVE

驗收證據

Fixture 獨立驗證 calculation,並拒絕 missing、oversized、malformed 或 unexpected artifact。

SOURCE / HTTP

可重現來源探針

curl -fsSI 'https://developers.openai.com/api/docs/guides/tools' | sed -n '1,5p'

PRIMARY / OFFICIAL

OpenAI 官方來源

來源核對 · 2026-08-10

  1. 01Using tools