Skip to main content

Query Generation

Generate realistic, problem-focused consumer queries using AI to systematically test LLM citation patterns.

Overview

The Query Generation feature uses Claude AI to create queries that mirror real consumer search patterns. Instead of manually writing 20-100 test queries, AI generates them based on your industry, focus area, and target personas.

Why Generate Queries?

Manual Query Creation Problems:

  • ❌ Time-consuming (20+ minutes for 20 queries)
  • ❌ Biased toward your own thinking
  • ❌ Miss common variations
  • ❌ Inconsistent persona coverage

AI-Generated Query Benefits:

  • ✅ Fast (20-100 queries in 10 seconds)
  • ✅ Mirrors real consumer patterns
  • ✅ Comprehensive coverage
  • ✅ Balanced across personas and journey stages

Accessing Query Generation

Navigate to the Generate page:

Dashboard → Generate
URL: /dashboard/generate

Generation Form

Industry Selection

Field: Industry dropdown

Options:

  • home-improvement - Home Improvement
  • saas - SaaS / Software
  • ecommerce - E-commerce / Retail
  • custom - Custom (enter your own)

Purpose: Provides industry-specific context for query generation.

Example:

  • Select home-improvement
  • Claude generates queries about repairs, renovations, DIY projects

Tips:

  • Be specific: "SaaS accounting software" > "software"
  • Use custom for niche industries
  • Start broad, then refine with focus area

Focus Area (Optional)

Field: Text input

Purpose: Narrows query generation to a specific topic within the industry.

Examples:

  • Industry: home-improvement, Focus: DIY plumbing repairs
  • Industry: saas, Focus: team collaboration tools
  • Industry: ecommerce, Focus: outdoor camping gear

When to Use:

  • Use: Targeting specific product category or service
  • Skip: Want broad industry coverage

Impact:

  • Without focus: "How do I renovate my kitchen?", "Best paint colors for living room"
  • With focus: "How do I fix a leaking faucet?", "What tools for replacing sink drain?"

Personas

Field: Multi-select checkboxes

Options:

  • ☑️ Consumer - General public, everyday users
  • ☑️ Professional - Industry experts, B2B buyers
  • ☑️ Beginner - First-time users, novices

Purpose: Generates queries from different user perspectives.

Examples:

  • Consumer: "What's the best running shoe for beginners?"
  • Professional: "What enterprise CRM integrates with Salesforce?"
  • Beginner: "How do I start a blog with no technical skills?"

Recommendation: Select all three for comprehensive coverage.

Distribution:

  • 20 queries → ~7 consumer, ~7 professional, ~6 beginner
  • 50 queries → ~17 consumer, ~17 professional, ~16 beginner

Journey Stages

Field: Multi-select checkboxes

Options:

  • ☑️ Awareness - Learning, education, problem discovery
  • ☑️ Consideration - Comparing options, evaluating solutions
  • ☑️ Decision - Ready to buy, final choice

Purpose: Targets different buyer journey phases.

Stage Characteristics:

StageIntentQuery Examples
AwarenessLearning"What causes kitchen sink leaks?", "Why does my toilet run?"
ConsiderationComparing"Best faucet brands for durability", "Plumber vs DIY cost comparison"
DecisionBuying"Where to buy Delta faucet repair kit?", "Should I hire Roto-Rooter?"

Recommendation: Select all three for complete funnel coverage.

Marketing Insight: Most consumers are in Awareness stage when searching AI, making it critical for AEO.


Query Count

Field: Slider (20-100)

Purpose: Controls how many queries to generate.

Recommendations by Use Case:

CountUse CaseTime
20Quick test, single focus10 sec
50Standard industry analysis15 sec
100Comprehensive market research25 sec

Cost Impact:

  • Generation: ~$0.01 per 100 queries (negligible)
  • Execution: Depends on providers selected (see Execute guide)

Tips:

  • Start with 20 for testing
  • Use 50-100 for production analysis
  • Higher counts = better statistical significance

Problem-Focused Queries

Field: Checkbox (enabled by default)

Purpose: Emphasizes problem-solving queries over brand searches.

Enabled (recommended):

  • "How do I fix a leaking faucet?"
  • "What's the best way to unclog a drain?"
  • "Why is my toilet running constantly?"

Disabled:

  • "Delta faucet reviews"
  • "Home Depot plumbing section"
  • "Roto-Rooter near me"

Why This Matters: Pre-brand awareness queries (problem-focused) are where consumers discover solutions. If your domain isn't cited here, you're invisible during critical decision-making.

Recommendation: Keep enabled for AEO analysis.

Generating Queries

Click Generate

After configuring parameters, click Generate Queries button.

What Happens:

  1. Request sent to Claude API
  2. AI analyzes your parameters
  3. Generates queries based on real search patterns
  4. Returns structured JSON with metadata
  5. Queries displayed in results panel

Duration: 5-15 seconds depending on count.

Review Generated Queries

Results appear below the form:

✓ Generated 20 queries successfully! (8.4 seconds)

1. How do I fix a leaking faucet in my kitchen?
Persona: Consumer | Stage: Awareness | Category: How-to
Intent: Learn basic plumbing repair

2. What tools do I need to replace a bathroom sink drain?
Persona: Beginner | Stage: Consideration | Category: Educational
Intent: Understand required tools for DIY project

... 18 more queries

Metadata Displayed:

  • Persona: Who would ask this
  • Journey Stage: Where they are in buying process
  • Category: Query type (how-to, comparison, problem-solving, educational, decision-making)
  • Intent: What user is trying to accomplish

Quality Check

Review queries for:

Naturalness: Do they sound like real questions? ✅ Relevance: Related to your industry/focus? ✅ Variety: Mix of query types and personas? ✅ Actionability: Can you answer these with content?

If quality is low, adjust parameters and regenerate:

  • Make focus area more specific
  • Try different industry selection
  • Reduce query count for higher quality

Saving Query Sets

After generating queries you're happy with, save them for reuse.

Name Your Query Set

Field: Query Set Name (required)

Best Practices:

  • Be descriptive: Include industry + focus
  • Use consistent naming: "Industry - Focus - Date"
  • Examples:
    • ✅ "Home Improvement - Plumbing DIY"
    • ✅ "SaaS - Team Collaboration - Q1 2025"
    • ❌ "Test Queries" (too vague)
    • ❌ "ABC123" (not descriptive)

Add Description (Optional)

Field: Description text area

Purpose: Explain the query set's purpose and context.

Example:

Consumer queries about DIY plumbing repairs and when to call
professionals. Focus on common household issues like leaks,
clogs, and toilet problems. Generated for Q1 2025 content
strategy planning.

When to Use:

  • Team collaboration (others will see this)
  • Long-term storage (remember context later)
  • Multiple similar sets (differentiate them)

Add Tags

Field: Comma-separated tags

Purpose: Organize and filter query sets in library.

Examples:

  • plumbing, diy, home-repair
  • saas, collaboration, project-management
  • camping, outdoor, gear-review

Best Practices:

  • Use lowercase
  • Be consistent across sets
  • Include: industry, topic, use case
  • 3-5 tags per set

Save to Library

Click Save to Library button.

Success Message: "Query set saved successfully!"

What Happens:

  1. Query set created in database
  2. All 20-100 queries stored individually
  3. Tags associated with set
  4. Execution count initialized to 0

Next Step: Queries now available in Library for execution.

Alternative Actions

Instead of saving, you can:

Export as CSV

Click Export as CSV button.

Output: CSV file with columns:

  • Query Text
  • Persona
  • Journey Stage
  • Category
  • Intent

Use Cases:

  • Import into other tools
  • Share with team via email/Slack
  • Analyze in Excel/Google Sheets
  • Archive for record-keeping

Execute Immediately

Click Execute Now button (appears after generation).

What Happens:

  • Redirects to Execute page
  • Queries pre-loaded in batch mode
  • Skip the Library step
  • Execute right away

When to Use:

  • One-time tests (don't need to save)
  • Immediate results needed
  • Exploratory research

Advanced Generation Techniques

Multi-Focus Strategy

Generate multiple sets with different focus areas:

Set 1: Industry: home-improvement, Focus: kitchen remodeling Set 2: Industry: home-improvement, Focus: bathroom renovation Set 3: Industry: home-improvement, Focus: outdoor landscaping

Benefit: Comprehensive industry coverage.

Persona-Specific Sets

Generate separate sets per persona:

Set 1: All personas: ☑️ Consumer only, Count: 50 Set 2: All personas: ☑️ Professional only, Count: 50 Set 3: All personas: ☑️ Beginner only, Count: 50

Benefit: Deep dive into specific user mindsets.

Journey Stage Testing

Generate sets for each stage:

Set 1: Stages: ☑️ Awareness only, Count: 30 Set 2: Stages: ☑️ Consideration only, Count: 30 Set 3: Stages: ☑️ Decision only, Count: 30

Benefit: Optimize content for funnel stages.

Competitive Analysis

Generate queries with competitor focus:

Focus: "Alternative to [Competitor Name]" Focus: "[Competitor Name] vs [Your Brand]" Focus: "[Competitor Name] review"

Benefit: Understand competitive positioning in AI responses.

Generation Best Practices

Start Broad, Then Narrow

Phase 1: Industry only, no focus (50 queries)

  • Discover common themes
  • Identify unexpected query types

Phase 2: Add specific focuses based on Phase 1 insights

  • Double down on high-potential areas

Use Templates First

Check pre-built templates before generating:

Available Templates:

  • Home Improvement (5 queries)
  • SaaS (3 queries)
  • E-commerce (3 queries)

How to Use:

  1. Review template queries
  2. If relevant, use as examples
  3. Generate similar queries at scale

Generate Weekly

Recommended Cadence:

  • Weekly: 20-50 new queries in your core focus
  • Monthly: 100+ queries for comprehensive analysis
  • Quarterly: Multiple industry segments

Why Regular Generation:

  • Search patterns evolve
  • New products/topics emerge
  • LLM training data updates
  • Competitive landscape changes

Quality Over Quantity

Better:

  • 50 highly relevant, specific queries
  • Well-defined focus area
  • Clear intent

Worse:

  • 100 generic, vague queries
  • No focus area
  • Mixed industries

Troubleshooting

Generation Fails

Error: "Failed to generate queries"

Causes:

  1. Missing ANTHROPIC_API_KEY in environment
  2. Invalid API key
  3. Claude API rate limit
  4. Network issue

Solutions:

  1. Verify .env.local has ANTHROPIC_API_KEY=sk-ant-...
  2. Check Claude dashboard for quota
  3. Wait 1 minute and retry
  4. Check internet connection

Low Quality Results

Problem: Generated queries are generic or off-topic

Solutions:

  1. Make focus area more specific
  2. Reduce query count (50 → 20)
  3. Try different industry selection
  4. Add more context in focus field

Duplicate Queries

Problem: Some queries are very similar

Expected: With 100 queries, some similarity is normal

Solutions:

  1. Reduce count (100 → 50)
  2. Delete duplicates before saving
  3. Use multiple focused sets instead of one large set

Next Steps

After generating and saving queries:

  1. Execute Queries → - Run across LLM providers
  2. Library → - Manage saved query sets
  3. Analytics → - Analyze citation patterns