최신 인사이트

Prompt Engineering 101: Get Better AI Results Every Time

Master the art of prompt engineering. Learn techniques to get consistent, high-quality outputs from ChatGPT, Claude, and other AI tools.

Prompt Engineering 101: Get Better AI Results Every Time

The difference between “meh” and “amazing” AI outputs? Your prompts. Here’s how to write them.

The Anatomy of a Great Prompt

Every effective prompt has these elements:

1. ROLE - Who should the AI be?
2. CONTEXT - What background is needed?
3. TASK - What exactly should it do?
4. FORMAT - How should output look?
5. CONSTRAINTS - What limitations apply?

Before and After Examples

Example 1: Content Writing

Bad Prompt: “Write about AI”

Good Prompt: “You are a technology journalist writing for a business audience. Write a 300-word article about how AI agents are changing customer service. Include one real statistic, use simple language, and end with a forward-looking statement.”

Example 2: Code Generation

Bad Prompt: “Write a login function”

Good Prompt: “Write a Python function for user login that:

  • Accepts email and password parameters
  • Validates email format
  • Checks password against bcrypt hash
  • Returns JWT token on success
  • Raises appropriate exceptions on failure
  • Includes docstring and type hints
  • Follows PEP 8 style”

Example 3: Analysis

Bad Prompt: “Analyze this data”

Good Prompt: “Analyze this sales data as a business analyst. Identify:

  1. Top 3 trends
  2. Anomalies or concerns
  3. Actionable recommendations

Format as bullet points. Focus on insights a CEO would care about. Data: [paste data]“

Key Techniques

1. Be Specific

Vague prompts get vague results.

Vague: “Make it better” Specific: “Improve readability by shortening sentences, adding subheadings, and using bullet points for lists”

2. Give Examples

Show what you want:

“Write product descriptions like this example: [Example]

Now write one for: [Product details]“

3. Use Step-by-Step

For complex tasks, break it down:

“1. First, read the customer complaint 2. Identify the core issue 3. Check our refund policy 4. Draft a response that acknowledges the issue and offers a solution”

4. Specify Format

“Format your response as:

  • Summary (2 sentences)
  • Key Points (bullet list)
  • Recommendation (1 paragraph)
  • Next Steps (numbered list)“

5. Set Constraints

“Write in 200 words or less” “Use only information from the provided document” “Avoid technical jargon” “Don’t mention competitor names”

Advanced Techniques

Chain of Thought

“Think through this step by step, explaining your reasoning, then give your final answer.”

Role Stacking

“You are an expert in [X] with 20 years of experience. You’ve worked at [companies]. Your communication style is [description].”

Output Templating

“Fill in this template: Problem: Root Cause: Solution: Timeline: “

Common Mistakes

MistakeFix
Too vagueAdd specifics
Too longFocus on essentials
No contextExplain background
No formatSpecify structure
Assuming knowledgeProvide needed info

Prompt Library Starter

Save these templates:

Email Draft: “Write a professional email to [recipient] about [topic]. The tone should be [formal/friendly]. Key points to cover: [list]. Length: [short/medium].”

Document Summary: “Summarize this [document type] for a [audience]. Focus on [aspects]. Limit to [length]. Format as [format].”

Decision Analysis: “Analyze the pros and cons of [decision]. Consider [factors]. Recommend an option with reasoning.”


Want to train your team on prompt engineering? We offer workshops.

KodKodKod AI

온라인

안녕하세요! 👋 KodKodKod AI 어시스턴트입니다. 무엇을 도와드릴까요?