Prompt Engineering
技術定義
設計輸入以引導模型產生最佳輸出的實務。它包含 chain-of-thought、few-shot 範例、角色提示、結構化輸出指示與 system prompt 設計。
相關術語
Chain-of-Thought
一種提示技巧,要求或引導模型在給出最終答案前先產生中間推理步驟。它通常能明顯改善多步驟數學、邏輯與程式問題的表現。
Few-shot Prompting
在 prompt 中提供少量輸入與輸出範例,再要求模型完成新任務。這能幫助模型理解格式、風格或任務目標,而不必重新 fine-tune。
Zero-shot Prompting
不提供範例,只用任務描述或指令要求模型執行任務。這依賴模型預訓練中學到的能力;現代大型模型表現已很強,但 specialized task 通常 few-shot 會更穩。
Temperature
控制輸出隨機性的 sampling 超參數。temperature 為 0 時模型總是選最高機率的下一個 token;數值越高,輸出越多樣、更有創意,但超過 1.0 容易引入噪聲。
Prompt Engineering 相關文章
全部術語
AgentAttention MechanismChain-of-ThoughtContext WindowDiffusion ModelDistillationDPO (Direct Preference Optimization)EmbeddingFew-shot PromptingFine-tuningFunction CallingGAN (Generative Adversarial Network)GRPO (Group Relative Policy Optimization)HallucinationInferenceLLM (Large Language Model)LoRA (Low-Rank Adaptation)MCP (Model Context Protocol)MultimodalPrompt EngineeringQLoRA (Quantized LoRA)QuantizationRAG (Retrieval-Augmented Generation)RLHF (Reinforcement Learning from Human Feedback)TemperatureTokenizerTool UseTop-p (Nucleus Sampling)TransformerVector DatabaseZero-shot Prompting