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

回顧期號 / PROMPTS

把 prompt 當成應用程式碼版本化

把穩定的 developer instruction 與 user input 分開,明訂 output contract,並讓 prompt 變更可 review。

01 / DECIDE

架構決策

當行為要跨 release、model、語言或多個產品介面保持穩定時使用。

把穩定的 developer instruction 與 user input 分開,明訂 output contract,並讓 prompt 變更可 review。 先把 input、output、state 與 side effect 畫成一條可觀察路徑,再決定 把 prompt 當成應用程式碼版本化 要放在哪一層。

02 / BUILD

三步實作

  1. 01

    框定合約

    先寫下 caller、資料分類、成功條件、timeout、取消與 ownership。當行為要跨 release、model、語言或多個產品介面保持穩定時使用。

  2. 02

    建立單一路徑

    只實作一條 end-to-end path,保留 request correlation、typed state 與可逆 failure handling。把穩定的 developer instruction 與 user input 分開,明訂 output contract,並讓 prompt 變更可 review。

  3. 03

    證明結果

    把驗收寫成可重跑的 fixture、contract test 或 browser test。每次 prompt 修訂上線前,以 fixture suite 比對任務結果與 refusal handling。

03 / BOUND

Production 邊界

Prompt 不是授權;tools、data access 與高影響動作仍須由 server policy 驗證。

04 / PROVE

驗收證據

每次 prompt 修訂上線前,以 fixture suite 比對任務結果與 refusal handling。

SOURCE / HTTP

可重現來源探針

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