All whitepapers

AI Strategy: Prompts, Schemas & Platform Specs

How ØSTEN uses Vertex AI (Gemini Flash) with strict schema validation and platform character limits to produce production-ready campaigns.

Structured Output & Zod Validation

Unconstrained LLM outputs are incompatible with ad network APIs. An ad headline that exceeds 30 characters fails validation in Google Ads, rejecting the entire campaign payload. ØSTEN enforces:

  • Strict Schemas: JSON output contracts defined with Zod schemas matching Google Ads and Meta Graph API data structures.
  • Exact Character Clamps: 30-character headline ceilings and 90-character description ceilings enforced with programmatic fallback truncation.
  • Keyword Match Type Structuring: Explicit generation of exact, phrase, and broad match variants with corresponding negative keyword lists.

Catalog Grounding

Rather than hallucinating marketing claims, the prompt engine injects context directly from the merchant's live Shopify catalog:

  • Active product titles, SKUs, and categories.
  • Real retail pricing and currency parameters.
  • Inventory availability flags to prevent advertising out-of-stock SKUs.

Defensive Failure Handling

  • Exponential Backoff: Rate-limiting and transient Vertex AI API timeouts are caught with automatic retry policies.
  • Fallback Draft Templates: If external AI inference encounters upstream quota exceptions, the system gracefully degrades to deterministic, high-converting campaign structures.