Algolia-Central

Knowledge/AgentStudio/evidence/category-pitch-pattern.md

Evidence — Category Page Pitch Pattern

Stateless backend-triggered agent. Takes a categoryPageId input, writes a 5-6 sentence sales pitch grounded in real brands/products from the index. Same prompt verbatim across 6 verticals — only the index changes.

Agent shape

Field Value
Tools 1 — algolia_search_index (single index)
Output Plain text, ≤200 words, 5-6 sentences
Memory Disabled
Suggestions Disabled
Model gpt-4.1-mini
Invocation Backend-triggered, NOT chat

Canonical prompt (verbatim)

You are a sales representative. For each category or subcategory you receive, write a compelling 5-6 sentence sales pitch highlighting the value and usefulness of that subcategory for the user. Explain what types of results or products the user can expect to find based on the category and its typical data sources. You may mention a few example products and brands to make the pitch more engaging. Make sure these products or brands actually exist in the data set provided (use algolia_search_index tool to check this), never invent brands that don't exist in the current category. Keep your response under 200 words. No need for /n/n new lines.
If the category is hierarchical (e.g., {parent} > {child}), only refer to the subcategory (in this case, {child}) and do not mention or include the full hierarchy in your response.

That's the entire prompt. ~120 words. Six verticals use this same prompt with only the example hierarchy text changed (Fashion: "Women > Bags"; Electronics: "Electronics > Computers & Accessories"; B2B: "Cutting Tools & Metalworking > Saw Blades").

Why this works

  • Single task — write a pitch given a category ID.
  • Anti-hallucination via grounding — "Make sure these products or brands actually exist" forces the agent to use the search tool before name-dropping. The algolia_search_index tool is a verification mechanism, not a discovery mechanism.
  • Hierarchical-input rule — "only refer to the subcategory" — explicit handling of compound IDs.
  • ~200-word cap — prevents runaway generation. Sales pitch, not encyclopedia entry.
  • Stateless — no memory, no follow-up. Each invocation is independent.

When this pattern applies for us

Algolia Central probably will need similar agents for backend pipelines:

  • Section/topic landing page generation — describe what's in this content section
  • Customer story summary generation — pitch what's interesting about a case study without deep-reading it
  • Per-vertical homepage hero text — for Sherwin Central, MasterCard Central, etc.

These are NOT chat agents. They're triggered by content management workflows.

Adoption checklist (when building one for Algolia Central)

  • [ ] One backend trigger per use case (cron, content publish hook, on-demand API)
  • [ ] One sentence describing the writing role ("You are a {role} writing for {audience}")
  • [ ] One sentence describing the input shape ("For each {input type} you receive...")
  • [ ] One sentence describing the output ("Write a {N}-sentence {format} highlighting {value}")
  • [ ] One anti-hallucination rule with verification mechanism ("Use algolia_search_index to verify {entities} exist")
  • [ ] One length cap
  • [ ] Zero persona theatre — these are utility generators
  • [ ] Zero tools beyond search verification
  • [ ] Zero memory, zero suggestions

Cost / scale notes

For 100 category pages × 1 generation = 100 LLM calls. At gpt-4.1-mini pricing (~$0.001/call for 200-word output), that's $0.10. Cheap enough to regenerate weekly. Algolia caches the agent's first-message responses (per 07-platform-features) so re-running with the same input is free.

What this evidence card does NOT cover

  • Other content-generation agents (suggestion generators, query builders) — see 04-agent-archetypes §6, §8