title: Fine-Tune an SLM or Prompt an LLM? The Case of Generating Low-Code
    Workflows
summary: Large Language Models (LLMs) such as GPT-4o can handle a wide range of
  complex tasks with the right prompt. As per token costs are reduced, the
  advantages of fine-tuning Small Language Models (SLMs) for real-world
  applications -- faster inference, lower costs -- may no longer be clear. In
  this work, we present evidence that, for domain-specific tasks that require
  structured outputs, SLMs still have a quality advantage. We compare fine-tuning
  an SLM against prompting LLMs on the task of generating low-code workflows in
  JSON form. We observe that while a good prompt can yield reasonable results,
  fine-tuning improves quality by 10% on average. We also perform systematic
  error analysis to reveal model limitations.
paper_authors._id: 683da3efae07a09d565d638e
paper_authors.name: Orlando Marquez Ayala
paper_authors._id: 683da3efae07a09d565d638f
paper_authors.name: Patrice Bechard
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2025-06-03T08:49:25.807Z
paper_authors._id: 607f060442beb4da0f990182
paper_authors.avatarUrl: https://cdn-avatars.huggingface.co/v1/production/uploads/607f060442beb4da0f990182/j5W2tLyU6JqkaTf3kv66s.jpeg
paper_authors.fullname: Patrice Bechard
paper_authors.type: user
paper_authors.user: patricebechard
paper_authors._id: 683da3efae07a09d565d6390
paper_authors.name: Emily Chen
paper_authors._id: 683da3efae07a09d565d6391
paper_authors.name: Maggie Baird
paper_authors._id: 683da3efae07a09d565d6392
paper_authors.name: Jingfei Chen
paper_title: Fine-Tune an SLM or Prompt an LLM? The Case of Generating Low-Code
    Workflows
paper_summary: Large Language Models (LLMs) such as GPT-4o can handle a wide range of
  complex tasks with the right prompt. As per token costs are reduced, the
  advantages of fine-tuning Small Language Models (SLMs) for real-world
  applications -- faster inference, lower costs -- may no longer be clear. In
  this work, we present evidence that, for domain-specific tasks that require
  structured outputs, SLMs still have a quality advantage. We compare fine-tuning
  an SLM against prompting LLMs on the task of generating low-code workflows in
  JSON form. We observe that while a good prompt can yield reasonable results,
  fine-tuning improves quality by 10% on average. We also perform systematic
  error analysis to reveal model limitations.
paper_ai_summary: Fine-tuning Small Language Models yields higher quality for structured output tasks compared to prompting Large Language Models, despite reduced token costs.
paper_ai_keywords: Large Language Models GPT-4o Small Language Models fine-tuning low-code workflows JSON error analysis