Course/Chapter 8/2. Content Generation & Summarization
    advanced
    Chapter 8: AI & LLM Integration

    2. Content Generation & Summarization

    Generate and summarize content with AI.

    20m Lesson 2 of 5

    Use AI to automate content creation and summarization tasks that would take hours manually.

    Code Examples

    Blog Post Generator Prompt
    javascript
    const topic = $json.topic;
    const keywords = $json.keywords.join(", ");
    
    const systemPrompt = `You are an expert content writer. 
    Write engaging, SEO-optimized blog posts.
    Always include:
    - A compelling headline
    - An introduction hook
    - 3-5 subheadings with detailed content
    - A conclusion with call-to-action
    Target keyword density: 1-2% for primary keywords.`;
    
    const userPrompt = `Write a 1000-word blog post about: ${topic}
    Target keywords: ${keywords}
    Tone: Professional but approachable
    Audience: Small business owners`;
    
    return [{ json: { systemPrompt, userPrompt } }];

    Pro Tips

    • 💡Always use system prompts to set the AI's role and output format
    • 💡Set temperature to 0.1–0.3 for factual content, 0.7–0.9 for creative content

    Comprehension Quiz

    Answer 2 of 2 correctly to unlock lesson completion.

    1. What temperature range is best for factual content?

    2. What should every AI prompt include for consistent output?

    Pass the quiz above to unlock lesson completion