跳到主要内容

Prompting Basics

Writing instructions that AI can follow.

A prompt is an instruction you give to AI. It's not just about what you ask, but how you ask it.


The Key Insight

You're not "chatting" with AI — you're programming it with natural language.

Every prompt is a tiny program that tells the AI:

  1. What role to play
  2. What task to perform
  3. What constraints to follow
  4. What format to output

Good vs. Bad Prompts

Bad PromptGood Prompt
"Fix my document""Fix grammar and spelling errors in this document. Preserve technical terms unchanged."
"Make this better""Improve clarity and flow. Keep my voice and style."
"Summarize this""Summarize in 3 bullet points, focusing on the main argument."

The difference: specificity, constraints, and clear expectations.


A Simple Framework

When writing prompts, think in layers:

LayerQuestionExample
RoleWho is the AI?"You are a proofreader for academic writing"
TaskWhat should it do?"Check this document for errors"
ConstraintsWhat are the rules?"Don't change technical terms"
FormatHow should it respond?"Present changes in a table"

Not every prompt needs all layers. But knowing the framework helps when simple prompts don't work.


Example: Grammar Check

A basic prompt:

Check the grammar in this document.

A better prompt:

You are a proofreader for academic writing.

Check this document for:
- Grammar errors
- Spelling mistakes
- Awkward phrasing

Rules:
- Don't change technical terms
- Preserve the author's voice
- Keep citations in their original format

Output:
Present each change in a table with columns:
| Original | Suggested | Reason |

The second prompt is longer but produces more consistent, useful results.


Common Mistakes

1. Too Vague

❌ "Make this better" ✅ "Fix grammar errors and improve clarity, but preserve my voice"

2. Over-Constraining

❌ "Only use words from this list..." ✅ Let AI use its judgment within reasonable bounds

3. No Format Specified

❌ "Analyze this document" ✅ "Analyze this document. List 3 key themes with supporting quotes."


Iteration

Prompts rarely work perfectly the first time. The process:

  1. Write an initial prompt
  2. See what AI produces
  3. Identify what's wrong
  4. Adjust the prompt
  5. Repeat

This is normal. Even experts iterate on their prompts.


Going Deeper


Next: Understand Agents — AI that takes action, not just responds.