跳到主要內容

/rewrite//brief 到底是不是 ChatGPT 的內建功能?一篇說清楚

先說結論

ChatGPT 官方不支援 /rewrite//brief 這種語法

ChatGPT (GPT-3.5 / GPT-4 / GPT-4o) 本身的 prompt 處理是自然語言為主,目前官方 API、ChatGPT 網站、OpenAI 文檔 沒有定義 /rewrite//brief 這種 Parser Prompting 語法

也就是說,丟這樣的指令,ChatGPT 會「試圖當作自然語言理解」

這類語法通常是「外掛的 parser」、「客製化的 prompt 模板」、「LangChain、Flowise、Notion AI、自建系統」做出來的 conventions,不是 ChatGPT 本體的功能。

ChatGPT 目前的行為現象,因為 2024–2025 年 GPT-4o / GPT-4-turbo 確實「開始對部分格式 prompt 有潛在 parsing 能力」,但這要拆成兩層來看,才能理解為什麼你「看起來它可以用」:

第一層:ChatGPT 現在會「嘗試理解」這種格式

GPT-4o(或 GPT-4-turbo)確實現在會:

  • 把 /rewrite 當作「你希望重寫」
  • 把 //brief 當作「風格(brief)」
  • 把 : 用一句話重寫這段內容 當作目標說明
/rewrite//brief: 用一句話重寫這段內容

因為目前 GPT-4o 裡面強化了 parsing ability

  • 有更多 “markdown parser” / “command style parser” 訓練
  • 有被大量 Slash Command prompt 訓練(Discord / Midjourney / Slack 等 prompt corpus 裡有大量 /xxx//yyy)
  • 有 exposure 到 LangChain / Prompt template 社群的 parsing 風格

所以 GPT-4o 其實「能靠類比學習」理解你這樣的 prompt,並進行正確回答。官方文檔(OpenAI API docs、Prompt Engineering Guide)目前並沒有正式定義 /rewrite//brief 這種格式是官方語法。

它是靠 LLM 本身的泛化能力 + 過去大量 prompt 模型學習資料影響,導致 GPT-4o 現在能理解這類 prompt。

  • 在自建 bot 或自建 API Wrapper 裡可以用(ex: Slack bot, Discord bot, 自建 LangChain agent)
  • 在 ChatGPT.com 直接用 → 不一定 work,要靠資料、外掛、plugin 或自建 parser。

第二層:「是不是 官方有支援規範格式?」

答案是:沒有明文規範。

官方文檔(OpenAI API docsPrompt Engineering Guide)目前並沒有正式定義 /rewrite//brief 這種格式是官方語法。

👉 它是 靠 LLM 本身的泛化能力 + 過去大量 prompt 模型學習資料影響,導致 GPT-4o 現在能理解這類 prompt。

後記及統整

為什麼你覺得「看起來可以用」?GPT-4o 已經 implicit 隱晦的學會解析這種 prompt pattern,所以你丟進 ChatGPT 裡,它「通常」能理解並正確執行

但是這種不是「保證行為」→ 未來模型更新後可能會更穩定,也可能格式規範會改變

✅ /rewrite//brief 是屬於進階 prompt parser 技巧
✅ ChatGPT 本身沒內建,但很多進階框架(LangChain、Flowise)會用這種 Parser Prompting Skill
✅ 你要用,可以自己加 parser,或改用 ChatGPT 支援的自然語言/Function Calling
✅ 學習資料已整理,依照需求選擇對應場景。

現況分類

用法 在 ChatGPT 內建 解析穩定性 備註
/rewrite//brief: xxx ✅ GPT-4o 會理解 90% 準確(目前 GPT-4o 行為) 靠語言模型學出來,不是官方明訂規範
/rewrite brief: xxx ❌ 容易被當自然語言誤解 低(常失敗) 沒有分隔符,parser 不好拆解
Function calling + schema ✅ 官方支援 100% 穩定 需要 API + schema 設定
自建 parser(LangChain 等) ✅ 自己定義 100% 控制 自己定義指令解析規則

GPT-4o 現階段支持清單

雙斜線風格 (/command//mode:)

GPT-4o 行為:幾乎 100% 理解 command + mode 結構,會照模式執行。

/rewrite//brief: 將下面這段話用一句話改寫
/translate//zh-hant: Please translate the following text.
/summarize//bullet: 幫我摘要成條列式

斜線+dash風格 (/command -mode:)

GPT-4o 行為:目前大致能理解,但比 // 稍弱(大概 80~90% 成功)。

/rewrite -brief: 用一句話改寫
/translate -zh-hant: 翻譯成繁體中文

YAML block / tag prompt

GPT-4o 行為:穩定解析,因為 YAML prompt 是官方 prompt engineering 裡常用格式。

task: rewrite
mode: brief
content: 將這段內容改寫成一句話

JSON-style inline prompting

GPT-4o 行為:穩定解析,非常推薦用於 API / GPT Builder。

{ "command": "rewrite", "mode": "brief", "content": "請改寫以下內容" }

Function-like syntax

GPT-4o 行為:解析能力佳(目前 85% 以上穩定性),容易受到 Function Calling 的學習影響。

rewrite(mode="brief"): 請改寫以下內容
translate(to="zh-hant"): Please translate this text.

冒號風格 prompt (Command: Mode: Content)

GPT-4o 行為:意外穩定(受到 Notion AI / Jasper 等工具 corpus 影響)。

Rewrite: Brief: 用一句話改寫
Summarize: Bullet: 以下文章請摘要

【目前 GPT-4o 還不穩定 / 不建議用】❌

Prompt 風格 GPT-4o 理解率 問題
/rewrite brief: xxx < 60% 沒有分隔符,容易被誤解
/command/ mode: xxx 單斜線容易被當成 URL
沒有 command,直接 //brief 開頭 缺主動詞
/command --mode xxx(雙減號) 受 CLI 語法影響,混淆概率高

目前能學的詳細文件

類別 學習資料
ChatGPT 官方 Prompt Engineering https://platform.openai.com/docs/guides/prompt-engineering
OpenAI Cookbook - Prompt 使用 https://github.com/openai/openai-cookbook
LangChain Prompt Templates https://python.langchain.com/docs/tutorials/llm_chain/#langsmith
LlamaIndex Prompt Engineering https://docs.llamaindex.ai/en/stable/optimizing/basic_strategies/basic_strategies/#prompt-engineering
Flowise Docs(圖形化 Prompt 編排) https://docs.flowiseai.com/
Midjourney Prompt Parsing https://docs.midjourney.com/hc/en-us/articles/32023408776205-Prompt-Basics
Notion AI(非公開) https://www.notion.com/help/guides/using-notion-ai
Prompt Engineering Guide(AI 社群版) https://www.promptingguide.ai/
Awesome Prompt Engineering(超級大全) https://github.com/dair-ai/Prompt-Engineering-Guide

參考來源

留言

這個網誌中的熱門文章

[CSS] z-index 在不同瀏覽器繼承問題

今天會討論到這個課題,是因為要實做一個Popup dialog,所以我們希望的結果如下圖。 可是在IE7 卻發生了這樣的情況。 Popup不論怎麼設定z-index都無法浮在最上層,我們看一下html架構發生什麼事情。

[教學] 快快樂樂刪除CodeIgniter index.php

預設的CI網址預設都設定為index.php同一層級,因此所有的程式都必須指定index.php導向才能開始,例如 http://localhost/ci/index.php/welcome/test http://localhost/ci/welcome/test 本文將說明如何將惱人的index.php消除,還你一個漂亮的URL。 設定開始: 接下來說明如何使用rewrite方式將惱人的index.php去除。 rewrite不清楚的人,煩請先自行google 首先要先確定Apache的 mod_rewrite 有 開啟 ,如果沒有開啟請設定好之後重新啟動apache。 接著,在根目錄底下建立一個新檔案,檔名為 .htaccess ,裡面程式碼如下: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] </IfModule> 接著到 application/config/config.php ,開啟檔案修改 $config['index_page'] = ""; 注意: /index.php/$1 要根據你目錄,例如 http://localhost/index.php ,網站根目錄為 /ci/index.php 則要寫成 /ci/index.php/$1 接著至CI目錄下,尋找 config\config.php , 修改一下裡面的檔案,修改如下: $config['index_page'] = ""; 存檔後,如此一來大功告成。 參考資料 官方網站說明

[教學] Mojito 安裝與入門,install mojito for beginner.

mojito ,最近終於從 YDN 對外公開此專案,這個套件主要用於解決前端多重裝置及瀏覽器端的問題,後端服務採取 node.js ,因此使用上必定要先準備以下幾個元素 準備素材 c++ complier git Node.js > 0.4.x NPM > 1.0.x 安裝方式 git clone git://github.com/yahoo/mojito.git cd mojito/source sudo npm install -g . npm install . 以上四個簡單的步驟,就可以把 mojito module 完整安裝到服務器上,接著就可以開始進入 mojito 的世界 使用方式 mojito 提供了完整的 command line 給開發者使用,接著先建立一個基本 hello world 專案,跟著以下步驟完成第一個專案。首先建立一個 mojito application, mojito create app hello cd hello 切換到目錄之後,再接著建立自己的 mojit,這邊的 mojit 就像是一個應用(application)可能會包含許多個獨立網站體,擁有獨立架構的 MVC ,包含內部設定等,詳細資料可以參考官方的 說明 ,建立 mojit mojito create mojit HelloMojit 輸入指令後,會看到顯示結果如下, creating mojit called 'HelloMojit' (using "default" archetype) ✔ mojit: HelloMojit created! ✔ mojito done. 接著修改 application.json 這個 mojit 設定檔案,讓剛才新建立的 hellp application 指定底下有一個 mojit -> HelloMojit ,讓應用可以去執行 mojit controller ,修改如下, [ { "settings": [ "master" ], "appPort": 8666, "specs": { ...