Zubnet AI學習Wiki › Prompt
基礎

Prompt

你給 AI 模型以得到回覆的文字。Prompt 可以是個問題、一條指令、一份創意簡報、或者你想讓它解釋的一段程式。模型做的一切都從你輸入的東西開始。你的 prompt 的品質、具體性、結構直接塑造回來的東西的品質。

為什麼重要

Prompt 就是介面。這是大多數人使用 AI 時拉動的唯一槓桿,而且是一個出奇強大的槓桿。模糊的 prompt 得到模糊的答案;一個具體、結構良好的 prompt 能從同一個模型裡提取出專家級的輸出。理解 prompt 是有效使用 AI 的第一步。

Deep Dive

A prompt isn't just "a question you type." In the API world, a prompt is a structured sequence of messages — typically a system message (setting the model's behavior), followed by alternating user and assistant messages that form a conversation. When you use a chat interface like Claude.ai, you see a simple text box, but underneath, your message is wrapped in this structure before reaching the model.

The Anatomy of a Good Prompt

Effective prompts tend to share a few traits: they state what you want (not just the topic but the format, length, and audience), they provide context the model needs, and they include constraints that prevent drift. "Tell me about Python" gets you a generic overview. "Write a 200-word explanation of Python's GIL for a developer who knows Java but not Python, focusing on practical implications for web servers" gets you something useful. The difference isn't magic — it's specificity.

Prompts as Programming

There's a reason "prompt engineering" became a discipline. At the API level, prompts are essentially programs written in natural language. You can include examples (few-shot), ask the model to reason step by step (chain of thought), assign roles ("You are a senior security auditor"), or constrain output format ("Respond only in valid JSON"). These aren't hacks — they're techniques that reliably change model behavior because they shift the probability distribution the model samples from. The model isn't "following instructions" the way a human does; it's generating text that's statistically consistent with the pattern you established.

The Prompt Isn't Everything

A common misconception is that the right prompt can make any model do anything. In reality, prompts interact with the model's training data, its alignment tuning, and its architectural constraints. A prompt can't give a model knowledge it was never trained on, bypass its safety training reliably, or exceed its context window. Understanding what prompts can and can't do saves time and prevents the frustration of expecting miracles from clever wording.

相關概念

← 所有術語
← Precision & Recall Prompt Caching →