返回提示庫

内容分类

A classification prompt for consistent labels, confidence notes, and stable taxonomy-based routing.

審校時間: 2026-03-18

Use this when you want the model to assign one or more labels to text using a fixed taxonomy and predictable output rules.

Prompt 模板

Classify the input into the taxonomy below.

Taxonomy:
{taxonomy}

Rules:
- Pick the single best label unless multi-label is explicitly allowed.
- If confidence is low, say so.
- Base the answer only on the text provided.
- Do not add commentary outside the required format.

Output format:
{
  "label": "<best_label>",
  "confidence": "<high|medium|low>",
  "reason": "<one sentence>"
}

Input:
{text}

正式使用前,請先替換模板變數並補充你的限制條件。

適用場景

  • Routing support tickets or feedback
  • Classifying articles or user-generated content
  • Detecting intent before an automation step

期望輸出

  • Fixed taxonomy
  • Strict JSON output
  • Confidence estimate
  • Short reasoning sentence

可替換變數

taxonomy

Allowed labels

Example: billing, bug, feature_request, account_access

text

Content to classify

Example: A support request or content excerpt

優化建議

  • Provide an explicit label set instead of asking for open-ended categorization.
  • Use JSON output if the result feeds a workflow.
  • Add examples if two labels are easy to confuse.

示例用法

Classify a message asking for a refund after duplicate billing.

預期效果

The model returns a billing label, a confidence level, and a one-line rationale in JSON.

參考來源