コンテンツへスキップ

Prompt Engineering

Write effective AI prompts that produce consistent, high-quality content across your workflows.

Prompt Structure

Effective prompts follow a consistent structure:

System Prompt

Defines the AI's role and behavior:

  • Who/what the AI is (expert, writer, analyst)
  • General capabilities and constraints
  • Tone and style guidelines
  • Output format expectations
User Prompt

Provides the specific task:

  • Context and background
  • Specific instructions
  • Required elements
  • Examples (if needed)

Writing System Prompts

System prompts set the foundation for consistent output.

Good System Prompt Example

Template
You are an expert web content writer specializing in {{industry}} websites.

Your writing style is:
- Professional yet approachable
- Clear and scannable
- Persuasive without being pushy
- SEO-optimized naturally

When creating content:
- Use active voice
- Keep paragraphs short (2-3 sentences)
- Include clear calls-to-action
- Write for the target audience: {{target_audience}}

Format requirements:
- Output valid HTML
- Use semantic heading structure (h1, h2, h3)
- Include appropriate meta description suggestions
Avoid Vague Instructions

Don't say "write good content" - specify what "good" means. Be explicit about quality criteria.

Writing User Prompts

User prompts provide the specific task with all necessary context.

User Prompt Structure

Template
Create a {{page_type}} page for {{company_name}}.

## Context
{{company_description}}

## Page Requirements
1. Hero section with compelling headline
2. Value proposition (3 key benefits)
3. Feature highlights with icons
4. Social proof section
5. Clear call-to-action

## Constraints
- Maximum 800 words
- Reading level: 8th grade
- Include keywords: {{keywords}}

## Previous Content
The homepage we created says: {{homepage_summary}}
Maintain consistency with this messaging.

Key Principles

  • Be specific: "3 key benefits" not "some benefits"
  • Provide context: Include relevant previous outputs
  • Set constraints: Word count, format, reading level
  • Use structure: Numbered lists and headers help AI parse

Output Formatting

Control output format for reliable parsing.

JSON Output

Template
Respond with a JSON object in this exact format:
{
    "title": "Page title",
    "meta_description": "160 characters max",
    "sections": [
        {
            "type": "hero|features|cta",
            "heading": "Section heading",
            "content": "Section content HTML"
        }
    ]
}

Output only the JSON object, no additional text.

HTML Output

Template
Output the content as valid HTML using these rules:
- Start with an h1 tag containing the page title
- Use h2 for section headings, h3 for subsections
- Wrap paragraphs in 

tags - Use

    or
      for lists - Include class="cta-button" on call-to-action links Do not include , , or tags. Output only the content to be placed in the page body.

Common Issues and Solutions

Issue Cause Solution
Inconsistent output format Unclear format instructions Provide explicit format examples
Generic content Insufficient context Add more specific details about business
Wrong tone Vague style instructions Give concrete examples of desired tone
Content too long/short No length constraints Specify word count or section limits
Hallucinated facts AI filling gaps creatively Provide all factual details explicitly