特殊模型說明
特殊模型介紹
本章節節錄特殊模型API的重點說明供使用上作為參考。目前依RAP平台包含的模型類別先介紹 gpt-oss-safeguard、Automatic Speech Recognition (ASR)、Text-to-Speech (TTS)、Rerank,並說明此模型的概述、特別用法去指出它和一般模型的主要差異。
gpt-oss-safeguard
概述
gpt-oss-safeguard 是第一個專為安全分類任務訓練的開放權重推理模型,旨在根據可自訂的策略對文字內容進行分類。專為信任與安全工作流程而設計。它是一個遵循策略的模型,能夠可靠地解釋和執行編寫的標準,並說明其決策原因。該模型的邏輯使其非常適合與以可審計性和可自訂性為基礎的大型安全系統整合。
特別用法
由於其特性,如果要使用gpt-oss-safeguard 此類模型做判斷的話需要使用者在 system prompt 裡面定義好 Policy Prompts。
Policy Prompts 定義了模型行為的操作邊界。與人工審核員編寫的內容或平台策略類似 oss-safeguard 的策略應明確規定哪些行為構成違規、哪些行為是允許的,以及如何將這些區別傳達給信任與安全系統的其他決策環節。
有效的 Policy Prompts 經過精心設計,能夠區分相似的內容類型,識別隱晦的、編碼的或間接的違規行為,並防止在極端情況下出現誤報。
- Policy Prompts 的結構
-
Instruction: 模型必須做什麼以及模型應該如何回答
-
Definitions: 關鍵字的簡明解釋
-
Criteria: 區分違規內容和非違規內容
-
Examples: 決策邊界附近的簡短、具體的實例。重要的是,既要有你想分類的例子,也要有你想排除的例子
由於 oss-safeguard 專為結構化審核而設計,因此它需要明確的回應 指令。如果 Policy Prompts 遵循一致的模式,包括預期的回應和輸出格式,則其效能可能會更好。 建議使用Harmony 格式的結構:
# Policy Name
## INSTRUCTIONS
Describe what oss-safeguard should do and how to respond.
## DEFINITIONS
Clarify key terms and context.
## VIOLATES (1)
Describe behaviors or content that should be flagged.
## SAFE (0)
Describe content that should not be flagged.
## EXAMPLES
Provide 4–6 short examples labeled 0 or 1.
Content: [INPUT]
Answer (0 or 1):
-
Policy Prompts 的範例
## Policy Definitions
### Key Terms
**[Term 1]**: [Definition]
**[Term 2]**: [Definition]
**[Term 3]**: [Definition]
## Content Classification Rules
### VIOLATES Policy (Label: 1)
Content that:
- [Violation 1]
- [Violation 2]
- [Violation 3]
- [Violation 4]
- [Violation 5]
### DOES NOT Violate Policy (Label: 0)
Content that is:
- [Acceptable 1]
- [Acceptable 2]
- [Acceptable 3]
- [Acceptable 4]
- [Acceptable 5]
## Examples
### Example 1 (Label: 1)
**Content**: "[Example]"
**Expected Response**:
### Example 2 (Label: 1)
**Content**: "[Example]"
**Expected Response**:
### Example 3 (Label: 0)
**Content**: "[Example]"
**Expected Response**:
### Example 4 (Label: 0)
**Content**: "[Example]"
**Expected Response**:
官方資料來源
以上僅節錄 gpt-oss-safeguard 的重要差異,若想要更深入了解介紹、適用族群以及完整使用指南請到官方網頁查看:
https://cookbook.openai.com/articles/gpt-oss-safeguard-guide
Automatic Speech Recognition (ASR)
概述
Audio Transcriptions API 用於將使用者上傳的音訊檔案轉換為文字 - Automatic Speech Recognition, ASR,適用於語音轉文字、逐字稿產生、字幕製作、多語言語音辨識等場景。