Flow generation through natural language: An agentic modeling approach (2026) - Shopify

This post details the fine-tuning of a tool-calling agent to generate Shopify Flow workflows from natural language. It introduces a novel approach using Python as an intermediate representation (DSL) for LLMs, coupled with a round-trip transpiler to Shopify's native JSON DSL. Key contributions include strategies for building training datasets from existing production workflows, meticulous mirroring of production environments in training data (tool naming, ordering, response format, system prompts), and optimizing tool interfaces to minimize context by returning lightweight summaries first. The post also discusses the training infrastructure (H200 GPUs, FSDP, Tangle) and highlights the discrepancy between offline benchmark performance and real-world user activation rates, emphasizing the importance of production feedback for out-of-distribution requests.
More from the Structured AI Workflows trail
- Under the River (2026) - Shopify
- Autoresearch isn’t just for training models (2026) - Shopify
- Building a Magic Mirror: AI retail experiences with Remix (2026) - Shopify
- Building production-ready agentic systems: Lessons from Shopify Sidekick (2025) - Shopify
- Introducing Roast: Structured AI workflows made easy (2025) - Shopify