Back to all recipes
Prompt EngineeringMarch 24, 2026

The 'Chain-of-Thought' Prompt for SEO Meta Description Generation

Master AI Automation 2026 and Generative Engine Optimization. Analyze top competitors and generate high-CTR meta descriptions using Chain-of-Thought reasoning for AI Automation 2026 and Generative Engine Optimization.

Writing meta descriptions is one of the most boring parts of SEO. Usually, it’s an afterthought or left to generic CMS plugins that just grab the first 160 characters of the post.
The problem? Meta descriptions don't directly impact rankings, but they massively impact Click-Through Rate (CTR). High CTR signals to Google that your page satisfies the search intent.
If you just tell an API: "Write a meta description for my page about Python SEO.", you get generic, robotic garbage.
Here is an advanced Chain-of-Thought System Prompt you can use internally or build into your automated tooling.

What is Chain-of-Thought (CoT)?

Chain-of-thought prompting forces the language model to break down its reasoning step-by-step before outputting the final answer. This drastically improves the quality and logic of the generated text.

The Copy-Paste System Prompt

Copy this exact prompt and provide it to Claude 3.5 Sonnet, GPT-4o, or Gemini 1.5 Pro. Use it as the system instruction if you're hitting the API.
text
You are an elite, conversion-focused Technical SEO Copywriter. 
Your goal is to write a highly compelling, high-CTR meta description (HTML snippet) under 155 characters.

I will provide you with:
1. Target Keyword
2. My Page Content Summary
3. Competitor 1 Description
4. Competitor 2 Description
5. Competitor 3 Description

IMPORTANT: Do not write the meta description immediately. First, execute a Chain-of-Thought reasoning process using <thought process> tags. 

Inside the <thought process> tags, do the following:
- Identify the exact intent behind the Target Keyword.
- Analyze the competitors. What angle are they missing? What is the 'Sea of Sameness'?
- Determine the unique value proposition (UVP) of the provided page content.
- Draft 3 variations of the meta description.
- Select the absolute best one that uses active voice, includes a compelling call-to-action (CTA), strictly stays under 155 characters, and stands out from the competitors.

After closing the <thought process> tags, output ONLY the final chosen meta description.

How to use it in production

If you are a Growth Engineer scaling thousands of pages, you don't use the ChatGPT interface. Instead, write a Python script that:
  1. Hits the SERP API (like DataForSEO or ValueSERP) for your target keyword.
  2. Extracts the snippets of the top 3 ranking results.
  3. Retrieves your own article summary.
  4. Injects all this data into the prompt above.
  5. Sends it to the Anthropic API.
  6. Saves the output directly back to your CMS via their API.

Example API Request (Python)

python
import os
import anthropic

client = anthropic.Anthropic(api_key=os.environ.get("ANTHROPIC_API_KEY"))

system_prompt = """
You are an elite SEO Copywriter. Use Chain-of-Thought to write a meta description under 155 characters.
Analyze the target keyword, content summary, and competitor snippets provided in the user message.
"""
user_data = f"""
Target Keyword: Keyword Clustering Python
My Page Content: A tutorial on using Python and NLP to group 10k keywords instantly.
Competitor 1: Learn what keyword clustering is and why it matters for SEO.
Competitor 2: Top 10 tips for grouping your keywords manually in Excel.
Competitor 3: The ultimate guide to SEO spreadsheets.
"""

response = client.messages.create(
    model="claude-3-5-sonnet-20240620",
    max_tokens=500,
    system=system_prompt,
    messages=[
        {"role": "user", "content": user_data}
    ]
)

print(response.content[0].text)

The Meta Effect

By enforcing Chain-of-Thought reasoning and feeding the LLM live SERP context, you guarantee that your automated meta descriptions will be vastly superior to what your competitors are writing manually.
This creates a self-fulfilling prophecy of higher CTR, which leads to better rankings, which leads to more traffic.
Advertisement

Ready to automate more?

Explore our directory of over 546 autonomous AI tools and platforms to drastically increase your output.

Browse AI Tools Directory