AI Dictionary of Terms

Prompt

The input text or instruction provided to a language model that guides its response, ranging from simple questions to complex, structured instructions with examples, context, and constraints.

The Simple Version

A prompt is like a question or request you give to an AI. If you ask “What’s the weather?” you’ll get a generic response. But if you ask “What’s the weather in San Francisco today, and should I bring an umbrella?” you’ll get a much more useful, specific answer.

The quality of your prompt directly affects the quality of the AI’s response. A vague prompt gets a vague answer. A clear, specific prompt gets a clear, specific answer. That’s why “prompt engineering” — the art of writing effective prompts — has become an important skill.

Detailed Explanation

In the context of large language models, a prompt is the complete input provided to the model, which typically includes:

Components of a Prompt:

  1. System Message: Instructions that define the model’s behavior, persona, and constraints (e.g., “You are a helpful assistant”)
  2. Context: Background information, retrieved documents, or conversation history
  3. User Query: The actual question or request from the user
  4. Examples: Demonstrations of desired input-output pairs (few-shot learning)
  5. Output Format: Specifications for how the response should be structured

Prompt Structure (Modern Chat Models):

[
  {"role": "system", "content": "You are a helpful coding assistant."},
  {"role": "user", "content": "Explain what a prompt is."}
]

Types of Prompts:

Prompt Engineering Techniques:

Prompt Anatomy:

Key Characteristics

Business Context

Prompts are the primary interface between humans and AI, making prompt quality critical for enterprise success:

Why Prompts Matter:

Enterprise Prompt Management:

Prompt Engineering as a Skill:

Real-World Analogy

Writing a brief for a freelancer. If you say “Write something about dogs,” you’ll get something generic. If you say “Write a 500-word blog post for first-time dog owners about choosing the right breed, focusing on apartment-friendly dogs, with a friendly and encouraging tone,” you’ll get something valuable. The prompt is your brief — the more specific and clear it is, the better the result.

Code Example

# Different prompt structures and their effects
from openai import OpenAI

client = OpenAI()

# 1. Simple prompt (zero-shot)
simple_prompt = "What is machine learning?"
response = client.chat.completions.create(
    model="gpt-4",
    messages=[{"role": "user", "content": simple_prompt}]
)
print("Simple:", response.choices[0].message.content[:100])

# 2. Structured prompt with system message and constraints
structured_prompt = [
    {"role": "system", "content": "You are a technical writer. Explain concepts clearly and concisely."},
    {"role": "user", "content": "Explain machine learning in exactly 2 sentences for a non-technical audience."}
]
response = client.chat.completions.create(
    model="gpt-4",
    messages=structured_prompt
)
print("Structured:", response.choices[0].message.content)

# 3. Few-shot prompt with examples
fewshot_prompt = """
Classify the sentiment of customer reviews as Positive, Negative, or Neutral.

Example 1:
Review: "The product arrived quickly and works perfectly!"
Sentiment: Positive

Example 2:
Review: "Terrible quality. Broke after one use."
Sentiment: Negative

Now classify this review:
Review: "It's okay. Does what it's supposed to do, nothing more."
Sentiment:"""

response = client.chat.completions.create(
    model="gpt-4",
    messages=[{"role": "user", "content": fewshot_prompt}]
)
print("Few-shot:", response.choices[0].message.content)

Common Misconceptions

Sources & Further Reading